RAVPower WD-03, Add LZMA Loader

What was rootfs? A 1920 MBye mkv file? :upside_down_face:

So ... after a clean HooToo flash you was curious how the empty RavPower looks like? :sweat_smile:

Just ask the vendor for full flash! You have the flashing set already! :wink:

I hope so, but I built the RavPower device.

I'm pretty sure...if you change the label it will not boot at all...

This is still needed yes?

I'm ripping of mtd-concat in a quick-and-dirty way.

Yep, it was the stock v19.07 ... LOL

Ya, but I had fully reassembled the RAVPower ... dang!

It comes up, but no web GUI?

LuCI? No LuCI in snapshot images, just releases.

Ahh. Ya, I add that to my config :laughing:

1 Like

NP, let me TFTP v19.07 (to kernel).

And kill your HooToo too? :see_no_evil:

LMAO! Nah, that one has the flash programmer still!

Which OpenWrt file did you try? File name please!
And its size in bytes?

It's openwrt-19.07.3-ramips-mt7620-ravpower_wd03-squashfs-sysupgrade.bin, ~ 4.1 MB. I wouldn't get too worried about this item - it's an error in the link (I can see), and a bug in u-boot. Don't want to get sidetracked by that ... LOL.

I have this load on the HooToo now, need to check sysupgrade when I get a chance. Thanks!

sysupgrade on v19.07.3 => clean, settings preserved! Unfortunately that doesn't mean something is not broken in master, but at least the latest build we are trying (with HooToo/RAVPower changes as well) is not working.

Thoughts?

Thanks!

Try my latest build on HooToo!

I disabled the mtd-concat functionality there, so flash it through tftp recovery and when its done with the first boot, you could try if preserving sysupgrade works!

Sure! But sorry, so many links, to make sure I get the right one - which link is it? Thanks!

Well, sort of funny ... had a bit of a mix-up with files, but perhaps it was good in the end :rofl:. OK, so here is what I did,

  1. Clean flash, OEM ... clear everything out
  2. TFTP flash, kernel and rootfs from your latest file (-03)
  3. Boot, don't see mtd-concat any more (just 2 partitions on firmware, firmware2 and firmware3 not used)
  4. Restore settings, sysupgrade -r ... check, yep, I see the settings
  5. Reboot, settings still there
  6. sysupgrade, reboots ... and settings are gone! But this was (accidentally ... the first time) with a build with mtd-concat. So I stepped back, and tried a few combinations (below!).

For each combination, after reboot I checked the configuration settings (/etc/config files), and if they were gone, I restored them (sysupgrade -r). Then I did a sysupgrade (-v), to the new file. Results,
a) -03, to mtd-concat: configuration lost
b) mtd-concat, to -03: configuration lost
c) -03, to -03: configuration lost

So from c), you can see that even without mtd-concat the settings are lost! Seems to me (by all means disagree!) that this is not related to mtd-concat, rather something else. And I did confirm ... just a reboot, settings are fine.

Stepping back (and thinking out loud ... careful :laughing:) => where is the info actually stored? Could it be that we need some padding, or limit a partition size, so that we don't overwrite it on flash? I do see that squashfs-split partition rootfs_data is overlapping with rootfs ... is this where the data is stored? Do we need to limit the size of rootfs slightly? I can try that here (I think ... LOL).

Thoughts?

Thank you for all the test!

It's nice to see that mtd-concat doesn't affect the bug. :+1:

I would try some paddig, the other options doesn't make me sense.
As you can see there are very few padding in the ramips target and the 19.07 image works without padding.

Please provide those lines from my 03.tar.gz and from a 19.07 build too!

Well, they are a bit different - and interesting (confusing?) ... in terms of length vs. absolute addresses. That said, here are the two cases,

  1. v19.07.3
[    0.549787] m25p80 spi0.0: gd25q64 (8192 Kbytes)
[    0.554552] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.561065] Creating 4 MTD partitions on "spi0.0":
[    0.565968] 0x000000000000-0x000000030000 : "u-boot"
[    0.571984] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.578278] 0x000000040000-0x000000050000 : "factory"
[    0.584366] 0x000000050000-0x000000800000 : "firmware"
[    0.593449] 2 uimage-fw partitions found on MTD device firmware
[    0.599566] Creating 2 MTD partitions on "firmware":
[    0.604646] 0x000000000000-0x00000017e017 : "kernel"
[    0.610623] 0x00000017e017-0x0000007b0000 : "rootfs"
[    0.616483] mtd: device 5 (rootfs) set to be root filesystem
[    0.623838] 1 squashfs-split partitions found on MTD device rootfs
[    0.630224] 0x0000003d5000-0x0000007b0000 : "rootfs_data"

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 007b0000 00001000 "firmware"
mtd4: 0017e017 00001000 "kernel"
mtd5: 00631fe9 00001000 "rootfs"
mtd6: 003db000 00001000 "rootfs_data"
  1. wd03, -03
[    0.590042] spi-nor spi0.0: gd25q64 (8192 Kbytes)
[    0.599549] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.612217] Creating 8 MTD partitions on "spi0.0":
[    0.621778] 0x000000000000-0x000000030000 : "u-boot"
[    0.632797] 0x000000030000-0x000000040000 : "config"
[    0.643856] 0x000000040000-0x000000050000 : "factory"
[    0.655143] 0x000000050000-0x000000051000 : "loader"
[    0.666145] 0x000000051000-0x0000001d0000 : "firmware2"
[    0.677707] 0x0000001d0000-0x0000001e0000 : "u-boot-env"
[    0.689455] 0x0000001e0000-0x000000200000 : "firmware3"
[    0.701002] 0x000000200000-0x000000800000 : "firmware"
[    0.719586] 2 okli-fw partitions found on MTD device firmware
[    0.731104] Creating 2 MTD partitions on "firmware":
[    0.741012] 0x000000000000-0x0000001f5f2b : "kernel"
[    0.752047] 0x0000001f5f2b-0x000000600000 : "rootfs"
[    0.763113] mtd: device 9 (rootfs) set to be root filesystem
[    0.776508] 1 squashfs-split partitions found on MTD device rootfs
[    0.788926] 0x00000041e000-0x000000600000 : "rootfs_data"

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "config"
mtd2: 00010000 00001000 "factory"
mtd3: 00001000 00001000 "loader"
mtd4: 0017f000 00001000 "firmware2"
mtd5: 00010000 00001000 "u-boot-env"
mtd6: 00020000 00001000 "firmware3"
mtd7: 00600000 00001000 "firmware"
mtd8: 001f5f2b 00001000 "kernel"
mtd9: 0040a0d5 00001000 "rootfs"
mtd10: 001e2000 00001000 "rootfs_data"

Thoughts? Really wondering about that 0x7b0000 ... leaving some room at the top end?

Thanks!

Nice catch! ... the -03 nuild has this room too ... :roll_eyes:

I have a few snapshot images from different devices: they all have some room at the end of their firmware partition.

Machine: GL.iNet GL-B1300, OpenWrt SNAPSHOT, r13134-f57230c4e6
[    0.600022] spi-nor spi0.0: mx25l25635e (32768 Kbytes)
[    0.605943] 9 fixed-partitions partitions found on MTD device spi0.0
[    0.610797] Creating 9 MTD partitions on "spi0.0":
[    0.617331] 0x000000000000-0x000000040000 : "SBL1"
[    0.622775] 0x000000040000-0x000000060000 : "MIBIB"
[    0.627483] 0x000000060000-0x0000000c0000 : "QSEE"
[    0.632215] 0x0000000c0000-0x0000000d0000 : "CDT"
[    0.637191] 0x0000000d0000-0x0000000e0000 : "DDRPARAMS"
[    0.641860] 0x0000000e0000-0x0000000f0000 : "APPSBLENV"
[    0.646954] 0x0000000f0000-0x000000170000 : "APPSBL"
[    0.652100] 0x000000170000-0x000000180000 : "ART"
[    0.657381] 0x000000180000-0x000002000000 : "firmware"
[    0.662272] 2 fit-fw partitions found on MTD device firmware
[    0.666225] Creating 2 MTD partitions on "firmware":
[    0.672002] 0x000000000000-0x0000003c0000 : "kernel"
[    0.677773] 0x0000003b42a0-0x000001e80000 : "rootfs"
[    0.682652] mtd: device 10 (rootfs) set to be root filesystem
[    0.687076] 1 squashfs-split partitions found on MTD device rootfs
[    0.692491] 0x000000640000-0x000001e80000 : "rootfs_data"
Machine: GL.iNet GL-AR300M (NOR), OpenWrt SNAPSHOT, r13136-ad27c133eb
[    0.313905] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.319210] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.325784] Creating 4 MTD partitions on "spi0.0":
[    0.330753] 0x000000000000-0x000000040000 : "u-boot"
[    0.336755] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.343081] 0x000000050000-0x000000ff0000 : "firmware"
[    0.352254] 2 uimage-fw partitions found on MTD device firmware
[    0.358441] Creating 2 MTD partitions on "firmware":
[    0.363595] 0x000000000000-0x0000001f0000 : "kernel"
[    0.369579] 0x0000001f0000-0x000000fa0000 : "rootfs"
[    0.375509] mtd: device 4 (rootfs) set to be root filesystem
[    0.382919] 1 squashfs-split partitions found on MTD device rootfs
[    0.389391] 0x000000430000-0x000000fa0000 : "rootfs_data"
[    0.395827] 0x000000ff0000-0x000001000000 : "art"
Machine: TP-Link TL-WR1043ND v1, OpenWrt SNAPSHOT, r12455-633c5137df
[    0.371345] m25p80 spi0.0: s25sl064p (8192 Kbytes)
[    0.376224] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.382698] Creating 3 MTD partitions on "spi0.0":
[    0.387547] 0x000000000000-0x000000020000 : "u-boot"
[    0.393713] 0x000000020000-0x0000007f0000 : "firmware"
[    0.403530] 2 tplink-fw partitions found on MTD device firmware
[    0.409569] Creating 2 MTD partitions on "firmware":
[    0.414579] 0x000000000000-0x0000001d2171 : "kernel"
[    0.420803] 0x0000001d2174-0x0000007d0000 : "rootfs"
[    0.426898] mtd: device 3 (rootfs) set to be root filesystem
[    0.434555] 1 squashfs-split partitions found on MTD device rootfs
[    0.440861] 0x000000400000-0x0000007d0000 : "rootfs_data"
[    0.447502] 0x0000007f0000-0x000000800000 : "art"

Sadly I don't have any mt7620 device currently. :confused:

I tried shortening the firmware1 partition slightly (0x600000 => 0x5b0000), but no joy. That was with mtd-concat though. Hmmm ... let me try to shorten that as well.