学习资料: https://www.bilibili.com/video/BV12E411h71h?p=6&vd_source=432ba293ecfc949a4174ab91ccc526d6 https://blog.csdn.net/x777777x/article/details/136444785
记录一次uboot启动log打印:
U-Boot 2016.03 (Mar 18 2024 - 01:07:08 +0800) // 编译时间2024/03/18 01:07:08 CPU: Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz) // CPU运行在396MHZ CPU: Industrial temperature grade (-40C to 105C) at 48C Reset cause: POR Board: MX6ULL 14x14 EVK I2C: ready // i2c准备就绪 DRAM: 512 MiB // 内存512M MMC: FSL_SDHC: 0, FSL_SDHC: 1 // 两个MMC控制器,0接的是SD卡,1接的是EMMC *** Warning - bad CRC, using default environment Display: TFT43AB (480x272) // LCD型号和格式 Video: 480x272x24 // 24表示RGB888格式LCD In: serial // 标准输入 Out: serial // 标准输出 Err: serial // 标准错误 switch to partitions #0, OK // 切换到了emmc的第0个分区 mmc1(part 0) is current device Net: Board Net Initialization Failed // net初始化失败 No ethernet found. Normal Boot Hit any key to stop autoboot: 0
uboot下支持的命令:
=> help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure bmode - sd1|sd2|qspi1|normal|usb|sata|ecspi1:0|ecspi1:1|ecspi1:2|ecspi1:3|esdhc1|esdhc2|esdhc3|esdhc4 [noreset] boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootelf - Boot from an ELF image in memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image bootz - boot Linux zImage image from memory clocks - display clocks cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation dcache - enable or disable data cache dhcp - boot image via network using DHCP/TFTP protocol dm - Driver model low level access echo - echo args to console editenv - edit environment variable env - environment handling commands erase - erase FLASH memory exit - exit script ext2load- load binary file from a Ext2 filesystem ext2ls - list files in a directory (default /) ext4load- load binary file from a Ext4 filesystem ext4ls - list files in a directory (default /) ext4size- determine a file's size ext4write- create a file in the root directory false - do nothing, unsuccessfully fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fatsize - determine a file's size fatwrite- write file into a dos filesystem fdt - flattened device tree utility commands flinfo - print FLASH memory information fstype - Look up a filesystem type fuse - Fuse sub-system go - start application at address 'addr' gpio - query and control gpio pins help - print command description/usage i2c - I2C sub-system icache - enable or disable instruction cache iminfo - print header information for application image imxtract- extract a part of a multi-image itest - return true/false on integer compare load - load binary file from a filesystem loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loadx - load binary file over serial line (xmodem mode) loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range ls - list files in a directory (default /) md - memory display mdio - MDIO utility commands mii - MII utility commands mm - memory modify (auto-incrementing address) mmc - MMC sub system mmcinfo - display MMC info mtest - simple RAM read/write test mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) ping - send ICMP ECHO_REQUEST to network host pmic - PMIC printenv- print environment variables protect - enable or disable FLASH write protection reset - Perform RESET of the CPU run - run commands in an environment variable save - save file to a filesystem saveenv - save environment variables to persistent storage setenv - set environment variables setexpr - set environment variable as the result of eval expression sf - SPI flash sub-system showvar - print local hushshell variables size - determine a file's size sleep - delay execution for some time source - run script from memory test - minimal test like /bin/sh tftpboot- boot image via network using TFTP protocol true - do nothing, successfully usb - USB sub-system usbboot - boot from USB device version - print monitor, compiler and linker version
1、信息查询命令
bdinfo:查看板子信息 => bdinfo arch_number = 0x00000000 boot_params = 0x80000100 DRAM bank = 0x00000000 -> start = 0x80000000 -> size = 0x20000000 eth0name = FEC1 ethaddr = (not set) current eth = FEC1 ip_addr = <NULL> baudrate = 115200 bps TLB addr = 0x9FFF0000 relocaddr = 0x9FF56000 reloc off = 0x18756000 irq_sp = 0x9EF53EA0 sp start = 0x9EF53E90- arch_number = 0x00000000:表示体系结构号为0。
- boot_params = 0x80000100:引导参数的地址为0x80000100。
- DRAM bank = 0x00000000:
- start = 0x80000000:DRAM bank的起始地址为0x80000000。
- size = 0x20000000:DRAM bank的大小为0x20000000,即536870912字节(约512MB)。
- eth0name = FEC1:网卡eth0的名称为FEC1。
- ethaddr = (not set):网卡eth地址未设置。
- current eth = FEC1:当前网卡为FEC1。
- ip_addr = :IP地址未设置。
- baudrate = 115200 bps:波特率为115200 bps。
- TLB addr = 0x9FFF0000:TLB地址为0x9FFF0000。
- relocaddr = 0x9FF56000:重定位地址为0x9FF56000。
- reloc off = 0x18756000:重定位偏移为0x18756000。
- irq_sp = 0x9EF53EA0:中断服务程序堆栈指针地址为0x9EF53EA0。
- sp start = 0x9EF53E90:堆栈指针的起始地址为0x9EF53E90。