Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBE2CC433EF for ; Fri, 5 Nov 2021 22:26:39 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B066D6120A for ; Fri, 5 Nov 2021 22:26:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B066D6120A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=boundarydevices.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de 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) 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 Content-Transfer-Encoding: 8bit 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 -- 2.32.0