Solved

Editing the Kernel to make hardware work

Posted on 2004-09-26
7
320 Views
Last Modified: 2010-04-20
Im haveing bother getting my modeom and sound to work in my new Mandrake installation. MY first time working with Linux so im not really sure what needs done. My modem is a Zyxel 630-11 and my soundcrad is an Audigy 2 ZS. I have found drivers for both but im just not sure how to get them installed.

Modem:
http://www.skynet.ie/~caolan/TechTexts/ZyXEL-630-11-HowTo.html

Souncard:
http://sourceforge.net/projects/emu10k1

Both talk about editing the Kernel and recompling it. The instructions say "type this or type that",but where should I be typing these commands? How can I open the Kernel to edit it and how do I compile it again?
0
Comment
Question by:me1191
  • 3
  • 3
7 Comments
 
LVL 11

Expert Comment

by:Jase-Coder
Comment Utility
Heres how to compile your kernel. If you havent got the kernel source on your pc get from the cd you installed mandrake from.

ok you have to be root, you then have to go to the directory where your source is. It is usually something like - /usr/src/linux-2.x.x etc when your in that directory you type make menuconfig this loads a console GUI that allows you to select options and modules. The site: http://www.skynet.ie/~caolan/TechTexts/ZyXEL-630-11-HowTo.html shows a rudimentary version of the type of menu you'll see ie this bit

"Code maturity level options  --->
     [ * ] Prompt for development and/or incomplete code/drivers
 Loadable module support  --->
     [ * ] Enable loadable module support
     [ * ]   Module unloading
 Device Drivers  --->
     Networking support  --->
         Networking options  --->
             < M > Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)
                 < M >   RFC1483/2684 Bridged protocols
             < M > PPP (point-to-point protocol) support
                 < M >   PPP support for async serial ports
                 < M >   PPP support for sync tty ports
                 < M >   PPP Deflate compression          
     USB support  --->
     < M > Support for USB
     [ * ]   USB device filesystem
     < M >   EHCI HCD (USB 2.0)
     < M >   OHCI HCD support
     < M >   UHCI HCD support
 Library routines  --->
     < M > CRC32 functions"

your menu should have the same options to these shown above, on your menu tick what is ticked above and then save your changes keep the default name which will be something like .config.

The you compile the kernel by doing the following commads

 make ; make modules ; make modules_install

once done you have to copy your new bzImage to the /boot I think from within your current directory assuming your in the source dir the path is arch/i386/boot

now cp bzImage /boot

MAKE SURE YOU BACK UP YOUR OLD BZIMAGE THAT IS IN THE /BOOT DIR BEFORE COPYING.

Then edit your /etc/lilo.conf

and add the entry

image = /boot/bzImage
root = /dev/hda1 <- or whatever your /boot partition is on
label = "New Kernel"
read-only

save these changes then exit your editor and type lilo to update lilo

Then resume from step 4 at http://www.skynet.ie/~caolan/TechTexts/ZyXEL-630-11-HowTo.html
0
 
LVL 4

Expert Comment

by:EinarTh
Comment Utility
I haven't looked at the sites, and I don't know this hardware, but dont do this unless you have to. Check:

1) What is the module (driver) called? i.e. what is it that you would either 'modprobe' or 'insmod'? does it already exist on you system?

2) If you're only compiling a new module, you dont have to recompile the whole kernel; just put the source files in place (if they aren't already), and 'make modules modules_install'

3) Most distros configure their kernel so that they have support for pretty much all recent hardware, even if they may not detect them automagically. Try to run adsl-setup first and see what happens.
0
 

Author Comment

by:me1191
Comment Utility
If I run the adsl set up it only finds the nvidia LAN built into my motherboard. So im assuming that it has no idea the modem is connected (usb).

Im having problems acually finding the kernel source code. However I have found a website that allows you to download any kernel version (in my case 2.6.3). The trouble with this is that im not sure what to download as there are five files under this particular kernel version...

linux-2.6.3.tar.bz2        17-Feb-2004 20:35   33M  
linux-2.6.3.tar.bz2.sign   17-Feb-2004 20:35  248  
linux-2.6.3.tar.gz         17-Feb-2004 20:35   41M  
linux-2.6.3.tar.gz.sign    17-Feb-2004 20:35  248  
linux-2.6.3.tar.sign       17-Feb-2004 20:35  248

This is the URL:- http://www.kernel.org/pub/linux/kernel/v2.6/

Also, through trying some screensavers I can see that my graphics card driver has either not been install, or not installed properly during setup. So ive found the driver on ATI's website and im stuck with it too. http://www.ati.com/support/drivers/linux/radeon-linux.html?type=linux&prodType=graphic&prod=productsLINUXdriver&submit.x=17&submit.y=6

How do I run Check.sh? Is there an easier way to find which Xfree86 version im running?

Thankyou for your time.

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:me1191
Comment Utility
I was looking under "Hardware" and I can see my modem listed under scanners. Its listed there along with my LCD screen (matrix orbital). For the modem it says "Port libusb:002:002". So I assume it knows my modem is there, so how can I make it work? If I click the "run config tool" button then it says "alcatel telecom dynamite modem is nt in the scanner database, configure it manually?" (then I will get a list of scanners).

There is no section for modems in Hardware. All I have in there is a section called "Ethernet Card".
0
 
LVL 4

Expert Comment

by:EinarTh
Comment Utility
Which distribution are you using? e.g. RedHat, SuSE, Lindows...?

Chances are your distro is using a kernel with patches that haven't made it into the official 'vanilla' kernel tree yet, so I wouldn't go messing about with that.

once I knows which distribution you're using, it becomes a lot easier to give specific directions.

cheers.
0
 

Author Comment

by:me1191
Comment Utility
I mentioned the distro in the first line of my original post. However, Mandrake 10. Kernel version 2.6.3
0
 
LVL 4

Accepted Solution

by:
EinarTh earned 500 total points
Comment Utility
Right, sorry, I missed that. Don't use mandrake myself, so bear with me...

In that case, you should use their software installation tool (which I dont know what's called) install the package 'kernel-source-???' where ??? matched your kernel version (which you can find by typing 'uname -r' at a command prompt (you can get one by e.g. pressing Alt+F2 and typing 'konsole' there).

Now, still using the command prompt do, 'su - ' to become root (you'll need your root passwd there), then 'cd /usr/src/', then do a 'ls -l'. You should see at least a directory called 'linux-???', where ??? is,again, the kernel version. There should also be a symbolic link called just linux, which points to the linux-??? directory. E.g. on my suse box:
einarth@dude:~ > ls -l /usr/src
lrwxrwxrwx   1 root root  17 2004-09-02 11:09 linux -> linux-2.6.5-7.108
drwxr-xr-x  21 root root 800 2004-09-03 16:47 linux-2.6.5-7.108

if that link isn't there, create it with 'ln -s linux-??? linux'.

Next, 'cd linux' and 'make oldconfig', then 'make menuconfig'. This will start the kernel configuration process. This is where you follow the instructions on the web sites, and in the first comment of this thread to configure support for your hardware.

Once that is done, you compile the kernel with 'make bzImage', then you compile the modules/drivers with 'make modules'. Next you install the modules with 'make modules_install'. This takes time, and requires you to have the development tools installed as well, i.e. gcc, glibc-devel etc.

Now, make sure you have a rescue or a bootable cd ready in case something bad happens (I recommend knoppix), because if the next steps fail for some reason, you propably wont be able to boot.

What you do next is to copy your newly compiled kernel into the boot dir, like so 'cp arch/i386/boot/bzImage /boot/linux-????' (again the ???? means.. you know).

Last thing on the list is to tell your bootloader about the new kernel. I dont know if mandrake uses lilo or grub ( you can 'rpm -qa | egrep -i "lilo|grub"' to find out), but in case of lilo, see comment 2 in this thread. In case of grub, open grub's config file (called either grub.conf or menu.lst and is somewhere under the /boot directory) with a editor (pico or nano or something else). Look for something like this:

title Linux
    kernel (hd0,1)/boot/vmlinuz root=/dev/hda2
    initrd (hd0,1)/boot/initrd

(this is from suse, your will be different, but similar)

Make another entry exactly like the one you found, but give it a different title, and make the kernel argument match your freshly compiled kernel.

Reboot, cross fingers, and once the boot screen comes up, select the new title to boot.

cheers.

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now