mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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@coreboot.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/10924 Tested-by: build bot (Jenkins)
This commit is contained in:
parent
730d47537e
commit
9125073d2a
6 changed files with 98 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,6 +8,7 @@ abuild*.xml
|
|||
.ccwrap
|
||||
build/
|
||||
coreboot-builds/
|
||||
payloads/external/depthcharge/depthcharge/
|
||||
payloads/external/FILO/filo/
|
||||
payloads/external/GRUB2/grub2/
|
||||
payloads/external/SeaBIOS/seabios/
|
||||
|
|
|
@ -23,6 +23,7 @@ payloads/coreinfo/build/coreinfo.elf coreinfo:
|
|||
clean-payloads:
|
||||
$(MAKE) -C payloads/coreinfo clean
|
||||
$(MAKE) -C payloads/libpayload clean
|
||||
$(MAKE) -C payloads/external/depthcharge -f Makefile.inc clean
|
||||
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc clean
|
||||
$(MAKE) -C payloads/external/U-Boot -f Makefile.inc clean
|
||||
$(MAKE) -C payloads/external/Memtest86Plus -f Makefile.inc clean
|
||||
|
@ -31,6 +32,7 @@ clean-payloads:
|
|||
distclean-payloads:
|
||||
$(MAKE) -C payloads/coreinfo distclean
|
||||
$(MAKE) -C payloads/libpayload distclean
|
||||
$(MAKE) -C payloads/external/depthcharge -f Makefile.inc distclean
|
||||
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc distclean
|
||||
$(MAKE) -C payloads/external/U-Boot -f Makefile.inc distclean
|
||||
$(MAKE) -C payloads/external/Memtest86Plus -f Makefile.inc distclean
|
||||
|
|
9
payloads/external/Makefile.inc
vendored
9
payloads/external/Makefile.inc
vendored
|
@ -25,6 +25,10 @@ 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)
|
||||
PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config
|
||||
#TODO: Figure out version
|
||||
endif
|
||||
|
||||
cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config
|
||||
payload_config-file := $(PAYLOAD_CONFIG)
|
||||
|
@ -59,6 +63,11 @@ payloads/external/SeaBIOS/seabios/out/vgabios.bin: seabios
|
|||
payloads/external/SeaBIOS/seabios/.config: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
|
||||
payloads/external/SeaBIOS/seabios/out/autoversion.h: payloads/external/SeaBIOS/seabios/out/bios.bin.elf
|
||||
|
||||
payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(top)/$(DOTCONFIG) $(CBFSTOOL)
|
||||
$(MAKE) -C payloads/external/depthcharge -f Makefile.inc \
|
||||
BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER)))) \
|
||||
MFLAGS= MAKEFLAGS=
|
||||
|
||||
filo:
|
||||
$(MAKE) -C payloads/external/FILO -f Makefile.inc \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
|
|
7
payloads/external/depthcharge/Kconfig
vendored
Normal file
7
payloads/external/depthcharge/Kconfig
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
if PAYLOAD_DEPTHCHARGE
|
||||
|
||||
config PAYLOAD_FILE
|
||||
string
|
||||
default "payloads/external/depthcharge/depthcharge/build/depthcharge.elf"
|
||||
|
||||
endif
|
8
payloads/external/depthcharge/Kconfig.name
vendored
Normal file
8
payloads/external/depthcharge/Kconfig.name
vendored
Normal file
|
@ -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.
|
71
payloads/external/depthcharge/Makefile.inc
vendored
Normal file
71
payloads/external/depthcharge/Makefile.inc
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
# release-R50-7978.B
|
||||
STABLE_COMMIT_ID=124af94fa5599a0698e59bf3d73675eb52fc6879
|
||||
|
||||
project_name=depthcharge
|
||||
project_dir=$(CURDIR)/depthcharge
|
||||
project_git_repo=https://chromium.googlesource.com/chromiumos/platform/depthcharge
|
||||
project_config_file=$(project_dir)/.config
|
||||
output_dir=$(project_dir)/build
|
||||
libpayload_dir=$(abspath $(CURDIR)/../../libpayload)
|
||||
libpayload_install_dir=$(output_dir)/lp_$(BOARD)
|
||||
vboot_dir=$(abspath $(CURDIR)/../../../3rdparty/vboot)
|
||||
|
||||
TAG-$(DEPTHCHARGE_MASTER)=origin/master
|
||||
TAG-$(DEPTHCHARGE_STABLE)=$(STABLE_COMMIT_ID)
|
||||
|
||||
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
|
||||
|
||||
$(project_dir):
|
||||
echo " Cloning $(project_name) from Git"
|
||||
git clone $(project_git_repo)
|
||||
|
||||
fetch: $(project_dir)
|
||||
cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ] || \
|
||||
[ "$(TAG-y)" = "origin/master" ]; then \
|
||||
echo " Fetching new commits from the $(project_name) git repo"; \
|
||||
git fetch; fi
|
||||
|
||||
checkout: fetch
|
||||
echo " Checking out $(project_name) revision $(TAG-y)"
|
||||
cd $(project_dir) ; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
|
||||
|
||||
$(libpayload_install_dir): $(project_dir)
|
||||
test -f $(libpayload_dir)/configs/config.$(BOARD) || \
|
||||
(echo "Error: $(libpayload_dir)/configs/config.$(BOARD) is not present" && \
|
||||
false)
|
||||
cp $(libpayload_dir)/configs/config.$(BOARD) $(libpayload_dir)/.config
|
||||
$(MAKE) -C $(libpayload_dir) olddefconfig
|
||||
$(MAKE) -C $(libpayload_dir)
|
||||
$(MAKE) -C $(libpayload_dir) install DESTDIR=$(libpayload_install_dir)
|
||||
# rm -f $(libpayload_dir)/.config
|
||||
|
||||
config: $(libpayload_install_dir) checkout
|
||||
echo " CONFIG project_name $(TAG-y)"
|
||||
export VERSION=$$(cd depthcharge && \
|
||||
git describe --tags --long --dirty 2>/dev/null || \
|
||||
echo "unknown") ; \
|
||||
cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \
|
||||
VB_SOURCE=$(vboot_dir) defconfig
|
||||
|
||||
build: config
|
||||
echo " MAKE $(project_name) $(TAG-y)"
|
||||
cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \
|
||||
VB_SOURCE=$(vboot_dir) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" depthcharge_unified
|
||||
|
||||
clean:
|
||||
test -d $(output_dir) && rm -rf $(output_dir) || exit 0
|
||||
|
||||
distclean:
|
||||
rm -rf $(project_dir)
|
||||
|
||||
.PHONY: checkout config build clean distclean clone fetch
|
Loading…
Add table
Reference in a new issue