[oe] [RFC] initramfs support for linux-handhelds-2.6

Koen Kooi koen at dominion.kabel.utwente.nl
Mon Feb 25 09:15:11 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Sokolovsky schreef:
| Hello,
|
| Failing to add generic and fully automated kernel-with-initramfs build,
| I have patch to add external initramfs to kernel for linux-hh. I'd
| still like to establish conventions for other kernel recipes to follow,
| so here're the patch for suggestion. The idea is simple:
|
| 1. KERNEL_INITRAMFS_PATH is set to the full path of cpio.gz image to
| use as initramfs. Empty value (default) means don't use initramfs. If
| file doesn't exist, build fails with an error message (content is left
| to specific recipe - there unfortunately doesn't seem to be a way to
| sensibly provide detailed one in generic case).
|
| 2. KERNEL_INITRAMFS_PATH is considered a distro realm, like for example
| kernel PREFERRED_VERSION. Below, angstrom distro config sets it.

| +KERNEL_INITRAMFS_PATH =
"${TMPDIR}/deploy/uclibc/images/${MACHINE}/initramfs-bootmenu-image-${MACHINE}.cpio.gz"

| +	if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" == "glibc"
]; then

A number of things:

1) Make the initramfs generation a seperate function (or task) that can
be called at will, instead of always being called in do_compile_prepend
2) Keep it simple and keep the kernel and initramfs in the same libc
realm, so a uclibc based initramfs needs a uclibc kernel (I known there
is no such thing, but you get the idea). That way you can just fish it
out of DEPLOY_DIR_IMAGE
3) Add an initramfs-<kernel-name_version>.bb that does

~  require <kernel-name_version>.bb
~  FILESPATH = "/path/magic/whatever"
~  do_compile_prepend() { do_initramfs}

This involves some extra build time ('uclibc' kernel build and a
'uclibc' initramfs kernel build), but is more transparent and less error
prone than your plan. I think it even avoids the dependency problems :)

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHwocfMkyGM64RGpERAg7gAJ0W2JIsJNjLiJoGwAVHdYvmNa8jPACfVc0x
0UDx1orbRuEtQB5eITl23N0=
=8LWE
-----END PGP SIGNATURE-----





More information about the Openembedded-devel mailing list