Trying to make kernel module programming compilation error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-16 3:44 AM
I am trying to build kernel module programme out-of-tree module with the help of ST WIKI document. But unfortunately we are facing the compilation error where while do_installation work. It says mymodule.ko "NO such file or directory".
Note : I am using DEVTOOL. And i attached the link which i used to build our kernel module programme.
https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_Package#Adding_an_external_out-of-tree_Linux_kernel_module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-16 6:18 PM - edited ‎2025-06-16 6:18 PM
Hello @asadullah4571
Can you check if your file is in the same directory you are pointing in your recipe ?
do_install () { # NOTE: unable to determine what to put here - there is a Makefile but no # target named "install", so you will need to define this yourself install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} install -m 0755 ${B}/kernel_module_example.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} }
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-19 4:57 AM
do_install () {
# NOTE: unable to determine what to put here - there is a Makefile but no
# target named "install", so you will need to define this yourself
install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}
install -m 0755 ${B}/kernel_module_example.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}
}
same as like wiki.
I think it will causing the error on Make file
I used this make file and i got the .ko file on the same directory, later I make my own custom recipes and it works well
