All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core] unwanted linux kernel image added to /boot directory
       [not found] <166CA878538D6557.30053@lists.openembedded.org>
@ 2021-03-16  3:13 ` Scott Branden
  2021-03-16 10:47   ` Max Krummenacher
  2021-03-16 18:24   ` Denys Dmytriyenko
  0 siblings, 2 replies; 10+ messages in thread
From: Scott Branden @ 2021-03-16  3:13 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

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:

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
> 
> 
> 
> 
> 


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4212 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  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 18:24   ` Denys Dmytriyenko
  1 sibling, 1 reply; 10+ messages in thread
From: Max Krummenacher @ 2021-03-16 10:47 UTC (permalink / raw)
  To: scott.branden, openembedded-core

Hi

Am Montag, den 15.03.2021, 20:13 -0700 schrieb Scott Branden via lists.openembedded.org:
> 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:
> 
> 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?
> > 

One usually does in the machine configuration:

RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""

Max


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-16 10:47   ` Max Krummenacher
@ 2021-03-16 16:55     ` Khem Raj
  2021-03-16 17:39       ` Denys Dmytriyenko
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2021-03-16 16:55 UTC (permalink / raw)
  To: Max Krummenacher
  Cc: Scott Branden, Patches and discussions about the oe-core layer

On Tue, Mar 16, 2021 at 3:47 AM Max Krummenacher <max.oss.09@gmail.com> wrote:
>
> Hi
>
> Am Montag, den 15.03.2021, 20:13 -0700 schrieb Scott Branden via lists.openembedded.org:
> > 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:
> >
> > 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?
> > >
>
> One usually does in the machine configuration:
>
> RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""

this should work too.
>
> Max
>
>
> 
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-16 16:55     ` Khem Raj
@ 2021-03-16 17:39       ` Denys Dmytriyenko
  0 siblings, 0 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-16 17:39 UTC (permalink / raw)
  To: Khem Raj
  Cc: Max Krummenacher, Scott Branden,
	Patches and discussions about the oe-core layer

On Tue, Mar 16, 2021 at 09:55:53AM -0700, Khem Raj wrote:
> On Tue, Mar 16, 2021 at 3:47 AM Max Krummenacher <max.oss.09@gmail.com> wrote:
> >
> > Hi
> >
> > Am Montag, den 15.03.2021, 20:13 -0700 schrieb Scott Branden via lists.openembedded.org:
> > > 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:
> > >
> > > 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?
> > > >
> >
> > One usually does in the machine configuration:
> >
> > RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
> 
> this should work too.

That will affect all the images, not just the specific initramfs:
https://lists.openembedded.org/g/openembedded-core/message/149546

-- 
Denys

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  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 18:24   ` Denys Dmytriyenko
  1 sibling, 0 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-16 18:24 UTC (permalink / raw)
  To: scott.branden; +Cc: openembedded-core

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-16 18:36     ` Denys Dmytriyenko
@ 2021-03-16 18:38       ` Denys Dmytriyenko
  0 siblings, 0 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-16 18:38 UTC (permalink / raw)
  To: openembedded-core

On Tue, Mar 16, 2021 at 02:36:28PM -0400, Denys Dmytriyenko wrote:
> This went off the list - hope you don't mind to put it back...

And, I ended up sending it to the wrong list... Sorry.


> On Tue, Mar 16, 2021 at 10:58:22AM -0700, Scott Branden wrote:
> > Hi Denys,
> > 
> > Thanks for the excellent suggestions - they work.
> > But, these seem really obscure.  I think the kernel.bbclass shouldn't automatically
> > be installing /boot/linux to begin with.  It could be done based on an image feature
> > selection?
> 
> kernel.bbclass does not populate the rootfs, it populates the corresponding 
> package. Any rootfs/initramfs is then built by installing necessary packages 
> into it. Whether to install a package or not is determined by IMAGE_INSTALL 
> and dependencies between the packages.
> 
> 
> > In addition, there seems to be an additional logic error in the present image
> > creation.  If I do not install an external kernel module in the image then /boot/linux
> > is not installed either.  Simply adding an external kernel module to an image shouldn't
> > pull in /boot/linux into the image?
> 
> It is not an error, but a well-defined behavior. In the link below there's a 
> comment about the default dependencies and how to alter them.
> 
> Basically, every kernel-module-* RDEPENDS on kernel-base, which normally 
> RDEPENDS on kernel-image. So, when you insall a module into your rootfs, it 
> follows the dependency chain properly. Hence all the suggestions you received 
> to simply disconnect kernel-image from kernel-base.
> 
> That normally works for most cases, unless you need a mixed behavior that I 
> mentioned. Hence, ROOTFS_POSTPROCESS_COMMAND trick.
> 
> 
> > On 2021-03-15 4:57 p.m., Denys Dmytriyenko wrote:
> > > On Mon, Mar 15, 2021 at 04:39:56PM -0700, 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?
> > > 
> > > There is an ages-old control knob for that, read here:
> > > https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n623
> > > 
> > > In your machine or distro config, you can set this as:
> > > RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
> > > 
> > > But that will affect all your images for a given machine. If you need to only 
> > > do it selectively for your initramfs image, but keep the standard behavior for 
> > > other images, you can do something like this in corresponding recipe:
> > > 
> > > ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
> > > empty_boot_dir () {
> > >         rm -rf ${IMAGE_ROOTFS}/boot/*
> > > }

-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
       [not found]   ` <45e3e633-c15b-9010-a085-e34f6d7d0d1e@broadcom.com>
@ 2021-03-16 18:36     ` Denys Dmytriyenko
  2021-03-16 18:38       ` Denys Dmytriyenko
  0 siblings, 1 reply; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-16 18:36 UTC (permalink / raw)
  To: Scott Branden; +Cc: Khem Raj, Max Krummenacher, openembedded-devel

This went off the list - hope you don't mind to put it back...


On Tue, Mar 16, 2021 at 10:58:22AM -0700, Scott Branden wrote:
> Hi Denys,
> 
> Thanks for the excellent suggestions - they work.
> But, these seem really obscure.  I think the kernel.bbclass shouldn't automatically
> be installing /boot/linux to begin with.  It could be done based on an image feature
> selection?

kernel.bbclass does not populate the rootfs, it populates the corresponding 
package. Any rootfs/initramfs is then built by installing necessary packages 
into it. Whether to install a package or not is determined by IMAGE_INSTALL 
and dependencies between the packages.


> In addition, there seems to be an additional logic error in the present image
> creation.  If I do not install an external kernel module in the image then /boot/linux
> is not installed either.  Simply adding an external kernel module to an image shouldn't
> pull in /boot/linux into the image?

It is not an error, but a well-defined behavior. In the link below there's a 
comment about the default dependencies and how to alter them.

Basically, every kernel-module-* RDEPENDS on kernel-base, which normally 
RDEPENDS on kernel-image. So, when you insall a module into your rootfs, it 
follows the dependency chain properly. Hence all the suggestions you received 
to simply disconnect kernel-image from kernel-base.

That normally works for most cases, unless you need a mixed behavior that I 
mentioned. Hence, ROOTFS_POSTPROCESS_COMMAND trick.


> On 2021-03-15 4:57 p.m., Denys Dmytriyenko wrote:
> > On Mon, Mar 15, 2021 at 04:39:56PM -0700, 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?
> > 
> > There is an ages-old control knob for that, read here:
> > https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n623
> > 
> > In your machine or distro config, you can set this as:
> > RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
> > 
> > But that will affect all your images for a given machine. If you need to only 
> > do it selectively for your initramfs image, but keep the standard behavior for 
> > other images, you can do something like this in corresponding recipe:
> > 
> > ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
> > empty_boot_dir () {
> >         rm -rf ${IMAGE_ROOTFS}/boot/*
> > }

-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-15 23:49 ` [OE-core] " Khem Raj
@ 2021-03-16  0:12   ` Denys Dmytriyenko
  0 siblings, 0 replies; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-16  0:12 UTC (permalink / raw)
  To: Khem Raj; +Cc: Scott Branden, Patches and discussions about the oe-core layer

On Mon, Mar 15, 2021 at 04:49:34PM -0700, Khem Raj wrote:
> On Mon, Mar 15, 2021 at 4:40 PM Scott Branden via
> lists.openembedded.org
> <scott.branden=broadcom.com@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?
> >
> 
> try
> 
> IMAGE_INSTALL_remove = "kernel-image-${KERNEL_IMAGETYPE}"

Kernel image won't be in IMAGE_INSTALL list, but rather in rdeps chain.


> or set
> 
> KERNEL_IMAGE = ""

No such variable.


-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-15 23:39 Scott Branden
  2021-03-15 23:49 ` [OE-core] " Khem Raj
@ 2021-03-15 23:57 ` Denys Dmytriyenko
       [not found]   ` <45e3e633-c15b-9010-a085-e34f6d7d0d1e@broadcom.com>
  1 sibling, 1 reply; 10+ messages in thread
From: Denys Dmytriyenko @ 2021-03-15 23:57 UTC (permalink / raw)
  To: scott.branden; +Cc: openembedded-core

On Mon, Mar 15, 2021 at 04:39:56PM -0700, 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?

There is an ages-old control knob for that, read here:
https://git.openembedded.org/openembedded-core/tree/meta/classes/kernel.bbclass#n623

In your machine or distro config, you can set this as:
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""

But that will affect all your images for a given machine. If you need to only 
do it selectively for your initramfs image, but keep the standard behavior for 
other images, you can do something like this in corresponding recipe:

ROOTFS_POSTPROCESS_COMMAND += "empty_boot_dir; "
empty_boot_dir () {
        rm -rf ${IMAGE_ROOTFS}/boot/*
}

-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core] unwanted linux kernel image added to /boot directory
  2021-03-15 23:39 Scott Branden
@ 2021-03-15 23:49 ` Khem Raj
  2021-03-16  0:12   ` Denys Dmytriyenko
  2021-03-15 23:57 ` Denys Dmytriyenko
  1 sibling, 1 reply; 10+ messages in thread
From: Khem Raj @ 2021-03-15 23:49 UTC (permalink / raw)
  To: Scott Branden; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 15, 2021 at 4:40 PM Scott Branden via
lists.openembedded.org
<scott.branden=broadcom.com@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?
>

try

IMAGE_INSTALL_remove = "kernel-image-${KERNEL_IMAGETYPE}"

or set

KERNEL_IMAGE = ""

> Thanks,
>  Scott
>
> 
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-16 18:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
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>
2021-03-16 18:36     ` Denys Dmytriyenko
2021-03-16 18:38       ` Denys Dmytriyenko

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.