armvirt: fix overlay support by updating to f2fs/ext4 based overlays
authorPetr Štetiar <ynezz@true.cz>
Thu, 28 Mar 2019 14:34:26 +0000 (14:34 +0000)
committerPetr Štetiar <ynezz@true.cz>
Tue, 25 Jun 2019 14:12:22 +0000 (14:12 +0000)
Current snapshot images doesn't provide images with usable overlay
filesystems:

 mount_root: no usable overlay filesystem found, using tmpfs overlay

So this patch fixes this by updating support to current f2fs/ext4 based
overlays and providing squashfs with proper rootfs
TARGET_ROOTFS_PARTSIZE size.

While at it, I've also added support for optional gzipping of the
images, and renamed the output rootfs image filenames to match the more
common naming pattern $(IMG_PREFIX)-rootfs-$(FS-TYPE).img.

Cc: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
target/linux/armvirt/Makefile
target/linux/armvirt/image/Makefile

index 9a67ab66a4ab3b7ae0ffdb0ed459458481516872..44d4ece22443736130560832968772f51a72c7d1 100644 (file)
@@ -17,4 +17,6 @@ KERNEL_PATCHVER:=4.19
 
 include $(INCLUDE_DIR)/target.mk
 
+DEFAULT_PACKAGES += mkf2fs e2fsprogs
+
 $(eval $(call BuildTarget))
index 73d9145e0eb714fa4afdaeb0ce9e6061fc685d56..0292dbab4213dd58c2973f8604e317cd99fa8783 100644 (file)
@@ -19,10 +19,16 @@ define Image/Build/Initramfs
        )
 endef
 
+define Image/Build/gzip
+       gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
+endef
+
+$(eval $(call Image/gzip-ext4-padded-squashfs))
+
 define Image/Build
        $(call Image/Build/$(1))
-       dd if=$(KDIR)/root.$(1) bs=128k conv=sync | \
-               gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-root.$(1).gz
+       $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img
+       $(call Image/Build/gzip/$(1))
 endef
 
 $(eval $(call BuildImage))