Skip to content

Commit

Permalink
tools/mkimage: update to 2021.10
Browse files Browse the repository at this point in the history
Changelog:

 - upstream now needs OpenSSL in order to be able to sign FITs. See:
commit cb9faa6f98ae ("tools: Use a single target-independent config to enable OpenSSL")

 - removes upstream patches.

Link: u-boot/u-boot@cb9faa6
Tested-by: Sergey V. Lobanov <sergey@lobanov.in>
Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
  • Loading branch information
zhanhb authored and chunkeey committed Dec 27, 2021
1 parent a0ad1f3 commit b6385a3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 399 deletions.
5 changes: 3 additions & 2 deletions tools/mkimage/Makefile
Expand Up @@ -7,14 +7,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mkimage
PKG_VERSION:=2021.01
PKG_VERSION:=2021.10

PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
https://mirror.cyberbits.eu/u-boot \
https://ftp.denx.de/pub/u-boot \
ftp://ftp.denx.de/pub/u-boot
PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
PKG_HASH:=cde723e19262e646f2670d25e5ec4b1b368490de950d4e26275a988c36df0bd4

HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)

Expand All @@ -38,6 +38,7 @@ define Host/Compile
CONFIG_FIT=y \
CONFIG_FIT_SIGNATURE=y \
CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 \
CONFIG_TOOLS_LIBCRYPTO=y \
tools-only
endef

Expand Down
12 changes: 6 additions & 6 deletions tools/mkimage/patches/030-allow-to-use-different-magic.patch
Expand Up @@ -2,15 +2,15 @@ This patch makes it possible to set a custom image magic.

--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -21,6 +21,7 @@ static struct image_tool_params params =
@@ -24,6 +24,7 @@ static struct image_tool_params params =
.arch = IH_ARCH_PPC,
.type = IH_TYPE_KERNEL,
.comp = IH_COMP_GZIP,
+ .magic = IH_MAGIC,
.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
.imagename = "",
.imagename2 = "",
@@ -82,11 +83,12 @@ static void usage(const char *msg)
@@ -85,11 +86,12 @@ static void usage(const char *msg)
" -l ==> list image header information\n",
params.cmdname);
fprintf(stderr,
Expand All @@ -24,16 +24,16 @@ This patch makes it possible to set a custom image magic.
" -a ==> set load address to 'addr' (hex)\n"
" -e ==> set entry point to 'ep' (hex)\n"
" -n ==> set image name to 'name'\n"
@@ -150,7 +152,7 @@ static void process_args(int argc, char
@@ -155,7 +157,7 @@ static void process_args(int argc, char
int opt;

while ((opt = getopt(argc, argv,
- "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
+ "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) {
- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
+ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) {
switch (opt) {
case 'a':
params.addr = strtoull(optarg, &ptr, 16);
@@ -237,6 +239,14 @@ static void process_args(int argc, char
@@ -245,6 +247,14 @@ static void process_args(int argc, char
case 'l':
params.lflag = 1;
break;
Expand Down
Expand Up @@ -15,11 +15,9 @@ __u64 is not available on FreeBSD, remove its usage.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/image.h | 2 ++
include/imx8image.h | 5 +++++
include/linux/posix_types.h | 2 ++
include/linux/types.h | 4 +++-
lib/rsa/rsa-sign.c | 2 +-
5 files changed, 13 insertions(+), 2 deletions(-)
3 files changed, 7 insertions(+), 1 deletion(-)

--- a/include/image.h
+++ b/include/image.h
Expand Down

This file was deleted.

0 comments on commit b6385a3

Please sign in to comment.