[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Loadable kernel modules support
Hi folks,
I'm happy to announce that the Microblaze uClinux kernel now supports
loadable kernel modules.
Thanks go to Jari (a Masters student here at UQ) for doing the work on this.
I've submitted the kernel patch to the CVS maintainers, it should be in
soon. One of the changes is to permit the existing drivers (gpio,
ethernet and system_ace) to be created as loadable modules. In the
kernel config, you can now specify "M" for module, instead of just
Yes/No for these drivers.
There's also a uClinux-dist patch that has the necessary changes to
busybox/insmod. I'll get that up on the website later today, when I
update and clean out the Patches page.
Following is an example showing how it works:
/> lsmod
Module Size Used by Not tainted
xilinx_enet 18892 2
/> insmod xilinx_gpio
Using
/lib/modules/2.4.24-uc0/kernel/drivers/char/xilinx_gpio/xilinx_gpio.o
xgpio #0 at 0xFFFF5000 mapped to 0xFFFF5000
Xilinx GPIO registered
/> gpio_test
DIP SW: 11000011
/> lsmod
Module Size Used by Not tainted
xilinx_gpio 2348 0
xilinx_enet 18892 2
/> rmmod xilinx_gpio
/> lsmod
Module Size Used by Not tainted
xilinx_enet 18892 2
/> gpio_test
Unable to open /dev/gpio
pid 29: failed 256
Pretty cool huh? :)
Note here I've created/installed the ethernet driver as a loadable
module as well. The uClinux build process automatically handles the
copying of kernel modules into the romfs/ subtree, and insmod knows
where to look to find them.
One of the reasons this is interesting is because with drivers created
as loadable modules, it allows us to pass parameters to them, so it
makes things like dynamic IRQ and address map handling a lot easier.
Cheers,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/