This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5749: How to add some .ko module in autoload

Hello support!!

I use ti-processor-sdk-linux-am57xx-evm-06.03.00.106 on am5749 (custom board).

I have some driver module and I wanna add it in autoload. But I dont know how because this linux no have rc.local file  or something like that.

Best regards,

Oleg

  • Hi Oleg,

    If you are using the filesystem in SD card then in your am57xx sdk:

    Insert your SD card to your ubuntu machine.

    vi Rules.make

    In the above file:

    Change line: DESTDIR ?=/home/keerthy/work/ti-processor-sdk-linux-am57xx-evm-06.03.00.106/targetNFS

    to

    DESTDIR ?=/media/$user/rootfs

    /* The above should be your SD card rootfs path */

    then do

    make linux_install

    This should take care of installing the module to your SD card filesystem. You can check if the module is present in targetNFS/lib/modules/4.19.94-gbe5389fd85/.

    Let me know if you are able to get that working.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    I would like to do it manualy. I mean in some Linux system it is possible throught rc.local or something like that.

    Here we have  etc/modules-load.d  so... I create My_module.conf  open this file and add My_module but when I start my system and try to make modprobe My_module it is can't find it. When I try to make Insmod I still didn't see my module in loaded list...

    Best Regards,

    Oleg

  • Hi Oleg,

    Could you try the command make linux_install to your SD rootfs and see if that works. There will be a lot
    of different ways but SDK has nicely given command for the very purpose you are trying. Let me know
    if you face issues with module auto probing with that.

    Best Regards,
    Keerthy

  • Hello Keerthy, I know about this method but like I saed I would like to do it through manual operation. I mean I know I should add some config file in etc directory . If you know how to do it exactly please show me the way how to do it:)
  • Oleg,

    That is again generic Linux nothing specific to SDK so the steps are clearly given here :-)

    https://wiki.archlinux.org/index.php/Kernel_module

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Acctualy I can't understand this:  https://wiki.archlinux.org/index.php/Kernel_module 

    I create  file /etc/modules-load.d/ my_driver.conf then I try to do restart and modprobe I see: modprobe: FATAL: Module my_driver not found in directory /lib/modules/4.19.94-rt39-ga242ccf3f1

    Best Regards,

    Oleg

  • Hi Support,

    I resolve it....you just a need to create file here: /etc/modules-load.d/

    For example I call it my_driver.conf it is should include name of  your module  in my case it is just my_driver

    then save it, reload linux and do:

    1) depmod -a

    2) modprobe my_driver

    3) restart linux for a check autoload

    Everything work is good!!!

    Best Regards,

    Oleg