From: chalianis1@gmail.com
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org, Chali Anis <chalianis1@gmail.com>
Subject: [PATCH] arm: efi: add a dummy efi arch on ARM64
Date: Tue, 29 Jul 2025 23:50:10 -0400 [thread overview]
Message-ID: <20250730035010.3318600-2-chalianis1@gmail.com> (raw)
In-Reply-To: <20250730035010.3318600-1-chalianis1@gmail.com>
From: Chali Anis <chalianis1@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.
Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
Documentation/boards/efi.rst | 11 +++-
arch/arm/Kconfig | 1 +
arch/arm/configs/efi_defconfig | 101 +++++++++++++++++++++++++++++++++
arch/arm/mach-efi/Kconfig | 10 ++++
arch/arm/mach-efi/Makefile | 1 +
5 files changed, 123 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/configs/efi_defconfig
create mode 100644 arch/arm/mach-efi/Kconfig
create mode 100644 arch/arm/mach-efi/Makefile
diff --git a/Documentation/boards/efi.rst b/Documentation/boards/efi.rst
index 869e5e88172f..872b0c2388ce 100644
--- a/Documentation/boards/efi.rst
+++ b/Documentation/boards/efi.rst
@@ -23,7 +23,7 @@ x86_64 binary currently is tested.
Building barebox for EFI
------------------------
-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
--- /dev/null
+++ b/arch/arm/configs/efi_defconfig
@@ -0,0 +1,101 @@
+CONFIG_EFI_ARM64=y
+CONFIG_64BIT=y
+CONFIG_MMU=y
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+# CONFIG_TIMESTAMP is not set
+CONFIG_BOOTM_SHOW_TYPE=y
+CONFIG_BOOTM_VERBOSE=y
+CONFIG_BOOTM_INITRD=y
+CONFIG_BLSPEC=y
+CONFIG_CONSOLE_ACTIVATE_ALL=y
+CONFIG_PARTITION_DISK_EFI=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_STATE=y
+CONFIG_BOOTCHOOSER=y
+CONFIG_RESET_SOURCE=y
+CONFIG_DEBUG_LL=y
+CONFIG_CMD_DMESG=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_IMD=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_BOOTCHOOSER=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LET=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_READF=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MM=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_WD=y
+CONFIG_CMD_2048=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_OF_DIFF=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_STATE=y
+CONFIG_NET=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_OF_BAREBOX_ENV_IN_FS=y
+CONFIG_DRIVER_SERIAL_EFI=y
+CONFIG_DRIVER_SERIAL_EFI_STDIO=y
+CONFIG_DRIVER_NET_EFI_SNP=y
+# CONFIG_SPI is not set
+CONFIG_DISK=y
+CONFIG_DISK_WRITE=y
+CONFIG_VIDEO=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_DRIVER_VIDEO_EFI_GOP=y
+CONFIG_FINTEK_SUPERIO=y
+CONFIG_SMSC_SUPERIO=y
+CONFIG_STATE_DRV=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_EFI=y
+CONFIG_F71808E_WDT=y
+CONFIG_ITCO_WDT=y
+# CONFIG_PINCTRL is not set
+CONFIG_PCI_EFI=y
+CONFIG_FS_EXT4=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_EFI=y
+CONFIG_FS_EFIVARFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/mach-efi/Kconfig b/arch/arm/mach-efi/Kconfig
new file mode 100644
index 000000000000..2bc4feca0581
--- /dev/null
+++ 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
+ select CLOCKSOURCE_EFI
+ depends on 64BIT
+ default y
+
diff --git a/arch/arm/mach-efi/Makefile b/arch/arm/mach-efi/Makefile
new file mode 100644
index 000000000000..16a218658ade
--- /dev/null
+++ b/arch/arm/mach-efi/Makefile
@@ -0,0 +1 @@
+obj- := __dummy__.o
--
2.34.1
next prev parent reply other threads:[~2025-07-30 3:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 3:50 [PATCH] clk: clk-fixed-factor: compile clk of provider only if it is enabled chalianis1
2025-07-30 3:50 ` chalianis1 [this message]
2025-07-30 6:12 ` [PATCH] arm: efi: add a dummy efi arch on ARM64 Ahmad Fatoum
2025-07-30 6:23 ` [PATCH] clk: clk-fixed-factor: compile clk of provider only if it is enabled Ahmad Fatoum
[not found] ` <CAL+1fyCC0V3MO4tmgBJumbdPn7_BhQc-60s3QhGjye0rQQVpPw@mail.gmail.com>
2025-08-04 9:41 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250730035010.3318600-2-chalianis1@gmail.com \
--to=chalianis1@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox