|
|||
|
|||
I wrote this how to because my laptop has 4GB of internal memory and with the default kernel that ships with Lets get started building our own custom kernel for Ubuntu Karmic from scratch. UpdatesNovember 13, 2009: Compilation: The NOEXTRAS is no longer used . CONCURRENCY_LEVEL is automatically I wrote the follow up article: How to update your custom Ubuntu Karmic kernel after a new kernel release Introductiongit Arch Flavor PreparationsLet’s get started by preparing our machine for compiling a kernel for Ubuntu Karmic. sudo su - Create a directory where you would like to build your kernel, this directory will hold the kernel source in a Getting the sourcecd /d1/development/kernel/karmic The source code is installed in the directory source. We will create a branch in which we will be doing our modifications. That way the master branch will stay in cd source Press q to get back to the prompt. linux (2.6.31-15.50) UNRELEASED; urgency=low The latest version is the first version after the UNRELEASED section. In this case it is 2.6.31-15.49. Sometime git checkout Ubuntu-2.6.31-15.49 -b core2 This will create a branch called core2. Creating a new configI’ll be using the method of creating a new flavor, this adds a bit more work but you can always compile the We’ll use the generic flavor as the base for our own flavor,core2. cp debian.master/config/i386/config.flavour.generic debian.master/config/i386/config.flavour.core2 To make changes to the configuration file we need to edit the configuration file. The kernel developers have debian.master/scripts/misc/kernelconfig editconfig This script will show you which configuration is next to be edited. You should not make changes, you can * Run menuconfig on i386/config.flavour.core2... Press a key. Make your changes, save the configuration and then keep going until the script ends. When you’re done, make a backup of the config flavor file. cp debian.master/config/i386/config.flavour.core2 ../. Now we need to clean up the git tree git reset --hard Getting ready for compilationBecause we are going to be creating a new flavor based on a existing flavor (generic in my case) we need ls debian.master/abi cp debian.master/abi/2.6.31-14.48/i386/generic debian.master/abi/2.6.31-14.48/i386/core2 Copy our flavored configuration file back. cp ../config.flavour.core2 debian.master/config/i386/ We need to edit the following files
In the next few parts I’ll explain what you need to change File: debian.master/scripts/misc/getabisSearch for the line: getall i386 generic generic-pae 386 Change it in: getall i386 generic generic-pae 386 core2 File: debian.master/rules.d/i386.mkSearch for the line: flavours = generic generic-pae 386 Change it in: flavours = generic generic-pae 386 core2 We need to make the compilation process aware of our own flavor we want to compile. cp debian.master/control.d/vars.generic debian.master/control.d/vars.core2 You can edit the file and make it your own. arch="i386 amd64" We need to commit our changes in the git repository. git add . The text after -m is the message you add to your commit. CompilationIt’s finally time for compiling but before we can start the compilation process there is one more step to do. fakeroot debian/rules clean
To start the compilation. skipabi=true skipmodule=true fakeroot debian/rules binary-core2 Next you need to run skipabi=true skipmodule=true fakeroot debian/rules binary-indep InstallationAfter the compilation is finished we’ll have several deb files in the parent directory. linux-doc_2.6.31-15.49_all.deb To install the files cd .. Check your bootloader if the newly installed kernel is the default one, for grub check the file Reboot and enjoy your newly installed kernel. By Peter at blog.avirtualhome.com | |||
|
Please register, you are currently just a guest here.
|
|||
| Similar Articles: | |||
|
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|||
|
|
|||
Members of Guest cannot leave comments. |
|||
Welcome to XNUXER.OR.ID, by visit our site we like to help you to get main information about internet security and opensource so dont forget to update your knowledge every time using our website.
To access file download or private information here you must register, please register here.
| Top Contributors: | |||
| 1 | webmaster | 166 | |
Articles: |
| This Hour: 0 |
| Today: 0 |
| This Month: 0 |
| All Time: 164 |
| Membership: |
| Registered Today :18 |
| This Hour:1 |
| This Month:333 |
| Total:4540 |
| Banned:0 |
| What do you think about our website? |