From patchwork Fri Dec 17 23:01:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 1570399 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=U+FoHNLK; 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) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG4JD2dt6z9sCD for ; Sat, 18 Dec 2021 10:02:36 +1100 (AEDT) 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) 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-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 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 Reviewed-by: Simon Glass --- 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