On 13-10-03 8:58 PM, Khem Raj wrote:

On Oct 3, 2013, at 5:02 PM, Bruce Ashfield <bruce.ashfi...@windriver.com> wrote:

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.ashfi...@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};

This was cd ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}/scripts in my patch but I will 
test out this one too.
but this is ok since

Thanks. I went with habit and did it right from the top level. I see
modpost in my sysroot, but I definitely want to get your confirmation
that it works for you as well.

Bruce


ifeq ($(KBUILD_EXTMOD),)
# Additional helpers built in scripts/
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
          asm-generic
         $(Q)$(MAKE) $(build)=$(@)


+         oe_runmake scripts
+       )
}

kernel_do_configure() {
--
1.8.1.2



_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to