In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how to compile the kernel in CentOS system, the content is very detailed, interested friends can refer to it, I hope it can help you.
Introduction to Linux Kernel
At the top is the user (or application) space. This is where the user application executes. Below user space is kernel space, where the Linux kernel is located.
The GNU C Library (glibc) is also here. It provides a system call interface to the kernel and a mechanism to translate between user-space applications and the kernel. This is important because kernel and user-space applications use different protected address spaces. Each user-space process uses its own virtual address space, while the kernel occupies a separate address space.
The Linux kernel can be further divided into three layers. At the top is the system call interface, which implements basic functions such as read and write. Below the system call interface is kernel code, which can be more precisely defined as architecture-independent kernel code. This code is common to all processor architectures supported by Linux. Beneath this code is architecture-dependent code that forms part of what is commonly known as a Board Support Package (BSP). This code serves as processor and platform-specific code for a given architecture.
The Linux kernel implements many important architectural attributes. At a higher or lower level, the kernel is divided into subsystems. Linux can also be seen as a whole because it integrates all of these basic services into the kernel. This is different from the microkernel architecture, which provides basic services such as communication, I/O, memory, and process management, and more specific services that are inserted into the microkernel layer.
CentOS kernel compilation and
download a kernel
Download kernel from official website https://www.kernel.org/, I downloaded linux-3.13.7.tar.xz
copy code
The code is as follows:
cat /proc/version #Check out my kernel version first
copy code
The code is as follows:
cd /usr/src
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.7.tar.xz
xz -d linux-*.tar.xz
tar xf linux-*.tar
cd linux-3.13.7
#Clear source tree and.config
make mrproper
At this time you may be wrong, will prompt the following
*** Unable to find the ncurses libraries or the
#Solution Installation
#centos
yum install ncurses-devel -y
#ubuntu
apt-get install ncurses-dev
custom kernel
copy code
The code is as follows:
make menuconfig #At least the network card, file system and sound card driver should be selected, and the configuration instructions are attached at the bottom.
Previous versions of #2.6 were, but now the kernel doesn't need to make dep anymore.
make dep
make bzlmage
make modules
make modules_install
make install
#Compile kernel
make
make bzImage #Compile the kernel image and you will be prompted as follows
#Kernel: arch/x86/boot/bzImage is ready
make modules #Compile kernel modules
make modules_install #Install kernel modules
#My 3.13.7 doesn't need too complicated configuration
make install #is installed directly, including kernel mapping,grub configuration do not need to be manually configured, it is automatically configured for you by scripts
Let's see, I executed make install, and what did install.sh do?
Now we can see that those tedious steps have been omitted for us, and all the scripts have been dried. In fact, the scripts do the following for us.
installation is complete
About how to compile the kernel in CentOS system to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.