Page 1 of 1

Installing a kernel module

Posted: Sat Jun 21, 2014 4:15 pm
by ArtGod
Hi,

I have had to compile and install a custom kernel module, because I picked the wrong wireless card for my RedPitaya.

The other day I had the compiler toolchain up and running in a (32bit) Linux VM. With that I could compile the *.ko file and copy it to the SD card together with the firmware binary. Now I could manually install the module using "modprobe <mymodulePath>" via SSH. A "ifup wlan0" brought up my wireless then.

Now I'd like to make this available at boot time. What I've done is trimming and extracting the root image. Mounting it in my Linux and finally adding the *.ko file to the boot filesystem image under /lib/modules/3.9.0-xilinx/. The firmware went to /lib/firemware/. I also modified /etc/modules to contain my module. After zipping and packing the image with "mkimage" it was ready to boot. However the module is not loaded automatically. In the dmesg output I can see the precompiled module coming up, but not the one I compiled myself. "modprobe"ing the module works as a charm; I don't have to give any path now.

Stuck for today, but happy my Linux knowledge helped me that far.

Happy hacking,
ArtGod

Re: Installing a kernel module

Posted: Sun Nov 23, 2014 3:00 pm
by Wolan32
I'm not too experienced in kernel moduls.
But only idea to add you mode probe command to /etc/init.d/rcS just before bring up the wlan0.
So you should have wifi at boot up.