build: image: add variable for gzip-ext4-padded-squashfs
authorPetr Štetiar <ynezz@true.cz>
Thu, 28 Mar 2019 22:07:28 +0000 (22:07 +0000)
committerPetr Štetiar <ynezz@true.cz>
Tue, 25 Jun 2019 14:12:22 +0000 (14:12 +0000)
This common code could be shared by at least 3 targets (malta, armvirt
and x86) so let's factor it out to separate variable.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
include/image.mk

index 3680be2155d361b898b78df62547eb457caa5457..f5da4853dfcbed52d193796d9211d80aa9ede3cf 100644 (file)
@@ -298,6 +298,23 @@ define Image/Manifest
                $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
 endef
 
+define Image/gzip-ext4-padded-squashfs
+
+  define Image/Build/squashfs
+    $(call Image/pad-root-squashfs)
+  endef
+
+  ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
+    define Image/Build/gzip/ext4
+      $(call Image/Build/gzip,ext4)
+    endef
+    define Image/Build/gzip/squashfs
+      $(call Image/Build/gzip,squashfs)
+    endef
+  endif
+
+endef
+
 ifdef CONFIG_TARGET_ROOTFS_TARGZ
   define Image/Build/targz
        $(TAR) -cp --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name \