aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch
diff options
context:
space:
mode:
authorNick Hainke <vincent@systemli.org>2022-10-21 22:53:58 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-10-22 22:50:36 +0200
commit6e245777bdfe75f73766ef06458de6313a7d4d5e (patch)
tree88aa79a8d23275ffe3ca3ba5952cccc1a1820bef /tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch
parent0dfe1d2175940d710e8ae08e9e4229d110155977 (diff)
downloadupstream-6e245777bdfe75f73766ef06458de6313a7d4d5e.tar.gz
upstream-6e245777bdfe75f73766ef06458de6313a7d4d5e.tar.bz2
upstream-6e245777bdfe75f73766ef06458de6313a7d4d5e.zip
tools/mkimage: update to 2022.10
Remove upstreamed patches: - 020-tools-mtk_image-split-gfh-header-verification-into-a.patch - 021-tools-mtk_image-split-the-code-of-generating-NAND-he.patch - 022-tools-mtk_image-add-support-for-nand-headers-used-by.patch Refreshed manually: - 030-allow-to-use-different-magic.patch Signed-off-by: Nick Hainke <vincent@systemli.org>
Diffstat (limited to 'tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch')
-rw-r--r--tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch89
1 files changed, 0 insertions, 89 deletions
diff --git a/tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch b/tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch
deleted file mode 100644
index 62300af266..0000000000
--- a/tools/mkimage/patches/020-tools-mtk_image-split-gfh-header-verification-into-a.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From b6bb61fd3818f4a3025fedbe4d15dbeeaef6ee82 Mon Sep 17 00:00:00 2001
-From: Weijie Gao <weijie.gao@mediatek.com>
-Date: Tue, 2 Aug 2022 17:21:34 +0800
-Subject: [PATCH 28/31] tools: mtk_image: split gfh header verification into a
- new function
-
-The verification code of gfh header for NAND and non-NAND are identical.
-It's better to define a individual function to reduce redundancy.
-
-Reviewed-by: Simon Glass <sjg@chromium.org>
-Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
----
- tools/mtk_image.c | 51 +++++++++++++++++++----------------------------
- 1 file changed, 21 insertions(+), 30 deletions(-)
-
---- a/tools/mtk_image.c
-+++ b/tools/mtk_image.c
-@@ -432,6 +432,25 @@ static int mtk_image_vrec_header(struct
- return SHA256_SUM_LEN;
- }
-
-+static int mtk_image_verify_gfh(struct gfh_header *gfh, uint32_t type, int print)
-+{
-+ if (strcmp(gfh->file_info.name, GFH_FILE_INFO_NAME))
-+ return -1;
-+
-+ if (le32_to_cpu(gfh->file_info.flash_type) != type)
-+ return -1;
-+
-+ if (print)
-+ printf("Load Address: %08x\n",
-+ le32_to_cpu(gfh->file_info.load_addr) +
-+ le32_to_cpu(gfh->file_info.jump_offset));
-+
-+ if (print)
-+ printf("Architecture: %s\n", is_arm64_image ? "ARM64" : "ARM");
-+
-+ return 0;
-+}
-+
- static int mtk_image_verify_gen_header(const uint8_t *ptr, int print)
- {
- union gen_boot_header *gbh = (union gen_boot_header *)ptr;
-@@ -494,21 +513,7 @@ static int mtk_image_verify_gen_header(c
-
- gfh = (struct gfh_header *)(ptr + gfh_offset);
-
-- if (strcmp(gfh->file_info.name, GFH_FILE_INFO_NAME))
-- return -1;
--
-- if (le32_to_cpu(gfh->file_info.flash_type) != GFH_FLASH_TYPE_GEN)
-- return -1;
--
-- if (print)
-- printf("Load Address: %08x\n",
-- le32_to_cpu(gfh->file_info.load_addr) +
-- le32_to_cpu(gfh->file_info.jump_offset));
--
-- if (print)
-- printf("Architecture: %s\n", is_arm64_image ? "ARM64" : "ARM");
--
-- return 0;
-+ return mtk_image_verify_gfh(gfh, GFH_FLASH_TYPE_GEN, print);
- }
-
- static int mtk_image_verify_nand_header(const uint8_t *ptr, int print)
-@@ -562,21 +567,7 @@ static int mtk_image_verify_nand_header(
-
- gfh = (struct gfh_header *)(ptr + 2 * le16_to_cpu(nh->pagesize));
-
-- if (strcmp(gfh->file_info.name, GFH_FILE_INFO_NAME))
-- return -1;
--
-- if (le32_to_cpu(gfh->file_info.flash_type) != GFH_FLASH_TYPE_NAND)
-- return -1;
--
-- if (print)
-- printf("Load Address: %08x\n",
-- le32_to_cpu(gfh->file_info.load_addr) +
-- le32_to_cpu(gfh->file_info.jump_offset));
--
-- if (print)
-- printf("Architecture: %s\n", is_arm64_image ? "ARM64" : "ARM");
--
-- return 0;
-+ return mtk_image_verify_gfh(gfh, GFH_FLASH_TYPE_NAND, print);
- }
-
- static int mtk_image_verify_header(unsigned char *ptr, int image_size,