In an sdk built with
bitbake core-image-directfb -c populate_sdk
there is no lib/modules/<kernel_version>/build folder to do kernel modules building, only lib/modules/<kernel_version>.
To my config file I added
TOOLCHAIN_TARGET_TASK_append = " kernel-devsrc kernel-dev packagegroup-core-buildessential"
but still no result. Now I'm building kernel modules over ~/fsl-community-bsp/build/tmp/work/imx6ulevk-poky-linux-gnueabi/linux-imx/4.1.15-r0/build/ folder and it works, but it's an overkill. Working in a team I want to give others toolchain so that they can build kernel modules using it. What do I have to add to config file so that my toolchain would have modules "build" folder? Any solution?
Solved! Go to Solution.
With a bit of studying I learned that build/ folder is actually just a symlink to /usr/src/kernel, did a simple Makefile but still got errors about some scripts aren't being present. So, you have to execute a "make modules_prepare" in kernel folder to make your toolchain ready for kernel modules building. Hope this helps others!
Hi Sudo,
Thats correct! Before compile kernel driver you need to prepare the modules and install any software on your host such as.
$ sudo apt-get install build-essential module-assistant
Then:
$ sudo make modules_prepare
Regards
With a bit of studying I learned that build/ folder is actually just a symlink to /usr/src/kernel, did a simple Makefile but still got errors about some scripts aren't being present. So, you have to execute a "make modules_prepare" in kernel folder to make your toolchain ready for kernel modules building. Hope this helps others!