From patchwork Fri Sep 17 16:17:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529493 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZpngYqn9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H9zgw0Cljz9sVw for ; Sat, 18 Sep 2021 02:20:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 928B38329D; Fri, 17 Sep 2021 18:19:10 +0200 (CEST) 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="ZpngYqn9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 537B783222; Fri, 17 Sep 2021 18:18:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 1597C8325E for ; Fri, 17 Sep 2021 18:18:04 +0200 (CEST) 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-wm1-x329.google.com with SMTP id e26so7769503wmk.2 for ; Fri, 17 Sep 2021 09:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fa/IjOFOHXKq5wEz4w2N3Ye6B9FM5qrzpxkh5Al1tYU=; b=ZpngYqn9HyATCTM0LWlC0+u0lMKkEnrkNwfK5azISug6dIcWCIA7wVKwRUdmon1Cmv yPF8O1vbh16z2m4t4BtFMt+kMYw3MqOKZdfMEQrcuMGhkHcvkW+uYeOW08IriYOTP40z EmgaRs1cHhfHFRXa2d4XEmy07J9/gTZvKk5SY= 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=Fa/IjOFOHXKq5wEz4w2N3Ye6B9FM5qrzpxkh5Al1tYU=; b=A++ayUMV5IjtBDG1x2sRo/uuGvE8NO82zOTVJIG8VfjGf2wyHkhuHEMpCGAQI2wcvQ 0oP3BhUMWd4GG8H00K133fMp+sjqMV193uLbSXr1ZkNsxNkaGqPWQfKxtBO+DZdvIObi GLISI8cyjtxJcDHpSNi086nZBfdrLfaD4YJE60Lwk3G/eBiz/OaJSQCHhonmFXklkEAd AvFKpV+jgJrQdHNn++y0cBoE1bu9uaoSMq5Gn79MupBwn1ljeBw4R8b1DVTAC/TgFHUr 8VDHBrlgB+FnoizAupKTe4kvwLJyPpxLHdy0DXGEz8dSQ4WeQPp/H/fPf4CWCLlJFEzi Dfww== X-Gm-Message-State: AOAM530cWnFBuFED18VN8tYvu3YlXDdSa5erXEnJVPH8Fe5zMDR4eHGS hF36ToYqRrXACx2bfprN+UKoHJEQSmbiSuCS X-Google-Smtp-Source: ABdhPJyjuliM6yAtYYIvtFjb2vLnS8XHhBlBQWdXcCaHg0W63qsIrxXwaeucM5xp8ymZkMmXUypd2A== X-Received: by 2002:a1c:2705:: with SMTP id n5mr15820884wmn.176.1631895483097; Fri, 17 Sep 2021 09:18:03 -0700 (PDT) Received: from sjg1.COMFAST (host-92-2-168-81.as13285.net. [92.2.168.81]) by smtp.gmail.com with ESMTPSA id 48sm7699906wrc.14.2021.09.17.09.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 09:18:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Masahiro Yamada , Simon Glass Subject: [PATCH 13/17] Makefile: Include the config for the phase being built Date: Fri, 17 Sep 2021 10:17:36 -0600 Message-Id: <20210917161741.1275871-14-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210917161741.1275871-1-sjg@chromium.org> References: <20210917161741.1275871-1-sjg@chromium.org> MIME-Version: 1.0 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 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 | 10 +++++++++- scripts/Makefile.spl | 8 +++++++- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3014788e14e..0bf846b5640 100644 --- a/Makefile +++ b/Makefile @@ -581,8 +581,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_SPL_BUILD +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif +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 5df8f61aa58..aaa960b51ce 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -40,9 +40,17 @@ 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),spl) +-include include/config/auto_spl.conf +else -include include/config/auto.conf +endif + -include $(prefix)/include/autoconf.mk include scripts/Makefile.uncmd_spl diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 25a3e7fa52e..02dd85b8e1c 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -19,9 +19,15 @@ _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 +-include include/config/auto_spl.conf +endif + UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD