From 019135af6f8ba6dde9023eb9ed73f22a99f3c11b Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 23 Oct 2020 13:18:47 -0400 Subject: [PATCH] Fix merge conflicts and make sure all boards are inside of CircleCI builds. PoC build for #867 --- .circleci/config.yml | 81 ++++++++++++++++++++++++++++++++++++-------- modules/coreboot | 7 +++- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index abc65ba49..54e40550b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: name: Install dependencies command: | apt update - 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 + 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 doxygen graphviz udev libudev1 libudev-dev automake libtool - checkout - run: @@ -24,7 +24,7 @@ jobs: - 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 \ + find modules/musl-cross* -type f | sort -h | xargs sha256sum > /tmp/musl-cross_module_and_patches.sha256sums \ - restore_cache: @@ -63,7 +63,8 @@ jobs: name: kgpe-d16_workstation command: | rm -rf build/kgpe-d16_workstation/* build/log/* && \ - make CPUS=4 V=1 BOARD=kgpe-d16_workstation || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + make CPUS=4 V=1 BOARD=kgpe-d16_workstation || \ + (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 @@ -80,7 +81,8 @@ jobs: name: kgpe-d16_workstation-usb_keyboard command: | rm -rf build/kgpe-d16_workstation-usb_keyboard/* build/log/* && \ - make CPUS=4 V=1 BOARD=kgpe-d16_workstation-usb_keyboard) || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + make CPUS=4 V=1 BOARD=kgpe-d16_workstation-usb_keyboard) || \ + (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 @@ -97,7 +99,8 @@ jobs: name: kgpe-d16_server command: | rm -rf build/kgpe-d16_server/* build/log/* && \ - make CPUS=4 V=1 BOARD=kgpe-d16_server || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + make CPUS=4 V=1 BOARD=kgpe-d16_server || \ + (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 @@ -113,8 +116,9 @@ jobs: - run: name: kgpe-d16_server-whiptail command: | - rm -rf build/kgpe-d16_server-whiptail/* build/log/* && / - make CPUS=4 V=1 BOARD=kgpe-d16_server-whiptail || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/kgpe-d16_server-whiptail/* build/log/* && \ + make CPUS=4 V=1 BOARD=kgpe-d16_server-whiptail || \ + (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 @@ -126,11 +130,30 @@ jobs: tar zcvf build/kgpe-d16_server-whiptail/logs.tar.gz build/log/* - store-artifacts: path: build/kgpe-d16_server-whiptail + - run: + name: librem_l1um + command: | + rm -rf build/kgpe-d16_server-whiptail/* build/log/* && \ + make CPUS=4 V=1 BOARD=librem_l1um || \ + (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_l1um hashes + command: | + cat build/librem_l1um/hashes.txt \ + - run: + name: Archiving build logs for librem_l1um + command: | + tar zcvf build/librem_l1um/logs.tar.gz build/log/* + - store-artifacts: + path: build/librem_l1um - run: name: librem_mini command: | - rm -rf build/librem_mini/* build/log/* && make CPUS=4 V=1 BOARD=librem_mini || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/librem_mini/* build/log/* && \ + make CPUS=4 V=1 BOARD=librem_mini || \ + (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 hashes @@ -146,7 +169,9 @@ jobs: - run: name: x230-flash command: | - rm -rf build/x230-flash/* build/log/* && make CPUS=4 V=1 BOARD=x230-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/x230-flash/* build/log/* && \ + make CPUS=4 V=1 BOARD=x230-flash || \ + (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 @@ -162,7 +187,9 @@ jobs: - run: name: t430-flash command: | - rm -rf build/t430-flash/* build/log/* && make CPUS=4 V=1 BOARD=t430-flash || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/t430-flash/* build/log/* && \ + make CPUS=4 V=1 BOARD=t430-flash || \ + (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 @@ -178,7 +205,9 @@ jobs: - run: name: t430 command: | - rm -rf build/t430/* build/log/* && make CPUS=4 V=1 BOARD=t430 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/t430/* build/log/* && \ + make CPUS=4 V=1 BOARD=t430 || \ + (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 @@ -194,7 +223,9 @@ jobs: - run: name: x230 command: | - rm -rf build/x230/* build/log/* && make CPUS=4 V=1 BOARD=x230 || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/x230/* build/log/* && \ + make CPUS=4 V=1 BOARD=x230 || \ + (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 @@ -210,7 +241,9 @@ jobs: - run: name: x230-hotp-verification command: | - rm -rf build/x230-hotp-verification/* build/log/* && make CPUS=4 V=1 BOARD=x230-hotp-verification || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/x230-hotp-verification/* build/log/* && \ + make CPUS=4 V=1 BOARD=x230-hotp-verification || \ + (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 @@ -223,10 +256,30 @@ jobs: - store-artifacts: path: build/x230-hotp-verification + - run: + name: x230-nkstorecli + command: | + rm -rf build/x230-nkstorecli/* build/log/* && \ + make CPUS=4 V=1 BOARD=x230-nkstorecli || \ + (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-nkstorecli hashes + command: | + cat build/x230-nkstorecli/hashes.txt \ + - run: + name: Archiving build logs for x230-nkstorecli + command: | + tar zcvf build/x230-nkstorecli/logs.tar.gz build/log/* + - store-artifacts: + path: build/x230-nkstorecli + - run: name: qemu-coreboot command: | - rm -rf build/qemu-coreboot/* build/log/* && make CPUS=4 V=1 BOARD=qemu-coreboot || (find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1) \ + rm -rf build/qemu-coreboot/* build/log/* && \ + make CPUS=4 V=1 BOARD=qemu-coreboot || \ + (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 diff --git a/modules/coreboot b/modules/coreboot index 7e178157e..a4664e94e 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -8,6 +8,7 @@ else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.11" coreboot_version := 4.11 coreboot_hash := 97fd859b4c39a25534fe33c30eb86e54a233952e08a024c55858d11598a8ad87 coreboot-blobs_hash := aa7855c5bd385b3360dadc043ea6bc93f564e6e4840d9b3ee5b9e696bbd055db + coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs) else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12" coreboot_version := 4.12 coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2 @@ -36,6 +37,8 @@ EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-err coreboot_configure := \ mkdir -p "$(build)/$(coreboot_dir)" \ && cp "$(pwd)/$(CONFIG_COREBOOT_CONFIG)" "$(build)/$(coreboot_dir)/.config" \ + && echo 'CONFIG_LOCALVERSION="Heads-$(HEADS_GIT_VERSION)"' >> $(build)/$(coreboot_dir)/.config \ + && echo 'CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="$(BOARD)"' >> $(build)/$(coreboot_dir)/.config \ && $(MAKE) olddefconfig \ -C "$(build)/$(coreboot_base_dir)" \ obj="$(build)/$(coreboot_dir)" \ @@ -75,10 +78,12 @@ $(build)/$(coreboot_dir)/.build: \ $(build)/$(BOARD)/initrd.cpio.xz \ # This produces a ROM image that is written with the flashrom program -$(build)/$(BOARD)/coreboot.rom: $(build)/$(coreboot_dir)/.build +ifneq ($(CONFIG_COREBOOT),) +$(build)/$(BOARD)/$(CB_OUTPUT_FILE): $(build)/$(coreboot_dir)/.build "$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print $(call do-copy,$(dir $<)coreboot.rom,$@) @touch $@ # update the time stamp +endif # # Helpful target for reconfiguring the coreboot target