diff --git a/.circleci/config.yml b/.circleci/config.yml index c5a03219..91732e56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: ubuntu:16.04 + - image: osresearch/heads-ubuntu:16.04 steps: - run: name: Install dependencies @@ -36,25 +36,25 @@ jobs: - run: name: Bootstrap make command: | - make bootstrap + make -j4 bootstrap - run: - name: Bootstrap musl + name: Bootstrap coreboot-gcc command: | ./build/make-4.2.1/make \ - -j4 \ + TOOLCHAIN=/home/builder/heads \ V=1 \ BOARD=qemu-coreboot \ - musl-cross + coreboot-gcc - run: name: qemu-coreboot command: | ./build/make-4.2.1/make \ - TERM=dumb \ - -j4 \ + TOOLCHAIN=/home/builder/heads \ V=1 \ + -j4 \ BOARD=qemu-coreboot \ - store-artifacts: @@ -67,8 +67,9 @@ jobs: name: qemu-linuxboot command: | ./build/make-4.2.1/make \ - -j4 \ + TOOLCHAIN=/home/builder/heads \ V=1 \ + -j4 \ BOARD=qemu-linuxboot \ - store-artifacts: @@ -81,6 +82,7 @@ jobs: name: x230 command: | ./build/make-4.2.1/make \ + TOOLCHAIN=/home/builder/heads \ -j4 \ V=1 \ BOARD=x230 \ diff --git a/modules/coreboot b/modules/coreboot index 1326e9d6..79c38cd3 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -39,14 +39,33 @@ coreboot_target := \ coreboot_output := coreboot.rom coreboot_depend += linux initrd +COREBOOT_XGCC_REL := $(coreboot_base_dir)/util/crossgcc/xgcc +COREBOOT_XGCC_PATH := $(build)/$(COREBOOT_XGCC_REL) +COREBOOT_XGCC := $(COREBOOT_XGCC_PATH)/bin/i386-elf-gcc + # hack to force a build dependency on the cross compiler -coreboot-gcc: $(build)/$(coreboot_base_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc -$(build)/$(coreboot_dir)/.configured: $(build)/$(coreboot_base_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc -$(build)/$(coreboot_base_dir)/util/crossgcc/xgcc/bin/i386-elf-gcc: $(build)/$(coreboot_base_dir)/.canary +coreboot-gcc $(build)/$(coreboot_dir)/.configured: $(COREBOOT_XGCC) + +ifeq "$(TOOLCHAIN)" "" +# Force a rebuild of the entire coreboot toolchain +$(COREBOOT_XGCC): $(build)/$(coreboot_base_dir)/.canary echo '******* Building crossgcc-i386 (this might take a while) ******' $(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=`nproc` crossgcc-i386 #echo '******* Building crossgcc-arm (this might take a while) ******' #$(MAKE) -C "$(build)/$(coreboot_base_dir)" crossgcc-arm +else +# Use the pre-build one from the external toolchain build +$(COREBOOT_XGCC): + if [ ! -e "$(TOOLCHAIN)/$(COREBOOT_XGCC_REL)" ]; then \ + echo >&2 "ERROR: TOOLCHAIN=$(TOOLCHAIN) does not have coreboot" ; \ + exit 1 ; \ + fi + if [ ! -e "$(COREBOOT_XGCC_PATH)" ]; then \ + ln -s \ + "$(TOOLCHAIN)/build/$(coreboot_base_dir)/util/crossgcc/xgcc" \ + "$(COREBOOT_XGCC_PATH)" ; \ + fi +endif # Force a rebuild if the inputs have changed $(build)/$(coreboot_dir)/.build: \