2025-03-30 11:17 PM - edited 2025-03-30 11:21 PM
Hi,
I'm trying to add external out-of-tree module in developer package. (following wiki)
After following wiki, I got error message in board(STM32MP157F-DK2) like this.
modprobe: ERROR: could not insert 'kernel_module_example': Exec format error
There was a difference with wiki while proceeding according to wiki's explanation.
Is there anything else I need to do to add external out-of-tree module?
- Ubuntu version (PC) : ubuntu 20.04 lts
- Board : STM32MP157F-DK2
- source code version : 24.11.06 (stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06)
Thanks.
Regards,
Youngjun.
Solved! Go to Solution.
2025-03-30 11:51 PM - edited 2025-03-30 11:51 PM
Hello @Younjun ,
The update folder is the one by default now instead of extra. The location of your module installation folder is good so.
Did you well sourced your SDK before compilation ? If you make "file <your_module>" do you well see this is ARM32 format ?
Last thing to check, did you well reinstall your Linux kernel Image as the magic number version changed by recompiling the kernel, so you need to redeploy the Boot Image kernel part as well as all the other modules.
Kind regards,
Erwan.
2025-03-30 11:51 PM - edited 2025-03-30 11:51 PM
Hello @Younjun ,
The update folder is the one by default now instead of extra. The location of your module installation folder is good so.
Did you well sourced your SDK before compilation ? If you make "file <your_module>" do you well see this is ARM32 format ?
Last thing to check, did you well reinstall your Linux kernel Image as the magic number version changed by recompiling the kernel, so you need to redeploy the Boot Image kernel part as well as all the other modules.
Kind regards,
Erwan.
2025-03-31 12:54 AM
Hello Erwan.
Thank you for replying.
I sourced SDK before complication.
I am not familiar with the embedded Linux environment, so I ask the following basic questions
Is there any documents about external out-of-tree module with recompiling the kernel?
Thansk.
Kind regards,
Youngjun.
2025-03-31 11:23 PM
I resolved the problem.
The problem was path setting.
I set the KERNEL_SRC_PATH to another folder.
And, below process in wiki is working.
Thanks.