<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Below, is the error and a heavily edited log file. For those in Wind River, the issue is LIN10-858. Btw, there is duplicate script building code in my patch
because I forgot to take it out of do_compile_kernelmodules() which is where I first moved it to.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Joe<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="font-family:"Courier New""> LD /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/built-in.o
<br>
CC [M] /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/hello.o
<br>
Building modules, stage 2. <br>
MODPOST 1 modules <br>
/bin/sh: scripts/mod/modpost: Permission denied <br>
make <br>
[3]: *** [/home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work-shared/intel-skylake-avx512-64/kernel-source/scripts/Makefile.modpost:91: __modpost] Error 126
<br>
make[2]: *** [/home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work-shared/intel-skylake-avx512-64/kernel-source/Makefile:1475: modules] Error 2
<br>
<br>
(modpost is under work-shared)<br>
<br>
<br>
<br>
<br>
<br>
[2017-07-13 21:02:39.512674040-07:00] NOTE: recipe hello-mod-0.1-r0: task do_make_scripts: Started<br>
<br>
[2017-07-13 21:02:39.648216523-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_make_scripts: Started<br>
<br>
[2017-07-13 21:02:44.190642236-07:00] NOTE: recipe hello-mod-0.1-r0: task do_configure: Started<br>
<br>
[2017-07-13 21:02:44.308167085-07:00] NOTE: recipe hello-mod-0.1-r0: task do_configure: Succeeded<br>
<br>
[2017-07-13 21:02:45.074545820-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_configure: Started<br>
<br>
[2017-07-13 21:02:45.077889943-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_configure: Succeeded<br>
<br>
[2017-07-13 21:02:59.371609194-07:00] NOTE: recipe hello-mod-0.1-r0: task do_make_scripts: Succeeded<br>
<br>
[2017-07-13 21:03:00.149468691-07:00] NOTE: recipe hello-mod-0.1-r0: task do_compile: Started<br>
<br>
[2017-07-13 21:03:02.840652134-07:00] ERROR: hello-mod-0.1-r0 do_compile: oe_runmake failed<br>
[2017-07-13 21:03:04.406712693-07:00] ERROR: hello-mod-0.1-r0 do_compile: Function failed: do_compile (log file is located at /home/wrlbuild/builds/builds-c23c9015-5785-4a83-8075-2a2fa9401ba3/wrlinux-std-sato_intel-skylake-avx512-64_world_10/tmp/work/intel_skylake_avx512_64-wrs-linux/hello-mod/0.1-r0/temp/log.do_compile.110776)<br>
<br>
[2017-07-13 21:03:04.407703129-07:00] NOTE: recipe module-debug-example-0.99-r0: task do_make_scripts: Succeeded<br>
<br>
<br>
<br>
<o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
<br>
<b>Sent:</b> Friday, July 21, 2017 10:30 AM<br>
<b>To:</b> Slater, Joseph<br>
<b>Cc:</b> Patches and discussions about the oe-core layer<br>
<b>Subject:</b> Re: [OE-core] [oe-core][PATCH 1/1] modules: move creation of some module related tools<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 21, 2017 at 1:13 PM, Joe Slater <<a href="mailto:jslater@windriver.com" target="_blank">jslater@windriver.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">You are changing some core code that has been protecting our builds for<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">quite some time .. yet, you have no example of the errors that are being<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">seen, and no proof that this actually fixes the problem (and that it doesn't<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">introduce other issues).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">i.e. how are the lock files no protecting this in whatever is breaking for you ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Looking at the change, I'm not convinced it is the right thing to do.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">i.e. putting something in kernel.bbclass that is only used by the modules<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">is less than ideal, without some sort of justification.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Bruce<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><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.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.lock"<br>
+<br>
kernel_do_install() {<br>
#<br>
# First install the modules<br>
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass<br>
index 6fe77c0..c1fe191 100644<br>
--- a/meta/classes/module-base.bbclass<br>
+++ b/meta/classes/module-base.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_kernelmodules"<br>
+# do_make_scripts() used to be in here, but is now in kernel.bbclass<br>
+do_configure[depends] += "virtual/kernel:do_make_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.lock"<br>
-do_make_scripts[depends] += "virtual/kernel:do_shared_workdir"<br>
-<br>
EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"<br>
<br>
MODULES_INSTALL_TARGET ?= "modules_install"<br>
<span class="hoenzb"><span style="color:#888888">--</span></span><span style="color:#888888"><br>
<span class="hoenzb">2.7.4</span><br>
<br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">_______________________________________________</span><br>
<span class="hoenzb">Openembedded-core mailing list</span><br>
<span class="hoenzb"><a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a></span><br>
<span class="hoenzb"><a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a></span></span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>