From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 28649C433F5 for ; Fri, 17 Dec 2021 23:02:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B98283740; Sat, 18 Dec 2021 00:02:15 +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="U+FoHNLK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53E798370D; Sat, 18 Dec 2021 00:02:08 +0100 (CET) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 AF20B83720 for ; Sat, 18 Dec 2021 00:02:04 +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-x62b.google.com with SMTP id v19so3077197plo.7 for ; Fri, 17 Dec 2021 15:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aFzPlLUo3sC9qj9r2+s9wjRj3cJIv8z3oi41FwRtxAs=; b=U+FoHNLKPotYLZNIVIqg4Kf7wsgFZUwBZEkhA4nkUqx+v8gAQNv28tc9/6vlKbabtd Xb17hG8tCQXV7rCMymaxjbR//gIeAIe3Pv6oXEPDc5pmikXvzU83iZu70AmUQkeMS8uc iTIx/wjtWDtCXm5l2iMl2piuCORS78F7ND+TM= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=aFzPlLUo3sC9qj9r2+s9wjRj3cJIv8z3oi41FwRtxAs=; b=8BEHcWm688qoFnjGJhEDZq0EqVjRxO3s500JZAu65h0rbiN1X91ENKaajiatJ5/x2K X4r0jgrzYBiNT+qkf0/znl15T5bApXiTf3yh57dxv/OoCX7Ya5A8NM7Cfb4NedtbcrV4 JFJi3Kgrc3LuFo0pj/alGYciyTBMf9Lx7vL3JlX6Ob0jE7bVk3w61XHDyuVWGA597SSD IgQhRo7MAXFC0x5KW6RWqJ/uvGnXPk6dzLgO14o0rIap/ePqERqBXtIXCcAWHDzTaRjr 6a0DIV9A9JOZZbk4o5Un9hjMtZ5EZKCUV0zf3gtZHW61phBuZgcKwDI8h/RVd/sgp4bA VsCw== X-Gm-Message-State: AOAM531UD0qBxsKFysbEtv+y0F+NRODEtqltvHo3z/d03NVcHnOxgdey huqMjQcCXYsSz37t1949yo/KnA== X-Google-Smtp-Source: ABdhPJySs0fq+qMrMuahXNT+VO325gxhCn+2lAdATGlDprs3C1Dpm6B8zwytxREFQD8r4RxGdOURJA== X-Received: by 2002:a17:90b:3889:: with SMTP id mu9mr6269057pjb.160.1639782122978; Fri, 17 Dec 2021 15:02:02 -0800 (PST) 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 f7sm11130388pfj.41.2021.12.17.15.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 15:02:02 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de, Troy Kisky Subject: [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory Date: Fri, 17 Dec 2021 15:01:27 -0800 Message-Id: <20211217230131.2715940-2-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> References: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 12e525ee31f..307262e00de 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 $(srctree)/configs $(srctree)/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