Hi all,
I have OpenWRT based, AI7688 board. I am trying to update firmware(sysupgrade image) into the board using loadb command. But when using cp command in u-boot then its not working.
Also, bootm command is not booting the firmware from the location. Its booting the firmware from the address where the firmware is loaded.
Below are the logs shown the issue occured
U-Boot 1.1.3 for AI7688H-64MB (Feb 16 2017 - 08:19:34)
MT7628 # loadb 0x80a00000 57600
## Ready for binary (kermit) download to 0x80A00000 at 57600 bps...
[04050C08][04050C0E]
DDR Calibration DQS reg = 00008986
U-Boot 1.1.3 for AI7688H-64MB (Feb 16 2017 - 08:19:34)
Board: Ralink APSoC
DRAM: 128 MB
relocate_code Pointer at: 87f68000
flash manufacture id: c2, device id 20 1a
find flash: MX25L51245G
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:Feb 16 2017 Time:08:19:34
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 580 MHZ ####
estimate memory size =128 Mbytes
RESET MT7628 PHY!!!!!!
GPIOMODE --> 50054404
GPIOMODE2 --> 5540551
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
You choosed 4
0
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 for AI7688H-64MB (Feb 16 2017 - 08:19:34)
MT7628 # loadb 0x80a00000 57600
## Ready for binary (kermit) download to 0x80A00000 at 57600 bps...
## Total Size = 0x01540004 = 22282244 Bytes
## Start Addr = 0x80A00000
MT7628 # erase linux
Erase linux kernel block !!
From 0x50000 length 0x3FB0000
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
MT7628 # cp.linux
Copy linux image[1431655765 byte] to SPI Flash[0x00050000]....
MT7628 # help
? - alias for 'help'
bootm - boot application image from memory
cp - memory copy
crc32 - checksum calculation
erase - erase SPI FLASH memory
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
go - start application at address 'addr'
help - print online help
loadb - load binary file over serial line (kermit mode)
md - memory display
mdio - Ralink PHY register R/W command !!
mm - memory modify (auto-incrementing)
nm - memory modify (constant address)
printenv- print environment variables
reset - Perform RESET of the CPU
rf - read/write rf register
saveenv - save environment variables to persistent storage
setenv - set environment variables
spi - spi command
tftpboot- boot image via network using TFTP protocol
usb - USB sub-system
usbboot - boot from USB device
version - print monitor version
MT7628 # help cp
cp
cp.uboot
- copy uboot block
cp.linux
- copy linux kernel block
MT7628 # cp.linux
Copy linux image[1431655765 byte] to SPI Flash[0x00050000]....
MT7628 # bootm
## Booting image at 80a00000 ...
Image Name: MIPS OpenWrt Linux-3.18.23
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1194147 Bytes = 1.1 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 128
Starting kernel ...
[ 0.000000] Linux version 3.18.23 (blogic@debian) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49203) ) #5 Tue Sep 27 11:48:57 CEST 2016
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7688 ver:1 eco:2
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] MIPS: machine is MediaTek LinkIt Smart 7688
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x07ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x07ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS2,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=0000d47c
[ 0.000000] Readback ErrCtl register=0000d47c
[ 0.000000] Memory: 126140K/131072K available (2658K kernel code, 129K rwdata, 532K rodata, 192K init, 190K bss, 4932K reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] intc: using register map from devicetree
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource_of_init: no matching clocksources found
[ 0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.080000] pinctrl core: initialized pinctrl subsystem
[ 0.090000] NET: Registered protocol family 16
[ 0.110000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.120000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.130000] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.140000] Switched to clocksource MIPS
[ 0.150000] NET: Registered protocol family 2
[ 0.150000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.170000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.180000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.190000] TCP: reno registered
[ 0.200000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.210000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.220000] NET: Registered protocol family 1
[ 0.230000] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.280000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.300000] msgmni has been set to 246
[ 0.310000] io scheduler noop registered
[ 0.310000] io scheduler deadline registered (default)
[ 0.320000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.340000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[ 0.360000] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
[ 0.380000] console [ttyS2] disabled
[ 0.380000] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A
[ 0.400000] console [ttyS2] enabled
[ 0.400000] console [ttyS2] enabled
[ 0.420000] bootconsole [early0] disabled
[ 0.420000] bootconsole [early0] disabled
[ 0.430000] spi-mt7621 10000b00.spi: sys_freq: 193333333
[ 0.450000] m25p80 spi32766.0: found mx66l51235l, expected mx25l25635e
[ 0.470000] m25p80 spi32766.0: mx66l51235l (65536 Kbytes)
[ 0.480000] m25p80 spi32766.0: using chunked io
[ 0.490000] 4 ofpart partitions found on MTD device spi32766.0
[ 0.500000] Creating 4 MTD partitions on "spi32766.0":
[ 0.510000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.520000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.530000] 0x000000040000-0x000000050000 : "factory"
[ 0.540000] 0x000000050000-0x000002000000 : "firmware"
[ 0.650000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[ 0.660000] mt7621_wdt 10000120.watchdog: Initialized
[ 0.670000] TCP: cubic registered
[ 0.680000] NET: Registered protocol family 17
[ 0.690000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 0.720000] Bridge firewalling registered
[ 0.720000] 8021q: 802.1Q VLAN Support v1.8
[ 0.730000] mtk-linkit bootstrap: Version :
[ 0.740000] mtk-linkit bootstrap: Revision :
[ 0.750000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 0.770000] Please append a correct "root=" boot option; here are the available partitions:
[ 0.780000] 1f00 192 mtdblock0 (driver?)
[ 0.790000] 1f01 64 mtdblock1 (driver?)
[ 0.800000] 1f02 64 mtdblock2 (driver?)
[ 0.810000] 1f03 32448 mtdblock3 (driver?)
[ 0.820000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.820000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[04050C09][04050C0D]
DDR Calibration DQS reg = 00008987
U-Boot 1.1.3 for AI7688H-64MB (Feb 16 2017 - 08:19:34)
Board: Ralink APSoC
DRAM: 128 MB
relocate_code Pointer at: 87f68000
flash manufacture id: c2, device id 20 1a
find flash: MX25L51245G
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:Feb 16 2017 Time:08:19:34
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 580 MHZ ####
estimate memory size =128 Mbytes
RESET MT7628 PHY!!!!!!
GPIOMODE --> 50054404
GPIOMODE2 --> 5540551
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP.
Can someone please let me know how can we get it resolved.
Thanks in advance,
Lad Dhawal Umesh