The S3C2410 is a cost-effective microprocessor designed by Samsung for embedded systems. It is a 16/32-bit RISC processor based on the ARM9TDMI core and operates at a clock speed of up to 200MHz. One of the key features of the Linux operating system is its device file concept, which allows serial port operations to be treated like regular file access, making it very convenient for developers.
The first step in setting up the system is installing the Linux operating system. During the installation process, the welcome screen appears, as shown in the image above. Red Hat prompts the user to select their preferred language, keyboard layout (the default is the US keyboard), and the installation source (usually a local CD-ROM).
Next, the Disk Druid tool is used to create a Linux file system. Then, the development board is set up via a PC, and the following commands are executed to write the kernel and file system to the board:
After powering off the development board and connecting the LCD, restarting the board will display the QT calibration program on the screen. Once calibrated, the QT interface will be loaded and ready for use.
Second, the U-Boot startup procedure and process
U-Boot is an open-source embedded bootloader that evolved from PC-Boot. Its main function is to initialize the system environment and copy the post-execution code into SDRAM, preparing the environment for the Linux kernel to run. Based on how it implements its functions, it can be divided into two stages. With proper configuration, U-Boot can be adapted to other development boards, making it a flexible choice not only for the S3C2410 but also a foundation for future research on other platforms.
This article uses the widely used version of U-Boot -1.1.6 as an example to explain the startup and porting procedures of U-Boot.
1. In the early stage of U-Boot operation, the ARM processor starts execution from physical address 0x00000000 upon power-on or reset. This is also where the initial Flash storage begins, and U-Boot is stored at the beginning of this space. The first stage of U-Boot is implemented in assembly language, aiming for efficiency and precision, primarily to initialize the hardware environment. The workflow is illustrated below.
During this phase, U-Boot initializes the boot environment and prepares for subsequent tasks such as initializing hardware components like the serial port, network interface, and flash memory. It then reads the kernel and root file system images from Flash and loads them into RAM before calling the kernel.
2. In the later stage of U-Boot operation, once the initialization is complete, the system enters the second stage. This part of the code is written in C to support more complex functionalities and improve code readability and portability. The entry point for executing the image is the function _start_armboot.
(1) Necessary Initialization in U-Boot: The system must initialize at least one serial port to provide I/O output for the user, including system information and menus. It also initializes the timer for countdown functionality and the Flash memory with associated operations. The U-Boot loader can receive binary files from a host via the Kermit protocol, store them in SDRAM, erase the NORFlash, and program the file into the Flash. The subsequent workflow is shown in the figure below.
(2) Downloading the Linux OS using TFTP: U-Boot includes a TFTP network download mode, which is significantly faster than the Kermit protocol, reducing download time and simplifying the debugging process for embedded software.
Since TFTP uses UDP over IP, it can take advantage of local communication methods. A TFTP packet typically consists of a local media header, IP header, UDP header, TFTP header, and the data itself. TFTP does not specify details in the IP header, but it uses the source and destination ports in UDP along with the packet length field. The TID (Transaction ID) used by TFTP acts as a port, so it must be within the range of 0–65,535. The TFTP header contains two bytes for the operation code, indicating the type of packet, allowing for necessary processing based on the TFTP packet format.
Third, the U-Boot porting process
Porting U-Boot requires adapting it to different board hardware configurations. The task involves adding hardware-specific files, configuring U-Boot, and compiling it. U-Boot version 1.1.4 supports the SMDK2410 development board, which also uses the S3C2410 chip. Therefore, the SMDK2410 is selected as a reference for porting, and the necessary files for the target board are added.
1. Setting up the target board directory in the board/ folder: Since U-Boot supports many development boards, you can find a similar board and modify it accordingly. Here, we choose smdk2410 as the template.
2. Creating the S3C2410 directory and files, and modifying the Makefile: Create the board/S3C2410 directory and update the Makefile accordingly.
3. Modifying the smdk2410.h file to adjust the U-Boot software and hardware configuration, and add the PING command functionality.
MT6-Subminiature Dustproof Micro Switch
Features
â—† Designed For Water and Dust Tight(IP67)
â—† Small Compact Sizeâ—† UL&ENEC&CQC Safety Approvals
â—† Long life & high reliability
â—† Variety of Levers
â—† Wide Range of wiring Terminals
â—† Wide used in Automotive Electronics,Appliance and Industrial Control etc.
â—† Customized Designs
Micro Magnetic Switch,Micro Momentary Switch,Sealed Rotary Switch,Subminiature Dustproof Micro Switch
Ningbo Jialin Electronics Co.,Ltd , https://www.donghai-switch.com