From patchwork Wed Jan 10 10:15:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Hebb X-Patchwork-Id: 858315 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FEbRzaIE"; dkim-atps=neutral Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zGrpJ1njgz9s72 for ; Thu, 11 Jan 2018 01:23:19 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D8BCEB80C35; Wed, 10 Jan 2018 15:23:14 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Wed, 10 Jan 2018 15:23:14 +0100 (CET) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 79251B80C1F for ; Wed, 10 Jan 2018 15:23:13 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-qt0-f195.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 10 Jan 2018 15:23:13 +0100 (CET) Received: by mail-qt0-f195.google.com with SMTP id s3so6225538qtb.10 for ; Wed, 10 Jan 2018 06:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+5OrZFsaeEwIObJ+GvZ6kYTQmRMPAp/3GmYnJGz7mJM=; b=FEbRzaIEaKMByFVuzbg5ZUeJdMH6FhIr528Cp8pwXgf7+P81dv5bTOGEKv5fLaB6hM k0TXCkIeFOOY7ZGTnWbsrCmzXQnp8EYt67N6Face/VcW7LF2wl8N5T+Jzc8J5jfF5Zdy 09DYu9PGusdzcO1D3GbsJDbPamvP7XDzeLPzFPdP1eWypAnNunLLmn7e0YL+qzec/OI1 Nsksl3wp3CoK5BY/Pz5UCEFaF7BVnlR3BSGklmf/d+6LOp042lNXdtW5h9lYiYUe8/jR BFIodLYbd3ZlblQDcEOmJ1iitI0q/1l2UWUgB2cNqgWfqdNGTuqsezCI+ibpSTgaIYSF KKlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+5OrZFsaeEwIObJ+GvZ6kYTQmRMPAp/3GmYnJGz7mJM=; b=c3BkK2a0R2KfBsP942yFSjHMkFYwfWex4Run/kAkaq/oRff0JJ9mBclv+xjztLTFis 3APPICfk/40ZDhoY+mlMuhipqj46lAFd5pWyKFvvT4B36HdqE7q/OlCOZsTj7hIfjVCf i90uIgREtsYUx4q7lLU1YBqcNsGm2V4ngoBOltwhbmkTg41NVZIjhLP6omoNo9Y69yJX rFmo55i2jRmzPOqDUGrjVhXSIyUfwFKxOmS9ZSiRzAB5Q1hAogYlh6GOsPCxYU2lvy93 XKzi39qkW8eQNGLCRRR6Dc4MyjvglDLhn5MdWHFtUmBx19rXdV43ArrqGf8LXz6mC7d3 xeZQ== X-Gm-Message-State: AKwxytdD20s+H5/2rwZNiFyVo4chHK2hCsJI+MjA8sip9Xuhh+Hd5X5Q 86l61p2zmz9yUq18wzP3+7Htb0fP02I= X-Google-Smtp-Source: ACJfBov3cnnZ7LkKe/avO4e5fDiGK/Tza8hrBygykh3e8b5QBlPQnTf1EJD69H0xUPPEH0F7ESUU7A== X-Received: by 10.237.54.231 with SMTP id f94mr24327422qtb.322.1515579313097; Wed, 10 Jan 2018 02:15:13 -0800 (PST) Received: from stingray.lan ([2601:18d:4600:e68c:3252:cbff:fe84:d255]) by smtp.gmail.com with ESMTPSA id u67sm4673826qkd.8.2018.01.10.02.15.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 02:15:12 -0800 (PST) From: Thomas Hebb To: John Crispin , Felix Fietkau Date: Wed, 10 Jan 2018 05:15:08 -0500 Message-Id: X-Mailer: git-send-email 2.15.1 Subject: [OpenWrt-Devel] [PATCH 1/3] build: allow custom config names in mkits.sh X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@lists.openwrt.org, Thomas Hebb MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This allows us to support the Netgear EX6100v2 and EX6150v2, whose bootloaders look for specific config names and refuse to boot if they're not present. Signed-off-by: Thomas Hebb --- include/image-commands.mk | 3 ++- scripts/mkits.sh | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/image-commands.mk b/include/image-commands.mk index 5f0ac6164d..6ad782922a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -121,7 +121,8 @@ endef define Build/fit $(TOPDIR)/scripts/mkits.sh \ -D $(DEVICE_NAME) -o $@.its -k $@ \ - $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \ + $(if $(word 2,$(1)),-d $(word 2,$(1))) \ + $(if $(word 3,$(1)),-c $(word 3,$(1))) -C $(word 1,$(1)) \ -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -A $(LINUX_KARCH) -v $(LINUX_VERSION) PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 8857996eba..e74b5866e8 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -16,7 +16,7 @@ usage() { echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \ - "-v version -k kernel [-D name -d dtb] -o its_file" + "-v version -k kernel [-D name -d dtb -c cfgname] -o its_file" echo -e "\t-A ==> set architecture to 'arch'" echo -e "\t-C ==> set compression type 'comp'" echo -e "\t-a ==> set load address to 'addr' (hex)" @@ -25,11 +25,14 @@ usage() { echo -e "\t-k ==> include kernel image 'kernel'" echo -e "\t-D ==> human friendly Device Tree Blob 'name'" echo -e "\t-d ==> include Device Tree Blob 'dtb'" + echo -e "\t-c ==> name the default config 'cfgname'" echo -e "\t-o ==> create output file 'its_file'" exit 1 } -while getopts ":A:a:C:D:d:e:k:o:v:" OPTION +CFGNAME='config@1' + +while getopts ":A:a:C:D:d:e:k:c:o:v:" OPTION do case $OPTION in A ) ARCH=$OPTARG;; @@ -39,6 +42,7 @@ do d ) DTB=$OPTARG;; e ) ENTRY_ADDR=$OPTARG;; k ) KERNEL=$OPTARG;; + c ) CFGNAME=$OPTARG;; o ) OUTPUT=$OPTARG;; v ) VERSION=$OPTARG;; * ) echo "Invalid option passed to '$0' (options:$@)" @@ -104,8 +108,8 @@ ${FDT} }; configurations { - default = \"config@1\"; - config@1 { + default = \"${CFGNAME}\"; + ${CFGNAME} { description = \"OpenWrt\"; kernel = \"kernel@1\"; fdt = \"fdt@1\";