From patchwork Fri Mar 29 14:07:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1069729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="edQMK3is"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44W3W23xTyz9sQr for ; Sat, 30 Mar 2019 01:08:46 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uJa/DqRbKo5mVazfTvra0B7Jn5b4gdAPmvejeY29Zyg=; b=edQMK3is7cxxwN MDEU9998m33a3C+5pDv0Vwk+wpmFiJaLCOqyERXmxVBVr3W1jo23a4a9xnbRJABLsPP++eeQRqIhS CiBu/I6mpb6vcy+msTe8YNHWDgicbLNShgECmmyV235iqd3gONbz58BzsgQOy70GjKHvdSBDxNcsC 1OR+S7JjikaJZBxMNt/uyjFrJaAy5EmQ3knVCyMWvZDT6ui2z8Nms2Khnozib5Ni8G/m95BtJBkhW rplMZbqVY2tkaMOmKNxYP/KuJt62NVRoLIeaLo5pusNUbXh4mOTIOGSdKJHZGAhZKP5Yz12jFFoot S5ai2You78UzUj5zSLUA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9sBO-00043f-8X; Fri, 29 Mar 2019 14:08:34 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9sAR-0002iE-GH for openwrt-devel@lists.openwrt.org; Fri, 29 Mar 2019 14:07:38 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 69AB741E8; Fri, 29 Mar 2019 15:07:28 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 09e967b4; Fri, 29 Mar 2019 15:07:26 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Fri, 29 Mar 2019 15:07:20 +0100 Message-Id: <1553868440-26476-6-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1553868440-26476-1-git-send-email-ynezz@true.cz> References: <1553868440-26476-1-git-send-email-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190329_070735_922058_3690ACF2 X-CRM114-Status: UNSURE ( 6.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH 5/5] x86: image: Fix small disk space in squashfs overlay X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Current squashfs snapshot images are improperly padded by just 128k, which doesn't correspond with TARGET_ROOTFS_PARTSIZE=256 default config option, leading to following: Filesystem Size Used Available Use% Mounted on /dev/root 2.5M 2.5M 0 100% /rom /dev/loop0 85.0K 9.0K 71.0K 11% /overlay overlayfs:/overlay 85.0K 9.0K 71.0K 11% / Signed-off-by: Petr Štetiar --- target/linux/x86/image/Makefile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index 0771547..84b0da7 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -93,10 +93,6 @@ ifneq ($(CONFIG_GRUB_IMAGES),) endef endif -define Image/Build/squashfs - dd if=/dev/zero bs=128k count=1 >> $(KDIR)/root.squashfs -endef - define Image/Build/iso $(INSTALL_DIR) $(KDIR)/root.grub/boot/grub $(KDIR)/grub2 $(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz @@ -141,20 +137,13 @@ ifneq ($(CONFIG_VMDK_IMAGES),) endef endif +$(eval $(call Image/gzip-ext4-padded-squashfs)) + define Image/Build/gzip gzip -f9n $(BIN_DIR)/$(IMG_COMBINED)-$(1).img gzip -f9n $(BIN_DIR)/$(IMG_ROOTFS)-$(1).img 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 - define Image/BuildKernel $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz endef