Search code examples
linuxlinux-kernellinux-device-driverembedded-linuxtiny-core-linux

How to add new kernel modules to extension files in Tiny Core Linux?


I am running Tiny Core Linux (TCL) and have installed new kernel modules to /lib/modules/<VERSION>/extra/. To have those modules available after a reboot, I need to add them to the extension files. How do I do it?


Solution

    1. Install dependencies:

      tce-load -wi squashfs-tools
      
    2. Create a temporary folder:

      mkdir my-modules
      
    3. Reconstruct the path to the modules in this folder, the content of this folder is going to be copied to / at boot:

      mkdir -p my-modules/lib/modules/<VERSION>/
      
    4. Copy the modules folder into this sub-folder:

      cp -r /lib/modules/<VERSION>/extra my-modules/lib/modules/<VERSION>/
      
    5. Create an extension:

      mksquashfs my-modules/ my-modules.tcz
      
    6. Install the extension:

      sudo cp my-modules.tcz /mnt/<sda1-or-so>/tce/optional/
      
    7. Add my-modules.tcz to the /mnt/<sda1-or-so>/tce/onboot.lst file.

    8. Reboot