浏览代码

add hosttool genimage

Waldemar Brodkorb 8 年之前
父节点
当前提交
857e9176a3

+ 26 - 0
package/genimage/Makefile

@@ -0,0 +1,26 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:=		genimage
+PKG_VERSION:=		9
+PKG_RELEASE:=		1
+PKG_HASH:=		69f35af7edf6f4dbdac7a18ddc69dcf38c501e43d8b50c524555754c51479078
+PKG_DESCR:=		image creation utility
+PKG_SECTION:=		dev/tools
+HOST_BUILDDEP:=		confuse
+PKG_URL:=		http://public.pengutronix.de/software/genimage/
+PKG_SITES:=		http://public.pengutronix.de/software/genimage/
+
+PKG_CFLINE_GENIMAGE:=	depends on ADK_HOST_ONLY
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,GENIMAGE,genimage,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_CPPFLAGS+=		-D_GNU_SOURCE
+
+include ${ADK_TOPDIR}/mk/host-bottom.mk
+include ${ADK_TOPDIR}/mk/pkg-bottom.mk

+ 11 - 0
package/genimage/patches/patch-image-rauc_c

@@ -0,0 +1,11 @@
+--- genimage-9.orig/image-rauc.c	2016-08-15 12:35:48.000000000 +0200
++++ genimage-9/image-rauc.c	2016-09-05 19:59:47.000000000 +0200
+@@ -62,7 +62,7 @@ static int rauc_generate(struct image *i
+ 		}
+ 
+ 		/* create parent directories if target needs it */
+-		path = strdupa(target);
++		path = strdup(target);
+ 		tmp = strrchr(path, '/');
+ 		if (tmp) {
+ 			*tmp = '\0';

+ 11 - 0
package/genimage/patches/patch-image-vfat_c

@@ -0,0 +1,11 @@
+--- genimage-9.orig/image-vfat.c	2016-01-12 17:49:29.000000000 +0100
++++ genimage-9/image-vfat.c	2016-09-05 19:59:30.000000000 +0200
+@@ -42,7 +42,7 @@ static int vfat_generate(struct image *i
+ 		struct image *child = image_get(part->image);
+ 		const char *file = imageoutfile(child);
+ 		const char *target = part->name;
+-		char *path = strdupa(target);
++		char *path = strdup(target);
+ 		char *next = path;
+ 
+ 		while ((next = strchr(next, '/')) != NULL) {

+ 4 - 0
target/config/Config.in.tools

@@ -27,6 +27,10 @@ config ADK_HOST_BUILD_FLEX
 	bool
 	default y
 
+config ADK_HOST_BUILD_GENIMAGE
+	bool
+	default y
+
 config ADK_HOST_BUILD_M4
 	bool
 	default y