Click to See Complete Forum and Search --> : kernel module or built-in


hardigunawan
04-15-2001, 10:55 PM
In compiling the kernel, how do I decide whether I should use include an option as a module or built into the kernel?

I've tried to built my ethernet card driver into the kernel and compiled it. However, my box can't detect it and I can't use the ethernet card. However, when I changed the driver to be installed as a module, it works!

When do I decide to install into the kernel or install as module? Is it because I miss some steps when I install the driver into the kernel?

What I did is:
make mrproper; make xconfig. Once done, I did:
make dep; make clean; make bzImage; make modules; rm -rf /lib/modules/*; make modules_install

then I move my System.map and bzImage into /boot partition and run /sbin/lilo.

Is my step right? Do I have to do:
pnpdump > /etc/isapnp.conf; isapnp /etc/isapnp.conf?

I've done this last time, but couldn't remember what it is for..... :(

pbharris
04-15-2001, 11:40 PM
hello,
here is what i do for making my kernel, everything i can leave as a module i do, why? well to be prefectly honest i am not sure, the only thing i can think of is to save a tiny amount of memory, although it should not matter at all is it is a module or if it is built in.
my way of making a kernel:

1. make mrproper sets some system stuff if i remember correctly.

2. make xconfig the toughest and most important part, picking all the modules, if they should be a module or not - whew!

3. make dep take care of dependencies.

4. make clean dump all the un-needed .o file so they don't mess up and bloat the kernel.

5. make bzImage make the kernel!

6. make bzlilo i am not sure if i need to do this anymore because i always rerun lilo later anyway.

7. make modules make those neat little removable drivers which makes me able to no need to reboot my box.

8. make modules_install - install the aforementioned modules in /lib/modules/kernel_version .

9. Move System.map, vmlinuz and vmlinux to /boot. (i use a copy of /boot and call it new_boot to save the old kernel).

10. run lilo.

11. reboot to see how right or wrong i am.

paul

[ 16 April 2001: Message edited by: pbharris ]