tools: mkimage: update to U-Boot release 2022.07
Removed patch 090-macos-arm64-builing-fix.patch as an equivalent solution was applied upstream: 3b142045e8 Support building on macOS/arm64 To not add new host dependencies (libuuid, gnuTLS) don't build the anyway unused mkeficapsule tool which would otherwise now be built by default. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
		| @@ -7,26 +7,36 @@ | ||||
| include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=mkimage | ||||
| PKG_VERSION:=2022.01 | ||||
| PKG_VERSION:=2022.07 | ||||
|  | ||||
| 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:=81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413 | ||||
| PKG_HASH:=92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e | ||||
|  | ||||
| HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) | ||||
|  | ||||
| include $(INCLUDE_DIR)/host-build.mk | ||||
|  | ||||
| define Host/Configure | ||||
| 	$(MAKE) -C $(HOST_BUILD_DIR) \ | ||||
| 		HOSTCFLAGS="$(HOST_CFLAGS)" \ | ||||
| 		HOSTLDFLAGS="$(HOST_LDFLAGS)" \ | ||||
| 		PKG_CONFIG_EXTRAARGS="--static" \ | ||||
| 		V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ | ||||
| 		tools-only_config | ||||
|  | ||||
| 	sed -i 's/CONFIG_TOOLS_MKEFICAPSULE=y/# CONFIG_TOOLS_MKEFICAPSULE is not set/' $(HOST_BUILD_DIR)/.config | ||||
| endef | ||||
|  | ||||
| define Host/Compile | ||||
| 	$(MAKE) -C $(HOST_BUILD_DIR) \ | ||||
| 		HOSTCFLAGS="$(HOST_CFLAGS)" \ | ||||
| 		HOSTLDFLAGS="$(HOST_LDFLAGS)" \ | ||||
| 		PKG_CONFIG_EXTRAARGS="--static" \ | ||||
| 		V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ | ||||
| 		tools-only_config \ | ||||
| 		tools-only | ||||
| endef | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic. | ||||
|  | ||||
| --- a/tools/mkimage.c | ||||
| +++ b/tools/mkimage.c | ||||
| @@ -24,6 +24,7 @@ static struct image_tool_params params = | ||||
| @@ -25,6 +25,7 @@ static struct image_tool_params params = | ||||
|  	.arch = IH_ARCH_PPC, | ||||
|  	.type = IH_TYPE_KERNEL, | ||||
|  	.comp = IH_COMP_GZIP, | ||||
| @@ -10,8 +10,8 @@ This patch makes it possible to set a custom image magic. | ||||
|  	.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS, | ||||
|  	.imagename = "", | ||||
|  	.imagename2 = "", | ||||
| @@ -85,11 +86,12 @@ static void usage(const char *msg) | ||||
|  			 "          -l ==> list image header information\n", | ||||
| @@ -88,11 +89,12 @@ static void usage(const char *msg) | ||||
|  			 "          -q ==> quiet\n", | ||||
|  		params.cmdname); | ||||
|  	fprintf(stderr, | ||||
| -		"       %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n" | ||||
| @@ -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" | ||||
| @@ -155,7 +157,7 @@ static void process_args(int argc, char | ||||
| @@ -163,7 +165,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: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) { | ||||
| -		   "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:o:O:rR:qstT:vVx")) != -1) { | ||||
| +		   "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:o:O:rR:qstT:vVx")) != -1) { | ||||
|  		switch (opt) { | ||||
|  		case 'a': | ||||
|  			params.addr = strtoull(optarg, &ptr, 16); | ||||
| @@ -245,6 +247,14 @@ static void process_args(int argc, char | ||||
| @@ -254,6 +256,14 @@ static void process_args(int argc, char | ||||
|  		case 'l': | ||||
|  			params.lflag = 1; | ||||
|  			break; | ||||
| @@ -61,7 +61,7 @@ This patch makes it possible to set a custom image magic. | ||||
|  	image_set_load(hdr, addr); | ||||
| --- a/tools/imagetool.h | ||||
| +++ b/tools/imagetool.h | ||||
| @@ -56,6 +56,7 @@ struct image_tool_params { | ||||
| @@ -59,6 +59,7 @@ struct image_tool_params { | ||||
|  	int arch; | ||||
|  	int type; | ||||
|  	int comp; | ||||
|   | ||||
| @@ -1,21 +0,0 @@ | ||||
| This patch fixes compilation issues on MacOS arm64. | ||||
| Based on discussion  | ||||
| https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0 | ||||
|  | ||||
| --- a/tools/imagetool.h | ||||
| +++ b/tools/imagetool.h | ||||
| @@ -272,11 +272,14 @@ int rockchip_copy_image(int fd, struct i | ||||
|   *  b) we need a API call to get the respective section symbols */ | ||||
|  #if defined(__MACH__) | ||||
|  #include <mach-o/getsect.h> | ||||
| +#include <mach-o/dyld.h> | ||||
|   | ||||
|  #define INIT_SECTION(name)  do {					\ | ||||
|  		unsigned long name ## _len;				\ | ||||
|  		char *__cat(pstart_, name) = getsectdata("__DATA",	\ | ||||
|  			#name, &__cat(name, _len));			\ | ||||
| +			__cat(pstart_, name) +=				\ | ||||
| +				_dyld_get_image_vmaddr_slide(0);	\ | ||||
|  		char *__cat(pstop_, name) = __cat(pstart_, name) +	\ | ||||
|  			__cat(name, _len);				\ | ||||
|  		__cat(__start_, name) = (void *)__cat(pstart_, name);	\ | ||||
| @@ -1,7 +1,7 @@ | ||||
| --- a/tools/mkimage.h | ||||
| +++ b/tools/mkimage.h | ||||
| @@ -42,7 +42,7 @@ static inline ulong map_to_sysmem(void * | ||||
|  } | ||||
| @@ -44,7 +44,7 @@ static inline ulong map_to_sysmem(void * | ||||
|  #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size] | ||||
|   | ||||
|  #define MKIMAGE_TMPFILE_SUFFIX		".tmp" | ||||
| -#define MKIMAGE_MAX_TMPFILE_LEN		256 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Golle
					Daniel Golle