Skip to content

Commit

Permalink
Fix CircleCI build problems (#808)
Browse files Browse the repository at this point in the history
* CircleCI: debian:10 docker based. Give possitility to override CACHE_VERSION through CircleCI when needed
* Makefile: fix #799 with implementation of @osresearch's recommended #799 (comment)
* modules/coreboot : indentation fix and putting version hashes together to facilitate future maintainership.
  • Loading branch information
tlaurion authored Aug 20, 2020
1 parent 9eff5c5 commit b14e564
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: debian:bullseye
- image: debian:10
steps:
- run:
name: Install dependencies
Expand Down Expand Up @@ -30,9 +30,9 @@ jobs:
- restore_cache:
keys:
#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
- 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
# skipping for now
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
name: x230-flash
#We delete build/make-4.2.1/ directory until issue #799 is fixed.
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 \
BOARD=x230-flash \
no_output_timeout: 3h
Expand Down Expand Up @@ -170,14 +170,14 @@ jobs:

- save_cache:
#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:
- crossgcc
- build/musl-cross-*

- save_cache:
#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:
- packages
- crossgcc
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ $(build)/$(make_dir)/.extract: $(packages)/$(make_tar)
tar xf "$<" -C "$(build)"
touch "$@"

$(build)/$(make_dir)/.patch: patches/make-$(make_version).patch $(build)/$(make_dir)/.extract
( cd "$(dir $@)" ; patch -p1 ) < "$<"
$(build)/$(make_dir)/.patch: $(build)/$(make_dir)/.extract
( cd "$(dir $@)" ; patch -p1 ) < "patches/make-$(make_version).patch"
touch "$@"

$(build)/$(make_dir)/.configured: $(build)/$(make_dir)/.patch
Expand Down
22 changes: 11 additions & 11 deletions modules/coreboot
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
modules-$(CONFIG_COREBOOT) += coreboot

ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
coreboot_version := 4.8.1
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
coreboot_version := 4.8.1
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
coreboot-blobs_hash := 18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295
else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
else
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
endif

#coreboot_version := git
Expand Down Expand Up @@ -113,13 +115,11 @@ coreboot-blobs_tar := coreboot-blobs-$(coreboot-blobs_version).tar.xz
coreboot-blobs_url := https://www.coreboot.org/releases/$(coreboot-blobs_tar)

ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
coreboot-blobs_tar_opt := --strip 3
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty/blobs
coreboot-blobs_hash := 18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295
coreboot-blobs_tar_opt := --strip 3
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty/blobs
else
coreboot-blobs_tar_opt := --strip 2
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
coreboot-blobs_tar_opt := --strip 2
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty
endif

## there is nothing to build for the blobs, this should be
Expand Down

0 comments on commit b14e564

Please sign in to comment.