Bug 5402

Summary: Not possible to build a third party module.
Product: [Yocto Project Subprojects] Kernel Reporter: Ferite <chamac2>
Component: kernel-toolingAssignee: Bruce Ashfield <bruce.ashfield>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, bluelightning, dvhart, yp.kernel.watcher, yp.watcher
Version: unspecified   
Target Milestone: 1.6 M4   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Ferite 2013-10-29 00:06:11 UTC
When a third party module (previosly tested on other distros) is going to be built on the same target system (Linux minnow 3.8.13-yocto-standard #1 SMP PREEMPT Wed Jul 3 09:03:06 CEST 2013 i686 GNU/Linux), the follow errors are present:

/bin/sh: /usr/src/kernel/scripts/recordmcount: No such file or directory

solved it with "make recordmcount"

/bin/sh: scripts/basic/fixdep: No such file or directory

solved it with "make fixdep"

/bin/sh: scripts/mod/modpost: No such file or directory

I could not compile this. I got "modpost.h:12:23: fatal error: elfconfig.h: No such file or directory".

If I try to "make modules" I get "*** No rule to make target `arch/x86/tools/relocs.c', needed by `arch/x86/tools/relocs'.  Stop."
Comment 1 Bruce Ashfield 2013-10-29 05:12:41 UTC
Can you confirm a few details ? Are you using the SDK on the
target? .. or even building on the target in general ? If so,
this is a known item, and we have an enhancement request filed
to recreate the support scripts for on target module building.

If this is something else, can you add your exact configuration
and build steps to the bug?
Comment 2 Ferite 2013-10-30 00:39:51 UTC
Yes, I am building the module on the same target system. Not crosscompiling nor SDK's.
Comment 3 Ferite 2013-10-30 00:45:51 UTC
The general procedure I followed was to install kernel-dev, set the path to the make file of the kernel in the make file of the module to be build, and then, to run the make. Thats is when the reported errors happened.
Comment 4 Bruce Ashfield 2013-10-30 02:49:17 UTC
This is expected (at the moment), there are open enhancements
to prepare the SDK to build modules by default, and since the
SDK uses the kernel-dev package, you'll have the same results
just using it.

The scripts that support module building are not in the kernel-dev
package, since we can't mix architectures (as one of several 
QA errors you get if they are left in place).

So after install (in the sysroot or on the target), you need to
restore the scripts. If you head to the installed kernel source
tree and do a 'make scripts', what is your result ?

(The enhancement to the SDK is all about ensuring that make
scripts is run during SDK creation, so you don't need this manual
step anymore).
Comment 5 Paul Eggleton 2014-01-17 15:07:34 UTC
Given that we have enhancement bug 4389 open for the SDK improvements, do we still need this bug as well?
Comment 6 Bruce Ashfield 2014-01-17 15:11:52 UTC
The SDK enhancements will cover this case and more, so I agree that we don't need this
individual bug, and it can be dup'd.


(In reply to comment #5)
> Given that we have enhancement bug 4389 open for the SDK improvements, do we
> still need this bug as well?
Comment 7 Paul Eggleton 2014-01-17 15:44:42 UTC
Marking as duplicate as per above. Thanks.

*** This bug has been marked as a duplicate of bug 4389 ***
Comment 8 Alexandru Georgescu 2014-07-31 14:09:35 UTC
verified as per above comments.