Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

device driver module

Hello,

I am currently writing a kernel device driver module. Added and modified Makefiles and Kconfig, and it seems to work.

As I am actively developing and debugging code, it takes a long time everytime I change a line in this driver, and had to recompile the entire kernel.

Does anyone how to just remake the module without having to make the entire kernel ?

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you can insert module with

    insmod mymodule

    and remove a module with

    rmmod mymodule

    when your linux is running. However it is necessary to enable module loading and unloading feature, when you configure your kernel

    Have a nice day
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks, but what i really want to know is there a quicker way to generate the module rather than going through

    make

    make linux image;

    E.g. if I change a line of code when debugging the driver, it would take me 2 minutes to find out if there there is an error in the driver code.

    How do I make building the kernel driver module as a separate project ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    please have a look at

    1) http://forum.niosforum.com/forum/index.php?showtopic=2411&hl=
    2) http://forum.niosforum.com/forum/index.php?showtopic=2522&hl=

    it works with the microtronix port.

    but i didn't test it with nioswiki buildroot ( i assume you are using this).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    wiki page updated again. to build module alone inside the kernel tree.