mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-09 08:08:27 +00:00
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]f3543e6944
Fixes:3d5c542
("uboot-mediatek: update to U-Boot 2023.01") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
This commit is contained in:
parent
ab8ead3e2d
commit
6c9b526e84
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user