From: Josh Triplett <josh@joshtriplett.org>
To: leizhen <thunder.leizhen@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Peter Zijlstra <peterz@infradead.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Zefan Li <lizefan@huawei.com>, Xinwei Hu <huxinwei@huawei.com>
Subject: Re: Fwd: [PATCH 1/1] init:add boot option "initramfs_packnum"
Date: Thu, 20 Nov 2014 20:02:34 -0800 [thread overview]
Message-ID: <20141121040233.GB4993@thin> (raw)
In-Reply-To: <546EB5A2.5050604@huawei.com>
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
next prev parent reply other threads:[~2014-11-21 4:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 1:42 [PATCH 1/1] init:add boot option "initramfs_packnum" Zhen Lei
2014-11-21 3:46 ` Fwd: " leizhen
2014-11-21 4:02 ` Josh Triplett [this message]
2014-11-21 6:27 ` leizhen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141121040233.GB4993@thin \
--to=josh@joshtriplett.org \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=huxinwei@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=paul.gortmaker@windriver.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=thunder.leizhen@huawei.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox