[coreboot-gerrit] Patch set updated for coreboot: payloads: Enable building depthcharge as part of the coreboot build
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Fri Feb 5 10:36:27 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/10924
-gerrit
commit e3defaa56c9766514de7e58b58f39eb163ed41e7
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date: Wed Jul 15 10:24:18 2015 -0700
payloads: Enable building depthcharge as part of the coreboot build
For CHROMEOS builds, depthcharge can be built automatically.
This dependency exists because depthcharge without vboot and subsequent
signing of the image doesn't work very well, and both are keyed to that
flag as well.
Change-Id: Id0195bd3b4e454f382782106d6512469106daac5
Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
payloads/external/Makefile.inc | 8 +++++
payloads/external/depthcharge/Kconfig | 7 ++++
payloads/external/depthcharge/Kconfig.name | 8 +++++
payloads/external/depthcharge/Makefile.inc | 52 ++++++++++++++++++++++++++++++
4 files changed, 75 insertions(+)
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 941af61..1f92309d 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -25,6 +25,9 @@ ifeq ($(CONFIG_PAYLOAD_FILO),y)
PAYLOAD_CONFIG=payloads/external/FILO/filo/.config
PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h
endif
+ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y)
+# TODO: fill in config and version
+endif
cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config
payload_config-file := $(PAYLOAD_CONFIG)
@@ -56,6 +59,11 @@ payloads/external/SeaBIOS/seabios/out/bios.bin.elf: seabios
payloads/external/SeaBIOS/seabios/.config: seabios
payloads/external/SeaBIOS/seabios/out/autoversion.h: seabios
+depthcharge:
+ $(MAKE) -C payloads/external/depthcharge -f Makefile.inc
+
+payloads/external/depthcharge/depthcharge/build/depthcharge.elf: depthcharge
+
filo:
$(MAKE) -C payloads/external/FILO -f Makefile.inc \
HOSTCC="$(HOSTCC)" \
diff --git a/payloads/external/depthcharge/Kconfig b/payloads/external/depthcharge/Kconfig
new file mode 100644
index 0000000..84b36e5
--- /dev/null
+++ b/payloads/external/depthcharge/Kconfig
@@ -0,0 +1,7 @@
+if PAYLOAD_DEPTHCHARGE
+
+config PAYLOAD_FILE
+ string
+ default "payloads/external/depthcharge/depthcharge/build/depthcharge.elf"
+
+endif
diff --git a/payloads/external/depthcharge/Kconfig.name b/payloads/external/depthcharge/Kconfig.name
new file mode 100644
index 0000000..bc564ec
--- /dev/null
+++ b/payloads/external/depthcharge/Kconfig.name
@@ -0,0 +1,8 @@
+config PAYLOAD_DEPTHCHARGE
+ bool "Depthcharge"
+ depends on CHROMEOS
+ help
+ Select this option if you want to build a coreboot image
+ with a depthcharge payload.
+
+ See http://coreboot.org/Payloads for more information.
diff --git a/payloads/external/depthcharge/Makefile.inc b/payloads/external/depthcharge/Makefile.inc
new file mode 100644
index 0000000..00cca0c
--- /dev/null
+++ b/payloads/external/depthcharge/Makefile.inc
@@ -0,0 +1,52 @@
+TAG-y=origin/master
+
+unexport KCONFIG_AUTOHEADER
+unexport KCONFIG_AUTOCONFIG
+unexport KCONFIG_DEPENDENCIES
+unexport KCONFIG_SPLITCONFIG
+unexport KCONFIG_TRISTATE
+unexport KCONFIG_NEGATIVES
+unexport src srck obj objk
+
+BOARD:=$(notdir $(CONFIG_MAINBOARD_DIR))
+
+all: build
+
+depthcharge:
+ echo " Cloning depthcharge from Git"
+ git clone https://chromium.googlesource.com/chromiumos/platform/depthcharge
+
+fetch: depthcharge
+ cd depthcharge; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
+ then echo " Fetching new commits from the depthcharge git repo"; git fetch; fi
+
+checkout: fetch
+ echo " Checking out depthcharge revision $(TAG-y)"
+ cd depthcharge; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
+
+config: checkout
+ echo " CONFIG depthcharge $(TAG-y)"
+ cp depthcharge/board/$(BOARD)/defconfig depthcharge/.config
+ yes "" | $(MAKE) -C depthcharge oldconfig
+
+build: config
+ echo " MAKE depthcharge $(TAG-y)"
+ cp ../../libpayload/configs/defconfig.$(BOARD) ../../libpayload/.config
+ yes "" | $(MAKE) -C ../../libpayload oldconfig
+ $(MAKE) -C ../../libpayload
+ $(MAKE) -C ../../libpayload install DESTDIR=installed
+ export VERSION=$$(cd depthcharge && \
+ git describe --tags --long --dirty 2>/dev/null || \
+ echo "unknown") ; \
+ cd depthcharge && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(abspath ../../libpayload/installed/libpayload) \
+ VB_SOURCE=3rdparty/vboot defconfig
+ cd depthcharge && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(abspath ../../libpayload/installed/libpayload) \
+ VB_SOURCE=../../../../3rdparty/vboot build/depthcharge.elf
+
+clean:
+ test -d depthcharge/out && rm -rf depthcharge/out || exit 0
+
+distclean:
+ rm -rf depthcharge
+
+.PHONY: checkout config build clean distclean clone fetch
More information about the coreboot-gerrit
mailing list