If you debug the driver at the uboot stage, you can make full use of the existing resources of uboot. This is more convenient and can speed up the development process. Only by standing on the shoulders of giants can you achieve twice the result with half the effort.
1. uboot provides operation commands to cover
2. Nand Flash operation, reading, writing, erasing, and status printing;
3. DDR operation, memory byte printing;
4. Network operation, ping command, ftp download function, command code details see [Linux bottom layer] U-boot burning script introduction SecureCRT
=> ping 192.168.2.108
5. Operation of MAC controller, MII can read the data of MAC controller and change the data controlled by MAC;
//Dual network cards, activate the current network card setting ethprime=ethernet@f0028000, the current network card
=> setenv ethprime ethernet@f0028000 //eth0 gmac
=> setenv ethprime ethernet@f802c000 //eth1 emac
=> mii device ethernet@f802c000 //MII interface switch PHY
=> mii device ethernet@f0028000
=> mii device //Query which PHY is enabled on the current MII interface
MII devices: 'ethernet@f0028000' 'ethernet@f802c000'
Current device: 'ethernet@f802c000'
=>mii read 0 3 //Use the MII interface to read the information of register address 3 of eht0
=>mii read 1 3 //Use the MII interface to read the information of register address 3 of eht1
uboot command can correctly read PHY information
Use the MII interface to read PHY information
=> mii info
MII_PHYSID2 @ 0x0 = 0xb8a0
PHY_PHYIDR[1,2] @ 0x0 = 0x0181b8a0
PHY 0x00: OUI = 0x606E, Model = 0x0A, Rev = 0x00, 10baseT, HDX
6. Change startup parameters
bootargs=console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256K(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs
bootcmd=nand read 0x21000000 0x180000 0x80000;nand read 0x22000000 0x200000 0x600000;bootz 0x22000000 - 0x21000000
7. Setting and viewing environment variables
//Environment variables
=>pri
arch=arm
baudrate=115200
board=sama5d3_xplained
board_name=sama5d3_xplained
bootargs=console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256K(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs
bootcmd=nand read 0x21000000 0x180000 0x80000;nand read 0x22000000 0x200000 0x600000;bootz 0x22000000 - 0x21000000
bootdelay=3
cpu=armv7
eth1addr=EE:AB:C1:D2:E6:C6
ethact=ethernet@f802c000
ethaddr=EE:AB:C1:D2:E6:C6
fdtcontroladdr=2fb16b48
ipaddr=192.168.1.100
ipaddr1=192.168.2.100
serverip=192.168.1.108
soc=at91
stderr=serial@ffffee00
stdin=serial@ffffee00
stdout=serial@ffffee00
vendor=atmel
8. The debugging command of EMMC can check whether the drive is successful and print out the size;
9. Use the help command to check which commands uboot supports, and the list will be printed out;
10. Command usage can also be obtained through help, for example: command line $mii help
Previous article:[Linux bottom layer] U-boot ksz9031 network driver debugging
Next article:[Linux bottom layer] U-boot compilation and transplantation
Recommended ReadingLatest update time:2024-11-23 19:06
- 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
- What does C_CAN and D_CAN mean?
- About the version of MicroPython?
- 2019 National Undergraduate Electronic Design Competition Summary and Award Ceremony Notice
- Disease data information is uploaded to the cloud in a timely manner NRF9160
- Research and Application of Asynchronous Generators
- Measuring magnet position using the LSM303AGR magnetometer
- [Evaluation of SGP40] +UART communication test sensor
- About TMS320C6000 serial interrupt
- [Silicon Labs BG22-EK4108A Bluetooth Development Evaluation] 2. Development Environment Construction
- It’s not fun anymore. The delivery time of 4G modules is about 4-6 weeks.