[oe] Generating slightly different images for different IMAGE_FSTYPES

Martin Jansa martin.jansa at gmail.com
Fri Feb 26 19:07:59 UTC 2010


On Fri, Feb 26, 2010 at 01:48:54PM -0500, Denys Dmytriyenko wrote:
> On Fri, Feb 26, 2010 at 10:07:41AM -0700, Tom Rini wrote:
> > On Fri, 2010-02-26 at 17:54 +0100, Marcin Juszkiewicz wrote:
> > > Dnia pi??tek, 26 lutego 2010 o 17:39:16 Martin Jansa napisa??(a):
> > > 
> > > > We're slowly stripping packages not really needed, but it would be
> > > > nice to remove whole /boot with kernel-image.
> > > 
> > > > Is there better way to solve it or should we try harder to save space
> > > >  somewhere else?
> > > 
> > > Learn about ROOTFS_POSTPROCESS_COMMAND variable present in 
> > > classes/rootfs_*.bbclass files. You can use it to launch your function after 
> > > rootfs is populated.
> > > 
> > > So for example your shr-lite-image has drop_kernel_from_boot function in which 
> > > you check "MACHINE==om-gta01" and if it is then "rm -rf /boot/uImage". After 
> > > your function all normal ext2/ubifs/jffs2/tarball images will be created 
> > > without kernel in them.
> > 
> > Or (as there's a number of ways to do this):
> > PACKAGE_REMOVE = "kernel-image-*"
> > ROOTFS_POSTPROCESS_COMMAND_om-gta01 += "opkg-cl ${IPKG_ARGS}
> > -force-depends \
> >                                 remove ${PACKAGE_REMOVE};"
> 
> This worked for me:
> 
> RDEPENDS_kernel-base = ""
> 
> 
> As kernel.bbclass suggests the following:
> 
> # Allow machines to override this dependency if kernel image files are
> # not wanted in images as standard
> RDEPENDS_kernel-base ?= "kernel-image"

That's also for ALL fstypes of that image.

> > > > Problem is that when we're booting on gta01, than /boot/uImage is used
> > > > so it should be installed in .tar.gz image.

ahh I'm missing "booting from uSD on gta01".

So once more and hopefully better:

so with rootfs in NAND, kernel from different NAND partition is used
(and is ignored in /boot on its jffs2/ubi/ubifs rootfs).

with rootfs on some uSD partition, then kernel is used from /boot/uImage
on the same partition

User can choose which rootfs is booting with every reboot and I don't
want to force every user to modify/reflash bootloader.

Regards,

-- 
uin:136542059                jid:Martin.Jansa at gmail.com
Jansa Martin                 sip:jamasip at voip.wengo.fr 
JaMa                         




More information about the Openembedded-devel mailing list