cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying an external in-tree Linux kernel module unsuccessfully

tpeng.1
Associate III

Following the instruction from https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Modifying_the_Linux_kernel_device_tree

.........

root@stm32mp1:~# modprobe vivid

[ 903.683914] cec: version magic '4.19.94 SMP preempt mod_unload modversions ARMv7 p2v8 ' should be '4.19.94 SMP preempt mod_unload ARMv7 p2v8 '

modprobe: ERROR: could not insert 'vivid': Exec format error

(My firmware version: ST OpenSTLinux - Weston - (A Yocto Project Based Distro) 2.6-openstlinux-20-02-19 stm32mp1)

Not know why. Need your help

1 ACCEPTED SOLUTION

Accepted Solutions
Hi ArmandG,
Thank you!
I did retest it again following the instruction. It works now.
Regards,
Tim

View solution in original post

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @tpeng.1​ 

This error may come from mistmatch between version used to compile ( SDK, source) and the one already flash on your target.

Are you aligned on openstlinux-20-02-19 for all ?

Hope it help

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Hi Olivier,
Thank you.
My components for stm32mp157c-dk2:
en.FLASH-stm32mp1-openstlinux-20-02-19.tar.xz
en.SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar.xz
en.SOURCES-stm32mp1-openstlinux-20-02-19.tar.xz
The vivid.ko file size is around 3420936 bytes after compiled in my side. But the original file size in TF card is 178488 bytes. Obviously something is wrong during my compile stage.
Regards,
Tim
ArmandG
ST Employee

Hi @tpeng.1​,

Have you been able to solve your problem ?  On our side we verified with the default image "en.FLASH-stm32mp1-openstlinux-20-02-19.tar.xz" as you and it's working well.

In the case you couldn't solve your problem, I suggest you to start over the tutorial to make sure you have not forgotten any instructions (can you make a screenshot of what you entered in the terminal ? Maybe some other errors occurred while following steps).

Regards,

Armand

Hi Armand,
My steps:
1. Configure on a build directory
[cid:image003.png@01D604E5.388069D0]
[cid:image004.png@01D604E5.388069D0]
[cid:image008.png@01D604E5.388069D0]
1. * Build kernel module
[cid:image012.png@01D604E5.388069D0]
1. Generate output build artifacts
[cid:image013.png@01D604E5.388069D0]
1. Check vivid.ko file size is 3.5M, why it so big comparing to it in the en.FLASH-stm32mp1-openstlinux-20-02-19.tar.xz. Does it contain debugger information ?
[cid:image018.png@01D604E5.388069D0]
Br,
Tim

​Hi @tpeng.1​ ,

I cannot see your screenshots, you have to use the attachment function to upload them.

By the way I also have a 3.5M vivid.ko file, the size is okay...

Regards,

Armand

Hi ArmandG,
Thank you!
I did retest it again following the instruction. It works now.
Regards,
Tim