CFE信息收集
来自Jack's Lab
打开串口写之后,reset 之时不停 Ctrl + c 可进入 CFE:
CFE version v1.0.4
BSP: 6.37.14.34 (r415984) based on BBP 1.0.37 for BCM947XX (32bit,SP,)
Build Date: Wed Apr 30 18:03:21 CST 2014 (szy@shenzhiyong-ct)
Copyright (C) 2000-2008 Broadcom Corporation.
Init Arena
Init Devs.
Boot up from NOR flash...
Boot partition size = 262144(0x40000)
Can't find nandflash! ccrev = 42, chipst= 0
DDR Clock: 800 MHz
Info: DDR frequency set from clkfreq=1000,*800*
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.37.14.34 (r415984)
CPU type 0x0: 1000MHz
Tot mem: 262144 KBytes
CFE mem: 0x00F00000 - 0x0179FE38 (9043512)
Data: 0x00F58390 - 0x00F588C8 (1336)
BSS: 0x00F588D8 - 0x00F9DE38 (284000)
Heap: 0x00F9DE38 - 0x0179DE38 (8388608)
Stack: 0x0179DE38 - 0x0179FE38 (8192)
Text: 0x00F00000 - 0x00F4CCC4 (314564)
Boot: 0x017A0000 - 0x017E0000
Reloc: I:00000000 - D:00000000
Device eth0: hwaddr 8C-BE-BE-20-B7-48, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Startup canceled
xiaomi> ^C
xiaomi> ^C
xiaomi> ^C
xiaomi> printenv
Variable Name Value
-------------------- --------------------------------------------------
BOOT_CONSOLE uart0
CFE_VERSION 1.0.37
CFE_BOARDNAME BCM947XX
CFE_MEMORYSIZE 262144
NET_DEVICE eth0
NET_IPADDR 192.168.1.1
NET_NETMASK 255.255.255.0
NET_GATEWAY 0.0.0.0
NET_NAMESERVER 0.0.0.0
STARTUP go;
*** command status = 0
xiaomi> help
Available commands:
nvram NVRAM utility.
reboot Reboot.
set console Change the active console device
loop Loop a command
nandboot SPI flash copy and jump to nand flash
flash Update a flash memory device
memtest Test memory.
f Fill contents of memory.
e Modify contents of memory.
d Dump memory.
u Disassemble instructions.
batch Load a batch file into memory and execute it
go Verify and boot OS image.
boot Load an executable file into memory and execute it
load Load an executable file into memory without executing it
save Save a region of memory to a remote file via TFTP
ping Ping a remote IP host.
arp Display or modify the ARP Table
ifconfig Configure the Ethernet interface
show clocks Show current values of the clocks.
show heap Display information about CFE's heap
show memory Display the system physical memory map.
show devices Display information about the installed devices.
unsetenv Delete an environment variable.
printenv Display the environment variables
setenv Set an environment variable.
help Obtain help for CFE commands
For more information about a command, enter 'help command-name'
*** command status = 0
xiaomi> help boot
SUMMARY
Load an executable file into memory and execute it
USAGE
boot [-options] host:filename|dev:filename
This command loads and executes a program from a boot device
By default, 'boot' will load a raw binary at virtual
address 0x20000000 and then jump to that address
OPTIONS
-elf Load the file as an ELF executable
-srec Load the file as ASCII S-records
-raw Load the file as a raw binary
-z Load compessed file
-loader=* Specify CFE loader name
-tftp Load the file using the TFTP protocol
-fatfs Load the file from a FAT file system
-rawfs Load the file from an unformatted file system
-fs=* Specify CFE file system name
-max=* Specify the maximum number of bytes to load (raw only)
-addr=* Specify the load address (hex) (raw only)
-noclose Don't close network link before executing program
*** command status = 0
xiaomi> show memory
Range Start Range End Range Size Description
------------ ------------ -------------- --------------------
000000000000-000000EFFFFF (000000F00000) DRAM (available)
0000017A0000-00000FFFFFFF (00000E860000) DRAM (available)
*** command status = 0
xiaomi> show devices
Device Name Description
------------------- ---------------------------------------------------------
uart0 NS16550 UART at 0x18000300
uart1 NS16550 UART at 0x18000400
flash0 ST Compatible Serial flash size 16384KB
flash0.boot ST Compatible Serial flash offset 00000000 size 256KB
flash0.trx ST Compatible Serial flash offset 00040000 size 1KB
flash0.os ST Compatible Serial flash offset 0004001C size 3072KB
flash0.trx2 ST Compatible Serial flash offset 00340000 size 1KB
flash0.os2 ST Compatible Serial flash offset 0034001C size 3072KB
flash0.trx3 ST Compatible Serial flash offset 00640000 size 1KB
flash0.squashfs ST Compatible Serial flash offset 0064001C size 8832KB
flash0.overlay ST Compatible Serial flash offset 00EE0000 size 1024KB
flash0.board_data ST Compatible Serial flash offset 00FE0000 size 64KB
flash0.nvram ST Compatible Serial flash offset 00FF0000 size 64KB
flash1.boot ST Compatible Serial flash offset 00000000 size 256KB
flash1.trx ST Compatible Serial flash offset 00040000 size 3072KB
flash1.trx2 ST Compatible Serial flash offset 00340000 size 3072KB
flash1.squashfs ST Compatible Serial flash offset 00640000 size 8832KB
flash1.overlay ST Compatible Serial flash offset 00EE0000 size 1024KB
flash1.board_data ST Compatible Serial flash offset 00FE0000 size 64KB
flash1.nvram ST Compatible Serial flash offset 00FF0000 size 64KB
eth0 Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller
*** command status = 0
xiaomi>
正常系统启动是参数为:
bootargs: boot -raw -z -addr=0x8000 -max=0xef8000 flash0.os:
flag_tftp_bootup=on 时启动参数为:
kernel: boot -raw -z -addr=0x8000 -max=0x800000 192.168.1.2:vmlinuz
boot_wait=on 时启动参数为:
Loader:raw Filesys:tftp Dev:eth0 File:192.168.1.2:vmlinuz Options:(null)