2.6 Mounting of the kernel

zhaozj2021-02-16  57

First part, prepare

To use the new kernel, of course, you must obtain the source code of the new kernel. The official website of the kernel is http://www.kernel.org you can get the latest kernel. 2.6 The update is quite fast, you can use the finger @ kernel.org command in the command line to quickly get the current latest kernel list. In this article I will be on 2.6.0.

After downloading the kernel source, we have to use TAR JXVF Linux-2.6.0.tar.bz2 to extract the source code. If you download the zxvf parameter using the ZXVF parameter with the compression package ending with TGZ. I strongly recommend that you don't use the / usr / src / linux directory to store the source code, because use this directory you need to manually do some symbolic links in / usr / include directory, this is not a good idea. So I suggest you build a directory separately for the source code, here our directory is /src/linux-2.6.0.

To compile and run a new kernel, you need to upgrade some packages, this information is in the Documentation / Changes file in the source code, as you choose to upgrade according to your actual situation. I emphasize that you should upgrade Module-Init-Tools, don't be confused by the version number output from the DepMod -V output in your current system (in RH9, it is 2.4.22, it feels like it is required than Changes. High, actually use different version rules). The new module-init-tools acquired in the following URL: http://www.kernel.org/pub/linux/kernel/people/rusty/modules/

I am using 0.9.14. If you download, the source code uses the following steps to compile

./configure --prefix = /

Make Moveold

# This step will take your previous Insmod, Modprobe, RMMOD and LSMOD

#Nenced to INSMOD.OLD, MODPROBE.OLD, RMMOD.OLD LSMOD.OLD

Make

Make Install

Then use ./generate-modprobe.conf /etc/modprobe.conf (converted to /etc/modules.conf to /etc/modprobe.conf)

If you use the DEVFS system, you also need to copy the modprobe.devfs to / etc.

When you upgrade the relevant software pack, prepare work is done, and we will enter the compilation phase.

The second part compiled

2.6 The Build system is very different from 2.4, which is actually more simple and convenient. Step 1 We have to enter the source catalog

CD /SRC/LINUX-2.6.0

Make Mrproper

Make MenuConfig (Based on Text Sheet Configuration Interface)

After flashing a few words, the interface appeared as shown.

The upper part of the interface is the instructions for use, using the arrow keys to move between the options, using Enter to enter the next layer menu, the highlights on each option are the keyboard shortcut, using it to quickly reach you want to set up Menu items. In parentheses, press Y to compile this project into the kernel, press M to compile as a module, press N to do not choose. press? The help information of this option will be printed, press ESC to return to the upper menu. The basic concept of the GUI tool is also discussed in detail. Later I will mainly use MenuConfig to set up each option, the order of the options is based on it, and the options in other tools are basically corresponding to. Remember to compile the module of the sound card into the kernel, no sound! !

Compile and install the kernel

#make

#make install

Compilation and installation module

#make modules (Compilation Selection Module)

#make modules_install (transfer the compiled module to the system standard location)

After completion, Reboot will find that the start option will be a 2.6 kernel option. Introduce the graphical interface configuration tool in the new kernel

There are two GUI configuration tools in the new kernel. The past make Xconfig is now a configuration tool for using the QT library as an interface program, so you have to use it to install the QT library. This package is included in the general distribution disc.

The other is make gconfig This is a tool using the GTK library as an interface program. You have to install the GTK library first. These two tools have a large change in the interface in the interface, which is more in line with the usual graphical interface programs.

And the traditional console configuration tool MenuConfig has nothing to change. It basically keeps the original look, does not like the brothers of the GUI tools of the flower, still use this :)

Several Make options for debugging in 2.6 are added, which are AlLfeesconfig, allnoconfig, allModconfig, indicate all options to Y, load all options to n, load all options to m. They are not prepared for kernel developers and testers, and our relationship is not big.

Make MenuConfig (section) Option Description

First Code Maturity Level Options (Code maturity option)

After entering ENTER, the option is as follows.

[*] Prompt for development and / or ibPlete code / drivers

By default, it is selected, which will be displayed in the setup interface or code and driver that is still developed or has not been completed. You should choose it, because there are many devices may need to select this option to configure, in fact it is safe of.

[*] SELECT Only Drivers Expected to Compile Cleanly

Select this option You will not see some driver options for existence problems, which is also selected by default. If you have a device that doesn't find a driver option, you can remove this, you can find the relevant driver, but it may be BUG.

[*] SELECT ONLY Drivers That Don't Need Compile-Time External Firmware

This is also the default option if you don't need to make MAP support for some external devices.

Item 2 General Setup

The options are as follows

[*] Support for Paging of Anonymous Memory

This option will allow your kernel to support virtual memory, which is to make your computer seem to have a large program that has more memory spaces more than actual memory. It is selected by default.

[*] System V IPC

Provide communication mechanisms for the process, which will enable exchange information between the processes in the system to maintain synchronization. Some procedures can only be running in the case of choosing Y, so you must choose here.

[] BSD Process Accounting

Here, the choice of Y will make the kernel to create an account as the user layer (the process is notified by a special system call), and the kernel will record the relevant information of the process to the account file when the program exits, mainly including the process Create time, creator, memory, etc. If you need Y, Y it :)

[*] Sysctl support

This will provide an interface that allows you to change some core parameters and variables without the need to restart the system. Opening this option will increase the volume of at least 8kb. If your kernel uses only the production installation and recovery system system, you can not choose to reduce the use of memory.

[] Kernel .config support

This will compile the kernel's configuration information to the relevant documentation, you can use some tools to extract it to re-build the kernel, usually do not have to choose it.

[] Remove Kernel Features (for Embedded Systems) --->

This option will remove some features from the kernel to reduce the core volume. For desktop users, this is not a good idea, so don't choose it. As in it, I will introduce in the future revenue.

Third Loadable Module Support (Loadable Module Options)

The options are as follows:

[*] Enable loadable module support

This option allows your kernel support module, what is the module? The module is a small piece of code. After compiling, it can be added to the kernel during the system kernel run, thereby adding some characteristics to the kernel or supports some kind of hardware. Generally, some unusless drives or properties can be compiled into a module to reduce the volume of the kernel. You can use the ModProbe command to load it to the kernel during runtime (it can be removed when you don't need it).

Some features are compiled as a module, not often used, especially if the driver that is not required when the system is started, can be compiled into a module, and if it is some driving, the driving, such as the file system, The support of the system bus is not to be compiled, and if the system cannot be started. (Of course there are some ways to do, I will mention it later)

[] Module Unloading

This option allows you to uninstall the module that is no longer used. If you don't choose, you will not be able to uninstall any module (some modules can not be uninstalled, whether or not this option is selected). Don't choose this option, you will make your kernel size minus a little

[] Module Versioning Support (Experimental)

This option will allow you to use the modules compiled in other versions of the kernel, but it is not reliable, so we don't choose it.

[*] Automatic Kernel Module Loading, AUTOMATIC

Under normal circumstances, if our kernel uses some of the drivers or features of the module in some tasks, we must use the ModProbe command to load it, the kernel can use. However, if you choose this option, it can automatically call the modprobe command to load the required modules when the kernel needs some modules. This is a great feature, of course, I want to choose Y :)

Fourth Processor Type and Features

Subarchitecture Type (PC-Compatible)

This is a relatively new feature, the main purpose is to bring Linux to support a variety of PC standards, usually our PC is following the so-called IBM compatible structure (PC / AT). This option allows you to choose some other architectures. We generally choose PC-Compatible.

Processor Family (Pentium-4 / Celeron (P4-Based) / Xeon)

Don't tell me, what is your CPU?

[] Generic x86 support

This option provides the largest compatibility of the X86 series, which is used to support some of the very few CPUs of the X86 system, which may reduce some system performance. So if your CPU can find this in the list, don't choose this.

[] HPET TIMER Support

This is also a new feature, HPET is a new type of Intel to replace the traditional 8254 (PIT) interrupt timer and RTC timer, full name called high-precision event timer. If you have a newer machine, you will choose it, it is a safe option, even if your hardware doesn't support HPET, it will not cause problems because it automatically uses 8254.

[*] SYMMETRIC MULTI-Processing Support

Don't talk more, if you choose a multiprocessor system, if you use a single CPU system like me or put it out.

(Maximum Number of CPUS (2-255)

Here is used to configure your longest a few CPUs, depending on your needs. Preemptible Kernel

This is a new feature, almost all articles of 2.6 will mention that this is the first kernel. That is to say by some priority priorities, you can perform some low-priority programs, even if these programs are executed under core states (this is actually not a real predetermined kernel). Thereby reducing the internal nuclear lagging period and improving the response of the system. Of course, the kernel in some special points is unacceptable, such as the scheduling program in the kernel itself is not pretty when executed. This feature can improve the performance of the desktop system, real-time system, so I am still selected.

[*] Machine Check EXCEPTION

If your system has some problems such as CPU overheating, the kernel will print information on the screen to remind you. This feature requires hardware support. You can view / proc / cpuinfo to see if there is a MCE logo, and if you have any words. If you are very unfortunate, you have a problem after you choose it, you can turn it off when you start.

[*] Check for non-fat errors on amd Athlon / DURON / Intel Pentium 4

Opening this option will check the problem that may exist on your machine. If there is a non-fatal error that will automatically fix and record, this can help you find the reason for the problem, is a good option, of course it only Can be used on the CPU in AMD Athlon / DURON / Intel Pentium 4. If you are just using one of them, you will choose.

CHECK for P4 Thermal Throttling Interrupt.

If this option is opened, the relevant information is displayed on the screen when the CPU temperature of P4 (that is, the temperature control device of the P4), the relevant information is displayed on the screen, and choose it according to your situation.

<> Toshiba Laptop Support

This option is for Toshiba notebooks, which can be used to access Toshiba's system management mode, that is, you can set BIOS directly. But pay attention to it only in Toshiba's own BIOS. If you have a Toshiba notebook, it is a pity that its BIOS is Phoenix, then this option is still the Liangshan Miller ---- Useless :)

<> Dell Laptop Support

This is basically the same as the above option, look at it yourself :)

<> / dev / cpu / microcode - Intel IA32 CPU Microcode Support

This option will allow you to update the microcode of the Intel IA32 series processor, of course, you must also choose DEVFS to use it normally in the file system option. If you translate it as a module you still need to add this line alias char-major-10-184 microcode in modprobe.conf

The kernel itself does not have a microcode binary, you can get new information to this URL.

<> / dev / cpu / * / msr - model-specific regiSter Support

This option desktop user is generally not used, it is mainly used in Intel's embedded CPU, which varies depending on the type of different CPU, which can be used to change some of the use of some CPU original physical structures. However, the difference in different CPUs is also very different.

<> / dev / cpu / * / cpuid - CPU Information Support

This creates a range of device files in the / dev / cpu to allow the process to access the specified CPU. Never choose.

<> BIOS Enhanced Disk Drive Calls Determine Boot Disk (Experimental)

This will open the Enhanced Disk Device Services in the BIOS in the real mode to determine which disk starts. This is usually safe, but most BIOS providers do not implement this feature. High memory support (OFF)

If you have a large capacity memory (more than 4G) you want to select it so that the kernel can use this part of the memory. Even if this is a life, this part is always OFF, if you have you.

Math Emulation

If there is no mathematical coprocessor on your CPU, open this option allows the kernel to simulate one to enhance floating point computing power, but slow can. If you are not using an antique CPU (486SX before) This item will never need.

[*] MTRR (Memory Type Range Register) Support

In the processor of the Intel P6 (PPRO, PII, and updated) There is a memory type range register that can control the memory range of the processor access. Open it typically enhance the display performance of the graphics card, so we must say Y :)

Fifth Power Management Options (ACPI, APM) (Advanced Power Management)

Power Management Support

If you want your Linux to support advanced power management (that is, we say soft offline, system sleep, etc.) need to choose it.

Software Suspend (Experimental)

Select this option You can hang your computer (a bit like XP in XP), open this feature, you can use SWSUSP or ShutDown -z to hang your computer. This system makes your current work (that is, the content in current memory) into your swap partition, use startup parameters when you start start up "Resume = / dev / your swap partition ", The kernel will restore the last work kernel from the mirror icon file, which can greatly improve the start speed of the system. When you don't want to restore the last job, pass the parameters "NoResume" to the kernel. However, your exchange partition will not be used after the system is started, you can use the mkswap command to reformat your swap partition. This feature does not require support for advanced power management. Very nice function, I have been useful, everyone will try it :)

SUSPEND-TO-DISK Support

This option is basically the same as the above features, but more flexible, you can specify a dedicated switched partition to save memory mirroring by the following subsections.

() Default resume Partition

Team the above option to specify a partition that saves the mirror.

ACPI (Advanced Configuration and Power Interface) Support --->

From here access to the configuration interface of the ACPI power management, pay attention to the ACPI and APM cannot be used at the same time. If you configure these, if you find a workable ACPI device when the system is started, the APM will be shut down, ACPI will be load:

[*] ACPI Support

This option should not use me more, if you want your system to use ACPI to manage your power, you should choose it, and you must have it to work, you have to install the ACPID daemon in the system.

[*] Sleep State (Experimental)

Choosing this option allows your system to have hang-up features, that is, you can temporarily interrupt your work, let your system with a state of low power consumption (Sleep State), your system status at this time Save on the memory or disk (depending on the depth of the hang), will return to the normal working status when you need it. However, due to the difference between the various systems, this function is not perfect. Only few devices can support this feature perfect, so it is not recommended to use it.

<> Ac adapter This is used to support the AC adapter in the mobile system to indicate that the current system is using AC power, which does not require this option for the desktop.

<> Battery

This option is used to provide the user's battery status information to the user via / proc / ACPI / BATTERY. With the same above options, there is no effect on the desktop.

<*> Button

This option is used to register an event based on the power button, such as Power, Sleep, etc. When you press the button, the event will happen, a daemon will read / proc / ACPI / Event, and perform the action defined on these events. For example, let the system shut down.

<*> Fan

This option provides control support for the system fan, which can be controlled by the user layer program (such as opening, closing, reading the current fan of the current fan, etc., but only a very small number of hardware supports it).

<*> Processor

Opening this option will make your system have the ability to process IDIE status, that is, save your processor to save power when free. Personally think this option is necessary.

<*> Thermal zone

When your system temperature is too high, ACPI can use this option to control your system, timely adjust the system's working status to protect your CPU, a great feature must be chosen, otherwise you don't use ACPI. . (Of course this requires hardware support)

<> ASUS / MEDION LAPTOP Extras

This is primarily prepared for the laptop produced by ASUS to provide support for those additional buttons on these systems, users can open or turn off the backlight of the LCD, adjust the brightness, and customize the flash indication of the LED. Users can change these settings via / proc / ACPI / ASUS.

<> Toshiba Laptop Extras

This option is specially supported for Toshiba notebooks. Its role is basically the same as the above option. If you have such this book, choose it.

[] Debug Statements

If you select it when ACPI occurs an error, detailed information will be printed, which will increase the volume of about 50K, if it is not necessary, don't choose it.

[] Relaxed AML

If you select it, the ACPI translator will relax the error check of AML, some laptops may need it to use ACPI (some bad desktops may also need it, if your system uses ACPI, there is a problem, you can choose it Try

PM (Advanced Power Management) BIOS Support --->

CPU FREQUENCY Scaling --->

转载请注明原文地址:https://www.9cbs.com/read-19650.html

New Post(0)