Linux/Linuxboot: share cmdline and initrd parser
Merge the command-line and initramfs parser from 'a linux payload' and 'LinuxBoot'. GOAL: merge 'a Linux payload' and 'LinuxBoot' Change-Id: I2d2aef5d07453b98e115af6ee06318c690def785 Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com> Reviewed-on: https://review.coreboot.org/29510 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
9d917f67fe
commit
a4266691e3
|
@ -73,7 +73,7 @@ config LINUXBOOT_KERNEL_CONFIGFILE
|
||||||
Add your own kernel configuration file. Otherwise a default
|
Add your own kernel configuration file. Otherwise a default
|
||||||
minimal defconfig is used.
|
minimal defconfig is used.
|
||||||
|
|
||||||
config LINUXBOOT_KERNEL_COMMANDLINE
|
config LINUX_COMMAND_LINE
|
||||||
string "Kernel command-line"
|
string "Kernel command-line"
|
||||||
default ""
|
default ""
|
||||||
help
|
help
|
||||||
|
@ -128,7 +128,7 @@ config LINUXBOOT_UROOT_FILES
|
||||||
Path to directory containing root structure for embedding into the
|
Path to directory containing root structure for embedding into the
|
||||||
initramfs.
|
initramfs.
|
||||||
|
|
||||||
config PAYLOAD_USERSPACE
|
config LINUX_INITRD
|
||||||
string
|
string
|
||||||
default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz"
|
default "payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz"
|
||||||
|
|
||||||
|
|
|
@ -82,20 +82,20 @@ $(project_dir)/target.dtb: $(PWD)/$(CONFIG_LINUXBOOT_DTB_FILE)
|
||||||
$(project_dir)/vmlinux.bin.lzma: $(project_dir)/vmlinux.bin
|
$(project_dir)/vmlinux.bin.lzma: $(project_dir)/vmlinux.bin
|
||||||
xz -c -k -f --format=lzma --lzma1=dict=1MiB,lc=3,lp=0,pb=3 $< > $@
|
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)
|
cp $(project_dir)/../arm64/kernel_fdt_lzma.its $(project_dir)
|
||||||
mkimage -f $(project_dir)/kernel_fdt_lzma.its $@
|
mkimage -f $(project_dir)/kernel_fdt_lzma.its $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
|
ifeq ($(CONFIG_LINUXBOOT_UROOT),y)
|
||||||
$(PWD)/$(CONFIG_PAYLOAD_USERSPACE):
|
$(PWD)/$(CONFIG_LINUX_INITRD):
|
||||||
$(MAKE) -f targets/u-root.mk
|
$(MAKE) -f targets/u-root.mk
|
||||||
else
|
else
|
||||||
$(PWD)/$(CONFIG_PAYLOAD_USERSPACE):
|
$(PWD)/$(CONFIG_LINUX_INITRD):
|
||||||
echo "Building without u-root support"
|
echo "Building without u-root support"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
linuxboot: $(project_dir)/kernel-image $(PWD)/$(CONFIG_PAYLOAD_USERSPACE)
|
linuxboot: $(project_dir)/kernel-image $(PWD)/$(CONFIG_LINUX_INITRD)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi
|
if [ -d "$(kernel_dir)" ]; then rm -rf $(kernel_dir); fi
|
||||||
|
|
|
@ -32,18 +32,7 @@ $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.e
|
||||||
#TODO: Figure out version
|
#TODO: Figure out version
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_PAYLOAD_LINUXBOOT),y)
|
ifeq ($(CONFIG_PAYLOAD_LINUX)$(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)
|
|
||||||
ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
|
ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
|
||||||
ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
|
ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
|
||||||
endif
|
endif
|
||||||
|
@ -269,14 +258,13 @@ linuxboot:
|
||||||
CPUS=$(CPUS) \
|
CPUS=$(CPUS) \
|
||||||
CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \
|
CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_VERSION) \
|
||||||
CONFIG_LINUXBOOT_KERNEL_CONFIGFILE=$(CONFIG_LINUXBOOT_KERNEL_CONFIGFILE) \
|
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_VERSION=$(CONFIG_LINUXBOOT_UROOT_VERSION) \
|
||||||
CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \
|
CONFIG_LINUXBOOT_UROOT_COMMANDS=$(CONFIG_LINUXBOOT_UROOT_COMMANDS) \
|
||||||
CONFIG_LINUXBOOT_ARCH=$(CONFIG_LINUXBOOT_ARCH) \
|
CONFIG_LINUXBOOT_ARCH=$(CONFIG_LINUXBOOT_ARCH) \
|
||||||
CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \
|
CONFIG_LINUXBOOT_UROOT=$(CONFIG_LINUXBOOT_UROOT) \
|
||||||
CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \
|
CONFIG_LINUXBOOT_UROOT_FILES=$(CONFIG_LINUXBOOT_UROOT_FILES) \
|
||||||
CONFIG_LINUXBOOT_DTB_FILE=$(CONFIG_LINUXBOOT_DTB_FILE) \
|
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
|
payloads/external/LinuxBoot/linuxboot/kernel-image: linuxboot
|
||||||
|
|
Loading…
Reference in New Issue