From patchwork Fri Nov 5 22:26:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1551587 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=boundarydevices.com header.i=@boundarydevices.com header.a=rsa-sha256 header.s=google header.b=PauJks72; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HmFV95pR8z9sPf for ; Sat, 6 Nov 2021 09:26:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B792E8371D; Fri, 5 Nov 2021 23:26:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=boundarydevices.com header.i=@boundarydevices.com header.b="PauJks72"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E22978371F; Fri, 5 Nov 2021 23:26:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D47A83714 for ; Fri, 5 Nov 2021 23:26:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troy.kisky@boundarydevices.com Received: by mail-pl1-x62f.google.com with SMTP id p18so11858738plf.13 for ; Fri, 05 Nov 2021 15:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NbkdM6Xertc3+CEp+16jDr8yfTHbHiYIuOdeK/QUBR4=; b=PauJks721/0pFgh0OO3EMfq89wkAFfXrNk5PdwnwIhv1ZusRCiWP69mhN35SyWCBAF rvpwu1dCg+D+y/zq5WwW54H/eS1RA5laqdbVz5j+AgYBzndpBE1xitiu0TyW2AOlAvmw P1kIS7KswVKtW1JvrC2SHEr/bbOPfSVxwGaoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NbkdM6Xertc3+CEp+16jDr8yfTHbHiYIuOdeK/QUBR4=; b=rzGjBllx/cdeFgZn15M8hIweCLzCYzUBkCqtQHnHNB7B/lqGpuG4JRH4/djDTHUr7u GOpa6oqsMbTxuIw3Q0StOgQKfr/WMoGS4vPECEYA5pbDhajhMv+KSCs6AzLNYwHu57xl puxW9aTFZhbrvnZUIXDt+Fr/3pGJAu1eU0ssKSI2vrOvFcsD8sDOUGflRspQIAw0eu5j 2vdHFrQV4fIrwMmUq9/8VYRJZyGigFOr6S2JpbCl3OM1za76SljOIUj0Zgkw779Caxr4 1GnY01aeTsnQlWRAkFDUyo2JhSmrYeplWbUChvXg06lUM1iF/J4HKEpupNo2rzCg4HRQ rhlg== X-Gm-Message-State: AOAM532CTGNCZWof8yIxgVzJxmIn15aYccwRX21Lt5Z8d08it68Nkru/ KfFexj0x0VUp/X/m0/xircXNSA== X-Google-Smtp-Source: ABdhPJyb+901TKI9CHOI1ml6qItsyUhvK1hn8lGvGGVAC8wCqyfse0ZgkAhtgNT5j12x5GTb+ntCEA== X-Received: by 2002:a17:90b:1c8f:: with SMTP id oo15mr33871870pjb.87.1636151188399; Fri, 05 Nov 2021 15:26:28 -0700 (PDT) Received: from OS2.boundarydevices.com. (wsip-72-200-236-186.oc.oc.cox.net. [72.200.236.186]) by smtp.googlemail.com with ESMTPSA id e187sm8316289pfe.181.2021.11.05.15.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 15:26:27 -0700 (PDT) From: Troy Kisky To: trini@konsulko.com Cc: u-boot@lists.denx.de, Troy Kisky Subject: [PATCH 1/1] kconfig: allow defconfigs to live in board directory Date: Fri, 5 Nov 2021 15:26:13 -0700 Message-Id: <20211105222613.1194988-1-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This will reduce the size of the configs directory, and make it more clear which board directory uses the defconfig file. Signed-off-by: Troy Kisky --- scripts/kconfig/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 12e525ee31..fbeb00749a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -92,8 +92,15 @@ else endif endif +%_defconfig: SHELL:=/bin/bash %_defconfig: $(obj)/conf - $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + $(Q)readarray -d '' names < <(find configs board -type f -name $@ -print0); \ + if (test $${#names[*]} -eq 1); then \ + $< $(silent) --defconfig="$${names[0]}" $(Kconfig); \ + else \ + echo "$@" not found or ambiguous error; \ + echo "$${names[@]}"; exit 1; \ + fi # Added for U-Boot (backward compatibility) %_config: %_defconfig