<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3787</bug_id>
          
          <creation_ts>2013-01-24 05:19:03 +0000</creation_ts>
          <short_desc>unable to build external kernel modules with linux-yocto 3.4</short_desc>
          <delta_ts>2013-02-28 05:01:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>1.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Khem Raj">raj.khem</reporter>
          <assigned_to name="Darren Hart">dvhart</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>29120</commentid>
    <comment_count>0</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2013-01-24 05:19:03 +0000</bug_when>
    <thetext>I have a kernel module which uses Kbuild infra and expects it from prebuild kernel tree in staging area. I am building it using a recipe for it. However the problem is that the prebuilt kernel staged in staging area does not have scripts/ dir which is prebuilt so the module ends up with errors like

yocto/poky/build/tmp-eglibc/sysroots/qemux86-64/usr/src/kernel/scripts/recordmcount: No such file or directory

I think we are removing quite a bit with 

make -C $kerneldir _mrproper_scripts from kernel.bbclass

that the resulting tree is not good enough for cross building external modules.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29121</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-01-24 05:55:20 +0000</bug_when>
    <thetext>The reason we clean scripts is that the binaries there are for the host and should not be deployed to the target. If you inherit from module.bbclass, it should be running do_make_scripts() to account for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29123</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2013-01-24 06:16:17 +0000</bug_when>
    <thetext>yes I am inheriting module.bbclass using

inherit module

in the external module recipe but I also pass

EXTRA_OEMAKE = &quot;-C ${STAGING_KERNEL_DIR}  M=${B} prefix=${D}&quot;
MAKE_TARGETS = &quot;modules&quot;

is MAKE_TARGETS definition an issue with do_make_scripts ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29221</commentid>
    <comment_count>3</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2013-01-27 06:57:22 +0000</bug_when>
    <thetext>OK I have found the issue and posted a patch to fix it. 

http://lists.linuxtogo.org/pipermail/openembedded-core/2013-January/034951.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30206</commentid>
    <comment_count>4</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-02-28 05:01:58 +0000</bug_when>
    <thetext>commit 62285873e2a6b9375a96a3de7a500205aeb18fb3
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Sat Jan 26 22:20:45 2013 -0800

    module-base.bbclass: Call make instead of oe_runmake in do_make_scripts</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>