package/abootimg: add host build
authorMike Frampton <mikeframpo@gmail.com>
Thu, 19 Nov 2020 09:08:53 +0000 (22:08 +1300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 19 Nov 2020 22:09:06 +0000 (23:09 +0100)
Enabling package host build for abootimg so that boot images can be
created for boards which boot from this format.

Signed-off-by: Mike Frampton <mikeframpo@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/Config.in.host
package/abootimg/Config.in.host [new file with mode: 0644]
package/abootimg/abootimg.mk

index c69c756f3a7c19275a8fcba2a01934318770f97a..4f69785810f452fbf68850472013c5247f5f99c4 100644 (file)
@@ -1,5 +1,6 @@
 menu "Host utilities"
 
+       source "package/abootimg/Config.in.host"
        source "package/aespipe/Config.in.host"
        source "package/android-tools/Config.in.host"
        source "package/asn1c/Config.in.host"
diff --git a/package/abootimg/Config.in.host b/package/abootimg/Config.in.host
new file mode 100644 (file)
index 0000000..65dc479
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ABOOTIMG
+       bool "host abootimg"
+       select BR2_PACKAGE_HOST_UTIL_LINUX
+       help
+         Tool to manipulate Android Boot Images, either on files
+         or directly on /dev block devices.
+
+         https://github.com/ggrandou/abootimg
index e90654694804b5f58826344814d46e70ccf6a804..64cee13c321e85f7546bc036ff0c935c6a9e6434 100644 (file)
@@ -11,6 +11,7 @@ ABOOTIMG_LICENSE_FILES = LICENSE
 
 # depends on libblkid from util-linux
 ABOOTIMG_DEPENDENCIES = util-linux
+ABOOTIMG_HOST_DEPENDENCIES = host-util-linux
 
 define ABOOTIMG_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
@@ -20,4 +21,13 @@ define ABOOTIMG_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0755 $(@D)/abootimg $(TARGET_DIR)/usr/bin/abootimg
 endef
 
+define HOST_ABOOTIMG_BUILD_CMDS
+       $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
+endef
+
+define HOST_ABOOTIMG_INSTALL_CMDS
+       $(INSTALL) -m 0755 $(@D)/abootimg $(HOST_DIR)/usr/bin/abootimg
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))