<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 1:13 PM, Joe Slater <span dir="ltr"><<a href="mailto:jslater@windriver.com" target="_blank">jslater@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Move creation of tools needed by module building recipes into<br>
kernel.bbclass but invoke the task only from the module recipes.<br>
Without this change, one module recipe can fail trying to use the<br>
tools while another is (re-)building them.<br></blockquote><div><br></div><div>You are changing some core code that has been protecting our builds for</div><div>quite some time .. yet, you have no example of the errors that are being</div><div>seen, and no proof that this actually fixes the problem (and that it doesn't</div><div>introduce other issues).</div><div><br></div><div>i.e. how are the lock files no protecting this in whatever is breaking for you ?</div><div><br></div><div>Looking at the change, I'm not convinced it is the right thing to do.</div><div><br></div><div>i.e. putting something in kernel.bbclass that is only used by the modules</div><div>is less than ideal, without some sort of justification.</div><div><br></div><div>Bruce</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Joe Slater <<a href="mailto:jslater@windriver.com">jslater@windriver.com</a>><br>
---<br>
meta/classes/kernel.bbclass | 15 +++++++++++++++<br>
meta/classes/module-base.<wbr>bbclass | 10 ++--------<br>
meta/classes/module.bbclass | 4 ----<br>
3 files changed, 17 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass<br>
index 7670c71..131387e 100644<br>
--- a/meta/classes/kernel.bbclass<br>
+++ b/meta/classes/kernel.bbclass<br>
@@ -280,6 +280,11 @@ kernel_do_compile() {<br>
<br>
do_compile_kernelmodules() {<br>
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE<br>
+<br>
+ # build modpost, etc<br>
+ make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \<br>
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
+<br>
if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then<br>
oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}<br>
<br>
@@ -296,6 +301,16 @@ do_compile_kernelmodules() {<br>
}<br>
addtask compile_kernelmodules after do_compile before do_strip<br>
<br>
+# Task to ensure the kernel scripts are created. Expected to be invoked<br>
+# only by module building recipes. See module.bbclass for an example.<br>
+do_make_scripts() {<br>
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS<br>
+ make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \<br>
+ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
+}<br>
+addtask make_scripts after do_compile_kernelmodules<br>
+do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.<wbr>lock"<br>
+<br>
kernel_do_install() {<br>
#<br>
# First install the modules<br>
diff --git a/meta/classes/module-base.<wbr>bbclass b/meta/classes/module-base.<wbr>bbclass<br>
index 6fe77c0..c1fe191 100644<br>
--- a/meta/classes/module-base.<wbr>bbclass<br>
+++ b/meta/classes/module-base.<wbr>bbclass<br>
@@ -1,7 +1,8 @@<br>
inherit kernel-arch<br>
<br>
# This is instead of DEPENDS = "virtual/kernel"<br>
-do_configure[depends] += "virtual/kernel:do_compile_<wbr>kernelmodules"<br>
+# do_make_scripts() used to be in here, but is now in kernel.bbclass<br>
+do_configure[depends] += "virtual/kernel:do_make_<wbr>scripts"<br>
<br>
export OS = "${TARGET_OS}"<br>
export CROSS_COMPILE = "${TARGET_PREFIX}"<br>
@@ -18,10 +19,3 @@ KERNEL_OBJECT_SUFFIX = ".ko"<br>
# kernel modules are generally machine specific<br>
PACKAGE_ARCH = "${MACHINE_ARCH}"<br>
<br>
-# Function to ensure the kernel scripts are created. Expected to<br>
-# be called before do_compile. See module.bbclass for an example.<br>
-do_make_scripts() {<br>
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS<br>
- make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \<br>
- -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts<br>
-}<br>
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass<br>
index 391776d..e344960 100644<br>
--- a/meta/classes/module.bbclass<br>
+++ b/meta/classes/module.bbclass<br>
@@ -1,9 +1,5 @@<br>
inherit module-base kernel-module-split pkgconfig<br>
<br>
-addtask make_scripts after do_prepare_recipe_sysroot before do_compile<br>
-do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.<wbr>lock"<br>
-do_make_scripts[depends] += "virtual/kernel:do_shared_<wbr>workdir"<br>
-<br>
EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_<wbr>DIR}"<br>
<br>
MODULES_INSTALL_TARGET ?= "modules_install"<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>