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 7F116C38142 for ; Tue, 31 Jan 2023 15:32:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 11AC785B2E; Tue, 31 Jan 2023 16:29:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="c6VF7FQJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D8F585AFC; Tue, 31 Jan 2023 16:28:29 +0100 (CET) Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) (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 E137B85AFA for ; Tue, 31 Jan 2023 16:27:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x130.google.com with SMTP id u8so6604163ilq.13 for ; Tue, 31 Jan 2023 07:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C1Ka0i/kQP38tmYU4vYgJxaql4m5+4aangQFjwbCGw8=; b=c6VF7FQJ6afPe1wZUVbr2Eb6V389M/6poS1593gLXK/jrf9974TdqPIdh0GoOIPkGX TrPIkRdj+AajGtdjBQMrkA2kVpdS+rPSfo4Y4gZeVE0mpFI0yT9pJmsQ1AN+ulwejZeH EYbnkiwdqABbmQaEYCPUWR6fFe274AZca2q/0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C1Ka0i/kQP38tmYU4vYgJxaql4m5+4aangQFjwbCGw8=; b=oxjp7yRs9FQ+vo0xS+CbfemVV8k24ToMchxvmI/fiGqhry/Vy4RK0dOSvqF6LzIHuk rs4rkN+2xCn97miCT7GT3KW+YjRywZ8CiNw2OX38kx86s7iO1OhmIO+HUFK8XG0HxUTM liorm/mEkJK+gsvlu3siFTQTT7DkfCXm37AsdDMudRM1Yz9UlohITg7IY+jPj0tY5pll 2EGYWEbdZlklu9RFq+bPaoFcTCYZdE55wJnciNIcYkf7qjzcF60ZKBvZKvGQ5YGWmKnv phg5xbvshw4SKeYi3B1krYs8lEjHtbyFUpW+EtLsJKmGXZsSKcqfAZhGJke3UYu2Caei BHDw== X-Gm-Message-State: AO0yUKUtae2P2KHBzl2PmzDeDZ84f/jd0VUi7kZXyyQ6/RWM8ECzUneT 8hFUM/HHOBQlPrm/VfC2Wqybl/2Yy51rp8s7 X-Google-Smtp-Source: AK7set+eF4O/DucIGDBzJR0LINKQLMznM1AZhNWzSL2ekrF4AGiiwX8CR7/ihM+GnHJ0foM3l2wb5A== X-Received: by 2002:a05:6e02:b49:b0:310:f694:a882 with SMTP id f9-20020a056e020b4900b00310f694a882mr6735141ilu.13.1675178876394; Tue, 31 Jan 2023 07:27:56 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:56 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Masahiro Yamada Subject: [PATCH 22/32] Makefile: Include the config for the phase being built Date: Tue, 31 Jan 2023 08:26:52 -0700 Message-Id: <20230131152702.249197-23-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean At present there is only a single auto.conf file used within the makefiles. Update them to use the correct one for each phase. Signed-off-by: Simon Glass --- Makefile | 11 ++++++++++- scripts/Makefile.build | 12 +++++++++++- scripts/Makefile.spl | 10 +++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8150ca69e82..be5b2f4fe40 100644 --- a/Makefile +++ b/Makefile @@ -587,8 +587,17 @@ scripts: scripts_basic scripts_dtc include/config/auto.conf $(Q)$(MAKE) $(build)=$(@) ifeq ($(dot-config),1) -# Read in config + +# Read in the config for this phase +ifdef CONFIG_TPL_BUILD +-include include/config/auto_tpl.conf +else ifdef CONFIG_VPL_BUILD +-include include/config/auto_vpl.conf +else ifdef CONFIG_SPL_BUILD +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif # Read in dependencies to all Kconfig* files, make sure to run # oldconfig if changes are detected. diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 97dd4a64f6e..093392b430f 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -44,9 +44,19 @@ ldflags-y := subdir-asflags-y := subdir-ccflags-y := -# Read auto.conf if it exists, otherwise ignore +# Read appropriate auto.conf if it exists, otherwise ignore # Modified for U-Boot + +ifeq ($(SPL_NAME),tpl) +-include include/config/auto_tpl.conf +else ifeq ($(SPL_NAME),vpl) +-include include/config/auto_vpl.conf +else ifeq ($(SPL_NAME),spl) +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif + -include $(prefix)/include/autoconf.mk include scripts/Kbuild.include diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 15ac87286d5..41528f32307 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -19,9 +19,17 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) include $(srctree)/scripts/Kbuild.include --include include/config/auto.conf -include $(obj)/include/autoconf.mk +# Read in the config for this SPL phase +ifdef CONFIG_TPL_BUILD +-include include/config/auto_tpl.conf +else ifdef CONFIG_VPL_BUILD +-include include/config/auto_vpl.conf +else +-include include/config/auto_spl.conf +endif + UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD -- 2.39.1.456.gfc5497dd1b-goog