Marcello Sylvester Bauer has uploaded this change for review. ( https://review.coreboot.org/29448
Change subject: Linuxboot: add option to parse initramfs ......................................................................
Linuxboot: add option to parse initramfs
Add the option to build the Linuxboot initramfs, otherwise choose the path to a custom initramfs. Build a u-root initramfs remains default.
Change-Id: I648fb2e0383d20b0e4d50e416af637ea07d1efb4 Signed-off-by: Marcello Sylvester Bauer info@marcellobauer.com --- M payloads/external/LinuxBoot/Kconfig M payloads/external/LinuxBoot/Makefile 2 files changed, 21 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/29448/1
diff --git a/payloads/external/LinuxBoot/Kconfig b/payloads/external/LinuxBoot/Kconfig index 58a67d6..30bd610 100644 --- a/payloads/external/LinuxBoot/Kconfig +++ b/payloads/external/LinuxBoot/Kconfig @@ -112,9 +112,16 @@ config PAYLOAD_FILE default "payloads/external/LinuxBoot/linuxboot/kernel-image"
+config LINUXBOOT_BUILD_INITRAMFS + bool "build initramfs" + default y + help + build Linuxboot initramfs + choice prompt "Payload Mode" default LINUXBOOT_UROOT + depends on LINUXBOOT_BUILD_INITRAMFS
config LINUXBOOT_UROOT bool "u-root" @@ -153,12 +160,20 @@ Path to directory containing root structure for embedding into the initramfs.
-config PAYLOAD_USERSPACE - string "LinuxBoot initramfs" - default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz" +endif + +config LINUXBOOT_CUSTOM_INITRAMFS + string "path to LinuxBoot initramfs" + default "" + depends on !LINUXBOOT_BUILD_INITRAMFS help The initramfs to use with the compiled kernel. Useful for debugging or custom initramfs.
-endif +config PAYLOAD_USERSPACE + string + default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz" \ + if LINUXBOOT_BUILD_INITRAMFS && LINUXBOOT_UROOT + default LINUXBOOT_CUSTOM_INITRAMFS if !LINUXBOOT_BUILD_INITRAMFS + endif diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile index 2390ba8..352c271 100644 --- a/payloads/external/LinuxBoot/Makefile +++ b/payloads/external/LinuxBoot/Makefile @@ -42,7 +42,7 @@
OBJCOPY:=$(LINUXBOOT_COMPILE)objcopy
-all: payload +all: linuxboot
toolchain: if [[ ! -x "$(LINUXBOOT_COMPILE)gcc" ]]; then \ @@ -104,7 +104,7 @@ echo "Building without u-root support" endif
-payload: $(project_dir)/kernel-image $(PWD)/$(CONFIG_PAYLOAD_USERSPACE) +linuxboot: $(project_dir)/kernel-image $(PWD)/$(CONFIG_PAYLOAD_USERSPACE)
clean: if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi