Fix CircleCI build problems (#808)

* CircleCI: debian:10 docker based. Give possitility to override CACHE_VERSION through CircleCI when needed
* Makefile: fix #799 with implementation of @osresearch's recommended https://github.com/osresearch/heads/issues/799#issuecomment-673059028
* modules/coreboot : indentation fix and putting version hashes together to facilitate future maintainership.
This commit is contained in:
tlaurion 2020-08-20 15:15:46 -04:00 committed by GitHub
parent 9eff5c5b70
commit b14e564ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 19 deletions

View File

@ -2,7 +2,7 @@ version: 2
jobs: jobs:
build: build:
docker: docker:
- image: debian:bullseye - image: debian:10
steps: steps:
- run: - run:
name: Install dependencies name: Install dependencies
@ -30,9 +30,9 @@ jobs:
- restore_cache: - restore_cache:
keys: keys:
#Restore existing cache for modules checksums validated to be exactly the same as in github current commit #Restore existing cache for modules checksums validated to be exactly the same as in github current commit
- heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }} - heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
#If precedent fails. Restore cache for musl-cross module checksum validated to be exactly the same as in github current commit #If precedent fails. Restore cache for musl-cross module checksum validated to be exactly the same as in github current commit
- heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }} - heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
# linuxboot steps need something to pass in the kernel header path # linuxboot steps need something to pass in the kernel header path
# skipping for now # skipping for now
@ -63,7 +63,7 @@ jobs:
name: x230-flash name: x230-flash
#We delete build/make-4.2.1/ directory until issue #799 is fixed. #We delete build/make-4.2.1/ directory until issue #799 is fixed.
command: | command: |
rm -rf build/make-4.2.1/ build/x230-flash/* build/log/* && make --load 2 \ rm -rf build/x230-flash/* build/log/* && make --load 2 \
V=1 \ V=1 \
BOARD=x230-flash \ BOARD=x230-flash \
no_output_timeout: 3h no_output_timeout: 3h
@ -170,14 +170,14 @@ jobs:
- save_cache: - save_cache:
#Generate cache for the same musl-cross module definition if hash is not previously existing #Generate cache for the same musl-cross module definition if hash is not previously existing
key: heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }} key: heads-cross-musl-{{ checksum "/tmp/musl-cross_module_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths: paths:
- crossgcc - crossgcc
- build/musl-cross-* - build/musl-cross-*
- save_cache: - save_cache:
#Generate cache for the exact same modules definitions if hash is not previously existing #Generate cache for the exact same modules definitions if hash is not previously existing
key: heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }} key: heads-modules-and-patches-{{ checksum "/tmp/all_modules_and_patches.sha256sums" }}{{ .Environment.CACHE_VERSION }}
paths: paths:
- packages - packages
- crossgcc - crossgcc

View File

@ -602,8 +602,8 @@ $(build)/$(make_dir)/.extract: $(packages)/$(make_tar)
tar xf "$<" -C "$(build)" tar xf "$<" -C "$(build)"
touch "$@" touch "$@"
$(build)/$(make_dir)/.patch: patches/make-$(make_version).patch $(build)/$(make_dir)/.extract $(build)/$(make_dir)/.patch: $(build)/$(make_dir)/.extract
( cd "$(dir $@)" ; patch -p1 ) < "$<" ( cd "$(dir $@)" ; patch -p1 ) < "patches/make-$(make_version).patch"
touch "$@" touch "$@"
$(build)/$(make_dir)/.configured: $(build)/$(make_dir)/.patch $(build)/$(make_dir)/.configured: $(build)/$(make_dir)/.patch

View File

@ -3,9 +3,11 @@ modules-$(CONFIG_COREBOOT) += coreboot
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1" ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
coreboot_version := 4.8.1 coreboot_version := 4.8.1
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23 coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
coreboot-blobs_hash := 18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295
else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12" else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_version := 4.12 coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2 coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
else else
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION") $(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
endif endif
@ -115,11 +117,9 @@ coreboot-blobs_url := https://www.coreboot.org/releases/$(coreboot-blobs_tar)
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1" ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
coreboot-blobs_tar_opt := --strip 3 coreboot-blobs_tar_opt := --strip 3
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty/blobs coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty/blobs
coreboot-blobs_hash := 18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295
else else
coreboot-blobs_tar_opt := --strip 2 coreboot-blobs_tar_opt := --strip 2
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
endif endif
## there is nothing to build for the blobs, this should be ## there is nothing to build for the blobs, this should be