diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-09-11 17:40:46 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-09-11 19:31:03 +0200 |
commit | 07aa858a73e6e855fc62a37ae275518fa4db5e50 (patch) | |
tree | 2ef3a199efacea2e0f39e11d3b1bd3b82943f564 /target/linux/ramips/dts | |
parent | a4e5b8897a922802acf3587d401627fd6f2c0c27 (diff) | |
download | upstream-07aa858a73e6e855fc62a37ae275518fa4db5e50.tar.gz upstream-07aa858a73e6e855fc62a37ae275518fa4db5e50.tar.bz2 upstream-07aa858a73e6e855fc62a37ae275518fa4db5e50.zip |
ramips: fix partitions and boot for RAVPower RP-WD03
The RAVPower RP-WD03 is a battery powered router, with an Ethernet and
USB port. Due due a limitation in the vendor supplied U-Boot bootloader,
we cannot exceed a 1.5 MB kernel size, as is the case with recent builds
(i.e. post v19.07). This breaks both factory and sysupgrade images.
To address this, use the lzma loader (loader-okli) to work around this
limitation.
The improvements here also address the "misplaced" U-Boot environment
partition, which is located between the kernel and rootfs in the stock
image / implementation. This is addressed by making use of mtd-concat,
maximizing space available in the booted image.
This will make sysupgrade from earlier versions impossible.
Changes are based on the recently supported HooToo HT-TM05, as the
hardware is almost identical (except for RAM size) and is from the same
vendor (SunValley). While at it, also change the SPI frequency
accordingly.
Installation:
- Download the needed OpenWrt install files, place them in the root
of a clean TFTP server running on your computer. Rename the files as,
- openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-kernel.bin => kernel
- openwrt-ramips-mt7620-ravpower_rp-wd03-squashfs-rootfs.bin => rootfs
- Plug the router into your computer via Ethernet
- Set your computer to use 10.10.10.254 as its IP address
- With your router shut down, hold down the power button until the first
white LED lights up.
- Push and hold the reset button and release the power button. Continue
holding the reset button for 30 seconds or until it begins searching
for files on your TFTP server, whichever comes first.
- The router (10.10.10.128) will look for your computer at 10.10.10.254
and install the two files. Once it has finished installation, it will
automatically reboot and start up OpenWrt.
- Set your computer to use DHCP for its IP address
Notes:
- U-Boot environment can be modified, u-boot-env is preserved on initial
install or sysupgrade
- mtd-concat functionality is included, to leave a "hole" for u-boot-env,
combining the OEM kernel and rootfs partitions
Most of the changes in this commit are the work of Russell Morris (as
credited below), I only wrapped them up and added compat-version.
Thanks to @mpratt14 and @xabolcs for their help getting the lzma loader
to work!
Fixes: 5ef79af4f80f ("ramips: add support for Ravpower WD03")
Suggested-by: Russell Morris <rmorris@rkmorris.us>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/dts')
-rw-r--r-- | target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts index 31ecd4dd85..407697a5e3 100644 --- a/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts +++ b/target/linux/ramips/dts/mt7620n_ravpower_rp-wd03.dts @@ -36,6 +36,24 @@ linux,code = <KEY_RESTART>; }; }; + + virtual_flash { + compatible = "mtd-concat"; + + devices = <&firmware1 &firmware2 &firmware3>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "openwrt,okli"; + label = "firmware"; + reg = <0x0 0x0>; + }; + }; + }; }; &gpio2 { @@ -56,7 +74,8 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <50000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; @@ -70,7 +89,7 @@ }; partition@30000 { - label = "u-boot-env"; + label = "config"; reg = <0x30000 0x10000>; read-only; }; @@ -82,9 +101,29 @@ }; partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0x7b0000>; + label = "loader"; + reg = <0x50000 0x10000>; + read-only; + }; + + firmware2: partition@60000 { + label = "firmware2"; + reg = <0x60000 0x170000>; + }; + + partition@1d0000 { + label = "u-boot-env"; + reg = <0x1d0000 0x10000>; + }; + + firmware3: partition@1e0000 { + label = "firmware3"; + reg = <0x1e0000 0x20000>; + }; + + firmware1: partition@200000 { + label = "firmware1"; + reg = <0x200000 0x600000>; }; }; }; |