Totally new to compiling


Forum: HD Install
Topic: Totally new to compiling
started by: manishsadh

Posted by manishsadh on Feb. 12 2007,07:36
Hi Guys,

my system : 3.2 frugal on  CF card
using usb for extensions
current extensions : vnc, feh

my problem:

please help me out with compiling this source.
i have a sound device from sis.

the manufacturer gave me the following files.

Makefile
sis7019.c
sis7019.h

what does it take to compile this to get something like sis7019.o which i can just load as a module?

what are the steps to compile this source?

do i need the kernel source and gcc. if so how to set this up
on the usb?


Thanks a lot.

Posted by Juanito on Feb. 12 2007,11:56
There was a very good post on this but I cannot find it...

See post "Dummy USB re-compile for USB boot" - < http://damnsmalllinux.org/cgi-bin....t=16271 >

Stop after applying the knoppix patch, then:

1. Copy your driver files files to usr/src/sis7019
3. cd usr/src/sis7019
2. ./configure
3. make
4. lsmod >oldmodules
5. touch mymarker
6. sudo make install
7. sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | tee files
8. lsmod > new_modules

This next part is verbatim from the post I cannot find:

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.

Posted by ^thehatsrule^ on Feb. 12 2007,14:21
Quote
do i need the kernel source and gcc.
Probably you'll need to grab these from mydsl... one of the gcc* packages and kernelsource (which are actually just the knoppix kernel headers, which should be sufficient)

From the list ...
Quote
Makefile
sis7019.c
sis7019.h


Since there is only a Makefile (and no configure), it appears he only has to do...
Code Sample
make && sudo make install


Where `make` would probably just create the module and store it in the current directory, and `make install` will probably install it to /lib/modules/... etc.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.