Home Operation and Maintenance Linux Operation and Maintenance What does linux kernel porting mean?

What does linux kernel porting mean?

Feb 23, 2023 am 10:29 AM
linux

In Linux, kernel transplantation refers to transferring program code from one hardware platform to another hardware platform to run; transplantation is to recompile the kernel to support the corresponding hardware based on the hardware platform selected by the user. So that it can run on the hardware platform. If the corresponding hardware driver or other kernel module is missing, you can develop it yourself and add it to the kernel to compile it together to finally achieve support for the hardware.

What does linux kernel porting mean?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is Linux kernel transplantation

The so-called transplantation is to transfer the program code from one operating environment to another operating environment. For kernel transplantation, it mainly involves moving from one hardware platform to running on another hardware platform.

Kernel transplantation is to recompile the kernel to support the corresponding hardware according to the hardware platform of your choice so that it can run on the hardware platform. If the corresponding hardware driver or other kernel module is missing, you can do it yourself Corresponding development is added to the kernel and compiled together to finally achieve hardware support.

The origin of the kernel

Linux is an open source computer operating system kernel. It is mainly written in C language. Since it is open source, there must be many people involved in development and maintenance. The reason why Linux has developed so fast is because it is open source. There are many people using it and many problems are found. If they find it difficult to use, they will be dismissed. Someone optimized it. The main modules (or components) of the Linux kernel are divided into the following parts: storage management, CPU and process management, file system, device management and driver, network communication, as well as system initialization (boot), system calls, etc.

Linux was first designed by Finnish Linus Torvalds. At that time, due to the commercialization of UNIX, Professor Andrew Tannebaum developed the Minix operating system so that it could not be bound by the AT&T license agreement and provide an operating system for teaching and research. It was released on the Internet and was freely available to students all over the world. Without further ado, let’s get straight to the topic.

How to carry out kernel transplantation

1. Version and download

Linux has developed from 1991 to the present, version What has become? I believe everyone also wants to know, so where to watch and where to download? The editor has prepared the kernel download URL for everyone: kernel.org/. You can see it by clicking on it directly. The interface is as follows :

What does linux kernel porting mean?
##Now the stable version has reached version 5.16.12. You can download the stable version, but it is not recommended to download the latest one. , because it is unstable and the experience it brings is definitely not good. There is not much difference between versions. Maybe the new version just adds some new platforms or new external drivers.

2. Kernel transplantation

Install the lzop library before compiling the source code, otherwise the compilation will fail:

sudo apt-get install lzop
Copy after login

Decompress the downloaded kernel source code, the command is as follows:

tar jxvf linux-imx-rel_imx_4.1.15_2.1.0_ga.tar.bz2
Copy after login

The following file is obtained:

What does linux kernel porting mean?
Create a shell script and enter the following compilation command:

What does linux kernel porting mean?

给予脚本权限,直至脚本变绿,如下:

What does linux kernel porting mean?

./mx6ull_nand.sh编译程序,出现图形界面可以先不去配置,直接exit退出,继续等待编译完成(内核编译需要的时间较长,建议大家准备好瓜子)。编译完成以后就会在 arch/arm/boot 这个目录下生成一个叫做 zImage 的文件,zImage 就是我们要用的 Linux 镜像文件。另外也会在 arch/arm/boot/dts 下生成很多.dtb 文件,这些.dtb 就是设备树文件。后面做驱动开发的时候会经常跟这些.dts文件打交道的,编译之后的文件如下:

What does linux kernel porting mean?

3、内核的使用

先设置交叉编译工具变量,进入顶层Makefile中设置如下:

What does linux kernel porting mean?

使用如下命令编译Linux:

make xxx_defconfig //使用默认配置文件配置 Linux
make menuconfig //启动图形化配置界面
make -j2         //编译 Linux
Copy after login

至此,Linux内核部分就给大家分享到这里了,动手操作起来吧。

相关推荐:《Linux视频教程

The above is the detailed content of What does linux kernel porting mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Clair Obscur: Expedition 33 - How To Get Perfect Chroma Catalysts
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1677
14
PHP Tutorial
1278
29
C# Tutorial
1257
24
Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

How to set important Git configuration global properties How to set important Git configuration global properties Apr 17, 2025 pm 12:21 PM

There are many ways to customize a development environment, but the global Git configuration file is one that is most likely to be used for custom settings such as usernames, emails, preferred text editors, and remote branches. Here are the key things you need to know about global Git configuration files.

See all articles