From patchwork Fri Mar 29 14:07:18 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: 1069723 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="fCMW5X9D"; 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 44W3VG4C89z9sQm for ; Sat, 30 Mar 2019 01:08:06 +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=lyd67yaPtXwE38o6+dmii3UmKK9fHzn/tyK6E1sQpW0=; b=fCMW5X9DZdGbWB wa1sUfEw+Zj3xVftjaXpi7h9mcGBxI2fjEA92MgrRxuIzRBkL7hbOPd1o+ttrID0lq0CVhPiSChWj gnlvs0C7Xi06C72vRR/fKX2zEQxNv1wjPSkegKJHhLD1zKW2mwVYHnvBijh6HqCOEqNMBT15k/Zvx EliRRKwrbPgWPKmJLRHTnigKr2uVRtWuU4Cv52GEPa1FkecS1bJ5HHIn4YNjDR79mYLTfHkODyg6Z HDE4vSTprEOQYkTpoNiduo/snuRg0US2Bpl0oIPVGBdmDB8XFKQABnYbM4laakUrQYZBnSQNFNHBZ Nh5bxE5F49yuurgdhGBQ==; 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 1h9sAU-0002nJ-Vp; Fri, 29 Mar 2019 14:07:39 +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 1h9sAO-0002gD-0j for openwrt-devel@lists.openwrt.org; Fri, 29 Mar 2019 14:07:34 +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 10CCE41DE; Fri, 29 Mar 2019 15:07:28 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id d95cee8c; 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:18 +0100 Message-Id: <1553868440-26476-4-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_070732_618436_660B4F0A X-CRM114-Status: UNSURE ( 6.62 ) 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 3/5] build: image: Add variable for gzip-ext4-padded-squashfs 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 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 --- include/image.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/image.mk b/include/image.mk index 8b84c8c..7eb7f23 100644 --- a/include/image.mk +++ b/include/image.mk @@ -300,6 +300,27 @@ 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 + + define Image/Build/gzip + 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 + +endef + ifdef CONFIG_TARGET_ROOTFS_TARGZ define Image/Build/targz $(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \