From patchwork Tue Apr 14 19:34:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander 'lynxis' Couzens X-Patchwork-Id: 461260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9892A14007F for ; Wed, 15 Apr 2015 05:34:57 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D3AD828C6BC; Tue, 14 Apr 2015 21:33:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id DFD6D2809D4 for ; Tue, 14 Apr 2015 21:33:43 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from mail.base45.de (mail.base45.de [80.241.61.77]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 14 Apr 2015 21:33:43 +0200 (CEST) Received: from x5ce0ed77.dyn.telefonica.de ([92.224.237.119] helo=lazus.localdomain) by mail.base45.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.82) (envelope-from ) id 1Yi6bP-0007bu-1D; Tue, 14 Apr 2015 21:34:31 +0200 From: Alexander Couzens To: openwrt-devel@lists.openwrt.org Date: Tue, 14 Apr 2015 21:34:12 +0200 Message-Id: <1429040052-30339-1-git-send-email-lynxis@fe80.eu> X-Mailer: git-send-email 2.3.5 Subject: [OpenWrt-Devel] [PATCH] ar71xx/image: remove duplicated rootfs in new tplink initramfs images X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" The new building code included the rootfs twice when building tplink initramfs images. To make it more readable move initramfs into an own build step Build/mktplinkfw-initramfs. Signed-off-by: Alexander Couzens --- target/linux/ar71xx/image/Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 4819ab9..49c3ca0 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -56,10 +56,20 @@ define Build/mktplinkfw -k $(word 1,$^) \ -r $@ \ -o $@.new \ + -j -X 0x40000 \ -a $(call rootfs_align,$(FILESYSTEM)) \ - $(if $(findstring sysupgrade,$1),-j -X 0x40000 -s) \ - $(if $(findstring factory,$1),-j -X 0x40000) \ - $(if $(findstring initramfs,$1),-s -c) + $(if $(findstring sysupgrade,$1),-s) + @mv $@.new $@ +endef + +# -c combined image +define Build/mktplinkfw-initramfs + $(STAGING_DIR_HOST)/bin/mktplinkfw \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \ + -k $@ \ + -o $@.new \ + -s \ + -c @mv $@.new $@ endef @@ -138,7 +148,7 @@ TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2 define Device/tplink TPLINK_HWREV := 0x1 KERNEL := kernel-bin | patch-cmdline | lzma - KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw initramfs + KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-initramfs IMAGES := sysupgrade.bin factory.bin IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade IMAGE/factory.bin := append-rootfs | mktplinkfw factory