2016-08-03 01:49:22 +00:00
|
|
|
modules += coreboot
|
|
|
|
|
2017-02-01 16:50:52 +00:00
|
|
|
#coreboot_version := git
|
|
|
|
#coreboot_repo := https://github.com/osresearch/coreboot
|
|
|
|
coreboot_version := 4.5
|
2016-08-03 01:49:22 +00:00
|
|
|
coreboot_dir := coreboot-$(coreboot_version)
|
2017-02-01 16:50:52 +00:00
|
|
|
coreboot_tar := coreboot-$(coreboot_version).tar.xz
|
|
|
|
coreboot_url := https://www.coreboot.org/releases/$(coreboot_tar)
|
|
|
|
coreboot_hash := 0ffdcb0d18f506c483f8fe99df54fe7d5769f834eeffdc23160b035fee2a6027
|
2016-08-19 15:31:07 +00:00
|
|
|
|
2016-08-03 01:49:22 +00:00
|
|
|
|
2016-11-23 17:11:08 +00:00
|
|
|
# Coreboot builds are specialized on a per-target basis.
|
|
|
|
# The builds are done in a per-target subdirectory
|
2016-11-29 16:19:48 +00:00
|
|
|
#coreboot_config := coreboot-$(TARGET).config
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2017-01-29 01:21:47 +00:00
|
|
|
EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches
|
|
|
|
|
2016-11-23 17:11:08 +00:00
|
|
|
coreboot_configure := \
|
2017-01-29 01:21:47 +00:00
|
|
|
$(MAKE) \
|
|
|
|
oldconfig \
|
|
|
|
obj=./$(BOARD) \
|
|
|
|
DOTCONFIG=../../config/coreboot-$(BOARD).config \
|
2017-02-01 18:39:56 +00:00
|
|
|
BUILD_TIMELESS=1 \
|
2017-01-29 01:21:47 +00:00
|
|
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
2016-11-23 17:11:08 +00:00
|
|
|
|
|
|
|
coreboot_target := \
|
2017-01-29 01:21:47 +00:00
|
|
|
obj=./$(BOARD) \
|
|
|
|
DOTCONFIG=../../config/coreboot-$(BOARD).config \
|
2017-02-01 18:39:56 +00:00
|
|
|
BUILD_TIMELESS=1 \
|
2017-01-29 01:21:47 +00:00
|
|
|
CFLAGS_x86_32="$(EXTRA_FLAGS)" \
|
|
|
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
2017-03-17 17:18:27 +00:00
|
|
|
-j $(MAKE_JOBS)
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2016-11-29 16:19:48 +00:00
|
|
|
coreboot_output := $(BOARD)/coreboot.rom
|
2016-11-23 17:11:08 +00:00
|
|
|
|
2016-08-03 01:49:22 +00:00
|
|
|
|
|
|
|
# hack to force a build dependency on the cross compiler
|
2016-11-23 17:11:08 +00:00
|
|
|
$(build)/$(coreboot_dir)/.configured: $(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc
|
|
|
|
$(build)/$(coreboot_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc:
|
|
|
|
echo '******* Building crossgcc-i386 (this might take a while) ******'
|
2017-01-27 21:17:03 +00:00
|
|
|
$(MAKE) -C "$(build)/$(coreboot_dir)" crossgcc-i386
|
2016-11-23 17:11:08 +00:00
|
|
|
#echo '******* Building crossgcc-arm (this might take a while) ******'
|
2017-01-27 21:17:03 +00:00
|
|
|
#$(MAKE) -C "$(build)/$(coreboot_dir)" crossgcc-arm
|
2016-08-14 20:03:11 +00:00
|
|
|
|
|
|
|
# The coreboot-blobs must be unpacked before we can build coreboot
|
|
|
|
# if we are using a tar file; git checkout will clone the submodule.
|
|
|
|
coreboot_depends := linux initrd
|
|
|
|
|
2017-02-01 16:50:52 +00:00
|
|
|
ifneq "$(coreboot_version)" "git"
|
|
|
|
|
|
|
|
# if we are not building from a git checkout,
|
|
|
|
# we must also download the coreboot-blobs tree
|
|
|
|
coreboot_depends += coreboot-blobs
|
|
|
|
modules += coreboot-blobs
|
|
|
|
|
|
|
|
coreboot-blobs_version := $(coreboot_version)
|
|
|
|
coreboot-blobs_tar := coreboot-blobs-$(coreboot-blobs_version).tar.xz
|
|
|
|
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty/blobs
|
|
|
|
coreboot-blobs_url := https://www.coreboot.org/releases/$(coreboot-blobs_tar)
|
|
|
|
coreboot-blobs_hash := 86dc3939f546fa9c3907434f9e8ee9e2362f9572b492fc92ea89ae313cf214e4
|
|
|
|
|
2016-08-14 20:03:11 +00:00
|
|
|
## there is nothing to build for the blobs, this should be
|
|
|
|
## made easier to make happen
|
2017-02-01 16:50:52 +00:00
|
|
|
coreboot-blobs_output := .built
|
|
|
|
coreboot-blobs_configure := echo -e 'all:\n\ttouch .built' > Makefile
|
2016-08-14 20:03:11 +00:00
|
|
|
|
2017-02-01 16:50:52 +00:00
|
|
|
endif
|