From 2109156b794fd94a94df358afad860bffc72d9d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Wed, 27 Mar 2019 11:31:14 +0100 Subject: [PATCH] x86: image: remove TARGET_IMAGES_PAD option and force padding MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Currently we're producing unusable x86 combined squashfs images (18.06.1, 18.06.2 and snapshots) as we don't enable TARGET_IMAGES_PAD, thus providing very small space for the overlay filesystem, leading to the following with OpenWrt 18.06.1 r7258-5eb055306f images on x86 QEMU: root@(none):/# mount | egrep 'root|overlay' /dev/root on /rom type squashfs /dev/loop0 on /overlay type ext4 overlayfs:/overlay on / type overlay root@(none):/# df -h | egrep 'root|overlay|Size' Filesystem Size Used Available Use% Mounted on /dev/root 2.5M 2.5M 0 100% /rom /dev/loop0 113.0K 8.0K 97.0K 8% /overlay overlayfs:/overlay 113.0K 8.0K 97.0K 8% / We should rather ensure proper image padding in image generation code and we shouldn't rely on config options in order to generate usable images. So this patch removes TARGET_IMAGES_PAD config option and enforces padding on combined images. Signed-off-by: Petr Å tetiar --- target/linux/x86/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index 84a3d88a7f..2d04d12237 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -80,7 +80,7 @@ ifneq ($(CONFIG_GRUB_IMAGES),) -e 's#@TITLE@#$(GRUB_TITLE)#g' \ ./grub.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg -$(CP) $(STAGING_DIR_ROOT)/boot/. $(KDIR)/root.grub/boot/ - PADDING="$(CONFIG_TARGET_IMAGES_PAD)" SIGNATURE="$(SIGNATURE)" PATH="$(TARGET_PATH)" $(SCRIPT_DIR)/gen_image_generic.sh \ + PADDING="1" SIGNATURE="$(SIGNATURE)" PATH="$(TARGET_PATH)" $(SCRIPT_DIR)/gen_image_generic.sh \ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \ $(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \ -- 2.30.2