Skip to content

Commit

Permalink
kgpe_d16 boards and CircleCI: bring par with heads upstream requireme…
Browse files Browse the repository at this point in the history
…nts (linux version defined under board config)
  • Loading branch information
tlaurion committed Sep 19, 2020
1 parent 3eedc5c commit e9895eb
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 16 deletions.
79 changes: 63 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
version: 2
environment:
NODE_ENV: test
NODE_OPTIONS: --max_old_space_size=4096
NPM_CONFIG_LOGLEVEL: error
JOBS: max # https://gist.github.com/ralphtheninja/f7c45bdee00784b41fed

jobs:
build:
docker:
- image: debian:bullseye
- image: debian:10
steps:
- run:
name: Install dependencies
Expand All @@ -11,14 +17,29 @@ jobs:
apt install -y build-essential zlib1g-dev uuid-dev libdigest-sha-perl libelf-dev bc bzip2 bison flex git gnupg iasl m4 nasm patch python wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev
- checkout

- restore_cache:
key: heads-{{ .Environment.CIRCLE_USERNAME }}-{{ .Environment.CACHE_VERSION }}

- run:
name: git reset
command: |
git reset --hard "$CIRCLE_SHA1" \
- run:
name: Creating all modules and patches digest
command: |
find ./patches/ ./modules/ -type f | sort -h |xargs sha256sum > /tmp/all_modules_and_patches.sha256sums \
- run:
name: Creating musl-cross-make and musl-cross-make patches digest
command: |
find ./patches/musl-cross-* modules/musl-cross* -type f | sort -h | xargs sha256sum > /tmp/musl-cross_module_and_patches.sha256sums \
- 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" }}{{ .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" }}{{ .Environment.CACHE_VERSION }}

# linuxboot steps need something to pass in the kernel header path
# skipping for now
# - run:
Expand Down Expand Up @@ -49,7 +70,7 @@ jobs:
command: |
rm -rf build/x230-flash/* build/log/* && make --load 2 \
V=1 \
BOARD=x230-flash \
BOARD=x230-flash || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230-flash hashes
Expand All @@ -67,7 +88,7 @@ jobs:
command: |
rm -rf build/t430-flash/* build/log/* && make --load 2 \
V=1 \
BOARD=t430-flash \
BOARD=t430-flash || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput t430-flash hashes
Expand All @@ -85,7 +106,7 @@ jobs:
command: |
rm -rf build/t430/* build/log/* && make --load 2 \
V=1 \
BOARD=t430 \
BOARD=t430 || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput t430 hashes
Expand All @@ -103,7 +124,7 @@ jobs:
command: |
rm -rf build/x230/* build/log/* && make --load 2 \
V=1 \
BOARD=x230 \
BOARD=x230 || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230 hashes
Expand All @@ -121,7 +142,7 @@ jobs:
command: |
rm -rf build/x230-hotp-verification/* build/log/* && make --load 2 \
V=1 \
BOARD=x230-hotp-verification \
BOARD=x230-hotp-verification || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput x230-hotp-verification hashes
Expand All @@ -139,7 +160,7 @@ jobs:
command: |
rm -rf build/kgpe-d16_workstation/* build/log/* && make --load 2 \
V=1 \
BOARD=kgpe-d16_workstation \
BOARD=kgpe-d16_workstation || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput kgpe-d16_workstation hashes
Expand All @@ -157,7 +178,7 @@ jobs:
command: |
rm -rf build/kgpe-d16_workstation-usb_keyboard/* build/log/* && make --load 2 \
V=1 \
BOARD=kgpe-d16_workstation-usb_keyboard \
BOARD=kgpe-d16_workstation-usb_keyboard || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput kgpe-d16_workstation-usb_keyboard hashes
Expand All @@ -175,7 +196,7 @@ jobs:
command: |
rm -rf build/kgpe-d16_server/* build/log/* && make --load 2 \
V=1 \
BOARD=kgpe-d16_server \
BOARD=kgpe-d16_server || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput kgpe-d16_server hashes
Expand All @@ -193,7 +214,7 @@ jobs:
command: |
rm -rf build/kgpe-d16_server-whiptail/* build/log/* && make --load 2 \
V=1 \
BOARD=kgpe-d16_server-whiptail \
BOARD=kgpe-d16_server-whiptail || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput kgpe-d16_server-whiptail hashes
Expand All @@ -206,12 +227,30 @@ jobs:
- store-artifacts:
path: build/kgpe-d16_server-whiptail

- run:
name: librem_mini-NoTPM
command: |
rm -rf build/librem_mini-NoTPM/* build/log/* && make --load 2 \
V=1 \
BOARD=librem_mini-NoTPM || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Ouput librem_mini-NoTPM hashes
command: |
cat build/librem_mini-NoTPM/hashes.txt \
- run:
name: Archiving build logs for librem_mini-NoTPM
command: |
tar zcvf build/librem_mini-NoTPM/logs.tar.gz build/log/*
- store-artifacts:
path: build/librem_mini-NoTPM

- run:
name: qemu-coreboot
command: |
rm -rf build/make-4.2.1/ build/qemu-coreboot/* build/log/* && make --load 2 \
rm -rf build/qemu-coreboot/* build/log/* && make --load 2 \
V=1 \
BOARD=qemu-coreboot \
BOARD=qemu-coreboot || (sudo dmesg; find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \
no_output_timeout: 3h
- run:
name: Output qemu-coreboot hashes
Expand All @@ -225,7 +264,15 @@ jobs:
path: build/qemu-coreboot

- save_cache:
key: heads-{{ .Environment.CIRCLE_USERNAME }}-{{ .Environment.CACHE_VERSION }}
#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" }}{{ .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" }}{{ .Environment.CACHE_VERSION }}
paths:
- packages
- crossgcc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# - Please support https://github.com/osresearch/heads/issues/719
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-kgpe-d16_server-whiptail.config
CONFIG_LINUX_CONFIG=config/linux-kgpe-d16_server-whiptail.config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a kgpe-d16 with USB keyboard support, FBwhiptail on onboard ASpeed GPU
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-kgpe-d16_workstation-usb_keyboard.config
CONFIG_LINUX_CONFIG=config/linux-kgpe-d16_workstation.config
Expand Down
1 change: 1 addition & 0 deletions boards/kgpe-d16_workstation/kgpe-d16_workstation.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Configuration for a kgpe-d16 running non-Qubes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-kgpe-d16_workstation.config
CONFIG_LINUX_CONFIG=config/linux-kgpe-d16_workstation.config
Expand Down

0 comments on commit e9895eb

Please sign in to comment.