[PATCH 1/1] riscv: allow building w/o DHCP, SCSI, VIRTIO

Bin Meng bmeng.cn at gmail.com
Mon Jul 4 11:50:04 CEST 2022


On Sun, Jul 3, 2022 at 7:28 PM Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Consider which boot devices are enabled in the definition of the
> BOOT_TARGET_DEVICES() macro.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
>  include/configs/qemu-riscv.h | 25 ++++++++++++++++++++++---
>  1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/include/configs/qemu-riscv.h b/include/configs/qemu-riscv.h
> index f462895fb5..427da69d3f 100644
> --- a/include/configs/qemu-riscv.h
> +++ b/include/configs/qemu-riscv.h
> @@ -33,11 +33,30 @@
>  /* Environment options */
>
>  #ifndef CONFIG_SPL_BUILD
> +
> +#if defined(CONFIG_CMD_DHCP)
> +#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
> +#else
> +#define BOOT_TARGET_DEVICES_DHCP(func)
> +#endif
> +
> +#if defined(CONFIG_SCSI)

For consistency, maybe CONFIG_CMD_SCSI?

> +# define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
> +#else
> +# define BOOT_TARGET_DEVICES_SCSI(func)
> +#endif
> +
> +#if defined(CONFIG_CMD_VIRTIO)
> +# define BOOT_TARGET_DEVICES_VIRTIO(func) func(VIRTIO, virtio, 0)
> +#else
> +# define BOOT_TARGET_DEVICES_VIRTIO(func)
> +#endif
> +
>  #define BOOT_TARGET_DEVICES(func) \
>         func(QEMU, qemu, na) \
> -       func(VIRTIO, virtio, 0) \
> -       func(SCSI, scsi, 0) \
> -       func(DHCP, dhcp, na)
> +       BOOT_TARGET_DEVICES_VIRTIO(func) \
> +       BOOT_TARGET_DEVICES_SCSI(func) \
> +       BOOT_TARGET_DEVICES_DHCP(func)
>
>  #include <config_distro_bootcmd.h>
>

Regards,
Bin


More information about the U-Boot mailing list