Bug 3757

Summary: Building a kernel module on target image fails (pre 1.4M3)
Product: [Yocto Project Subprojects] Kernel Reporter: Stefan Stanacar <sstncr>
Component: linux-yoctoAssignee: Darren Hart <dvhart>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, sgw
Version: 1.4   
Target Milestone: 1.4 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Stefan Stanacar 2013-01-18 13:41:28 UTC
poky commit 9eb88ceb39b7d0b8ddc6487e61ce8edadef10ec4

1. Create a qemux86-64 core-image-sato-sdk image.
2. Run the image under QEMU.
3. Go to /usr/src/kernel and run "make scripts && make menuconfig"
4. Mark a kernel feature as a module (M) and save the configuration.
5. Run make && make modules_install in order to compile and install the module.

Output when running make:

root@qemux86-64:/usr/src/kernel# make
make[1]: Nothing to be done for `all'.
make[1]: *** No rule to make target `arch/x86/tools/relocs.c', needed by `arch/x86/tools/relocs'.  Stop.
make: *** [archscripts] Error 2
Comment 1 Darren Hart 2013-01-21 17:12:10 UTC
The /usr/src/kernel directory is only intended to contain the headers, scripts, tools, and Makefiles necessary to build EXTERNAL modules. it does not contain ALL of the sources, and is not intended to rebuild parts of the original build.
Comment 2 Stefan Stanacar 2013-01-29 16:57:44 UTC
Oki, thanks Darren. The test case was unclear, I've update it.
Compiling and loading an external module works just fine.