[coreboot-gerrit] Change in coreboot[master]: Linux/Linuxboot: share cmdline and initrd parser

Marcello Sylvester Bauer (Code Review) gerrit at coreboot.org
Tue Nov 6 12:43:08 CET 2018


Marcello Sylvester Bauer has uploaded this change for review. ( https://review.coreboot.org/29510


Change subject: Linux/Linuxboot: share cmdline and initrd parser
......................................................................

Linux/Linuxboot: share cmdline and initrd parser

Merge the command-line and initramfs parser from 'a linux paylod'
and 'LinuxBoot'.

GOAL: merge 'a Linux payload' and 'LinuxBoot'

Change-Id: I2d2aef5d07453b98e115af6ee06318c690def785
Signed-off-by: Marcello Sylvester Bauer <info at marcellobauer.com>
---
M payloads/external/LinuxBoot/Kconfig
M payloads/external/LinuxBoot/Makefile
M payloads/external/Makefile.inc
3 files changed, 8 insertions(+), 20 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/29510/1

diff --git a/payloads/external/LinuxBoot/Kconfig b/payloads/external/LinuxBoot/Kconfig
index 4225330..fe85206 100644
--- a/payloads/external/LinuxBoot/Kconfig
+++ b/payloads/external/LinuxBoot/Kconfig
@@ -98,7 +98,7 @@
 	  Add your own kernel configuration file. Otherwise a default
 	  minimal defconfig is used.
 
-config LINUXBOOT_KERNEL_COMMANDLINE
+config LINUX_COMMAND_LINE
 	string "Kernel command-line"
 	default ""
 	help
@@ -153,7 +153,7 @@
 	  Path to directory containing root structure for embedding into the
 	  initramfs.
 
-config PAYLOAD_USERSPACE
+config LINUX_INITRD
 	string
 	default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz"
 
diff --git a/payloads/external/LinuxBoot/Makefile b/payloads/external/LinuxBoot/Makefile
index 3ea7658..4f6e98a 100644
--- a/payloads/external/LinuxBoot/Makefile
+++ b/payloads/external/LinuxBoot/Makefile
@@ -91,20 +91,20 @@
 $(project_dir)/vmlinux.bin.lzma: $(project_dir)/vmlinux.bin
 	xz -c -k -f --format=lzma --lzma1=dict=1MiB,lc=3,lp=0,pb=3 $< > $@
 
-$(project_dir)/kernel-image: $(project_dir)/vmlinux.bin.lzma $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir)/target.dtb $(PWD)/$(CONFIG_PAYLOAD_USERSPACE)
+$(project_dir)/kernel-image: $(project_dir)/vmlinux.bin.lzma $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir)/target.dtb $(PWD)/$(CONFIG_LINUX_INITRD)
 	cp $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir)
 	mkimage -f $(project_dir)/kernel_fdt_lzma.its $@
 endif
 
 ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
-$(PWD)/$(CONFIG_PAYLOAD_USERSPACE):
+$(PWD)/$(CONFIG_LINUX_INITRD):
 	$(MAKE) -f targets/u-root.mk
 else
-$(PWD)/$(CONFIG_PAYLOAD_USERSPACE):
+$(PWD)/$(CONFIG_LINUX_INITRD):
 	echo "Building without u-root support"
 endif
 
-linuxboot: $(project_dir)/kernel-image $(PWD)/$(CONFIG_PAYLOAD_USERSPACE)
+linuxboot: $(project_dir)/kernel-image $(PWD)/$(CONFIG_LINUX_INITRD)
 
 clean:
 	if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index cb806b7..706f4f2 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -32,18 +32,7 @@
 #TODO: Figure out version
 endif
 
-ifeq ($(CONFIG_PAYLOAD_LINUXBOOT),y)
-  ifeq ($(CONFIG_ARCH_X86),y)
-    ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE))),)
-      ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE)
-    endif
-    ifneq ($(strip $(call strip_quotes,$(CONFIG_PAYLOAD_USERSPACE))),)
-      ADDITIONAL_PAYLOAD_CONFIG+=-I $(strip $(call strip_quotes,$(CONFIG_PAYLOAD_USERSPACE)))
-    endif
-  endif
-endif
-
-ifeq ($(CONFIG_PAYLOAD_LINUX),y)
+ifeq ($(CONFIG_PAYLOAD_LINUX)$(CONFIG_PAYLOAD_LINUXBOOT),y)
 ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
       ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
 endif
@@ -271,14 +260,13 @@
 		CONFIG_LINUXBOOT_KERNEL_CUSTOM=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM) \
 		CONFIG_LINUXBOOT_KERNEL_CUSTOM_VERSION=$(CONFIG_LINUXBOOT_KERNEL_CUSTOM_VERSION) \
 		CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \
-		CONFIG_LINUXBOOT_KERNEL_COMMANDLINE=$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE) \
 		CONFIG_LINUXBOOT_UROOT_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \
 		CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \
 		CONFIG_LINUXBOOT_ARCH=$(CONFIG_LINUXBOOT_ARCH) \
 		CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \
 		CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \
 		CONFIG_LINUXBOOT_DTB_FILE=$(CONFIG_LINUXBOOT_DTB_FILE) \
-		CONFIG_PAYLOAD_USERSPACE=$(CONFIG_PAYLOAD_USERSPACE)
+		CONFIG_LINUX_INITRD=$(CONFIG_LINUX_INITRD)
 
 
 payloads/external/LinuxBoot/linuxboot/kernel-image: linuxboot

-- 
To view, visit https://review.coreboot.org/29510
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: I2d2aef5d07453b98e115af6ee06318c690def785
Gerrit-Change-Number: 29510
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/20181106/f910dcc2/attachment.html>


More information about the coreboot-gerrit mailing list