From patchwork Tue Mar 29 06:34:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1610510 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 4KSKcj0ssBz9sFk for ; Tue, 29 Mar 2022 17:37:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dNQYhKt3gKrte5CVjBd3jLRzUfeDDNrIbQkyyaYt/LQ=; b=fIazZnk/x1JZnE i8U/jJHVMw+XJhlLc3xEuNAG0AJnIR967/5en6eePkvKwku+z8IIeZffcpYfjQ1HutF9auNmJ9A/I 08dfBmWodPfl1E/ygqKQZBXYr6iGChDC8EG8V6GwD6gjmYlXrpjwJOs/4QvL8Sf6iPieCPHRQkMVV K+ozVkQSnpS1vZ4wqUTOmJHktgAW843IjVl1WH+z6+udPc+X6/NHsD5MOn4t0lZlzWHQmhBBxiPf3 JJoIfvT3GbHYST4SqaJyEI3AoKxeeEK+gEqnDuOJnCSYR8BaEnawFj5T0gmzRONb6ih5r40atCs14 iCepX3ZtcBjkIE4O53BQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ5RM-00BD9i-Qe; Tue, 29 Mar 2022 06:34:52 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZ5RI-00BD8x-Dh for openwrt-devel@lists.openwrt.org; Tue, 29 Mar 2022 06:34:50 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 456BB18373; Tue, 29 Mar 2022 08:34:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=true.cz; s=xnet; t=1648535685; bh=qUTNlDw4JI4RZ6HQtJ/SDJFAhv6D5Gc7jQTXvhy2hVc=; h=From:To:Cc:Subject:Date; b=MUXhBRDhicNfG+TM24ZbRppo9YBE9KTzoha2PRVbvmxSnAEWH94rEiFnZq5gY5wCU 7JmLIIqQ1Ljr4VwfyZeV2WzHOdn92O7JYIui4Siji3Og9C0kK0lXdVmGDqzgJvLIeJ LcgS5LnLM2bP3ttAenKq98mInRLgs9jda0g1+WtY= Received: by meh.true.cz (OpenSMTPD) with ESMTP id abe68248; Tue, 29 Mar 2022 08:34:20 +0200 (CEST) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Cc: =?utf-8?q?Petr_=C5=A0tetiar?= Subject: [PATCH] build: target: improve UX of CONFIG_TARGET handling Date: Tue, 29 Mar 2022 08:34:41 +0200 Message-Id: <20220329063441.20595-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220328_233448_932757_1063F979 X-CRM114-Status: UNSURE ( 6.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Make it clear, that for `make kernel_{menu, old}config` it's possible to use only following values for CONFIG_TARGET variable: * env * platform * subtarget * subtarget_platform This should prevent misuse like `make kernel_menuconfig CONFIG_TARGET=bcm2710` etc. Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Make it clear, that for `make kernel_{menu,old}config` it's possible to use only following values for CONFIG_TARGET variable: * env * platform * subtarget * subtarget_platform This should prevent misuse like `make kernel_menuconfig CONFIG_TARGET=bcm2710` etc. Signed-off-by: Petr Štetiar --- include/target.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/target.mk b/include/target.mk index 72fe493776b9..444cc032400f 100644 --- a/include/target.mk +++ b/include/target.mk @@ -177,18 +177,17 @@ LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$ ifeq ($(CONFIG_TARGET),platform) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),subtarget) +else ifeq ($(CONFIG_TARGET),subtarget) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),subtarget_platform) +else ifeq ($(CONFIG_TARGET),subtarget_platform) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),env) +else ifeq ($(CONFIG_TARGET),env) LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST) LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config +else ifneq ($(strip $(CONFIG_TARGET)),) + $(error ERROR: CONFIG_TARGET="$(CONFIG_TARGET)" invalid, use one of `platform`, `subtarget`, `subtarget_platform` or `env`) endif __linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)