Here are some things I do when compiling drivers and modules for dsl.
The first step is to download and install two packages from the System section of the dsl repository: gcc1.dsl and kernelsource.dsl. I would also recommend gnu-utils.dsl because some programs require it and it makes finding the newly created files easier. You can use the mydsl icon on the desktop, or load them by hand by highlighting the file in emelfm and pressing the top middle "MyDSL" button for each file. If you are on a liveCD or frugal install, it doesn't hurt to download them beforehand and save them and the driver source code to a CD or other drive you can see from dsl so that you can reload again as needed.
Once you use tar -xzvf mydrivers.tar.gz to unpack the driver sources (replace mydrivers.tar.gz with your package's file name), read all of the README and INSTALL files. That will help since the steps are slightly different from driver to driver in terms of compiling, installation, and testing. Most programs use the following three steps:
./configure make sudo make install
If you are running from a liveCD or a frugal install, you might need to run these two lines before you run your "sudo make install" step:
These two lines prevent the "sudo depmod -a" step that many installs need to run from failing due to the read only nature of the modules.* files. You might see an error that says "depmod: Can't open /lib/modules/2.4.26/modules.dep for writing" if you omit this step and your driver may not load correctly. If you see that error, try the above 2 lines and run the "sudo make install" command again.
Now try your driver out. Is it working? Did the README or INSTALL require a "sudo insmod some_driver.o" command to be run?
If you get errors about missing libraries or packages, you can install the dsl-dpkg.dsl package and run:
You can often easily find what packages your missing components are in yourself using the Debian package search. If make or gcc complains about a missing something.h then search for something.h on the Debian packages site and then use "sudo apt-get install whatever" to load the missing package. I've found in my own experience that libncurses5-dev and libreadline4-dev are the most common packages I need to load by far.
One trick I use a lot to create *.dsl packages for drivers is to create a dummy marker file, install the drivers, and then use find to see what files were added or changed. If you want to try this you do need to have gnu-utils loaded. Replace the "sudo make install" command with these five commands:
This creates a file called "files" that contains a list of all of the files that were added or changed during the installation. I then edit that file and remove the leading "/ramdisk" from the lines and also look for things that shouldn't get backed up like any /etc/mtab or /etc/fstab files. Also avoid saving the /lib/modules/2.4.26/modules.* files. I can see what modules were loaded by looking for anything that is different between the old_modules and new_modules files. Then I use the following command to pack up the drivers in a neat little package:
tar -czvf mydriver.dsl --numeric-owner --no-recursion -T files
Then you can load the drivers again from a frugal or liveCD reboot. You will need to load the drivers by hand using sudo insmod mydriver.o so you'll need to look at the output from lsmod to see what drivers you have running before you reboot.
I have had problems with some drivers and packages not finding things they need in the kernelsource.dsl. If that's the case, you may need to download the full kernel sources from www.kernel.org as the file linux-2.4.26.tar.gz, create a /usr/src directory, and untar the kernel sources there. Create a /usr/src directory:
You could also download the smaller linux-2.4.26.tar.bz2 sources which are compressed with bzip. To unpack them use the line tar -xjvf linux-2.4.26.tar.bz2 -C /usr/src (uses a 'j' instead of a 'z'). You can use the j option for bzipped driver sources as well.