LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-21-2004, 12:12 AM   #1
quentusrex
Member
 
Registered: Aug 2004
Location: Seattle, Washington
Posts: 101

Rep: Reputation: 15
Working with the kernel


I was reading an article in the magazine 'LINUX Journal' August 2004 Issue. It was talking about working with usb devices and it says to modify the kernel module source for a usb device. It shows how to modify the file devio.c then it says 'a simple compile, install and module load' well... umm... i'm new to linux. how would I compile the new file? how would I install it? and how would I load this new module? the rest of the article is very detailed, but this one section assumes these are known actions.

i'm using Debian Sarge with a 2.6.7-1-386 kernel. please help if you can.
 
Old 08-21-2004, 03:21 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: Working with the kernel

Quote:
Originally posted by quentusrex
I was reading an article in the magazine 'LINUX Journal' August 2004 Issue. It was talking about working with usb devices and it says to modify the kernel module source for a usb device. It shows how to modify the file devio.c then it says 'a simple compile, install and module load' well... umm... i'm new to linux. how would I compile the new file? how would I install it? and how would I load this new module? the rest of the article is very detailed, but this one section assumes these are known actions.

i'm using Debian Sarge with a 2.6.7-1-386 kernel. please help if you can.
I haven't tried what you are doing, so this is a bit
generic :) ... may not quite be the same for you
(I'm not using the 2.6 kernel, either).

Commonly there's a Makefile in each subdirectory
of the kernel source tree. Once you're done editing
a simple "make" should compile it. Install in case of
a module means to copy the new .o file to the location
in /lib/modules/<version-mumble>/<>/<> where the
predecessor lives.


Cheers,
Tink
 
Old 08-21-2004, 12:30 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
Hi,
first thing i would do after changing that file is to go to the top level Makefile in the kernel source directory
and put a value after EXTRAVERSION=
just put anything you like there like
EXTRAVERSION=Test
or whatever
now you can install your new kernel without destroying the one you are using now
check that you have a .config file in the top dir
if it's there from default build good if not find the debian default .config
it might be in the kernel source tree somewhere can't remember
copy it to top level source dir and rename it .config
then run
make menuconfig
or
make xconfig (if you have qt developement set up properly)
exit and say yes to save changes or whatever it says
make bzImage
make modules
make modules_install

copy and rename /arch/i386/bzImage to wherever your boot stuff is /boot ???
cp /arch/i386/bzImage /boot/vmlinuz-2.6.7-1-386-Test
make sure you name it something different than the kernel you are using now !
backup /boot/System.map then from the top level kernel source dir
cp Sytem.map /boot/System.map
add a new entry to grub or lilo for your new kernel
(use the old one as a template and leave the old one untouched)
now you can try your new test kernel
if it won't work you still have your old one and you can choose it from bootloader
if you are using lilo seems like you have to run the command "lilo" after you add stuff to the file ??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
Upgrade from working kernel-source-2.6.7-1 & -2 to kernel paniced -3 & -4 Outabux Debian 6 08-15-2004 01:36 PM
I've got Kernel 2.6.6 working nebloof LinuxQuestions.org Member Success Stories 1 05-30-2004 09:48 AM
why X not working in 2.6.3 kernel mardanian Linux - General 6 03-07-2004 10:13 PM
Does anyone have a working 2.4.20 kernel ? lostboy Linux - Distributions 10 03-17-2003 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration