刷机
参考https://www.right.com.cn/forum/thread-530906-1-1.html
uboot(Breed)
虽然Breed是uboot实现的,但是还是有web界面的:
相关常用命令:
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2018 HackPascal <hackpascal@gmail.com>
Build date 2018-12-29 [git-135bed9]
Version 1.1 (r1266)
DRAM: 64MB
Platform: MediaTek MT7621A ver 1, eco 3
Board: PandoraBox PBR-M1 / Newifi Y2S
Clocks: CPU: 880MHz, DDR: 800MHz, Bus: 220MHz, Ref: 40MHz
Flash: GigaDevice GD25Q128 (16MB) on mt7621-spi.0
rt2880-eth: MAC address from EEPROM is invalid, using default settings.
rt2880-eth: Using MAC address 00:0c:43:00:00:01
eth0: MediaTek MT7530 Gigabit switch
Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0
Press any key to interrupt autoboot ... 2
Autoboot aborted due to key press.
Starting breed built-in shell
breed>
breed> help
Available commands:
about - About this bootloader
abstatus - Interrupt status of autoboot
arp - Display ARP table
autoboot - Detect firmware type and boot automatically
boot - Boot firmware
btntst - Test GPIO of buttons
dhcp - Display DHCP leases
env - Environment variables utility
envconf - Configure environment variable block
exit - Exit from telnet
flash - Flash utility
gpio - GPIO utilities
help - Show available commands
jtagd - JTAG dongle over GPIO
mdio - MDIO utility
mem - Memory operation utilities
net - Network control
netstat - Display network state
reset - Restart device
setbrg - Set baudrate
spi - SPI utility
sysinfo - Display system information
thread - Display all threads
wget - Retrieval file through HTTP
breed> about
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2018 HackPascal <hackpascal@gmail.com>
Build date 2018-12-29 [git-135bed9]
Version 1.1 (r1266)
breed> arp
IP address MAC address
breed> env
Usage:
env list - List all environment variables
env get <key> - Get value of a key
env set <key> <value> - Set value of a key
env unset <key> - Remove a key with its value
env clear - Remove all contents
env save - Save environment variables to flash
breed> env list
Environment is not available.
breed> flash
Usage:
flash list - List all flashes
flash [bank <n>] info - Show detail of flash bank <n>
flash [bank <n>] dump <addr> <size> - Display contents of flash
flash [bank <n>] read <addr> <dst> <size> - Read flash contents to memory
flash [bank <n>] erase <addr> <size> - Erase flash sector(s)
flash [bank <n>] write <addr> <src> <size> - Write data to flash
breed> flash list
Bank Type Size Model
0 SPI-NOR 16MB GigaDevice GD25Q128
breed> gpio
GPIO direction status name
0 in lo
1 in hi
2 in hi
3 in lo
4 in lo
5 in lo
6 in lo
7 in lo
8 in lo
9 in lo
10 in lo
11 in hi
12 in lo
13 in hi
14 in hi
15 in hi
16 in hi
17 in lo
18 in hi reset
19 in lo
20 in hi
21 in hi
22 in hi
23 in hi
24 in hi
25 in hi
26 out hi
27 in hi
28 out hi wlan5g
29 out hi internet
30 in hi
31 out lo power
32 out hi sys
33 out hi wlan2g
34 in hi
35 in hi
36 in lo
37 in hi
38 in hi
39 in hi
40 in hi
41 in lo
42 in lo
43 in lo
44 in lo
45 in lo
46 in lo
47 in lo
48 in lo
49 in lo
50 in lo
51 in lo
52 in lo
53 in lo
54 in lo
55 in lo
56 in lo
57 in lo
58 in lo
59 in lo
60 in lo
61 in lo
breed> spi
Usage:
spi list - List all SPI slaves
spi [dev <slave>] <op> [<op> [<op> ...]] - Do <op> on <slave>
Operations:
start - Select slave
stop - Deselect slave
read <addr> <size> - Read to memory
read display <size> - Read and display
write <addr> <size> - Write from memory
write str <str> - Write from input
speed <speed_str> - Set SPI bus speed
Note:
<str> uses C style encoding, i.e. \x0d\x0a
<speed_str> can have k/m as suffix
breed> spi list
Available SPI slaves:
mt7621-spi.0
breed> sysinfo
Platform: MediaTek MT7621A ver 1, eco 3
Board: PandoraBox PBR-M1 / Newifi Y2S
Clocks: CPU: 880MHz, DDR: 800MHz, Bus: 220MHz, Ref: 40MHz
Relocate Offset: 03ebc000
DRAM size: 64MB
DRAM range: 80000000 - 83ffffff
Kernel size: 266KB
Kernel range: 83fbc000 - 83ffea3b
Kernel symbol table size: 16KB
Kernel symbol table range: 83fb7d28 - 83fbbffc
Managed memory size: 2MB
Managed memory range: 83db7c28 - 83fb7c27
Managed memory used: 278.03KB (13.57%)
Boot parameter size: 256KB
Boot parameter range: 83d77b28 - 83db7b27
Unused memory size: 61MB
Unused memory range: 80001000 - 83d76b27
breed> thread
Id CPU Time Parent Status IRQ/Mutex Routine
0 01:51 Running kernel_main
1 00:00 0 Pending 5 net_loop
2 00:00 0 Pending 77 shell_daemon
3 00:00 2 Running shell_routine
4 00:00 0 Sleeping sys_led_blink_routine
breed> mem
Usage:
mem dump [keep] <start_addr> [size] - Display memory range
mem crc32 <addr> <size> - Calculate CRC32 of memory range
mem read [byte|short|long] <addr> - Read value from specific address
mem write [byte|short|long] <addr> <value> - Write value to specific address
mem write str <addr> <str> - Write string to specific address
mem copy <dst> <src> <size> - Copy memory block
mem fill <dst> <val> <size> - Fill memory block
mem compare <addr1> <addr2> <size> - Compare memory block
breed>
breed>
breed>
breed> autoboot
Trying to boot firmware from 0x00050000 in flash bank 0 ...
Reading data into memory ...
U-Boot firmware image header detected.
Image Name: MIPS OpenWrt Linux-5.10.172
Data Size: 2749753 Bytes
Load Address: 80001000
Entry Point: 80001000
Flushing cache ... done.
Starting kernel at 0x80001000...
OpenWrt kernel loader for MIPS based SoC
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80001000...
[ 0.000000] Linux version 5.10.172 (siwind@ArchLinux) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r22481-1814a6022e) 12.2.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Tue Mar 14 14:00:25 2023
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is ZTE E8820V2
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] percpu: Embedded 15 pages/cpu s30224 r8192 d23024 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Writing ErrCtl register=000407cc
[ 0.000000] Readback ErrCtl register=000407cc
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 54376K/65536K available (6725K kernel code, 624K rwdata, 1364K rodata, 1256K init, 235K bss, 11160K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 256
[ 0.000000] CPU Clock: 880MHz
[ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[ 0.000014] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[ 0.007943] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[ 0.016999] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[ 0.083164] pid_max: default: 32768 minimum: 301
[ 0.087925] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.095129] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.105833] rcu: Hierarchical SRCU implementation.
[ 0.110887] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[ 0.119014] smp: Bringing up secondary CPUs ...
[ 0.124311] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.124321] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.124333] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.124412] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.178765] Synchronize counters for CPU 1: done.
[ 0.210934] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.210943] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.210951] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.210994] CPU2 revision is: 0001992f (MIPS 1004Kc)
[ 0.270057] Synchronize counters for CPU 2: done.
[ 0.300690] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.300699] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.300706] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.300755] CPU3 revision is: 0001992f (MIPS 1004Kc)
[ 0.355247] Synchronize counters for CPU 3: done.
[ 0.385114] smp: Brought up 1 node, 4 CPUs
[ 0.393602] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.403430] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.410465] pinctrl core: initialized pinctrl subsystem
[ 0.418272] NET: Registered protocol family 16
[ 0.424707] cpuidle: using governor teo
[ 0.477715] clocksource: Switched to clocksource GIC
[ 0.484519] NET: Registered protocol family 2
[ 0.489306] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.497312] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.505743] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.513339] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.520327] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.526761] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.533269] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.540495] NET: Registered protocol family 1
[ 0.544791] PCI: CLS 0 bytes, default 32
[ 0.551077] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.562339] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.568280] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.580900] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.586730] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.592631] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.599299] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[ 0.607344] printk: console [ttyS0] disabled
[ 0.611680] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
....后面切换成57600波特率了。。。。