Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to start embedded Linux OS

Shulou Source: shulou.com Published: 2022-06-01 12:16:43 09月26日 Update

This article mainly explains "how to start embedded Linux OS". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to start embedded Linux OS.

First, the hardware is powered on

Second, first-level startup: bootROM

Boot ROM is a ROM that cannot be changed by manufacturers and solidified inside the chip.

Function:

Determine the device used to boot

Move a small piece of code (4k/8k/16k) from the location of the booted device to run in RAM, that is, SPL

Third, secondary startup: SPL+uboot

1.SPL: Secondary Program Loader:

Function:

Initialize DDR

Move the second piece of code from the booted device to RAM and load uboot

(some SoC copy bootloader to RAM before initializing DDR;)

2.uboot: Universal boot loader:

U-Boot reads and analyzes environment variables from the boot device to obtain the kernel and rootfs storage locations, as well as the required kernel command line

Automatic detection system RAM and eMMC/Nand Flash capacity and parameters

Set the MAC address of the Ethernet port and configure the hardware ready to load Linux kernel

Load Linux kernel to RAM, where control of the system is transferred to kernel for processing

IV. Linux Kernel

System Kernel initializes Linux, loads rootfs, and finally starts' init' to initialize Linux user space

5. Different OS

Android 、 Yocto 、 ubuntu 、 fedora

Add:

From a software point of view, an embedded Linux system can be divided into four levels:

1. Boot loader. It includes the boot code solidified in the firmware (firmware) (optional), and BootLoader. (bootROM,uboot)

2. Linux kernel. Custom kernel specific to the embedded board and kernel startup parameters. (linux kernel)

3. File system. Includes the root file system and the file system built on the Flash memory device. Ramdisk is usually used as the rootfs.

4. User application. A user-specific application. Sometimes an embedded graphical user interface may be included between the user application and the kernel layer. The commonly used embedded GUI are: MicroWindows and MiniGUI.

BootLoader is a Mini Program, the main function is to boot the operating system. Think of it as a GRUB/LILO bootstrap on a PC Linux, but in embedded linux, there is no BIOS, but runs directly from flash to load the kernel. It can initialize the hardware device, thus bringing the software and hardware environment of the system to an appropriate state, so as to be ready for the final call to the operating system.

At this point, I believe you have a deeper understanding of "how to start embedded Linux OS". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: System embedded program device kernel user code application file hardware application operating system location function content parameter common use environment preparation learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Tech Info Linux Redmi Microsoft