From: "Denys Dmytriyenko" <denis@denix.org>
To: scott.branden@broadcom.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] unwanted linux kernel image added to /boot directory
Date: Tue, 16 Mar 2021 14:24:51 -0400 [thread overview]
Message-ID: <20210316182451.GG18041@denix.org> (raw)
In-Reply-To: <510db8eb-fcb2-ca15-3813-b3d52e51fce6@broadcom.com>
On Mon, Mar 15, 2021 at 08:13:33PM -0700, Scott Branden via lists.openembedded.org wrote:
> It appears that inherit of the kernel_do_install routine is called which causes the linux
> image to be installed in /boot. I added a quick and dirty hack to inhibit this behaviour.
> Could someone please comment on a proper solution:
Your change is incorrect - the code below installs the kernel image to be
packaged into corresponding binary package (rpm/ipk/deb) and has nothing to
do with installing it into your rootfs/initramfs. So, you are basically
"neutering" kernel image package, making it empty for any rootfs that tries
to use it.
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index ddff2ddcd2..527f6ca85d 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -428,7 +428,9 @@ kernel_do_install() {
>
> for imageType in ${KERNEL_IMAGETYPES} ; do
> if [ $imageType != "fitImage" ] || [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ] ; then
> - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}
> + if [ "${INHIBIT_IMAGE_IN_BOOT}" != "1" ] ; then
> + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}
> + fi
> fi
> done
>
>
> On 2021-03-15 4:39 p.m., Scott Branden via lists.openembedded.org wrote:
> > Hello,
> >
> > There seems to be a problem when a kernel module is added to an initramfs
> > image.
> >
> > As soon as I add a recipe which installs an external kernel module into an
> > initramfs image it automatically installs the linux kernel image in a
> > /boot directory.
> >
> > This is really bad as it increases the size of the initramfs image.
> >
> > /boot/Image should not be installed in the image when an external kernel
> > module is added to an image.
> >
> > Can someone suggest a fix to this issue?
> >
> > Thanks,
> > Scott
--
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964
next prev parent reply other threads:[~2021-03-16 18:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166CA878538D6557.30053@lists.openembedded.org>
2021-03-16 3:13 ` [OE-core] unwanted linux kernel image added to /boot directory Scott Branden
2021-03-16 10:47 ` Max Krummenacher
2021-03-16 16:55 ` Khem Raj
2021-03-16 17:39 ` Denys Dmytriyenko
2021-03-16 18:24 ` Denys Dmytriyenko [this message]
2021-03-15 23:39 Scott Branden
2021-03-15 23:49 ` [OE-core] " Khem Raj
2021-03-16 0:12 ` Denys Dmytriyenko
2021-03-15 23:57 ` Denys Dmytriyenko
[not found] ` <45e3e633-c15b-9010-a085-e34f6d7d0d1e@broadcom.com>
[not found] ` <20210316183628.GH18041@denix.org>
2021-03-16 18:38 ` Denys Dmytriyenko
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=20210316182451.GG18041@denix.org \
--to=denis@denix.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=scott.branden@broadcom.com \
/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