All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] initramfs support for linux-handhelds-2.6
@ 2008-02-24 23:48 Paul Sokolovsky
  2008-02-25  9:15 ` Koen Kooi
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Sokolovsky @ 2008-02-24 23:48 UTC (permalink / raw)
  To: openembedded-devel

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.


--- conf/distro/angstrom-2007.1.conf	bb906c2c783007b1d23eedbf01ff13a271da4595
+++ conf/distro/angstrom-2007.1.conf	a8220fb1f7f5fa4674d43722b241d7aec2dd790a
@@ -60,6 +60,7 @@ PREFERRED_VERSION_linux-handhelds-2.6   
 
 #Preferred version for the kernel on various machines
 PREFERRED_VERSION_linux-handhelds-2.6               ?= "2.6.21-hh20"
+KERNEL_INITRAMFS_PATH = "${TMPDIR}/deploy/uclibc/images/${MACHINE}/initramfs-bootmenu-image-${MACHINE}.cpio.gz"
 PREFERRED_VERSION_linux-ixp4xx                      ?= "2.6.21.6+svnr${SRCREV}"
 RDEPENDS_kernel-base_hx4700 = ""
 RDEPENDS_kernel-base_htcuniversal = ""
============================================================
--- packages/linux/linux-handhelds-2.6.inc	a212a1e08710b140bd482d9538939be6fed39bab
+++ packages/linux/linux-handhelds-2.6.inc	b761bc283eb28d9f018764f3ca504f8e1ea6972d
@@ -54,6 +54,16 @@ do_configure() {
 
 }
 
+do_compile_prepend() {
+	if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" == "glibc" ]; then
+	    if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then
+		echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately"
+		exit 1
+	    fi
+	    cp ${KERNEL_INITRAMFS_PATH} usr/initramfs_data.cpio.gz
+	fi
+}
+
 do_deploy() {
 	install -d ${DEPLOY_DIR_IMAGE}
 	install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_FILENAME}



-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com



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

end of thread, other threads:[~2008-02-25 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-24 23:48 [RFC] initramfs support for linux-handhelds-2.6 Paul Sokolovsky
2008-02-25  9:15 ` Koen Kooi
2008-02-25 10:22   ` Paul Sokolovsky
     [not found]     ` <fpuebs$5oa$1@ger.gmane.org>
2008-02-25 13:57       ` [Angstrom-devel] " Paul Sokolovsky

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.