summaryrefslogtreecommitdiff
path: root/payloads/external/Makefile.inc
diff options
context:
space:
mode:
authorPhilipp Deppenwiese <zaolin@das-labor.org>2018-06-19 20:22:32 +0200
committerPhilipp Deppenwiese <zaolin.daisuki@gmail.com>2018-06-19 18:37:37 +0000
commit0f0e4e6c66b53098404ee00b001819b8b86f8e4b (patch)
treeee25551fd811f1905b0fa791ca8d525ba02a44ba /payloads/external/Makefile.inc
parenta892cde653d40e39d399b1bc4c438e3dc2d00cd6 (diff)
payloads: Add LinuxBoot payload in u-root mode
* Add LinuxBoot support * Add u-root mode * Download kernel and u-root from upstream sources. * Add customization options * Clean kernel only if directory exists Change-Id: I3a25ff6812e046acc688cbbb203cf262ad751659 Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org> Reviewed-on: https://review.coreboot.org/23071 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/external/Makefile.inc')
-rw-r--r--payloads/external/Makefile.inc37
1 files changed, 37 insertions, 0 deletions
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index ec7d9a83ba..3943db9b87 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -4,6 +4,7 @@
##
## Copyright (C) 2009-2010 coresystems GmbH
## Copyright (C) 2015 Google Inc.
+## Copyright (C) 2017 Facebook Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -31,6 +32,13 @@ $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.e
#TODO: Figure out version
endif
+ifeq ($(CONFIG_PAYLOAD_LINUXBOOT),y)
+ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE))),)
+ ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUXBOOT_KERNEL_COMMANDLINE)
+endif
+ADDITIONAL_PAYLOAD_CONFIG+=-I $(CONFIG_PAYLOAD_USERSPACE)
+endif
+
ifeq ($(CONFIG_PAYLOAD_LINUX),y)
ifneq ($(strip $(call strip_quotes,$(CONFIG_LINUX_COMMAND_LINE))),)
ADDITIONAL_PAYLOAD_CONFIG+=-C $(CONFIG_LINUX_COMMAND_LINE)
@@ -240,3 +248,32 @@ payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG)
IPXE_UART=$(IPXE_UART) \
CONFIG_TTYS0_BAUD=$(CONFIG_TTYS0_BAUD) \
MFLAGS= MAKEFLAGS=
+
+# LinuxBoot
+
+linuxboot:
+ $(MAKE) -C payloads/external/LinuxBoot \
+ HOSTCC="$(HOSTCC)" \
+ CC="$(HOSTCC)" \
+ GCC_CC_x86_32=$(GCC_CC_x86_32) \
+ GCC_CC_x86_64=$(GCC_CC_x86_64) \
+ GCC_CC_arm=$(GCC_CC_arm) \
+ GCC_CC_arm64=$(GCC_CC_arm64) \
+ OBJCOPY_x86_32=$(OBJCOPY_x86_32) \
+ OBJCOPY_x86_64=$(OBJCOPY_x86_64) \
+ OBJCOPY_arm=$(OBJCOPY_arm) \
+ OBJCOPY_arm64=$(OBJCOPY_arm64) \
+ CPUS=$(CPUS) \
+ CONFIG_LINUXBOOT_KERNEL_VERSION=$(CONFIG_LINUXBOOT_KERNEL_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)
+
+payloads/external/LinuxBoot/linuxboot/kernel-image: linuxboot
+payloads/external/LinuxBoot/linuxboot/initramfs.cpio.xz: linuxboot
+payloads/external/LinuxBoot/linuxboot/kernel/.config: linuxboot
+payloads/external/LinuxBoot/linuxboot/go/src/github.com/u-root/u-root/.git: linuxboot