With monolithic kernels, life without modules can be difficult. Particularly, getting new hardware support means using the latest out of tree drivers, or a bleeding edge kernel.org kernel. But no more! To get support for new hardware with older kernels, just update the existing kernel driver in place. The kernel Makefile and the standalone driver makefile aren't exactly compatible, and upgrading from one to another is straight forward if you know what you're doing. By the end of this post, you will.
First you need to locate the kernel source, usually something like /usr/src/linux. Digging further, find the driver source buried in there, somewhere like /drivers/net/e1000e. This should have the driver files and the Makefile. Make a backup of the files, just in case we'll need it later. Since we are going to be updating to the latest driver, we can go ahead and delete everything but the Makefile (and the backups). Find your release driver tarball that you want to use and extract it and move files into the directory so all the *.c and *.h files are in the same location as old *.c and *.h files.
Example: The files in the kernel source would be 82571.c, defines.h, e1000.h, es2lan.c,ethtool.c,hw.h,ich8lan.c,lib.c,netdev.c,param.c and phy.c
Once its updated it should look like this:
e1000.h, e1000_80003es2lan.h, e1000_82571.h, e1000_defines.h, e1000_ich8lan.h, e1000_mac.h, e1000_manage.h, e1000_nvm.h, e1000_phy.h, e1000_regs.h, hw.h, kcompat.h, e1000_80003es2lan.c, e1000_82571.c, e1000_ich8lan.c, e1000_mac.c, e1000_manage.c, e1000_nvm.c, e1000_phy.c, ethtool.c, kcompat.c, kcompat_ethtool.c, netdev.c, param.c
Now the driver directory has the new driver files and the old driver Makefile. The problem is that the Makefile is going to build with the old file names and not the new ones. This will be fixed by updating the kernel driver Makefile.
Here is an example kernel driver makefile file listing:
e1000e-objs := 82571.o ich8lan.o es2lan.o \
lib.o phy.o param.o ethtool.o netdev.o
Looking at the latest driver, you need to make all the *.c files have a *.o in the objects list. EXCEPT the kcompat_ethtool.c. That needs to be left out.
Here is an example of what the line is modified to look like.
e1000e-objs := netdev.o ethtool.o param.o e1000_82571.o e1000_ich8lan.o e1000_80003es2lan.o \
e1000_mac.o e1000_nvm.o e1000_phy.o e1000_manage.o kcompat.o
Now you just make the kernel and enjoy the new driver!
Time for the big review:
1. Update the kernel Makefile updated to use the new files.
2. Use the released driver files.
3. Thanks for using Intel networking products.