[build] Canonicalise command list configuration

Move all command selection from config/defaults/<platform>.h to the
top-level config/general.h, using indented conditional blocks to
clarify which commands are supported and enabled on each platform.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-01-16 12:05:38 +00:00
parent 9f4b9f60fe
commit e72c331aa7
5 changed files with 61 additions and 55 deletions

View File

@@ -26,7 +26,6 @@ FILE_SECBOOT ( PERMITTED );
#define TIME_EFI
#define REBOOT_EFI
#define ACPI_EFI
#define FDT_EFI
#define MPAPI_EFI
#define NAP_EFI
#define SERIAL_SPCR
@@ -48,8 +47,6 @@ FILE_SECBOOT ( PERMITTED );
#define USB_EFI /* Provide EFI_USB_IO_PROTOCOL interface */
#define USB_BLOCK /* USB block devices */
#define REBOOT_CMD /* Reboot command */
#define EFI_SETTINGS /* EFI variable settings */
#define CERTS_EFI /* EFI certificate sources */
@@ -57,26 +54,23 @@ FILE_SECBOOT ( PERMITTED );
#if defined ( __i386__ ) || defined ( __x86_64__ )
#define IOAPI_X86
#define ENTROPY_RDRAND
#define CPUID_CMD /* x86 CPU feature detection command */
#define UNSAFE_STD /* Avoid setting direction flag */
#define FDT_NULL
#endif
#if defined ( __arm__ ) || defined ( __aarch64__ )
#define IOAPI_ARM
#define FDT_CMD
#endif
#if defined ( __aarch64__ )
#define FDT_CMD
#define FDT_EFI
#endif
#if defined ( __loongarch__ )
#define IOAPI_LOONG64
#define FDT_EFI
#endif
#if defined ( __riscv )
#define IOAPI_RISCV
#define FDT_CMD
#define FDT_EFI
#endif
#endif /* CONFIG_DEFAULTS_EFI_H */

View File

@@ -25,6 +25,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#define ACPI_LINUX
#define MPAPI_NULL
#define SERIAL_NULL
#define FDT_NULL
#define DRIVERS_LINUX

View File

@@ -27,6 +27,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ACPI_RSDP
#define MPAPI_PCBIOS
#define SERIAL_SPCR
#define FDT_NULL
#ifdef __x86_64__
#define IOMAP_PAGES
@@ -49,7 +50,4 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define USB_KEYBOARD /* USB keyboards */
#define USB_BLOCK /* USB block devices */
#define REBOOT_CMD /* Reboot command */
#define CPUID_CMD /* x86 CPU feature detection command */
#endif /* CONFIG_DEFAULTS_PCBIOS_H */

View File

@@ -22,6 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define DMAAPI_FLAT
#endif
#define FDT_SBI
#define CONSOLE_SBI
#define CONSOLE_SERIAL
#define REBOOT_SBI
@@ -37,8 +38,4 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define SMBIOS_NULL
#define TIME_NULL
#define REBOOT_CMD
#define POWEROFF_CMD
#define FDT_CMD
#endif /* CONFIG_DEFAULTS_SBI_H */