[coreboot-gerrit] Change in coreboot[master]: Linuxboot: add option to parse initramfs

Marcello Sylvester Bauer (Code Review) gerrit at coreboot.org
Sun Nov 4 11:29:46 CET 2018


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 at 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

-- 
To view, visit https://review.coreboot.org/29448
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I648fb2e0383d20b0e4d50e416af637ea07d1efb4
Gerrit-Change-Number: 29448
Gerrit-PatchSet: 1
Gerrit-Owner: Marcello Sylvester Bauer <info at marcellobauer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181104/f5ae7762/attachment.html>


More information about the coreboot-gerrit mailing list