From patchwork Thu Dec 25 19:11:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 424063 X-Patchwork-Delegate: blogic@openwrt.org 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 5E2101400B7 for ; Fri, 26 Dec 2014 06:11:07 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6BF6B28B439; Thu, 25 Dec 2014 20:09:04 +0100 (CET) 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, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 76F2A28B439 for ; Thu, 25 Dec 2014 20:08:58 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from fudo.makrotopia.org (fudo.makrotopia.org [5.135.190.93]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 25 Dec 2014 20:08:58 +0100 (CET) Received: from local by fudo.makrotopia.org with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1Y4DoF-0001wu-AB; Thu, 25 Dec 2014 20:10:55 +0100 Date: Thu, 25 Dec 2014 20:11:51 +0100 From: Daniel Golle To: openwrt-devel@lists.openwrt.org Message-ID: <20141225191146.GA16090@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [OpenWrt-Devel] [PATCH 1/2] image.mk: make ubinize.cfg optional 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: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" When using UbinizeImage with ubifs rootfs, ubinize.cfg is no longer needed. Yet, the absance of ubinize.cfg would make the build process abort with an error. Fix that by checking if ubinize.cfg is present and do no not call the "classic" ubinize image generation if it isn't. Signed-off-by: Daniel Golle [missing new-line before UbinizeImage added itentionally] --- include/image.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/image.mk b/include/image.mk index 12322bd..5456839 100644 --- a/include/image.mk +++ b/include/image.mk @@ -147,6 +147,7 @@ ifneq ($(CONFIG_NAND_SUPPORT),) (cd "$(KDIR_TMP)"; $(TAR) cvf \ "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1)) endef + # $(1) board name # $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage) # $(3) rootfstype (e.g. squashfs or ubifs) @@ -194,10 +195,10 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),) $(call Image/Build,ubifs) ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),) - $(call Image/mkfs/ubifs/generate,) + $(if $(wildcard ./ubinize.cfg),$(call Image/mkfs/ubifs/generate,)) $(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay)) endif - $(call Image/Build,ubi) + $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi)) endef endif