I'm building an image for my MR3420v1 that already upgraded the flash to 16/64.
After the image was build, I try to upload sysupgrade file to my router with breed.
After the image was uploaded, it's like always reboot and never enter the ssh console or luci.
But, when I upload initframfs kernel file, it's successfully boot and I can log in to the device.
Most likely you have an issue with the rootfs definition in the dts, or writing the roots is failing when you do the sysupgrade, but only the bootlog will show for sure
I didn't get bootlog yet, because I'm still using ethernet connection, I can ping ke the device just a few seconds seems the uboot is working, but then disconnect again when try to load the firmware.
where is the file showing rootfs definition/dts?
since this router is normally in tiny/small flash section. So, I make some modification in these file so I can build 3420v1 generic version
$ git checkout v21.02.1
M target/linux/ath79/image/generic-tp-link.mk
M target/linux/ath79/image/tiny-tp-link.mk
M target/linux/ath79/tiny/target.mk
HEAD is now at b4d7885af7 OpenWrt v21.02.1: adjust config defaults
My Proroute H820 router isn't supported by OpenWrt yet. I have it booting fine with a dts and patches made for 19.07.8 and also when I load 21.02.1 image to SDRAM via TFTP.
Here is log when booting 21.02.1 from flash:
U-Boot 1.1.3 (Aug 16 2012 - 13:48:50)
Board: Ralink APSoC DRAM: 64 MB
relocate_code Pointer at: 83fb4000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 42
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Aug 16 2012 Time:13:48:50
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 360 MHZ ####
estimate memory size =64 Mbytes
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. 4
You choosed 2
0
raspi_read: from:50028 len:6
.
2: System Load Linux Kernel then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.1.1) ==:192.168.1.1
Input server IP (192.168.1.101) ==:192.168.1.101
Input Linux Kernel filename (openwrt-21.02.1-ramips-rt305x-proroute_h820-squashfs-sysupgrade.bin) ==:openwrt-21.02.1-ramips-rt305x-proroute_h820-squashfs-sysupgrade.bin
netboot_common, argc= 3
NetTxPacket = 0x83FE5FC0
KSEG1ADDR(NetTxPacket) = 0xA3FE5FC0
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.101; our IP address is 192.168.1.1
Filename 'openwrt-21.02.1-ramips-rt305x-proroute_h820-squashfs-sysupgrade.bin'.
TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REPLY, set server/gtwy eth addr (08:08:08:08:08:08)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################
done
Bytes transferred = 4559654 (459326 hex)
NetBootFileXferSize= 00459326
raspi_erase_write: offs:200000, count:459326
raspi_erase: offs:200000 len:450000
.....................................................................
raspi_write: to:200000 len:450000
.....................................................................
raspi_read: from:200000 len:10000
.raspi_read: from:210000 len:10000
.raspi_read: from:220000 len:10000
.raspi_read: from:230000 len:10000
.raspi_read: from:240000 len:10000
.raspi_read: from:250000 len:10000
.raspi_read: from:260000 len:10000
.raspi_read: from:270000 len:10000
.raspi_read: from:280000 len:10000
.raspi_read: from:290000 len:10000
.raspi_read: from:2a0000 len:10000
.raspi_read: from:2b0000 len:10000
.raspi_read: from:2c0000 len:10000
.raspi_read: from:2d0000 len:10000
.raspi_read: from:2e0000 len:10000
.raspi_read: from:2f0000 len:10000
.raspi_read: from:300000 len:10000
.raspi_read: from:310000 len:10000
.raspi_read: from:320000 len:10000
.raspi_read: from:330000 len:10000
.raspi_read: from:340000 len:10000
.raspi_read: from:350000 len:10000
.raspi_read: from:360000 len:10000
.raspi_read: from:370000 len:10000
.raspi_read: from:380000 len:10000
.raspi_read: from:390000 len:10000
.raspi_read: from:3a0000 len:10000
.raspi_read: from:3b0000 len:10000
.raspi_read: from:3c0000 len:10000
.raspi_read: from:3d0000 len:10000
.raspi_read: from:3e0000 len:10000
.raspi_read: from:3f0000 len:10000
.raspi_read: from:400000 len:10000
.raspi_read: from:410000 len:10000
.raspi_read: from:420000 len:10000
.raspi_read: from:430000 len:10000
.raspi_read: from:440000 len:10000
.raspi_read: from:450000 len:10000
.raspi_read: from:460000 len:10000
.raspi_read: from:470000 len:10000
.raspi_read: from:480000 len:10000
.raspi_read: from:490000 len:10000
.raspi_read: from:4a0000 len:10000
.raspi_read: from:4b0000 len:10000
.raspi_read: from:4c0000 len:10000
.raspi_read: from:4d0000 len:10000
.raspi_read: from:4e0000 len:10000
.raspi_read: from:4f0000 len:10000
.raspi_read: from:500000 len:10000
.raspi_read: from:510000 len:10000
.raspi_read: from:520000 len:10000
.raspi_read: from:530000 len:10000
.raspi_read: from:540000 len:10000
.raspi_read: from:550000 len:10000
.raspi_read: from:560000 len:10000
.raspi_read: from:570000 len:10000
.raspi_read: from:580000 len:10000
.raspi_read: from:590000 len:10000
.raspi_read: from:5a0000 len:10000
.raspi_read: from:5b0000 len:10000
.raspi_read: from:5c0000 len:10000
.raspi_read: from:5d0000 len:10000
.raspi_read: from:5e0000 len:10000
.raspi_read: from:5f0000 len:10000
.raspi_read: from:600000 len:10000
.raspi_read: from:610000 len:10000
.raspi_read: from:620000 len:10000
.raspi_read: from:630000 len:10000
.raspi_read: from:640000 len:10000
.raspi_read: from:650000 len:10000
.raspi_erase: offs:650000 len:10000
.
raspi_write: to:650000 len:10000
.
raspi_read: from:650000 len:10000
.Done!
## Booting image at bc200000 ...
raspi_read: from:200000 len:40
. Image Name: Linux Kernel Image
Created: 2021-10-24 9:01:35 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1497132 Bytes = 1.4 MB
Load Address: 80000000
Entry Point: 80000000
raspi_read: from:200040 len:16d82c
....................... Verifying Checksum ... OK
Uncompressing Kernel Image ... zsf debug data error 3
LZMA ERROR 1 - must RESET board to recover
Yes, I understand that bootlog need to get serial connection. My usb to serial is still in my storage box and need to solder the connection, that is not my setup at the moment.
I'm using breed web to load the image.
Btw, thank you for .dts file idea, this is what I need...
I didn't know how expand the rootfs partition so sysupgrade image can be loaded.
The hex mathematics sound wrong.
You risk overwriting art.
Starting from 20000 with size fe0000 puts the partition end at 1000000 (or actually ffffff).
But art already starts from ff0000.
They overlap. Major risk of destroying the WiFi calibration data (= art).
You should have that size as 0xfd0000, so that art starting at ff0000 gets safely left alone. reg = <0x20000 0xfd0000>;
I've build the image, after flashing rootfs is in readonly.
Config is not saved after a reboot.
Is there any clue where to look at?
How to solve this issue?
Here are some boot log:
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.372795] 3 fixed-partitions partitions found on MTD device spi0.0
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.379207] Creating 3 MTD partitions on "spi0.0":
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.384078] 0x000000000000-0x000000020000 : "u-boot"
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.390623] 0x000000020000-0x000001000000 : "firmware"
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.400437] 2 tplink-fw partitions found on MTD device firmware
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.406482] Creating 2 MTD partitions on "firmware":
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.411513] 0x000000000000-0x0000001d6a80 : "kernel"
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.418020] 0x0000001d6a80-0x000000fe0000 : "rootfs"
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.424325] mtd: device 3 (rootfs) set to be root filesystem
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.432662] 1 squashfs-split partitions found on MTD device rootfs
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.438986] 0x000000510000-0x000000fe0000 : "rootfs_data"
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 0.445931] 0x000000ff0000-0x000001000000 : "art"
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 0.455087] libphy: Fixed MDIO Bus: probed
Sun Oct 24 09:01:45 2021 kern.err kernel: [ 0.802778] ag71xx 19000000.eth: Could not connect to PHY device. Deferring probe.
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 1.133652] random: fast init done
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.442151] libphy: ag71xx_mdio: probed
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.447076] libphy: ar8xxx-mdio: probed
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.454159] switch0: Atheros AR724X/AR933X built-in rev. 2 switch registered on mdio.0
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.495790] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.505916] eth0: Atheros AG71xx at 0xba000000, irq 5, mode: gmii
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.512398] i2c /dev entries driver
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.518200] NET: Registered protocol family 17
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.522818] 8021q: 802.1Q VLAN Support v1.8
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.530040] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.536623] MEM 0x0000000010000000..0x0000000013ffffff
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.541908] IO 0x0000000000000000..0x0000000000000000
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.547454] PCI host bridge to bus 0000:00
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.551639] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.558571] pci_bus 0000:00: root bus resource [io 0x0000]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.564195] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.571038] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.579073] pci 0000:00:00.0: [168c:ff1c] type 00 class 0x020000
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.585201] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1000ffff 64bit]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.592222] pci 0000:00:00.0: supports D1
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.596284] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.603755] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.610488] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.939291] ag71xx 19000000.eth: connected to PHY at mdio.0:1f:04 [uid=004dd041, driver=Generic PHY]
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.949510] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.969167] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.986097] Freeing unused kernel memory: 1192K
Sun Oct 24 09:01:45 2021 kern.warn kernel: [ 1.990694] This architecture does not have kernel memory protection.
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 1.997176] Run /sbin/init as init process
Sun Oct 24 09:01:45 2021 user.info kernel: [ 3.286943] init: Console is alive
Sun Oct 24 09:01:45 2021 user.info kernel: [ 3.290860] init: - watchdog -
Sun Oct 24 09:01:45 2021 user.info kernel: [ 5.589308] kmodloader: loading kernel modules from /etc/modules-boot.d/*
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 5.675027] usbcore: registered new interface driver usbfs
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 5.680750] usbcore: registered new interface driver hub
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 5.686270] usbcore: registered new device driver usb
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 5.707779] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Sun Oct 24 09:01:45 2021 user.info kernel: [ 5.727060] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
Sun Oct 24 09:01:45 2021 user.info kernel: [ 5.745348] init: - preinit -
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 8.100724] random: jshn: uninitialized urandom read (4 bytes read)
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 8.546553] random: jshn: uninitialized urandom read (4 bytes read)
Sun Oct 24 09:01:45 2021 kern.notice kernel: [ 8.618714] random: jshn: uninitialized urandom read (4 bytes read)
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 8.918104] eth0: link up (1000Mbps/Full duplex)
Sun Oct 24 09:01:45 2021 user.notice kernel: [ 13.356878] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
Sun Oct 24 09:01:45 2021 user.warn kernel: [ 13.369875] urandom-seed: Seed file not found (/etc/urandom.seed)
Sun Oct 24 09:01:45 2021 kern.info kernel: [ 13.507565] eth0: link down
Sun Oct 24 09:01:45 2021 user.info kernel: [ 13.528402] procd: - early -
Sun Oct 24 09:01:45 2021 user.info kernel: [ 13.531560] procd: - watchdog -
Sun Oct 24 09:01:45 2021 user.info kernel: [ 14.194407] procd: - watchdog -
Sun Oct 24 09:01:45 2021 user.info kernel: [ 14.225826] procd: - ubus -