diff mbox series

[4/4] arm: apple: Switch to standard boot

Message ID 20240317-apple_config-v1-4-1b862bc140a9@jannau.net
State Changes Requested
Delegated to: Tom Rini
Headers show
Series configs: apple: Switch to standard boot + small adjustments | expand

Commit Message

Janne Grunau via B4 Relay March 17, 2024, 2:54 p.m. UTC
From: Janne Grunau <j@jannau.net>

Use standard boot instead of the distro boot scripts.

Signed-off-by: Janne Grunau <j@jannau.net>
---
 arch/arm/Kconfig        |  2 +-
 include/configs/apple.h | 20 ++------------------
 2 files changed, 3 insertions(+), 19 deletions(-)

Comments

Mark Kettenis April 15, 2024, 2:24 p.m. UTC | #1
> From: Janne Grunau via B4 Relay <devnull+j.jannau.net@kernel.org>
> Date: Sun, 17 Mar 2024 15:54:50 +0100
> 
> From: Janne Grunau <j@jannau.net>
> 
> Use standard boot instead of the distro boot scripts.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>

As per a somewhat recent discussion about this for the rockchip SoCs,
I think we want BOOTSTD_FULL instead of BOOTSTD_DEFAULT.  Even though
I think that BOOTSTD_FULL is a bit too chatty at the moment.

That also solves the issue that BOOTSTD_DEFAULTS doesn't run the EFI
bootmgr (which does happen with distroboot).  Although Heinrich has a
diff to fix that.

> ---
>  arch/arm/Kconfig        |  2 +-
>  include/configs/apple.h | 20 ++------------------
>  2 files changed, 3 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 01d6556c42..ad89abde41 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1034,7 +1034,7 @@ config ARCH_APPLE
>  	select USB
>  	imply CMD_DM
>  	imply CMD_GPT
> -	imply DISTRO_DEFAULTS
> +	imply BOOTSTD_DEFAULTS
>  	imply OF_HAS_PRIOR_STAGE
>  
>  config ARCH_OWL
> diff --git a/include/configs/apple.h b/include/configs/apple.h
> index a70440b3ad..1e08b11448 100644
> --- a/include/configs/apple.h
> +++ b/include/configs/apple.h
> @@ -9,26 +9,10 @@
>  	"stdout=vidconsole,serial\0" \
>  	"stderr=vidconsole,serial\0"
>  
> -#if IS_ENABLED(CONFIG_CMD_NVME)
> -	#define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
> -#else
> -	#define BOOT_TARGET_NVME(func)
> -#endif
> -
> -#if IS_ENABLED(CONFIG_CMD_USB)
> -	#define BOOT_TARGET_USB(func) func(USB, usb, 0)
> -#else
> -	#define BOOT_TARGET_USB(func)
> -#endif
> -
> -#define BOOT_TARGET_DEVICES(func) \
> -	BOOT_TARGET_NVME(func) \
> -	BOOT_TARGET_USB(func)
> -
> -#include <config_distro_bootcmd.h>
> +#define BOOT_TARGETS	"nvme usb"
>  
>  #define CFG_EXTRA_ENV_SETTINGS \
>  	ENV_DEVICE_SETTINGS \
> -	BOOTENV
> +	"boot_targets=" BOOT_TARGETS "\0"
>  
>  #endif
> 
> -- 
> 2.44.0
> 
> 
>
Janne Grunau April 16, 2024, 7:50 a.m. UTC | #2
On Mon, Apr 15, 2024 at 04:24:51PM +0200, Mark Kettenis wrote:
> > From: Janne Grunau via B4 Relay <devnull+j.jannau.net@kernel.org>
> > Date: Sun, 17 Mar 2024 15:54:50 +0100
> > 
> > From: Janne Grunau <j@jannau.net>
> > 
> > Use standard boot instead of the distro boot scripts.
> > 
> > Signed-off-by: Janne Grunau <j@jannau.net>
> 
> As per a somewhat recent discussion about this for the rockchip SoCs,
> I think we want BOOTSTD_FULL instead of BOOTSTD_DEFAULT.  Even though
> I think that BOOTSTD_FULL is a bit too chatty at the moment.

I noticed and added BOOTSTD_FULL to the defconfig downstream. To solve
the chattyness we could override BOOTCMD to "bootflow scan -b" in the
defconfig.

> That also solves the issue that BOOTSTD_DEFAULTS doesn't run the EFI
> bootmgr (which does happen with distroboot).  Although Heinrich has a
> diff to fix that.

I've seen but I think for interactive use BOOTSTD_FULL is still the
better choice. The full bootstd commands are helpful for booting from a
non-default partition.

I'll resend with BOOTSTD_FULL and will think whether to change BOOTCMD
in apple_m1_defconfig or in Kconfig. I don't think it makes much sense
to list the boot methods by default before boot.

Janne
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 01d6556c42..ad89abde41 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1034,7 +1034,7 @@  config ARCH_APPLE
 	select USB
 	imply CMD_DM
 	imply CMD_GPT
-	imply DISTRO_DEFAULTS
+	imply BOOTSTD_DEFAULTS
 	imply OF_HAS_PRIOR_STAGE
 
 config ARCH_OWL
diff --git a/include/configs/apple.h b/include/configs/apple.h
index a70440b3ad..1e08b11448 100644
--- a/include/configs/apple.h
+++ b/include/configs/apple.h
@@ -9,26 +9,10 @@ 
 	"stdout=vidconsole,serial\0" \
 	"stderr=vidconsole,serial\0"
 
-#if IS_ENABLED(CONFIG_CMD_NVME)
-	#define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
-#else
-	#define BOOT_TARGET_NVME(func)
-#endif
-
-#if IS_ENABLED(CONFIG_CMD_USB)
-	#define BOOT_TARGET_USB(func) func(USB, usb, 0)
-#else
-	#define BOOT_TARGET_USB(func)
-#endif
-
-#define BOOT_TARGET_DEVICES(func) \
-	BOOT_TARGET_NVME(func) \
-	BOOT_TARGET_USB(func)
-
-#include <config_distro_bootcmd.h>
+#define BOOT_TARGETS	"nvme usb"
 
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_DEVICE_SETTINGS \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif