aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorChukun Pan <amadeus@jmu.edu.cn>2023-04-20 23:03:08 +0800
committerDaniel Golle <daniel@makrotopia.org>2023-05-02 18:17:09 +0100
commit6c9b526e84e73880eaf72cb656b5908bc5c3f792 (patch)
tree77a993860e7de5003419e22e726e67ebe4a65e2f /package
parentab8ead3e2d2d43c67536ec64076dec5d725408cd (diff)
downloadupstream-6c9b526e84e73880eaf72cb656b5908bc5c3f792.tar.gz
upstream-6c9b526e84e73880eaf72cb656b5908bc5c3f792.tar.bz2
upstream-6c9b526e84e73880eaf72cb656b5908bc5c3f792.zip
uboot-mediatek: fixes build when nmbm enabled
The image_header_t typedef has been removed from uboot v2023.01 [1], replaced with legacy struct. [1] https://github.com/u-boot/u-boot/commit/f3543e69442ca393e52df253d9c5d45bc189d471 Fixes: 3d5c542 ("uboot-mediatek: update to U-Boot 2023.01") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Diffstat (limited to 'package')
-rw-r--r--package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch b/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch
index c1188c62a5..6b319384d5 100644
--- a/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch
+++ b/package/boot/uboot-mediatek/patches/100-09-cmd-add-nmbm-command.patch
@@ -205,9 +205,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+#endif
+ }
+
-+ ret = mtd_read(mtd, off, sizeof(image_header_t), &retlen,
++ ret = mtd_read(mtd, off, sizeof(struct legacy_img_hdr), &retlen,
+ (void *)loadaddr);
-+ if (ret || retlen != sizeof(image_header_t)) {
++ if (ret || retlen != sizeof(struct legacy_img_hdr)) {
+ printf("Failed to read NMBM at offset 0x%08llx\n", off);
+ return CMD_RET_FAILURE;
+ }
@@ -215,7 +215,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ switch (genimg_get_format((void *)loadaddr)) {
+#if defined(CONFIG_LEGACY_IMAGE_FORMAT)
+ case IMAGE_FORMAT_LEGACY:
-+ size = image_get_image_size((image_header_t *)loadaddr);
++ size = image_get_image_size((struct legacy_img_hdr *)loadaddr);
+ image_name = "legacy";
+ break;
+#endif