[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141121040233.GB4993@thin>
Date: Thu, 20 Nov 2014 20:02:34 -0800
From: Josh Triplett <josh@...htriplett.org>
To: leizhen <thunder.leizhen@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Peter Zijlstra <peterz@...radead.org>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Zefan Li <lizefan@...wei.com>, Xinwei Hu <huxinwei@...wei.com>
Subject: Re: Fwd: [PATCH 1/1] init:add boot option "initramfs_packnum"
On Fri, Nov 21, 2014 at 11:46:42AM +0800, leizhen wrote:
> During the development phase, we usually enlarge initrd-end to reserve more
> memory than the initfs zip exactly occupied. Then we can easily add or delete
> files in zip package, without generate fdt again and again. But unfortunately,
> if too many zeros followed initfs zip, it will take a long time to break the
> loop.
>
> while (!message && len) {
> ... ...
> if (!*buf) {
> buf++;
> ... ...
> continue;
> }
>
> So, use the boot option "initramfs_packnum" to specify how many zip packages
> in each initrd area. When the specified number of packages decompressed in one
> area, immediately terminate the loop. Have no impact on current use by default.
This seems like the wrong approach to me. Rather than changing Linux to
ignore excess data in the initramfs, could you change your bootloader to
pass the true length of the initramfs to Linux? Even if you reserve
extra space, if you know how much data you've actually included, you
could have your bootloader pass that information to Linux.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists