Hi,

On 30.07.25 05:50, chalian...@gmail.com wrote:
> From: Chali Anis <chalian...@gmail.com>
> 
> this arch will forces a generic arm 64 cpu, which will
> produce an efi payload on ARM 64, this works with a virtual
> machine using qemu-system-aarch64, need further work to support
> real hardware.
> Submit the patch in case someone is interrested in working
> to have a full support for efi payload on real hardware.

Thanks for your patch.

For the Virt platforms we decided to use the multi defconfigs to cut down
on the number of configs. I think efi_defconfig is useful to have, because
it shares little with other existing configs, but it might confuse users
to provide it before it is a viable target, i.e. can actually boot a kernel
via EFI...

I just submitted an alternative patch for multi_v8_efi_defconfig, which could
be used as stepping stone for further work.

What do you think?

> -Use the following to build barebox for EFI:
> +Use the following to build barebox for EFI for x86:
>  
>  .. code-block:: sh
>  
> @@ -31,6 +31,15 @@ Use the following to build barebox for EFI:
>    make efi_defconfig
>    make
>  
> +for EFI on arm 64 use:
> +
> +.. code-block:: sh
> +
> +  export ARCH=arm
> +  export CROSS_COMPILE=aarch64-linux-gnu-
> +  make efi_defconfig
> +  make
> +
>  The resulting EFI image is ``barebox.efi`` (or the barebox-flash-image link).
>  
>  Running barebox on EFI systems
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d283ef7793a1..d5dd6abc416f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -276,6 +276,7 @@ source "arch/arm/mach-vexpress/Kconfig"
>  source "arch/arm/mach-tegra/Kconfig"
>  source "arch/arm/mach-zynq/Kconfig"
>  source "arch/arm/mach-zynqmp/Kconfig"
> +source "arch/arm/mach-efi/Kconfig"
>  
>  config BOARD_ARM_VIRT
>       bool
> diff --git a/arch/arm/configs/efi_defconfig b/arch/arm/configs/efi_defconfig
> new file mode 100644
> index 000000000000..5fe998ed4d4d

> +CONFIG_VIDEO=y
> +CONFIG_FRAMEBUFFER_CONSOLE=y
> +CONFIG_DRIVER_VIDEO_EFI_GOP=y

This doesn't work correctly on ARM yet

> +CONFIG_FINTEK_SUPERIO=y
> +CONFIG_SMSC_SUPERIO=y

These are likely not used with ARM systems

> +CONFIG_STATE_DRV=y
> +CONFIG_WATCHDOG=y
> +CONFIG_WATCHDOG_EFI=y
> +CONFIG_F71808E_WDT=y
> +CONFIG_ITCO_WDT=y

Not relevant to ARM systems.

> +++ b/arch/arm/mach-efi/Kconfig
> @@ -0,0 +1,10 @@
> +config EFI_ARM64
> +     bool "EFI on ARM64"
> +     select CPU_V8
> +     select CPU_SUPPORTS_64BIT_KERNEL
> +     select HAVE_EFI_PAYLOAD
> +     select EFI_PAYLOAD

EFI_PAYLOAD is still gated behind COMPILE_TEST, so I think this should result in
a warning.

> +    select CLOCKSOURCE_EFI

Wrong indentation.

Cheers,
Ahmad
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to