skimpydog.com Forum Index No Distro Specific Kernel Building |
Browsing this Thread:
1 Anonymous Users
Bottom Previous Topic Next Topic |
|
|
---|
Poster | Thread |
---|
|
Kernel Building | #1 |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7 HP : 0 / 170 Group:
Webmasters Registered Users |
Building the Linux Kernel is really quite simple - IF you have a decent auto-generated configuration to start with.
What I mean by that, is simply this: You can build your kernel by hand, and often things will fail until you have your kernel 100% how you want it - that is working with your hardware, how you want it 100%. Keep in mind you will have to configure things for iptables/ipfw, network, video performance, audio, hard disks (RAID, SCSI) etc... until you have what you want in a working manner. Stable.. A few key pointers I have learned are like this, If you have a .config, or anything like that in /usr/src/kernel(linux)-{whatever}.x.x-x, you can use for your new kernel builds. This can become a bit more difficult than this, but for that you MUST read up on the specific hardware you are attempting to configure, and from there you may need to stay on top of drivers after you rebuild your kernel. This is very common for video cards whereas you will have to reinstall your video drivers after rebuilding your kernel. ______________________________ So, if you cd to /etc/src/kernel-XXX you can see your source files for your kernel. If you do not have these crucial files, you will need to install the kernel source. ################## A note about kernel building: You ultimately build the kernel you are wanting to run - a kernel that works stably with your hardware, and preferably boots quickly (that's if you can help it - some drivers take a moment to load, or fail to load). With that in mind, if the source of the kernel you have available to you is all you have available, then that is your new kernel version until you decide to upgrade {or downgrade}. You should be able to port your kernel between operating systems (Linux variants if you use the Linux kernel) if you build things properly, and actually use your .config that you ultimately build with any of the kernel releases from kernel.org when you build your kernel. _____________________________________ The configuration I will advise to build your kernel starting off with a newer kernel that has been auto-generated. If you run gentoo, you can actually use the "genkernel all" command to generate a kernel for you, then you can customize things. You can load your kernel configuration into "make menuconfig" once you locate the initial .config file which is normally located at /usr/src/kernel(linux|symlink)/.config. If this is the same directory for the source you are building from, it should automatically load, if you do not trust this, or wish to change the location for the build you want to configure, scroll all of the way down, and choose, "Load an Alternate Configuration File", such as:
As I previously stated, you will want to configure your kernel to meet your specific needs. If you want ntfs support (if you have a dual boot, or if you have a NTFS drive (partition)), add this as a module, not built into the kernel; such as: while in make menuconfig Choose:
Scroll Down until you see:
Build in NTFS support as a module:
Setup anything else you may need, Video Card, network cards, wifi cards, HAM Radio if you are licensed for it and have the equipment, or make yourself a vending machine out of a Linux box - and save your configuration.
Then build the kernel. The Build Building is really quite simple, but it can take a lot of time. -- You must be in the kernel source directory first
or you can run this as one string:
Check to make sure your grub is up to date (pointing to the correct kernel, and you have the proper arguments to boot):
The following will be customized for your specific layout! This is what I use on a machine:
After you have verified things are going to work (drive locations, and grub (or lilo) is configured to boot the new kernel), you should be good to go. |
||||||||||
Posted on: 2009/1/28 22:29
|
Subject | Poster | Date |
---|---|---|
Re: Kernel Building | skimpydog | 2010/1/19 19:41 |
Re: Kernel Building | skimpydog | 2011/2/10 20:10 |
Top Previous Topic Next Topic |
|