Max's Hole in Cyberspace 3.0

Adding a custom driver to Slax

Posted on Wednesday, 23rd of March 2011 10:27:50 PM by Max Bainrot. Permalink

Here is my quick blog post on how to add a custom driver, in this quickie tutorial I will be adding the e1000e driver.

  1. Download slax (make sure you have the SLAX-DEVELOP modules)
  2. Boot slax (I recommend a vm so you can save your stuff, else bring a flashy to copy the stuff over)
  3. Login as root (default password for slax is un: root, pw: toor)
  4. Compile your driver (duh)
  5. Copy driver files to your home directory remembering the file structure they're ment to be in.
  6. cd ~
  7. cp /boot/initrd.gz ~/
  8. mkdir initmnt
  9. gzip -d initrd.gz
  10. mount -o loop initrd initmnt/
  11. Drop the files where they are meant to be (at time of writing and for the e1000e driver its 
    /lib/modules/2.6.27.27/kernel/drivers/net/e1000e and you want the e1000e.ko file)
  12. Fire up vi and edit ~/initmnt/rclinux (or simular)
  13. Add the following line around where it loads all the modules for drivers
    insmod /path/to/your/driver/driver.extension
    e.g. insmod /lib/modules/2.6.27.27/kernel/drivers/net/e1000e/e1000e.ko
  14. Save your changes to the linuxrc/rclinux
  15. cd ~
  16. umount initmnt/
  17. gzip initrd
  18. copy the initrd.gz to another computer (via scp, flashdrive etc)
  19. Remaster the slax iso and replace the old initrd.gz with your new shiney one :)
  20. ????
  21. PROFIT :D

Why did I take the effort to do this???? because I plan on designing a cluster setup :) Details coming soon

When I get time I will do a better write up for those who can't follow my super excited hasty post :D