LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-07-2011, 02:45 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 51
change the module and create custom kernel


hi

I'd like to change the existing kernel module (driver) file and compile a custom kernel.

Is this the correct way, or pls correct me?

# cd linux-source-2.6.32
# cp /boot/config-$(uname -r) ./.config
# make-kpkg clean
change the driver file /custom_kernel/linux-source-2.6.32/drivers/gpu/drm/i915/i915_drv.h manually
# make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers
# dpkg -i *.deb

Last edited by cccc; 05-20-2011 at 06:55 PM.
 
Old 05-08-2011, 02:17 PM   #2
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Still don't know if these steps are correct?
 
Old 05-11-2011, 08:01 PM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Perhaps other way here to change the kernel module directly instead of kernel compile:

http://www.cyberciti.biz/tips/build-...urce-tree.html

Don't know if it helps in my case and can replace the existing already instelled kernel module.
Or has someone an idea how it should work?

Last edited by cccc; 05-11-2011 at 08:05 PM.
 
Old 05-13-2011, 02:03 PM   #4
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
make sure you install kernel-package, a set of tools for compiling kernels/headers, as well as ncurses, for convenience
Code:
#  apt-get install kernel-package
#  apt-get install libncurses5-dev
This will prepare and then compile the kernel after you have made the changes.
make sure these are running while working within the directory of the kernel source tree.
Code:
#  make oldconfig
#  CONCURRENCY_LEVEL=8 make-kpkg kernel-image --initrd --append-to-version=*-your-kernel-name*
replacing *your-kernel-name* with whatever you want to call the new kernel
then
Code:
#  cd /usr/src
#  dpkg -i *name of your custom kernel .deb*
reboot into your new kernel!
 
1 members found this post helpful.
Old 05-16-2011, 10:08 AM   #5
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Thx a lot it works great, but is it correct if I add kernel_headers on the end?
Code:
# CONCURRENCY_LEVEL=8 make-kpkg kernel-image --initrd --append-to-version=custom.001 kernel_headers
 
Old 05-16-2011, 11:33 AM   #6
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
i always add "--initrd kernel_image kernel_headers " at the end (without quotes), so i'd say: yes.
btw: you probably will want to add the hyphen (-) in front of the custom.001, like posted by mf93,
similar to -append-to-version="-custom.001"
else the resulting name looks a bit strange.
You don't need to compile kernels as root:
http://forums.debian.net/viewtopic.php?p=212790#p212790

Last edited by j1alu; 05-16-2011 at 11:36 AM.
 
1 members found this post helpful.
Old 05-20-2011, 10:28 AM   #7
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Thx I've done the following:
Code:
# CONCURRENCY_LEVEL=8 make-kpkg --initrd --append-to-version=-custom.001 kernel-image kernel_headers
and these packages with these long names were created:
Code:
# ls
linux-headers-2.6.32-custom.001_2.6.32-custom.001-10.00.Custom_i386.deb
linux-image-2.6.32-custom.001_2.6.32-custom.001-10.00.Custom_i386.deb
Can I rename them afterwords?

BTW Sould I do this next time?
Code:
# CONCURRENCY_LEVEL=8 make-kpkg --initrd --append-to-version="-custom.001" kernel-image kernel_headers

Last edited by cccc; 05-22-2011 at 09:22 AM.
 
Old 05-22-2011, 08:00 PM   #8
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
you can name them whatever you want, just make sure to install them with dpkg and then boot into them in grub. it will come up in the boot menu with the custom name you appended
 
1 members found this post helpful.
Old 05-27-2011, 04:13 AM   #9
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
Thx

Last edited by cccc; 05-30-2011 at 10:46 AM.
 
Old 05-30-2011, 10:46 AM   #10
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
BTW I've forgotten:
Code:
# cp /boot/config-$(uname -r) ./.config
or
Code:
# make oldconfig
Should I build custom kernel again?
 
  


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
Create a USB Boot Disk from the Custom Kernel and System Image oxblood Slackware 1 08-30-2009 01:38 PM
Custom kernel 2.6.22 name change from hda to sda bristi Debian 4 07-15-2007 11:27 AM
Custom kernel device driver isalmbio Linux - Kernel 0 06-30-2007 10:50 AM
custom kernel -- additional driver deadlinx Ubuntu 2 09-14-2006 04:36 AM
How to create custom install CD with third party driver built in? Arodef Red Hat 3 04-05-2006 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:20 PM.

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