In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "Linux rootfs and linuxrc process how to configure" related knowledge, Xiaobian through the actual case to show you the operation process, the operation method is simple and fast, practical, I hope this "Linux rootfs and linuxrc process how to configure" article can help you solve the problem.
The last stage of kernel startup starts three processes: Process 0 is actually the idle process just mentioned, called idle process, which is an endless loop.
Process 1: The kernel_init function is process 1, which is called the init process.
Process 2: The kthread function is Process 2, which is the Linux kernel daemon. This process is used to ensure that the linux kernel itself works properly. In embedded operating systems,/linuxrc is usually specified as the init process
/linuxrc is an executable application.
(1)/linuxrc is the application layer, and has nothing to do with the kernel source code.
(2)/linuxrc is executable under the board's current kernel. Therefore, under ARM SoC Linux system, this application is compiled and linked with arm-linux-gcc; if it is under PC Linux system, then this application is compiled and linked with gcc.
(3)/linuxrc If it is statically compiled and connected, it can be run directly; if it is dynamically compiled and connected, we must also provide it with the necessary library files to run. However, because our/linuxrc program is directly invoked by the kernel, the user has no opportunity to export the path of the library file, so in fact this/linuxrc cannot be dynamically connected, usually statically connected.
2,/linuxrc execution leads to the user interface
(1)After the operating system boots, after a series of running configurations, it finally gives the user an operating interface (perhaps cmdline, perhaps GUI), which is brought out by/linuxrc.
(2)The user interface has its own application, but the user interface application is executed directly or indirectly by/linuxrc calls. UI programs and other applications are processes 2, 3, 4, and so on. This is what we call process 1 (init process, or/linuxrc), which is the ancestor of all other application processes.
3./linuxrc is responsible for configuring the system after startup.
(1)Just like a house can't live directly after it is built, it has to be renovated; the operating system can't be used directly after starting up, it has to be configured.
(2)The configuration of the application layer after the operating system starts (generally called runtime configuration, English abbreviation etc) is to make our operating system more convenient to use, more suitable for my personal hobbies or practicality.
4./linuxrc is usually busybox in embedded linux.
(1)busybox is a project written in C language, which contains a lot of.c files and.h files. This project can be configured to compile applications that run on various platforms. If we compile busybox with arm-linux-gcc we get an application that runs on our board linux kernel.
(2)busybox This program was developed to build rootfs in an embedded environment, that is to say, it is a specially developed init process application.
(3)busybox provides a complete set of shell command assemblies for the current system. Such as vi, cd, mkdir, ls, etc. In desktop Linux distributions (such as ubuntu, redhat, centOS, etc.) vi, cd, ls, etc. are all separate applications. But in embedded linux, to save trouble, we put vi, cd and other commonly used shell commands together to form a shell command package, called busybox.
What else should be in rootfs
1、/linuxrc
2. Device files in dev directory. In linux everything is a file, so a hardware device is virtualized into a device file to access, in linux system/dev/xxx means a hardware device, we want to operate this hardware is open to open the device file, then read/write/ioctl operation of the device, and finally close the device.
The/dev directory is also indispensable in the smallest rootfs, and there are one or two device files that rootfs must have.
3. sys and proc directories. In the smallest rootfs is also not omitted, but these two as long as the creation of empty folders can be, there is nothing inside, there is no need to have something. These two directories are also driver-related. A virtual file system in Linux.
4. usr is the storage place of some files owned by the user of the system. This thing will be automatically generated when busybox is installed in the future.
5. The etc directory is a key and important one. All files in the directory are runtime configuration files./ All configuration files in the etc directory are directly or indirectly invoked by/linuxrc to complete the runtime configuration of the operating system. The etc directory is the key to making rootfs, so the next course will be devoted to this etc. directory.
6. The lib directory is also a key one in rootfs, which cannot be omitted. The lib directory contains dynamic and static link library files for the current operating system. We are mainly for dynamic link library.
About "Linux rootfs and linuxrc process how to configure" the content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.
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.