aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-07-11 15:32:34 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-07-11 23:39:18 +0100
commit349e2b7e658290f967a4aab4fd9d754572f9b0b2 (patch)
treecb63514e89b40b1f8515d4717afe43847be3d17a /package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
parent3ac13416ca67908a691d3ae3c9b08623a56e9c60 (diff)
downloadupstream-349e2b7e658290f967a4aab4fd9d754572f9b0b2.tar.gz
upstream-349e2b7e658290f967a4aab4fd9d754572f9b0b2.tar.bz2
upstream-349e2b7e658290f967a4aab4fd9d754572f9b0b2.zip
uboot-mediatek: several fixes for MT7622
* ! Behavior change ! Old behavior: If the Reset button is held down during power-on do factory reset and try booting recovery from TFTP forever. If valid recovery is received via TFTP, write it to flash and boot. New behavior: If the Reset button is held down during power-on do factory reset, then try TFTP *once*, then try booting on-flash recovery, then keep trying via TFTP forever until a valid image is received. Only if there is no bootable recovery stored on flash, store the downloaded recovery. Then boot it. * Set loadaddr to 0x48000000 in order to allow booting images larger than ~47MB (reported by Oskari Lemmelä). Setting loadaddr to 0x48000000 gives us 384MB on devices with 512MB RAM, which should be more than enough as a maximum size for uImage.FIT to be loaded. * Widely unify device-specific default environment in preparation to auto-generate it from parameters. * backport upstream commit fixing MBR/DOS partitioning Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch')
-rw-r--r--package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
new file mode 100644
index 0000000000..8432053ea0
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
@@ -0,0 +1,26 @@
+From c7d1b1890880ee64786b92a1b95ba9ecb4694997 Mon Sep 17 00:00:00 2001
+From: Christian Melki <christian.melki@t2data.com>
+Date: Mon, 7 Jun 2021 11:21:15 +0200
+Subject: [PATCH] disk/part_dos.c: Fix a variable typo in
+ write_mbr_partitions()
+
+This function is passed *dev not *dev_desc, so pass the right name to
+part_init().
+
+Fixes: f14c5ee5ab8b ("disk: part_dos: update partition table entries after write")
+Signed-off-by: Christian Melki <christian.melki@t2data.com>
+---
+ disk/part_dos.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/disk/part_dos.c
++++ b/disk/part_dos.c
+@@ -424,7 +424,7 @@ int write_mbr_partitions(struct blk_desc
+ }
+
+ /* Update the partition table entries*/
+- part_init(dev_desc);
++ part_init(dev);
+
+ return 0;
+ }