From: Ferry Toth <ftoth@exalondelft.nl>
To: yocto@yoctoproject.org
Subject: Re: How to build initramfs with modules but without bzImage
Date: Mon, 22 May 2017 22:11:51 +0000 (UTC) [thread overview]
Message-ID: <ofvnn7$ngp$1@blaine.gmane.org> (raw)
In-Reply-To: 3320411.ypKkNcmLs6@chromium
Op Mon, 22 May 2017 00:05:41 +0200, schreef Ferry Toth:
> I am building 2 images. One has my rootfs, the other builds a kernel
> with builtin initramfs.
>
> To build the initramfs I did the following:
> In the .../conf directory, I create a file named initramfs.conf and add
> the following:
>
> INITRAMFS_IMAGE = "core-image-minimal-initramfs"
> INITRAMFS_IMAGE_BUNDLE = "1"
>
> IMAGE_FSTYPES = "cpio.gz"
>
> Then to build the initramfs based on the core-image-base recipe, I
> execute the following bitbake command:
>
> bitbake -R conf/initramfs.conf core-image-minimal-initramfs
>
> When it completes, there is a kernel + initramfs file in the .../tmp/
> deploy/images/..../ directory.
>
> This image boots to the init script, but then hangs as the mmc drivers
> have not been included.
>
> Now I create a core-image-minimal-initramfs.bbappend file and
> PACKAGE_INSTALL the modules I need (also tried kernel-modules).
>
> Unfortunately this also installs the kernel bzImage in the /boot
> directory, that appears to be a dependancy. This adds another 6MB to my
> initramfs, which is now to load.
>
> I expect it should be possible to add the modules without adding the
> kernel, but haven't been able to find a way to do that. Or it should be
> possible to remove the contents of /boot after do_rootfs.
>
> But I have no clue how to do that.
>
> Or am I just generating the initramfs in the wrong way?
Thanks people especially paulg and khem on irc,
I added to my core-image-minimal-initramfs.bbappend:
ROOTFS_POSTPROCESS_COMMAND += "clobber_unused"
clobber_unused () {
rm ${IMAGE_ROOTFS}/boot/*
}
This shrink my initramfs just enough to boot. Of course I can remove more
files if needed, by adding dir's to the clobber function.
next prev parent reply other threads:[~2017-05-22 22:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 22:05 How to build initramfs with modules but without bzImage Ferry Toth
2017-05-22 22:11 ` Ferry Toth [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-21 21:54 Ferry Toth
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='ofvnn7$ngp$1@blaine.gmane.org' \
--to=ftoth@exalondelft.nl \
--cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.