ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Samuel Holland <samuel@sholland.org>,
	linux-sunxi@lists.linux.dev, u-boot@lists.denx.de
Subject: [PATCH 07/19] sunxi: simplify U-Boot proper only builds
Date: Wed,  3 Jan 2024 00:12:27 +0000	[thread overview]
Message-ID: <20240103001239.17482-8-andre.przywara@arm.com> (raw)
In-Reply-To: <20240103001239.17482-1-andre.przywara@arm.com>

At the moment every Allwinner board builds and requires an SPL, even
though we select this individually in each _defconfig file.
For experiments and for early bringup of new SoCs it would be beneficial
to only build U-Boot proper, for instance to postpone a tedious SPL port
(including DRAM support) in the initial phase.

Protect some SPL related symbols that we unconditionally select at the
moment with "if SPL", to avoid Kconfig conflicts when CONFIG_SPL is
disabled.

This alone does not cleanly build U-Boot proper only yet, but gets it
far enough so that the binary can be harvested.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/Kconfig            |  4 ++--
 arch/arm/mach-sunxi/Kconfig | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d812685c984..adce50c66a4 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1143,14 +1143,14 @@ config ARCH_SUNXI
 	select SPL_SEPARATE_BSS if SPL
 	select SPL_STACK_R if SPL
 	select SPL_SYS_MALLOC_SIMPLE if SPL
-	select SPL_SYS_THUMB_BUILD if !ARM64
+	select SPL_SYS_THUMB_BUILD if SPL && !ARM64
 	select SUNXI_GPIO
 	select SYS_NS16550
 	select SYS_THUMB_BUILD if !ARM64
 	select USB if DISTRO_DEFAULTS
 	select USB_KEYBOARD if DISTRO_DEFAULTS && USB_HOST
 	select USB_STORAGE if DISTRO_DEFAULTS && USB_HOST
-	select SPL_USE_TINY_PRINTF
+	select SPL_USE_TINY_PRINTF if SPL
 	select USE_PREBOOT
 	select SYS_RELOC_GD_ENV_ADDR
 	imply BOARD_LATE_INIT
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index a4a8d8e9445..421a48bc357 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -182,7 +182,7 @@ config SUNXI_GEN_SUN6I
 config SUN50I_GEN_H6
 	bool
 	select FIT
-	select SPL_LOAD_FIT
+	select SPL_LOAD_FIT if SPL
 	select MMC_SUNXI_HAS_NEW_MODE
 	select SUPPORT_SPL
 	---help---
@@ -272,7 +272,7 @@ config MACH_SUN6I
 	select ARCH_SUPPORT_PSCI
 	select SPL_ARMV7_SET_CORTEX_SMPEN
 	select DRAM_SUN6I
-	select SPL_I2C
+	select SPL_I2C if SPL
 	select SUN6I_PRCM
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
@@ -300,7 +300,7 @@ config MACH_SUN8I_A23
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
 	select DRAM_SUN8I_A23
-	select SPL_I2C
+	select SPL_I2C if SPL
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
@@ -313,7 +313,7 @@ config MACH_SUN8I_A33
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
 	select DRAM_SUN8I_A33
-	select SPL_I2C
+	select SPL_I2C if SPL
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
 	select SYS_I2C_SUN8I_RSB
@@ -323,7 +323,7 @@ config MACH_SUN8I_A83T
 	bool "sun8i (Allwinner A83T)"
 	select CPU_V7A
 	select DRAM_SUN8I_A83T
-	select SPL_I2C
+	select SPL_I2C if SPL
 	select SUNXI_GEN_SUN6I
 	select MMC_SUNXI_HAS_NEW_MODE
 	select MMC_SUNXI_HAS_MODE_SWITCH
@@ -382,7 +382,7 @@ config MACH_SUN9I
 	select CPU_V7A
 	select SPL_ARMV7_SET_CORTEX_SMPEN
 	select DRAM_SUN9I
-	select SPL_I2C
+	select SPL_I2C if SPL
 	select SUN6I_PRCM
 	select SUNXI_GEN_SUN6I
 	select SUPPORT_SPL
@@ -398,7 +398,7 @@ config MACH_SUN50I
 	select SUNXI_DRAM_DW
 	select SUNXI_DRAM_DW_32BIT
 	select FIT
-	select SPL_LOAD_FIT
+	select SPL_LOAD_FIT if SPL
 	select SUNXI_A64_TIMER_ERRATUM
 
 config MACH_SUN50I_H5
@@ -407,7 +407,7 @@ config MACH_SUN50I_H5
 	select MACH_SUNXI_H3_H5
 	select MMC_SUNXI_HAS_NEW_MODE
 	select FIT
-	select SPL_LOAD_FIT
+	select SPL_LOAD_FIT if SPL
 
 config MACH_SUN50I_H6
 	bool "sun50i (Allwinner H6)"
-- 
2.35.8


  parent reply	other threads:[~2024-01-03  0:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  0:12 [PATCH 00/19] sunxi: SPL cleanup part 1 Andre Przywara
2024-01-03  0:12 ` [PATCH 01/19] sunxi: cleanup sunxi-common.h Andre Przywara
2024-01-03  0:12 ` [PATCH 02/19] sunxi: sun50i-h6: remove unneeded base addresses from header Andre Przywara
2024-01-03  0:12 ` [PATCH 03/19] sunxi: sun4i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 04/19] sunxi: sun9i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 05/19] sunxi: move #ifdef guards around tzpc_init() to header file Andre Przywara
2024-01-03  0:12 ` [PATCH 06/19] sunxi: remove common.h inclusion Andre Przywara
2024-01-03  0:12 ` Andre Przywara [this message]
2024-01-03  0:12 ` [PATCH 08/19] sunxi: remove unneeded i2c_init_board() call for U-Boot proper Andre Przywara
2024-01-03  0:12 ` [PATCH 09/19] sunxi: compile clock.c for SPL only Andre Przywara
2024-01-03  0:12 ` [PATCH 10/19] sunxi: sun4i: make more clock functions " Andre Przywara
2024-01-03  0:12 ` [PATCH 11/19] sunxi: sun6i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 12/19] sunxi: sun50i_h6: " Andre Przywara
2024-01-03  0:12 ` [PATCH 13/19] sunxi: sun8i_a83t: " Andre Przywara
2024-01-03  0:12 ` [PATCH 14/19] sunxi: sun9i: " Andre Przywara
2024-01-03  0:12 ` [PATCH 15/19] sunxi: move pinmux setup into separate SPL only file Andre Przywara
2024-01-03  0:12 ` [PATCH 16/19] sunxi: SPL pinmux: rewrite without #ifdefs Andre Przywara
2024-01-03  0:12 ` [PATCH 17/19] sunxi: move UART pinmux setup into separate file Andre Przywara
2024-01-03  0:12 ` [PATCH 18/19] sunxi: SPL pinmux: split out UART pinmux per port Andre Przywara
2024-01-03  0:12 ` [PATCH 19/19] sunxi: SPL pinmux: rewrite UART setup without #ifdefs Andre Przywara
2024-01-17 13:52 ` [PATCH 00/19] sunxi: SPL cleanup part 1 Andre Przywara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240103001239.17482-8-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox