This is a discussion on Slackware Custom-kernel-Intro within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> It is difficult to create a kernel specific for your device if you don't know much about hardware. In ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| It is difficult to create a kernel specific for your device if you don't know much about hardware. In this document I'll describe a way to obtain the required information. In short: 1 Compile the most recent slackware kernel using the config file supplied by slackware 2 Create a configuration based on the hardware loaded during boot Now in more detail: Step 1: Compile slackware kernel with slackware config make a kernels directory in your home directory and download linux-2.6.13.tar.bz2 from a site (http://www.kernel.org/mirrors/) to that directory. you can download the .sign file as well if you want to ensure that the downloaded file was correct. tar xjf linux-2.6.13.tar.bz2 cd linux-2.6.13 # change '/mnt/cdrom' if it is not where slackware disk 3 was mounted cp /mnt/cdrom/testing/source/linux-2.6.13/config-2.6.13 . # This will take a long time... # the package created is /tmp/kernel-generic-2.6.13-$ARCH-1.tgz # ($ARCH is set in the SlackBuild script) su -c '\ bash /mnt/cdrom/testing/source/linux-2.6.13/kernel-generic.SlackBuild; \ mv /tmp/kernel-generic-2.6.13-$ARCH-1.tgz .; \ installpkg kernel-generic-2.6.13-$ARCH-1.tgz' the step from 2.4 to 2.6 requires more changes search for information on this make changes to your '/etc/lilo.conf' to include the 2.6.13 kernel or '/boot/grub/menu.lst' if you use grub. leave in a fall-back boot option for the original kernel. If you don't know how to do this, search for info, there is on the net and probably on your computer (use the 'man' or 'info' command and documents are also in /usr/doc/Linux-HOWTOs/) install your bootloader: run as root 'lilo' or 'grub-install /dev/hda' (unless you know hda is not your boot location). errors reported? solve them first, your computer may not boot if you do not! before continuing make sure all the hardware you want support for in your kernel is attached to your computer (USB devices,cards for laptops, printer, scanner, etc) Also make sure you have a bootdisk for slackware, which you should have made during slackware's installation. If your BIOS (system start up) enables it you can also boot from cd (Slackware cd 1). step 2 Create a configuration based on the hardware loaded during boot To obtain the latest kernel download all files patch-2.6.x.tar.bz2 (and .sign files) from http://www.kernel.org/mirrors/ where x is a number larger than 13; save the patches in ~/kernels/ to apply patch 2.6.14, for example open a console: cd ~/kernels/ mv linux-2.6.13 linux-2.6.14 bzip2 -d patch-2.6.14.bz2 cd linux-2.6.14 patch -p1 ../patch-2.6.14 To ensure no patches were rejected, you can check by: find ./* -name '*~' find ./* -name '*.rej' No files should be found. The latest fixes are in the 2.6.x.y patches, but if the latest is for instance 2.6.14.2, you don't need to apply patch-2.6.14.1. If you later want to apply patch 2.6.14.3 you first have to reverse patch 2.6.14.2 (-R option): patch -p1 -R -d ~/kernels/linux-2.6.14.2 2.6.x-zzz patches apply to kernel 2.6.(x-1) Ok now the kernel configuration: in a console: cd ~/kernels/linux-2.6.14.2 make xconfig # make gconfig or make menuconfig can also be used This will open the window in which you can select the kernel options. Read help here for a basic introduction. Load slackware's 'config-2.6.13' file (which should be in this kernel directory if you followed the guide). It complains that some options have changed. You should watch out for these options a bit. It usually does not give problems. open another console and do: su -c 'lsmod' The modules are shown which were loaded by slackware during boot. If a module is not in this list, your kernel did not need it. Now if an option in your kernel configuration is compiled as a module, then you should check this list to see whether it was loaded, if not then you probably can safely deselect it. If you're not sure about an option move over it and press help to get some info. The info often suggests a choice as well. Information can also be found in the ~/kernels/linux-2.6.14.2/Documentation/ directory (but may be very difficult to comprehend). The first three menus (in the current) kernel are Code maturity level options ---> General setup ---> Loadable module support ---> These options concern the basic behaviour of your kernel. You probably should leave these the way they are. Block layer ---> only look here if you have disks bigger than 2 Terra bytes (no) Processor type and features ---> here are some interesting options. Information about your processor and amount of memory can be obtained from the application KInfoCenter (KDE-menu -> system) Take some time to read through the options, you can make changes if you know you can, otherwise leave to default. Power management options (ACPI, APM) ---> Options in here are primarily for laptops, If you don't have that you should go in here to deselect some options. Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> deselect not loaded modules Executable file formats ---> leave them Networking ---> making changes may be very usefull but are dependent on the function of your computer in relation to other computers in the network (internet or more local). It is safe to leave it the way it is, find information elsewhere if you want to. Device Drivers ---> Here most hardware specific for your computer can be selected. Do a su -c lspci or su -c 'lspci -v' to get some information. about your pci cards. If you have a certain device you can go through the options to ensure it's selected. remove unused modules and make changes if you want support for specific hardware. Some changes in graphic support may also be desirable, but you'll have to find info if you want that for your device specific. Changes may also be needed in your /etc/X11/xorg.conf file File systems ---> make changes only if you know the specified filesystems will not be used. You probably can deselect some more options, but you'll have to know a bit about the filesystems you use and may want to mount. remaining options: leave them When finished save it to a file, config-2.6.14.2 for instance. now do a su -c 'make clean bzImage modules modules_install' if many modules were deselected it should run a lot faster this time. if succesful su -c 'cp ./arch/i386/boot/bzImage /boot/vml-2.6.14.2' make as su necessary changes for lilo or grub and run the commands as specified earlier, hold your breath and reboot. |
| |||
| Roel wrote: > It is difficult to create a kernel specific for your device if you don't > know much about hardware. In this document I'll describe a way to obtain > the required information. In short: .... > if succesful > su -c 'cp ./arch/i386/boot/bzImage /boot/vml-2.6.14.2' > make as su necessary changes for lilo or grub and run the commands as > specified earlier, hold your breath and reboot. If unsuccessful, check here: http://slackworld.berlios.de/03/kuac.html or there: http://slackworld.berlios.de/03/refs.html :-) Mikhail |
| |||
| > http://slackworld.berlios.de/03/kuac.html > http://slackworld.berlios.de/03/refs.html Thanks, they are really good |
| |||
| > :-) I've made some more changes including the links you gave it can be read here: http://slackwarehelp.org/viewtopic.php?p=1922#1922 |
| ||||
| Roel wrote: > > :-) > I've made some more changes including the links you gave it can be read > here: http://slackwarehelp.org/viewtopic.php?p=1922#1922 Thanks for letting me know! IMHO, the text looks great. The whole forum seems to be good, too. I added a reference to SlackLinks: http://slackworld.berlios.de/links.html -- Mikhail |