[oe] [PATCH] image.bbclass: reorder do_rootfs

Roman I Khimov khimov at altell.ru
Wed Apr 22 09:13:33 UTC 2009


On Monday 30 March 2009 11:59:57 Roman I Khimov wrote:
> -addtask rootfs before do_build after do_install
> +addtask rootfs after do_compile before do_install

BTW, looking at kernel.bbclass again I think with this applied we can simplify
a bit INITRAMFS_IMAGE dependency with something like this (untested, not using
initramfs in this fashion, but would be interested to hear from someone using
it):

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 954c407..fecf90c 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -11,19 +11,19 @@ python __anonymous () {
 
     import bb
     
+    depends = bb.data.getVar("DEPENDS", d, 1)
     kerneltype = bb.data.getVar('KERNEL_IMAGETYPE', d, 1) or ''
     if kerneltype == 'uImage':
-    	depends = bb.data.getVar("DEPENDS", d, 1)
     	depends = "%s u-boot-mkimage-openmoko-native" % depends
-    	bb.data.setVar("DEPENDS", depends, d)
 
     image = bb.data.getVar('INITRAMFS_IMAGE', d, True)
     if image != '' and image is not None:
-        bb.data.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs', d)
+    	depends = "%s %s" % (depends, image)
+
+    bb.data.setVar("DEPENDS", depends, d)
 }
 
 INITRAMFS_IMAGE ?= ""
-INITRAMFS_TASK ?= ""
 
 inherit kernel-arch
 
@@ -90,7 +90,6 @@ kernel_do_compile() {
 		oenote "no modules to compile"
 	fi
 }
-kernel_do_compile[depends] = "${INITRAMFS_TASK}"
 
 kernel_do_stage() {
 	ASMDIR=`readlink include/asm`





More information about the Openembedded-devel mailing list