[OE-core] [PATCH 1/1] kernel: restore scripts in the sysroot

Bruce Ashfield bruce.ashfield at windriver.com
Fri Oct 4 00:02:21 UTC 2013


When building against the sysroot, out of tree modules can require modpost
and other utilities normally found in the kernel's scripts directory. For
the kernel source in the staging dir, these scripts have been removed to
avoid mixing archiectures when packaging kernel-dev (among other things).

Rather than further complicate the kernel's install rule, or its packaging,
we can jump into the sysroot and restore the scripts by building them, hence
making them available to packages that need them.

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
---
 meta/classes/kernel.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 4acfb7e..d856e31 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -294,6 +294,14 @@ do_install[prefuncs] += "package_get_auto_pr"
 
 sysroot_stage_all_append() {
 	sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
+
+	# Restore kernel scripts in the sysroot, since they had to be removed during
+	# packaging to avoid mismatched arch QA errors, but are required/useful when
+	# packages like out of tree kernel modules are built. Rather than playing QA
+	# games, it is easier to just do this work in the sysroot.
+	( cd ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH};
+	  oe_runmake scripts 
+	)
 }
 
 kernel_do_configure() {
-- 
1.8.1.2




More information about the Openembedded-core mailing list