-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathuboot-netconsole.txt
99 lines (87 loc) · 3.38 KB
/
uboot-netconsole.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
On Host (Linux), use nc command (NetConsole Tool) to access the u-boot netconsole:
Connect Host to OpenHub6 Ethernet port.
Configure Host with IP 192.168.255.2
Run nc -nul 6666 &
Run nc -u 192.168.255.1 6666
On the Target (OpenHub), boot to netconsole mode:
hold Reset button and push a pin into the hole at the bottom then release the pin. Keep Reset button pressed.
Wait at least 8 red flashes before releasing the Reset button.
The uboot version should show.
Below are some command output (uboot version, environment variables and boot that shows OpenWRT version).
dr_boot> version
version
U-Boot 1.1.4 (Jun 3 2014)
dr_boot> printenv
printenv
bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:192k(u-boot),64k(u-boot-env),16064k(firmware),64k(ART)
bootdelay=1
baudrate=115200
bootfile="firmware.bin"
loadaddr=0x80800000
ncport=6666
uboot_addr=0x9F000000
uboot_name=uboot.bin
uboot_size=0x30000
uboot_upg=if ping $serverip; then tftp $loadaddr $uboot_name && if itest.l $filesize == $uboot_size; then erase $uboot_addr +$filesize && cp.b $loadaddr $uboot_addr $filesize && echo OK!; else echo ERROR! Wrong file size!; fi; else ERROR! Server not reachable!; fi
firmware_addr=0x9F040000
firmware_name=firmware.bin
firmware_upg=if ping $serverip; then tftp $loadaddr $firmware_name && erase $firmware_addr +$filesize && cp.b $loadaddr $firmware_addr $filesize && echo OK!; else ERROR! Server not reachable!; fi
filesize=4a0000
fileaddr=81000000
serverip=192.168.255.2
bootcmd=bootm 0x9f040000
ipaddr=192.168.255.1
stdin=nc
stdout=nc
stderr=nc
ethact=eth1
Environment size: 956/32764 bytes
dr_boot> ?
?
? - alias for 'help'
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
clearclk - remove PLL and clocks configuration from FLASH
cp - memory copy
defenv - reset environment variables to their default values
dhcp - invoke DHCP client to obtain IP/boot params
echo - echo args to console
erase - erase FLASH memory
exit - exit script
go - start application at address 'addr'
help - print embedded help
httpd - start www server for firmware recovery
iminfo - print firmware header
itest - return true/false on integer compare
md - memory display
mm - memory modify (auto-incrementing)
mtest - RAM test
mw - memory write (fill)
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv - print environment variables
printmac - print MAC addresses stored in FLASH
reset - perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to FLASH
setclk - select clocks configuration from predefined list
setenv - set environment variables
setmac - save new MAC address in FLASH
sntp - send NTP request to NTP server
startnc - start net console
startsc - start serial console
test - minimal test like /bin/sh
tftpboot - boot image via network using TFTP protocol
version - print U-Boot version
dr_boot> boot
boot
Booting image at: 0x9F040000
Image name: MIPS OpenWrt Linux-3.18.45
Created: 2019-11-11 20:22:22 UTC
Image type: MIPS Linux Kernel Image (lzma compressed)
Data size: 1190213 Bytes = 1.1 MB
Load address: 0x80060000
Entry point: 0x80060000
Uncompressing kernel image... OK!
Starting kernel...