difos/target/linux
Adrian Schmutzler 07aa858a73 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: 5ef79af4f8 ("ramips: add support for Ravpower WD03")

Suggested-by: Russell Morris <rmorris@rkmorris.us>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-11 19:31:03 +02:00
..
apm821xx apm821xx: provide legacy interrupts for PCIe in DT 2020-09-05 23:26:05 +02:00
arc770 arc770: drop support for kernel 4.14 2020-09-02 16:29:22 +02:00
archs38 treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
armvirt kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
at91 at91: explicitly set CONFIG_USB_SUPPORT for sam9x subtarget 2020-08-27 16:36:18 +02:00
ath25 ath25: fix preinit Ethernet port configuration 2020-09-10 18:52:15 +02:00
ath79 ath79: add support for TP-Link EAP245-v3 2020-09-09 20:42:10 +03:00
bcm27xx kernel: bump 5.4 to 5.4.63 2020-09-06 19:55:19 +02:00
bcm47xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
bcm53xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
bcm63xx kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
cns3xxx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
gemini gemini: Add swap partition to DNS-313 2020-07-31 18:34:40 +02:00
generic kernel: use proper upstream inclusion version for patch 2020-09-11 18:40:44 +02:00
imx6 kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
ipq40xx ipq40xx: essedma: enable VLAN tag offload for single-port 2020-09-11 17:37:11 +02:00
ipq806x kernel: bump 5.4 to 5.4.63 2020-09-06 19:55:19 +02:00
ipq807x kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
kirkwood treewide: revert sysupgrade adjustments for early DSA-adopters 2020-09-08 19:27:15 +02:00
lantiq lantiq: remove vmmc node from FritzBox 7412 dts 2020-08-20 23:45:39 +02:00
layerscape kernel: bump 5.4 to 5.4.63 2020-09-06 19:55:19 +02:00
malta kernel: set WATCHDOG_CORE dependency in kmod-hwmon-sch5627 2020-08-24 14:09:11 +02:00
mediatek mediatek/ramips: remove an ethernet optimization patch that was reported to cause a regression 2020-09-09 11:51:47 +02:00
mpc85xx treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
mvebu treewide: revert sysupgrade adjustments for early DSA-adopters 2020-09-08 19:27:15 +02:00
mxs treewide: make dependency on kmod-usb-net selective 2020-08-10 12:54:30 +02:00
octeon octeon: add support for Itus Shield Router 2020-08-16 02:15:06 +02:00
octeontx kernel: bump 5.4 to 5.4.60 2020-08-24 17:33:58 +02:00
omap treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
oxnas oxnas: kd20: revert accedintally commited change 2020-08-29 01:16:24 +01:00
pistachio pistachio: drop support for kernel 4.14 2020-09-02 16:29:22 +02:00
ramips ramips: fix partitions and boot for RAVPower RP-WD03 2020-09-11 19:31:03 +02:00
rockchip kernel: bump 5.4 to 5.4.58 2020-08-18 18:14:54 +02:00
sunxi treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
tegra treewide: use wpad-basic-wolfssl as default 2020-08-20 14:19:39 +02:00
uml uml: update to linux 5.4 2020-08-22 07:02:01 +02:00
x86 kernel: bump 5.4 to 5.4.63 2020-09-06 19:55:19 +02:00
zynq kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
Makefile build: add 'make kernel_xconfig' command 2020-07-08 16:07:05 +02:00