Skip to main content
Visitor II
March 16, 2020
Solved

Modifying an external in-tree Linux kernel module unsuccessfully

  • March 16, 2020
  • 2 replies
  • 1495 views

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

    This topic has been closed for replies.
    Best answer by tpeng.1
    Hi ArmandG,
    Thank you!
    I did retest it again following the instruction. It works now.
    Regards,
    Tim

    2 replies

    Technical Moderator
    March 16, 2020

    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

    tpeng.1Author
    Visitor II
    March 17, 2020
    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
    ST Employee
    March 27, 2020

    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

    tpeng.1Author
    Visitor II
    March 28, 2020
    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
    ST Employee
    March 30, 2020

    ​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