Fully build the kernel suitable for your Slackware Machine

Source: Internet
Author: User
Create a kernel suitable for your Slackware machine-general Linux technology-Linux programming and kernel information. For more information, see the following. Use the kernel source code and scripts officially provided by Slackware to create a kernel suitable for your machine

The current machine configuration is getting higher and higher. a small notebook may also have 2 GB of memory. In addition, server applications often use large memory. From the perspective of practice, slackware uses the default kernel, which does not support large memory. It supports a maximum of 800 mb and may not reach 1 GB. In addition, Slackware does not support multiple CPUs by default. If you have multiple CPU machines, you must compile the kernel;

The solution is extremely simple to allow Slackware to support machines with 1 GB or more memory. We need to re-compile the kernel so that it supports 4G. Of course, if there is more than 4 GB, you can select the 64 GB one.

To enable Slackware to support multiple CPU machines, it is nothing more than to enable it to support SMP When configuring the kernel.
  • Supported Ric multi-processing support options;

    It is not enough to explain how to solve the problem. If an article does not operate on an instance, it is really difficult for novice students to read it. I write all my articles to new users. I am afraid that new users will not understand the articles I have written. They are not worth reading for old birds, I think what I write is worthless. Therefore, when I write something in detail, it is best to write it to the first Linux brother to read the document I wrote, it can also be completed in one step.

    This article is suitable for beginners

    The best way to compile the kernel in the Slackware system is to use the existing official resources of Slackware for compilation. If other software encounters problems, if Slackware has official resources, we can also use this solution;

    After all, directly download from the http://www.kernel.org, your own Kernel configuration is still a little hard. It may take a long time to configure Linux for beginners, but it cannot be guaranteed. Therefore, our followers of slack should make full use of Slackware resources.

    Anyone with kernel compilation experience knows that if the compilation is successful after preparation. save the config file so that you can re-compile the kernel of the same version next time to solve some minor problems;

    Believe in Slackware and trust Slacware's official resources. This will give us half the effort, especially for Slackware beginners. In fact, Slackware Kernel updates are not very positive, which is related to Slackware's traditional (Security. In fact, in general, we have a stable enough kernel. If it is not to solve specific problems, we do not need to upgrade it all day long. When I write this article, the kernel version of Slackware 10.1 is 2.4.29, while the test kernel of current (that is, the development version) is 2.6.12.3. In this case, Slackware is not a new owner, but mainly based on security and stability;

    In this article, we will use the test kernel of Slackware's current to briefly describe the benefits of slackware's official resources, and solve the problems of large memory support by the way;

    1. Download the source code of the official current testing kernel;

    Address: http://www.slackware.com/getslack/

    Find the image from the address above. Generally, the US and Japan are faster;

    For example, we get the source code directory of testing kernel linux-2.6.12.3 through the address below;

    Ftp://slackware.mirrors.tds.net/pub/...inux-2.6.12.3/

    We need to download everything in it. The installation packages provided by Slackware are compiled and generated through these files. All people have written the configuration files and scripts, so we do not need to use them;

    For example, all the linux-2.6.12.3 files in our FTP image are stored in/usr/src/kernel26 according to the directory structure provided by FTP;

    The download is complete. Let's proceed to the next step;

    2. Use the config file officially provided by Slackware to configure your own Kernel configuration file. config;

    1. decompress the kernel and perform some basic work;

    Bash-3.00 # pwd

    /Usr/src/kernel26

    Bash-3.00 # ls

    Config-2.6.12.3 kernel-generic linux-2.6.12.3.tar.bz2.sign

    Kernel-modules linux-2.6.12.3.tar.bz2


    Bash-3.00 # tar jxvf linux-2.6.12.3.tar.bz2

    Bash-3.00 # mv linux-2.6.12.3 .. move the unzipping hand kernel directory to the upper-level directory, that is,/usr/src

    Bash-3.00 # cd ..


    Bash-3.00 # ls

    Kernel26 linux-2.4.29 linux-2.6.12.3.tar.bz2 speakup-2.4.29

    Linux linux-2.6.12. 3 rpm


    Bash-3.00 # cd linux-2.6.12.3

    Bash-3.00 # pwd

    /Usr/src/linux-2.6.12.3


    Bash-3.00 # cp ../kernel26/config-2.6.12.3. Copy the Kernel configuration file to the current working directory linux-2.6.12.3

    Bash-3.00 # cp config-2.6.12.3. config replicate config-2.6.12.3 to. config

    2. Briefly configure the kernel;

    Bash-3.00 # make menuconfig enters the Kernel configuration mode;

    There are two Kernel configuration methods: one is directly placed into the kernel; the other is compiled into modules; the two methods have their own advantages; directly compiled into the kernel, such as the startup of the device, the process of Loading modules is no longer required. Compiling modules requires Loading modules supported by the kernel of the device. However, it is not feasible to directly compile everything into the kernel, the kernel size will increase, and the system load will also be too heavy. When compiling the kernel, it is best to include the most important data into the kernel. If you do not understand anything else, you 'd better use the default value. Slackware Kernel configuration file is the best tutorial;

    1] Move the keyboard, select the Load an Alternate Configuration File item, and call. config to facilitate our Configuration. Because this Configuration File is configured by Slackware, we just need to modify it a little.

    2] modify the existing problems of your machine. For example, we mentioned the large memory support problem in the previous article;

    Select the CPU of your machine;

    Move the keyboard to Processor type and features ---> and press ENTER;

    Find Processor family (486) ---> press ENTER to ENTER;

    After entering, we found that there are a lot of CPU models available; in general, according

    Bash-3.00 # select the output information of cat/proc/cpuinfo. For example, if we are from the celon (P4) generation, we should select the following, of course, the default 486 version can also run normally. Since we re-compile the kernel, We have to select the corresponding model, which may improve the performance;

    Processor family (Pentium-4/celon (P4-based)/Pentium-4 M/Xeon)

    Supports large memory. If the memory is 1 GB or above, but less than 4 GB, 4 GB is required. If the memory exceeds 4 GB, 64 GB is required;

    High Memory Support (4 GB) --->

    (X) 4 GB

    () 64 GB

    There are also hardware such as sound cards that need to be viewed step by step. If there is something unknown, we need to press [shift] +? To view the description. In general, the config file of slackware has been configured. You just need to check it.

    Another example: for example, if I use intel ac97 sound card, how should I configure it?

    First, you need to know the chipset of your sound card. We need to check it through lspci-v;

    Bash-3.00 # lspci-v

    To view only the sound card, use the following method:

    Bash-3.00 # lspci-v | grep audio

    00: 1f. 5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) ac'97 Audio Controller (rev 03)

    Through the above output, we know that this machine uses the intel AC97 sound card, so we should pay special attention to the AC97 configuration;

    Find Device Drivers ---> Sound --->

    Sound card support. This must be selected;

    Advanced Linux Sound Architecture supports the ALSA driver supported by the Sound card. The OSS driver is provided below, which is only a part. If you want to use a more comprehensive OSS driver, you can buy it. For other options, see the following;

    Sequencer support

    Sequencer dummy client

    OSS Mixer API

    Oss pcm (digital audio) API
  • OSS Sequencer API

    RTC Timer support
  • Verbose printk

    [] Debug


    Then let's look down at

    Generic devices ---> enter

    Dummy (/dev/null) soundcard

    Virtual MIDI soundcard

    MOTU MidiTimePiece AV multiport MIDI

    UART16550 serial MIDI driver

    Generic MPU-401 UART driver

    ISA devices ---> select this option if you use the ISA sound card;

    PCI devices ---> if you use the PCI sound card, select it here, and the integrated sound card is also here;

    USB devices ---> This is an option supported by the USB sound card kernel. I have such a sound card, but I have not tried it;

    PCMCIA devices ---> This is the option of PCMCIA sound card. I have not seen such a sound card yet. If you have one, click here.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.