Created attachment 4253 [details] log.do_rootfs POKY: 2.5.M3.rc1 <f49ee61422c867516db252054e993df29f775136> USE CASE : As a developer, I want to be able to build external modules (hello-mod). STEPS TO REPRODUCE: 1. Have clone poky 2. Checkout branch with 2.5.3.rc1 3. Create new layer to work with your own linux kernel name meta-kerneltest(depend to you to name the layer) 4. Copy the hello-mod directory from meta-skeleton to meta-kerneltest 5. Inside build environment , ensure the following line is set on the same file PREFERRED_VERSION_linux-yocto_qemux86-64="[VERSION]%" 6. Set the hello module variable information on conf/local.conf (in your testing build environment), with the following line: MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-hello" 7. Edit the linux-yocto recipe append file and make sure you have only the following line, and save and close the file: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 8. Clean the shared state: $ cd [POKY_PATH]/build $ bitbake virtual/kernel -c cleansstate 9. Compile the hello module: $ bitbake hello-mod 10. Create a minimal image: $ bitbake core-image-minimal 11. Boot the image using QEMU: $ runqemu nographic core-image-minimal 11.1. Once the qemu terminal is ready, verify on it that the hello module was successfully added: $ modprobe hello 11.2. Remove the hello module: $ rmmod hello1 11.3. Power off and exit the qemu terminal: $ poweroff *[VERSION] refer as linux-yocto kernel version (only the first two numbers, for example: 4.10) * Can refer this link for the following step. - Setup (Common Prerequisites) and TC_KD_10 – Building hello-mod https://wiki.yoctoproject.org/wiki/Kernel_Development_Test_Cases EXPECTED OUTCOME: 1. Compilation process should be performed successfully. 2. Image should be compiled without errors. 3. Verify the message "Hello World!"is displayed after executing modprobe on the QEMU terminal. 4. Verify the message "Goodbye Cruel world!" is displayed after removing the module on the QEMU terminal. ACTUAL OUTCOME: 1. In step run bitbake core-image-minimal, got error with function do_rootfs METHOD USED: Done try with both method but still got error related to do_rootfs. 1. Build using clean build folder. 2. Build using fresh poky and build folder
To successfully build the module, please follow the original steps, but place this line (step 6): MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "hello-mod" in your local.conf instead of MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-hello" My results were: $ bitbake hello-mod $ bitbake core-image-minimal $ runqemu nographic core-image-minimal <snip> Poky (Yocto Project Reference Distro) 2.4+snapshot qemux86 /dev/ttyS0 qemux86 login: root root@qemux86:~# modprobe hello [ 22.156996] hello: loading out-of-tree module taints kernel. [ 22.163419] Hello World! root@qemux86:~# rmmod hello [ 34.223320] Goodbye Cruel World! root@qemux86:~# I will investigate if this is a documentation error (obsolete documentation?) or an actual regression. I am also not sure the steps 5,7,8 are actually still needed...
https://patchwork.openembedded.org/patch/149929/
The patch was merged with master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=sumo-next&id=5264dbd39d082a2a2f68b5506cff6761fc936cdf
This bug is fixed. Verify in 2.5 M4 rc1