From: Janne Grunau Date: Thu, 30 Apr 2026 22:31:16 +0000 (+0200) Subject: arm: apple: Switch to board based text env X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f0ff73bac5dc43f8fe336f2828900035e260f1a;p=thirdparty%2Fu-boot.git arm: apple: Switch to board based text env The main use case for u-boot on Apple silicon based devices is to provide an EFI based bootloader for operating systems. This uses a generic u-boot image with DTBs passed from an earlier boot loader (m1n1). Use the generic board name "mac" for this purpose. Signed-off-by: Janne Grunau --- diff --git a/MAINTAINERS b/MAINTAINERS index ae4013767d1..ea646f618a5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -137,6 +137,7 @@ R: Janne Grunau S: Maintained F: arch/arm/include/asm/arch-apple/ F: arch/arm/mach-apple/ +F: board/apple/ F: configs/apple_m1_defconfig F: doc/board/apple/ F: drivers/input/apple_spi_kbd.c diff --git a/arch/arm/mach-apple/Kconfig b/arch/arm/mach-apple/Kconfig index 294690ec0e8..fdc8c32152f 100644 --- a/arch/arm/mach-apple/Kconfig +++ b/arch/arm/mach-apple/Kconfig @@ -3,12 +3,22 @@ if ARCH_APPLE config TEXT_BASE default 0x00000000 -config SYS_CONFIG_NAME +config SYS_SOC default "apple" -config SYS_SOC +config SYS_VENDOR default "apple" +config SYS_BOARD + string "Board name" + default "mac" + help + This option contains information about board name. + Based on this option board// will + be used. + Apple silicon based devices are expected to use the generic board name + "mac". + config SYS_MALLOC_LEN default 0x4000000 diff --git a/arch/arm/mach-apple/rtkit_helper.c b/arch/arm/mach-apple/rtkit_helper.c index b7d60e15700..cbdc204f141 100644 --- a/arch/arm/mach-apple/rtkit_helper.c +++ b/arch/arm/mach-apple/rtkit_helper.c @@ -11,6 +11,7 @@ #include #include #include +#include /* ASC registers */ #define REG_CPU_CTRL 0x0044 diff --git a/board/apple/mac/mac.env b/board/apple/mac/mac.env new file mode 100644 index 00000000000..109379c8c67 --- /dev/null +++ b/board/apple/mac/mac.env @@ -0,0 +1,4 @@ +stdin=serial,usbkbd,spikbd +stdout=vidconsole,serial +stderr=vidconsole,serial +boot_targets=nvme usb diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index 1ce69f2882a..6020cd3f215 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -29,3 +29,5 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_NO_FB_CLEAR=y CONFIG_VIDEO_SIMPLE=y CONFIG_GENERATE_SMBIOS_TABLE_VERBOSE=y +CONFIG_SYS_VENDOR=apple +CONFIG_SYS_BOARD=mac diff --git a/drivers/iommu/apple_dart.c b/drivers/iommu/apple_dart.c index bfd4ad20105..ebef28d0b9d 100644 --- a/drivers/iommu/apple_dart.c +++ b/drivers/iommu/apple_dart.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/nvme/nvme_apple.c b/drivers/nvme/nvme_apple.c index 48f82bc826c..3e7d95c2b54 100644 --- a/drivers/nvme/nvme_apple.c +++ b/drivers/nvme/nvme_apple.c @@ -13,6 +13,7 @@ #include #include #include +#include /* ASC registers */ #define REG_CPU_CTRL 0x0044 diff --git a/include/configs/apple.h b/include/configs/apple.h deleted file mode 100644 index 1e08b114480..00000000000 --- a/include/configs/apple.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -/* Environment */ -#define ENV_DEVICE_SETTINGS \ - "stdin=serial,usbkbd,spikbd\0" \ - "stdout=vidconsole,serial\0" \ - "stderr=vidconsole,serial\0" - -#define BOOT_TARGETS "nvme usb" - -#define CFG_EXTRA_ENV_SETTINGS \ - ENV_DEVICE_SETTINGS \ - "boot_targets=" BOOT_TARGETS "\0" - -#endif