DSL Tips and Tricks :: compiling drivers

Thanks for the excelent post Clacker!

I've been beaten by a few of the gotchas you pointed out in the past, but I think it's time I tried again!

cd ../
patch -p1 -d linux-2.4.26 < knoppix-kernel.patch
cd linux-2.4.26
make dep

'make dep' won't be enough to prepare sources for building some modules.

To correctly prepare sources for module building you need to begin to compile the kernel ie run 'make'.  But you can cntrl-C very early in the process, just after the 'split' line in fact.  All kernel source files needed for module building with then be correctly prepared.

I made a .uci out of my prepared sources with user.tar.gz placing a symlink from /opt/prepared_sources to /usr/src/linux-2.4.26 or something like that.  As long as another .dsl has been installed first (so that mkwriteable has been run), the symlink will get placed on installing the uci.  So I can mount the sources without risking maxing out my ramdisk.

I haven't posted it to the repo because:

1. I'm not convinced the resulting sources exactly match the running knoppix 2.4.26 kernel ie I'm not sure I trust the knoppix config file.  If they don't, some modules built could be dangerously borked if they don't exactly match the running kernel.

2. A very few progs during compile seem to want the kernel sources to be writeable - I think that might be a hangover from the very early days of linux when, unless I'm mistaken, for example, some prog headers went into the kernel source directory.

sudo apt-get install libncurses5-dev patch

This does not work for me on dsl 3.4/2.4.26.

I get errors about unmet dependencies with libncurses5, libc6...

I do a last try.

How do I compile drivers in DSL?
I'm trying to compile a network driver,
there's a post on this:

I haven't been able to find out how to compile drivers in DSL. This thread is dated and I can't follow it, as stated in the previous post, something is broken.

I'd be very grateful if someone could help. Can't think I'm the only one who's trying to compile a driver in DSL....

Also having trouble compiling a driver, for two onboard Intel 82574L Gb NIC's...


Next Page...
original here.