aboutsummaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/Makefile.mk1
-rw-r--r--payloads/external/Makefile.mk7
-rw-r--r--payloads/external/leanefi/Kconfig58
-rw-r--r--payloads/external/leanefi/Kconfig.name6
-rw-r--r--payloads/external/leanefi/Makefile22
5 files changed, 94 insertions, 0 deletions
diff --git a/payloads/Makefile.mk b/payloads/Makefile.mk
index a2336aa876..5f988dac1b 100644
--- a/payloads/Makefile.mk
+++ b/payloads/Makefile.mk
@@ -28,6 +28,7 @@ payloads/external/edk2 \
payloads/external/GRUB2 \
payloads/external/LinuxBoot \
payloads/external/skiboot \
+payloads/external/leanefi \
payloads/external/coreDOOM \
force-payload:
diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk
index d497cf871c..4a17791052 100644
--- a/payloads/external/Makefile.mk
+++ b/payloads/external/Makefile.mk
@@ -436,6 +436,13 @@ payloads/external/skiboot/build/skiboot.elf:
$(MAKE) -C payloads/external/skiboot all \
CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \
CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION)
+
+# leanefi
+
+payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG)
+ $(MAKE) -C payloads/external/leanefi
+FORCE: ;
+
# COREDOOM
payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom:
diff --git a/payloads/external/leanefi/Kconfig b/payloads/external/leanefi/Kconfig
new file mode 100644
index 0000000000..490cbcc9bc
--- /dev/null
+++ b/payloads/external/leanefi/Kconfig
@@ -0,0 +1,58 @@
+if PAYLOAD_LEANEFI
+
+menu "leanEFI configuration"
+
+config PAYLOAD_FILE
+ string
+ default "payloads/external/leanefi/leanefi/build/leanefi.elf"
+
+config LEANEFI_EFI_ECPT
+ bool
+ default y if ARCH_ARM64
+
+config LEANEFI_HEAP_SIZE
+ int "Heap size"
+ default 131072
+ help
+ This is the heap size (malloc'able size) available
+ to the payload.
+
+ If unsure, set to 131072 (128K)
+
+config LEANEFI_STACK_SIZE
+ int "Stack size"
+ default 16384
+ help
+ This is the stack size available to the payload.
+
+ If unsure, set to 16384 (16K)
+
+config LEANEFI_BASE_ADDRESS
+ hex "Base address"
+ default 0x62000000 if BOARD_EMULATION_QEMU_AARCH64
+ #default 0x10023300000 if BOARD_EMULATION_QEMU_SBSA
+ help
+ This is the base address for the payload.
+
+config LEANEFI_PAYLOAD
+ bool "Add a payload"
+ default y
+ help
+ If selected leanEFI will start a payload.
+ This option should only be unselected for debug purposes.
+
+config LEANEFI_PAYLOAD_PATH
+ string "path to leanefi payload"
+ depends on LEANEFI_PAYLOAD
+
+config LEANEFI_FDT
+ bool "Add an FDT that is propagated as EFI configuration table"
+ default y if BOARD_EMULATION_QEMU_AARCH64
+
+config LEANEFI_FDT_PATH
+ string "path to FDT"
+ depends on LEANEFI_FDT
+
+endmenu
+
+endif
diff --git a/payloads/external/leanefi/Kconfig.name b/payloads/external/leanefi/Kconfig.name
new file mode 100644
index 0000000000..1524d676b4
--- /dev/null
+++ b/payloads/external/leanefi/Kconfig.name
@@ -0,0 +1,6 @@
+config PAYLOAD_LEANEFI
+ bool "leanefi"
+ depends on ARCH_ARM64
+ help
+ Select this option if you want to build a coreboot image
+ with an leanefi payload.
diff --git a/payloads/external/leanefi/Makefile b/payloads/external/leanefi/Makefile
new file mode 100644
index 0000000000..4edec32e55
--- /dev/null
+++ b/payloads/external/leanefi/Makefile
@@ -0,0 +1,22 @@
+
+unexport KCONFIG_AUTOHEADER
+unexport KCONFIG_AUTOCONFIG
+unexport KCONFIG_DEPENDENCIES
+unexport KCONFIG_SPLITCONFIG
+unexport KCONFIG_TRISTATE
+unexport KCONFIG_NEGATIVES
+unexport $(COREBOOT_EXPORTS)
+
+build: leanefi
+ $(MAKE) -C leanefi
+
+leanefi:
+ git clone "https://review.coreboot.org/leanefi"
+
+distclean:
+ rm -rf leanefi
+
+clean:
+ $(MAKE) -C leanefi clean
+
+.PHONY: build clean distclean