Uboot version: u-boot-2013.01
Development board: Exynos4412
This article is mainly to familiarize yourself with the use of U-boot and how to burn U-boot into Exynos4412. Of course, before that, you must first ensure that U-boot is already on the development board. If not, please burn a compiled Uboot.bin first, you can use JTAG or DNW.
1. Environment Construction
In order to facilitate development, data is transmitted over the network, mainly using tftp and nfs. tftp is used for data transmission, and nfs is used to mount the root file system.
1. TFTP mode settings
For specific configuration, please visit http://blog.csdn.net/zqixiao_09/article/details/50319877 . There are two modes of using tftp here: a. interactive mode (manual) b. automatic mode.
a -- interactive mode
Enter the following command in the Uboot interface:
tftp 41000000 uImage //Copy the tftp host uImage to 4412 memory address 41000000
tftp 42000000 exynos4412-fs4412.dtb
bootm 41000000 - 420000000
b-- Automatic mode:
Set bootcmd, so that after Uboot is loaded successfully, the bootcmd command will be executed to automatically download the file and boot the kernel
setenv bootcmd tftp 41000000 uImage ; tftp 42000000 exynos4412-fs4412.dtb; bootm 41000000 - 42000000
to clay
Bootcmd uses '' between each command to input multiple commands.
2. Mount the root file system via NFS
1) Configure nfs
a -- Download
sudo apt-get install nfs-kernel-server
b -- Configuration
sudo vi /etc/exports
Add your nfs shared directory in the last line
/nfsboot *(rw,sync,no_subtree_check) note: Make sure this directory exists (permissions: 777)
c -- Restart nfs service
sudo /etc/init.d/nfs-kernel-server restart
d -- test
Method 1) showmount -e
The second method) mount it yourself
mount -t nfs 127.0.0.1:/nfsboot /mnt/xxx
For specific configuration, please visit http://blog.csdn.net/zqixiao_09/article/details/50337933
2) Copy and decompress the created root file system
cp xxx/rootfs.tar.xz /nfsboot
tar xvf rootfs.tar.xz
3) Set the development board bootargs
setenv bootargs root=/dev/nfs nfsroot=virtual machine ip:/nfsboot/rootfs rw console=ttySAC2,115200 ip=development board ip init=/linuxrc
to clay
Note: root=/dev/nfs means the root file system is on /dev/nfs; nfsroot=virtual machine ip:/nfsboot/rootfs is the location of the virtual machine file system; init=/linuxrc is the first process started after booting;
4) Testing
Write a program and run it on the development board
2. Detailed explanation of commonly used Uboot commands
1. Environment setting commands
a -- View current environment variables
printenv
b -- Add environment variables
setenv
例: set ipaddr 192.168.1.1 ====>ipaddr=192.168.1.1
c -- Modify environment variables
setenv variable name value
d -- delete environment variables
setenv variable name
e--Common environment variables
ipaddr: set the development platform ip
serverip: tftp server ip
netmask: subnet mask
gatewayip: gateway
bootcmd: start kernel variables (commands executed during automatic startup)
bootargs: parameters transmitted to the kernel (at the kernel stage, the original environment variables have no effect)
bootdelay: set the interaction delay
2. Data transmission command
a -- Network
tftp memory address file name (use TFTP protocol to transfer files)
b -- Serial port
loadb memory address (using Kermit transport protocol)
3. Memory access commands
a -- Memory:
md Display memory contents
Format: md 41000000
mm Modify memory value (address automatically increases by one)
Format: mm 41000000
ends with .
mm.w (2B) mm.l (4B, default)
mw Fills memory with the specified data
Format: mw 41000000 12345678 10
Write 0x10 times 0x12345678 to the starting address 0x41000000
b-- External memory:
1) -- nand:
nand write 20008000 0 40000
nand read 20008000 0 40000
nand erase 0 40000
2) -- emmc:
movi write kernel 41000000
Write memory 41000000 data to the kernel partition of emmc
movi read kernel 41000000
Load the contents of the kernel partition of emmc into the memory address 41000000
Note: Exynos4412 uses eMMC for external memory, no NAND flash or NOR flash.
4. Run
a -- bootm
The bootm command is specifically used to start the memory image processed by the U-boot mkimage tool in SDRAM (pointing the pc pointer to the memory address, and other operations)
b -- go
Point the pc pointer to the memory address
c -- boot
Restart the development board
5. Others
Run: Run the content of the specified environment variable
help: View all commands
3. Download and Burn
1. Product model:
Product mode means that Uboot, Kernel, and rootfs have been successfully transplanted and can be burned into external memory for direct use.
The following is mainly the method of burning uboot, kernel, dtb, and rootfs to emmc. The method of loading uboot, kernel, dtb, and rootfs into memory here uses tftp. Of course, there are other methods, such as nfs and SD card.
1) -- uboot burning:
a) -- uboot already exists in emmc
via Internet :
tftp 41000000 u-bootxxx.bin
movi write u 41000000
Restart to take effect.
b) -- emmc is empty
Burn via SD card:
1: Pull the switch to 1000 (SD card boot)
and enter the command: sdfuse flashall
2: Pull the switch back to 0110 (emmc boot)
Restart to take effect
2)-- Kernel and dtb burning
via network tftp 41000000 uImage
movi write k 41000000
Through the network tftp 41000000 exynos4412-fs4412.dtb
movi write d 41000000
3) -- Burn ramdisk (image of rootfs)
via network tftp 41000000 ramdisk.img
movi write r 41000000 300000
4) -- Set the boot parameter bootcmd
setenv bootcmd movi read k 41000000; movi read d 42000000;movi read r 43000000 300000; bootm 41000000 43000000 42000000
NOTE: If the data in the middle of bootm is '-', it means it is mounted from nfs [see bootargs]. If it is a memory address, the file system is loaded from the address.
Previous article:How does the GPIO of the iTOP-4412 development board work?
Next article:Chapter 12: Tiny4412 U-BOOT transplantation 12 DDR3 initialization sequence
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Developing FFT Applications Using Low-Power Microcontrollers
- IEEE 754 floating point hexadecimal conversion tool
- Disassembling the world's first automotive LiDAR
- How to Design an RF Power Amplifier
- The simulation of multiplication floating point IP in quartus, has anyone used it?
- What is integrated circuit layout design
- LED downlight replacement dimmable power supply
- There are some problems with the PFC circuit power-on process. Please consult
- LM358 audio amplifier circuit (loudspeaker)
- Problems with porting UCGUI