openwrt/target/linux/mediatek/patches-5.4
David Woodhouse 6eb63019af 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.

This commit probably wants backporting to 19.07, which also doesn't
install over the vendor OpenWrt and doesn't even have a full-system
installation option.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2020-07-26 16:42:35 +08:00
..
0001-v5.7-spi-make-spi-max-frequency-optional.patch mediatek: backport spi-mem based mtk spinor driver 2020-03-21 12:58:29 +08:00
0002-v5.7-spi-add-support-for-mediatek-spi-nor-controller.patch mediatek: backport spi-mem based mtk spinor driver 2020-03-21 12:58:29 +08:00
0003-switch-add-mt7531.patch kernel: bump 5.4 to 5.4.24 2020-03-09 20:43:53 +01:00
0005-dts-mt7622-add-gsw.patch kernel: bump 5.4 to 5.4.24 2020-03-09 20:43:53 +01:00
0005-dts-mt7629-add-gsw.patch kernel: bump 5.4 to 5.4.24 2020-03-09 20:43:53 +01:00
0006-dts-fix-bpi2-console.patch kernel: bump 5.4 to 5.4.24 2020-03-09 20:43:53 +01:00
0006-dts-fix-bpi64-console.patch kernel: bump 5.4 to 5.4.24 2020-03-09 20:43:53 +01:00
0010-dts-mt7629-rfb-fix-firmware-partition.patch mediatek: mt7629: fix firmware partition 2020-03-21 12:58:29 +08:00
0226-phy-phy-mtk-tphy-Add-hifsys-support.patch mediatek: re-add u3phy2 phy-switch patch 2020-07-09 10:28:40 +02:00
0227-arm-dts-Add-Unielec-U7623-DTS.patch mediatek: mt7623: fix sysupgrade from vendor OpenWrt on UniElec U7623 2020-07-26 16:42:35 +08:00
0301-mtd-mtk-ecc-move-mtk-ecc-header-file-to-include-mtd.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0303-mtd-spinand-disable-on-die-ECC.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0306-spi-spi-mem-MediaTek-Add-SPI-NAND-Flash-interface-dr.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0307-dts-mt7629-add-snand-support.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0308-dts-mt7622-add-snand-support.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0310-dts-add-wmac-support-for-mt7622-rfb1.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0400-eth-fix-rx-vlan-hw-offload.patch kernel: bump 5.4 to 5.4.34 2020-04-21 22:16:33 +02:00
0401-eth-fix-eth1-tx-timeout.patch kernel: bump 5.4 to 5.4.34 2020-04-21 22:16:33 +02:00
0500-v5.6-crypto-backport-inside-secure.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0501-crypto-add-eip97-inside-secure-support.patch mediatek: minor fix to eip97 driver 2020-07-16 09:14:49 +02:00
0502-dts-mt7623-eip97-inside-secure-support.patch mediatek: switch over to extended upstream eip97 driver 2020-06-07 17:52:21 +02:00
0600-1-6-net-dsa-mt7530-Refine-message-in-Kconfig.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0600-2-6-net-dsa-mt7530-Extend-device-data-ready-for-adding-a-new-hardware.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0600-3-6-dt-bindings-net-dsa-add-new-MT7531-binding-to-support-MT7531.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0600-4-6-net-dsa-mt7530-Add-the-support-of-MT7531-switch.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0600-6-6-arm64-dts-mt7622-add-mt7531-dsa-to-bananapi-bpi-r64-board.patch kernel: bump 5.4 to 5.4.45 2020-06-09 16:59:33 +02:00
0900-bt-mtk-serial-fix.patch kernel: Update kernel 5.4 to version 5.4.50 2020-07-04 21:12:42 +02:00
0990-gsw-rtl8367s-mt7622-support.patch kernel: bump 5.4 to 5.4.31 2020-04-09 00:12:46 +02:00
0991-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
0992-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
0993-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
0994-ARM-dts-mediatek-Update-mt7629-PCIe-node.patch kernel: bump 5.4 to 5.4.52 2020-07-17 11:00:33 +02:00
0999-hnat.patch kernel: bump 5.4 to 5.4.39 2020-05-07 12:53:06 +02:00
1000-eth-gdm-config-backport.patch kernel: bump 5.4 to 5.4.39 2020-05-07 12:53:06 +02:00
1001-eth-mtk-disable-TBDDONE-support.patch kernel: bump 5.4 to 5.4.39 2020-05-07 12:53:06 +02:00