The S3C2410 is a cost-effective microprocessor from Samsung for embedded systems. It is a 16/32-bit RISC processor based on the ARM9TDMI core and operates at 200MHz. Since the existing Linux system introduces the concept of device files, the read/write serial port can be operated like a normal file, which is very convenient.
First, the installation of the Linux system
The welcome process first appears in the installation process, as shown in the image above. Red Hat asks the user which language to use, the type of keyboard the user uses (the default option is the US keyboard), and the location where the software is installed (choose the local CD-ROM).
Use Disk Druid to create a Linux file system and then set up the development board through a PC, and execute the following commands to write the kernel and file system to the development board:
At this point, power off the development board and connect the LCD. Restart the development board, the QT calibration program will appear on the LCD, and the QT interface will be entered after calibration.
Second, U-Boot startup procedures and processes
U-Boot is an open source embedded driver that evolved from PC-Boot. It mainly completes the initialization of the system environment, and copies the post-execution j code to the SDRAM space to provide conditions for the operation of the Linux kernel. According to the difference in the way its function is implemented, it can be divided into two stages. It can be applied to other development boards by modifying the configuration. Therefore, the choice of U-Boot can not only be applied to the S3C2410, but also provide a basis for future research on other development boards.
This article selects the most common version of U-Boot -1.1.6 as an example to introduce U-Boot startup and related porting procedures.
1. In the early stage of U-Boot operation, the ARM series processor starts from the physical address Ox00000000 at power-on or reset. This is also the starting position of the storage space used by the first piece of Flash, and U-Boot is stored in Flash. The front end. The first phase of U-Boot is implemented in assembly language to achieve short and precise purposes, mainly to complete the initialization of the system hardware environment. The workflow is shown in the following figure.
During the startup process of this step, U-Boot needs to initialize the boot environment and then prepare for subsequent work, such as initialization of hardware devices such as serial port, network port, and flash, and read the kernel image and root file system image from Flash. Go to the RAM space and call the kernel that has already been downloaded.
2. In the later stage of U-Boot operation, when the startup environment initialization is completed, it enters the post-start phase. This part of the code is implemented in C language to facilitate more complex functions and better code readability and portability. The function _start_armboot0 is the entry point to execute the image.
(1) U-Boot necessary initialization: The system initializes at least one serial port to perform I/O output information with the end user, including system information and operation menus; initialize the timer to facilitate the countdown; initialize the Flash, register the Flash operation. Function to prepare for Flash read and write. In the loader U-Boot, the hangable binary file can be received from the host through the kermit protocol, the file is first placed in the SDRAM, and then the NORFlash AM29LV160DB is erased by the NORFlash operation program, and the file is programmed. Go to NORFlash. The later workflow is shown in the figure.
(2) Download the Linux operating system using the TFTP network protocol: The download program U-Boot includes the TFTP network download file mode, and the download speed is several times faster than the Kermit protocol mode, which can greatly save the file download time, which is extremely simple. The debugging method of the embedded program.
Since TFTP uses UDP and UDP uses lP, lP can also use other local communication methods. Therefore, a TFTP packet will have the following segments: local media header, lP header, data header, TFTP header, and the rest is TFTP data. TFTP does not specify any data in the lP header, but it uses the source and destination ports in UDP and the packet length field. The packet tag (TID) used by TFTP is used here as a port, so the TID must be between 0-65,535. The TFTP header includes two upper byte operation codes. This code indicates the type of the packet, and the necessary migration work can be performed according to the TFTP packet format.
Third, the U-Boot migration process
Different board hardware configurations require U-Boot porting. The task of porting U-Boot includes adding development board hardware related files, configuring U-Boot, and then compiling. U-Boot -1.1.4 supports the SMDK2410 development board, and the SMDK2410 also uses the S3C2410 chip. Therefore, select the SMDK2410 as the migration reference and define the U-Boot that the target board needs to add:
1. Setting up the target board directory in the boarcl/ directory Since U-Boot itself supports many development boards and processors, you can find the development board with the same or similar processor model, and then make corresponding modifications on this basis. Select smdk2410 as the template here.
2. Create the S3C2410 directory and files, and modify the Makefile Mkdir board/S3C2410
3. By modifying the file smdk2410. h to modify the U-Boot software and hardware configuration to increase the PING command function
9v wall charger,AC Power Supply Wall Plug,Wall Adapter Power Supply,9V Power Adapter,ac 50/60hz power adapter,Wall Adapter Power Supply - 9VDC,100-240v converter switching power adapter
Shenzhen Waweis Technology Co., Ltd. , https://www.waweispowerasdapter.com