Build user applications on the embedded linux platform

Source: Internet
Author: User
Build a user application under the embedded linux platform-general Linux technology-Linux programming and kernel information. The following is a detailed description. 1. Introduction

Running GNU/Linux systems on dedicated embedded boards has become increasingly popular. An embedded Linux system can be divided into four layers from the software perspective, as shown in Figure 1-1:

(1) Bootstrap program. Includes the boot Code (optional) in the firmware and the Boot Loader.

(2) Linux kernel. Customized kernel and kernel startup parameters for Embedded boards.

(3) file system. Including the root file system and the file system built on the Flash memory device. Ram disk is usually used as the root file system.

(4) user applications. User-specific applications. Sometimes an embedded graphical user interface may be included between the user application and the kernel layer. Common embedded guis include MicroWindows and MiniGUI.

The following describes how to correctly organize and connect these parts on the linux-2.4.x kernel to automatically run the user application for analysis.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // linux.ccidnet.com/col/attachment/2006/11/908751.jpg'); ">



   2. linux Startup Process

After the system is reset, the program that runs far away is the Boot loader ). The boot program can be stored in a dedicated ROM, or shared with kernel images and file system images with Flash chips or solid state disks, as shown in. The pilot program is responsible for initializing hardware devices and establishing a memory space ing diagram, so as to bring the system's hardware and software environment to a proper state, so as to prepare a correct environment for the final call of the operating system kernel. Uboot is an open-source boot program on Sourceforge. It provides), MIPS, x86, and other processors. Download Site is http://sourceforge.net/projects/u-boot

The process of U-boot startup in the arm9-system is as follows:

1. Jump to the reset code (set the CPU to SVC, ARM working mode, and SDRAM initialization)
2. Copy the U-boot code to the RAM space. C functions can be called.
3. Call the initialization Function
(CPU_init (), board_init (), interrupt_init (), serial_init ())
4. initialize the flash device
5. initialize the system memory allocation function
6. initialize the NAND Device
7. initialize the Display Device
8. initialize a network device
9. Enter the command loop to receive commands sent from the serial port. If there is no user operation delay for 10 seconds, the Linux kernel is automatically loaded. First, copy the Linux kernel Image to the ram space, jump to the First Command of the Linux kernel code, and give control to the Linux kernel.
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.