[oe] Issues with the system startup when the IMAGE_TYPE is squashfs

Tom Rini trini at kernel.crashing.org
Mon Nov 17 16:44:06 UTC 2008


On Mon, Nov 17, 2008 at 05:31:24PM +0100, Marcin Juszkiewicz wrote:
> Thursday 13 of November 2008 12:19:28 Christian Pössinger napisa??(a):
> > I'm currently building a rootfs that will be stored in a squashfs
> > container. The file is properly created by OpenEmbedded, but I
> > noticed some issues:
> 
> > The second issue comes with the kernel modules. Again, the first
> > system startup will create the modules.dep file inside the
> > /lib/modules/$(uname -a) directory. But as stated before, this is not
> > possible on a read-only filesystem.
> >
> > Is there any way within OpenEmbedded to create those files before the
> > actual rootfs image is packed?
> 
> Each kernel module has postinstall script (added by kernel.bbclass) 
> which calls 'depmod -a' and update-modules. Opkg intercepts depmod calls 
> to make it just one call in 'opkg configure' during first boot. In 
> effect your rootfs has all module dependencies generated on build time. 
> You can probably remove second part of those postinstalls to not call 
> them on device at all.

Another option, if your kernel only builds the modules you want to
install, is have module.dep, etc, be built in the install section of the
kernel recipe and package them up into the kernel-modules package.  The
only slight trick is that you need to do this in kernel_do_install in
kernel.bbclass:
oe_runmake DEPMOD=`which ${TARGET_PREFIX}depmod-2.6` INSTALL_MOD_PATH="${D}" modules_install
Since the kernel does some tests which mean that DEPMOD must be passed
as a full path.

-- 
Tom Rini




More information about the Openembedded-devel mailing list