Composition of Embedded Linux systems

Source: Internet
Author: User

The composition of an embedded Linux system is a typical embedded Linux system. According to the storage space, the Boot zone, kernel zone, and file system zone are usually divided. The Boot Loader and system parameters are stored in the Boot zone, the kernel area stores customized Linux kernel www.2cto.com file systems for specific embedded platforms, including the root file system and the file system built on Flash memory devices. The graphic interface system and user applications are placed in the file system area. 1. The space occupied by Boot Loader is usually small, and it is next to a startup parameter area, used to save Linux kernel startup parameters and user startup configurations. 2: The Boot Loader program is the Boot Loader of the embedded system. It is the first software code to run after the system is powered on. The main task of the Boot Loader program is to initialize the hardware device and build a map of the memory space to bring the system's hardware and software environment to a suitable environment, the most important task of the Boot Loader program is to start the LInux kernel www.2cto.com 3: The file system is the most space occupied by the embedded LInux system, which usually occupies all the space except the Boot Loader and the kernel, after Linux is started, a root file system is loaded. The root file system contains the necessary configuration information, library functions, shell interpreters, and core directories. Other file systems can be mounted to the root file system. 'boot Loader is generally written to the memory through the JTAG interface and simulator, while the kernel and file system can be written to the memory through the serial port and network port. The Linux kernel consists of five parts: process scheduling, memory management, file system, network subsystem, and device management. Memory Management: (Memory Management) Linux Memory Management supports Virtual Memory and uses a paging mechanism. The Memory Management subsystem allows multiple processes to securely share the primary Memory area. Through memory management, Linux supports memory addresses that exceed the actual memory size. disks can be used as memory, and disks and memories can be exchanged. Device management: Linux supports three types of hardware devices: character devices, Block devices, and network devices. It also provides the concept of platform devices and sys file system to manage various devices, linux device drivers can be compiled into the kernel, loaded at system startup, or dynamically loaded as modules. The Linux code structure is very large in linux 2.6 kernel code, among them, about half of the device drivers are arch hardware platform-related code block device core code crypto encryption function library documentation about each part of the kernel general interpretation and Annotation of text files drivers Device Driver-related code fs file system-related code include kernel header file init kernel initialization code ipc system inter-process communication kernel core part: process scheduling, interrupt processing, signal processing, module lib General kernel function mm Memory Management net network communication protocol code samples kernel example security system security related code sound audio system code www.2cto.com compile the kernel Command 1: make menuconfig // configure the kernel command 2: make // compile and generate the target file, including the loadable module 3: make zImage // compile and generate the kernel 4: make modules_install // Why does the installation module need to configure the kernel? You must configure the kernel before compiling. make menuconfig to generate the default configuration file. config. This file sets the cpu system and many driver options. If this file is not configured, it cannot be compiled. No Default kernel is downloaded. config, you need to find a default config file, such as arch/arm/configs/, which contains many default configurations of the arm cpu, of course, you can also copy your previous config file to the new kernel directory .. Config is the initial step for configuring and compiling the kernel. Why re-compile the kernel? The new kernel fixes bugs in the old kernel and adds many new features. If you want to use these new features or customize a more efficient and stable kernel based on your system, you need to re-compile the Linux kernel. Generally, the updated kernel supports more hardware, provides better process management capabilities, and runs faster and more stably. It also fixes many vulnerabilities found in earlier versions, it is necessary for Linux users to regularly upgrade and update the system kernel. In order to correctly set the kernel compilation configuration options and compile only the code of the functions required by the system, there are generally four considerations: www.2cto.com 1: self-compiled kernel runs faster (with less code) 2: The system will have more memory (the kernel part will not be exchanged to the virtual memory) 3: compilation of unnecessary functions into the kernel may increase vulnerability 4 exploited by system attackers: compiling a function as a module to the kernel is slow. Some kernel makefiles of the Linux kernel are divided into four components: 1. Top-layer Makefile: at the top of the kernel code. Read the Makefile at the top level. the content of the config file, which is generally responsible for building the kernel and Module 2: config configuration file: Kernel configuration file, generally under/arch/*/configs 3: General Rules of Makefile: makefile in the/scripts/directory. * 4: kbuild Makefile: Under directories of different levels (1): The target definition is used to define the content to be compiled as a module, the links to be compiled enter the kernel obj-y + = foo. o it represents by foo. c or foo. the s file is compiled to get foo. o and link it to the kernel. If $ (obj-m) is used, it indicates that the object file is compiled into a loadable kernel module ~ Well, these are some basic things, but they are very important. It's been so long ~ Take a rest. I hope it will help you.
 

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.