immortalwrt/target/linux
David Woodhouse bf58bfb90e mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623
This board ships with an ancient 14.07-based OpenWrt using block2mtd, and
the MBR partition table contains nonsense.

It is possible to sysupgrade to an upstream OpenWrt image, but the
legacy layout of the OpenWrt images start at 0xA00 in the eMMC, with
a raw uImage. The legacy OpenWrt image doesn't "own" the beginning
of the device, including the MBR and U-Boot.

This means that when a user upgrades to upstream OpenWrt, it doesn't
boot because it can't find the right partitions. So hard-code them on
the kernel's command line using CONFIG_CMDLINE_PARTITION (for block).

Additionally, the vendor firmware doesn't cope with images larger than
about 36MiB, because it only overwrites the contents of its "firmware"
MTD partition. The current layout of the legacy image wastes a lot of
space, allowing over 32MiB for the kernel and another 10MiB for the FAT
recovery file system which is only created as 3MiB. So pull those in
to allow 4¾ MiB for the kernel, 3MiB for recovery, and then we have over
20MiB for the root file system.

This doesn't affect the new images which ship with a full eMMC image
including a different MBR layout and a partition for U-Boot, because
our modern U-Boot can actually pass the command line to the kernel, and
the built-in one doesn't get used anyway.

Tested by upgrading from vendor OpenWrt to the current legacy image,
from legacy to itself, to the previous legacy layout, and then to
finally the full-system image.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
(cherry picked from commit 6eb63019af)
2020-07-30 11:50:07 +08:00
..
apm821xx kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
ar71xx ar71xx: Fix mikrotik NAND compile problem 2020-07-07 23:43:26 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt armvirt,x86: fix build breakage of crypto ccp module 2020-07-05 13:33:31 +02:00
at91 at91: disable legacy PTYs and virtual terminals 2019-12-17 11:27:20 +02:00
ath25 kernel: bump 4.14 to 4.14.171 2020-02-24 14:20:14 +01:00
ath79 ath79: correctly define WiFi switch for TL-WR841ND v8 2020-07-23 17:40:23 +02:00
bcm53xx bcm53xx: add support for Luxul FullMAC WiFi devices 2020-04-07 15:51:11 +02:00
brcm47xx bcm47xx: fix switch setup for Linksys WRT610N v2 2020-07-23 17:40:00 +02:00
brcm63xx bcm63xx: DGND3700v1: fix port order 2020-06-28 14:32:42 +02:00
brcm2708 kernel: fix nand_release() usage. 2020-07-04 21:04:11 +02:00
cns3xxx kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
gemini kernel: bump 4.14 to 4.14.156 2019-11-29 10:00:35 +01:00
generic kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
imx6 treewide: remove 4.19 leftovers 2019-10-08 12:45:13 +02:00
ipq40xx ipq40xx: fix ethernet vlan double tagging 2020-07-14 18:36:19 +02:00
ipq806x ipq806x: EA8500 fix boot partition detection 2020-06-03 15:29:03 +02:00
kirkwood kirkwood: support for button in Pogoplug V4 2020-07-10 13:55:54 +02:00
lantiq lantiq/xrx200: make WLAN button responsive on Fritzbox 7360 & 7362 2020-07-23 17:39:42 +02:00
layerscape kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
malta malta: remove CONFIG_LEGACY_PTY from kernel config 2019-12-17 11:27:30 +02:00
mediatek mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623 2020-07-30 11:50:07 +08:00
mpc85xx kernel: bump 4.14 to 4.14.171 2020-02-24 14:20:14 +01:00
mvebu kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
mxs kernel: bump 4.14 to 4.14.178 2020-05-04 21:05:21 +02:00
octeon treewide: remove 4.19 leftovers 2019-10-08 12:45:13 +02:00
octeontx kernel: bump 4.14 to 4.14.176 2020-04-16 13:23:52 +02:00
omap treewide: use new procd sysupgrade $UPGRADE_BACKUP variable 2019-09-12 13:27:29 +02:00
oxnas kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
pistachio kernel: Update kernel 4.14 to version 4.14.187 2020-07-04 19:22:23 +02:00
ramips kernel: fix nand_release() usage. 2020-07-04 21:04:11 +02:00
rb532 kernel: bump 4.14 to 4.14.86 2018-12-10 11:48:44 +01:00
samsung kernel: fix nand_release() usage. 2020-07-04 21:04:11 +02:00
sunxi kernel: bump 4.14 to 4.14.169 2020-02-04 18:11:26 +01:00
tegra tegra: correct cpu subtype 2020-04-18 00:18:13 +02:00
uml uml: remove CONFIG_LEGACY_PTY from kernel config 2019-12-17 11:27:16 +02:00
x86 armvirt,x86: fix build breakage of crypto ccp module 2020-07-05 13:33:31 +02:00
zynq zynq: make title consistent for all devices 2019-05-17 21:41:43 +02:00
Makefile