[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adding modules to the kernel


I have written a module that I would like to include onto the LX board.
I want to be able to {ins,rm,ls}mod it instead of compiling it into the

After making the necessary changes in
arch/cris/drivers{Config.in,Makefile}, I run 'make menuconfig' to enable
my driver as a module and thereby creating the .config file in the
process. Now, I am trying to 'make kernel' from the top level directory.

------- Snip from top level Makefile ----------------------------------
       @xxxxxxx.latest \
              -o ! -f $(AXIS_KERNEL_DIR)/.config; then \
                cp kernelconfig $(AXIS_KERNEL_DIR)/.config ; \
                rm -f kernelconfig.latest ; \
        @xxxxxxx.config \
            2> /dev/null ; then \
                ($(MAKE) -C $(AXIS_KERNEL_DIR) oldconfig \
                 && $(MAKE) -C $(AXIS_KERNEL_DIR) dep \
                 && $(MAKE) -C $(AXIS_KERNEL_DIR) clean) || exit 1; \

This part of the Top-level Makefile (under 'kernel' target) will always
overwrite the .config with kernelconfig.latest.

Wouldn't it be a better strategy to just prompt the user to generate
his/her own .config by running 'make menuconfig' in the os/linux
directory and have kernelconfig.latest as a symlink to os/linux/.config?

How are other developers organizing their own modules? Also, where are
you putting the modules on the filesystem?

Thanks in advance.