configs: meson64: Ensure commands for boot targets are available
PATCH 1/1 configs: meson64: Ensure commands for boot targets are available
When populating BOOT_TARGET_DEVICES on Amlogic Meson platforms, verify that the shell commands for accessing the relevant media have been enabled in the build configuration.
This was already being done for USB, NVME and SCSI devices, but not for MMC devices or network boot. This meant that configuring U-Boot without the networking or MMC subsystems/drivers would cause an error to be thrown during preprocessing.
--- include/configs/meson64.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-)
include/configs/meson64.h +23 -5
@@ -77,6 +77,15 @@#define BOOTENV_DEV_NAME_USB_DFU (devtypeu, devtypel, instance)#endif +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC (func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) +#else +#define BOOT_TARGET_MMC (func) +#endif +#ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICES_USB (func) func(USB, usb, 0)#else
@@ -95,18 +104,27 @@#define BOOT_TARGET_SCSI (func)#endif +#if defined(CONFIG_CMD_DHCP ) && defined(CONFIG_CMD_PXE ) +#define BOOT_TARGET_PXE (func) func(PXE, pxe, na) +#define BOOT_TARGET_DHCP (func) func(DHCP, dhcp, na) +#elif defined(CONFIG_CMD_DHCP ) +#define BOOT_TARGET_PXE (func) +#define BOOT_TARGET_DHCP (func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_PXE (func) +#define BOOT_TARGET_DHCP (func) +#endif +#ifndef BOOT_TARGET_DEVICES #define BOOT_TARGET_DEVICES (func) \ func(ROMUSB, romusb, na) \ func(USB_DFU, usbdfu, na) \ - func(MMC, mmc, 0) \ - func(MMC, mmc, 1) \ - func(MMC, mmc, 2) \ + BOOT_TARGET_MMC(func) \ BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_NVME(func) \ BOOT_TARGET_SCSI(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func)#endif #define BOOTM_SIZE __stringify(0x1700000)
Signature · 1 line
2.47.0
Quoted 57 lines · Callum Parsey via groups.io
When populating
BOOT_TARGET_DEVICESon Amlogic Meson platforms, verify that the shell commands for accessing the relevant media have been enabled in the build configuration.This was already being done for USB, NVME and SCSI devices, but not for MMC devices or network boot. This meant that configuring U-Boot without the networking or MMC subsystems/drivers would cause an error to be thrown during preprocessing.
Signed-off-by Callum Parsey <[email protected]>--- include/configs/meson64.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-)include/configs/meson64.h +21
-3@@ -77,6 +77,15 @@#define BOOTENV_DEV_NAME_USB_DFU (devtypeu, devtypel, instance)#endif +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC (func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) +#else +#define BOOT_TARGET_MMC (func) +#endif +#ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICES_USB (func) func(USB, usb, 0)#else @@ -95,18 +104,27 @@#define BOOT_TARGET_SCSI (func)#endif +#if defined(CONFIG_CMD_DHCP ) && defined(CONFIG_CMD_PXE ) +#define BOOT_TARGET_PXE (func) func(PXE, pxe, na) +#define BOOT_TARGET_DHCP (func) func(DHCP, dhcp, na) +#elif defined(CONFIG_CMD_DHCP ) +#define BOOT_TARGET_PXE (func) +#define BOOT_TARGET_DHCP (func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_PXE (func) +#define BOOT_TARGET_DHCP (func) +#endif +#ifndef BOOT_TARGET_DEVICES #define BOOT_TARGET_DEVICES (func) \ func(ROMUSB, romusb, na) \ func(USB_DFU, usbdfu, na) \ - func(MMC, mmc, 0) \ - func(MMC, mmc, 1) \ - func(MMC, mmc, 2) \ + BOOT_TARGET_MMC(func) \
include/configs/meson64.h line 130
Quoted 10 lines
include/configs/meson64.h +2
-2BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_NVME(func) \ BOOT_TARGET_SCSI(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func) #endif #define BOOTM_SIZE __stringify(0x1700000)
Neil Armstrong
maintainerHi,
Quoted 10 lines · Callum Parsey
When populating
BOOT_TARGET_DEVICESon Amlogic Meson platforms, verify that the shell commands for accessing the relevant media have been enabled in the build configuration.This was already being done for USB, NVME and SCSI devices, but not for MMC devices or network boot. This meant that configuring U-Boot without the networking or MMC subsystems/drivers would cause an error to be thrown during preprocessing.
[...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic-next)
[1/1] configs: meson64: Ensure commands for boot targets are available
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/315cad97a5ae09b1b975fff2413ce785b3b8592a
Signature · 1 line
Neil