From a9db60aab18f14d13de5435fa4ae32ad6ad81244 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 6 Sep 2020 18:46:56 +0200 Subject: [PATCH 1/3] boards/lenovo: Add vboot support * Add vboot support to supported Lenovo boards * Didn't add config that wouldn't build (non ME stripped versions) Signed-off-by: Patrick Rudolph --- boards/t420-vboot/t420-vboot.config | 39 ++++++++++++++++++++++++ boards/t430-vboot/t430-vboot.config | 47 +++++++++++++++++++++++++++++ boards/x220-vboot/x220-vboot.config | 39 ++++++++++++++++++++++++ boards/x230-vboot/x230-vboot.config | 47 +++++++++++++++++++++++++++++ config/coreboot-t420-vboot.config | 28 +++++++++++++++++ config/coreboot-t430-vboot.config | 30 ++++++++++++++++++ config/coreboot-x220-vboot.config | 28 +++++++++++++++++ config/coreboot-x230-vboot.config | 32 ++++++++++++++++++++ 8 files changed, 290 insertions(+) create mode 100644 boards/t420-vboot/t420-vboot.config create mode 100644 boards/t430-vboot/t430-vboot.config create mode 100644 boards/x220-vboot/x220-vboot.config create mode 100644 boards/x230-vboot/x230-vboot.config create mode 100644 config/coreboot-t420-vboot.config create mode 100644 config/coreboot-t430-vboot.config create mode 100644 config/coreboot-x220-vboot.config create mode 100644 config/coreboot-x230-vboot.config diff --git a/boards/t420-vboot/t420-vboot.config b/boards/t420-vboot/t420-vboot.config new file mode 100644 index 000000000..119b23b6c --- /dev/null +++ b/boards/t420-vboot/t420-vboot.config @@ -0,0 +1,39 @@ +# Configuration for a T420 running Qubes and other OS, T420 is identical to X230 on the Linux Side of things. +export CONFIG_COREBOOT=y +export CONFIG_COREBOOT_VERSION=4.12 +export CONFIG_LINUX_VERSION=4.14.62 + +CONFIG_COREBOOT_CONFIG=config/coreboot-t420-vboot.config +CONFIG_LINUX_CONFIG=config/linux-x230.config + +CONFIG_CRYPTSETUP=y +CONFIG_FLASHROM=y +CONFIG_FLASHTOOLS=y +CONFIG_GPG2=y +CONFIG_KEXEC=y +CONFIG_UTIL_LINUX=y +CONFIG_LVM2=y +CONFIG_MBEDTLS=y +CONFIG_PCIUTILS=y +CONFIG_POPT=y +CONFIG_QRENCODE=y +CONFIG_TPMTOTP=y +CONFIG_DROPBEAR=y + +CONFIG_CAIRO=y +CONFIG_FBWHIPTAIL=y + +CONFIG_LINUX_USB=y +CONFIG_LINUX_E1000E=y + +export CONFIG_TPM=y +export CONFIG_BOOTSCRIPT=/bin/gui-init +export CONFIG_BOOT_REQ_HASH=n +export CONFIG_BOOT_REQ_ROLLBACK=n +export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on intel_iommu=igfx_off" +export CONFIG_BOOT_KERNEL_REMOVE="quiet" +export CONFIG_BOOT_DEV="/dev/sda1" +export CONFIG_BOOT_GUI_MENU_NAME="ThinkPad T420 Heads Boot Menu" +export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0" +export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0" +export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image bios" diff --git a/boards/t430-vboot/t430-vboot.config b/boards/t430-vboot/t430-vboot.config new file mode 100644 index 000000000..5d0a4b2d3 --- /dev/null +++ b/boards/t430-vboot/t430-vboot.config @@ -0,0 +1,47 @@ +# Configuration for a t430 running Qubes and other OSes +export CONFIG_COREBOOT=y +export CONFIG_COREBOOT_VERSION=4.12 +export CONFIG_LINUX_VERSION=4.14.62 + +CONFIG_COREBOOT_CONFIG=config/coreboot-t430-vboot.config +CONFIG_LINUX_CONFIG=config/linux-x230.config + +CONFIG_CRYPTSETUP=y +CONFIG_FLASHROM=y +CONFIG_FLASHTOOLS=y +CONFIG_GPG2=y +CONFIG_KEXEC=y +CONFIG_UTIL_LINUX=y +CONFIG_LVM2=y +CONFIG_MBEDTLS=y +CONFIG_PCIUTILS=y +CONFIG_POPT=y +CONFIG_QRENCODE=y +CONFIG_TPMTOTP=y +CONFIG_DROPBEAR=y + +CONFIG_CAIRO=y +CONFIG_FBWHIPTAIL=y + +CONFIG_LINUX_USB=y +CONFIG_LINUX_E1000E=y + +export CONFIG_TPM=y +export CONFIG_BOOTSCRIPT=/bin/gui-init +export CONFIG_BOOT_REQ_HASH=n +export CONFIG_BOOT_REQ_ROLLBACK=n +export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on intel_iommu=igfx_off" +export CONFIG_BOOT_KERNEL_REMOVE="quiet" +export CONFIG_BOOT_DEV="/dev/sda1" +export CONFIG_BOOT_GUI_MENU_NAME="Thinkpad T430 Heads Boot Menu" +export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0" +export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0" +export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image bios" + +# This board has two SPI flash chips, an 8 MB that holds the IFD, +# the ME image and part of the coreboot image, and a 4 MB one that +# has the rest of the coreboot and the reset vector. +# +# Only flashing to the bios region is safe to do. The easiest is to +# flash internally when the IFD is unlocked for writing, and t430-flash +# is installed first. diff --git a/boards/x220-vboot/x220-vboot.config b/boards/x220-vboot/x220-vboot.config new file mode 100644 index 000000000..972acd0e8 --- /dev/null +++ b/boards/x220-vboot/x220-vboot.config @@ -0,0 +1,39 @@ +# Configuration for a x220 running Qubes and other OS, X220 is identical to X230 on the Linux Side of things. +export CONFIG_COREBOOT=y +export CONFIG_COREBOOT_VERSION=4.12 +export CONFIG_LINUX_VERSION=4.14.62 + +CONFIG_COREBOOT_CONFIG=config/coreboot-x220-vboot.config +CONFIG_LINUX_CONFIG=config/linux-x230.config + +CONFIG_CRYPTSETUP=y +CONFIG_FLASHROM=y +CONFIG_FLASHTOOLS=y +CONFIG_GPG2=y +CONFIG_KEXEC=y +CONFIG_UTIL_LINUX=y +CONFIG_LVM2=y +CONFIG_MBEDTLS=y +CONFIG_PCIUTILS=y +CONFIG_POPT=y +CONFIG_QRENCODE=y +CONFIG_TPMTOTP=y +CONFIG_DROPBEAR=y + +CONFIG_CAIRO=y +CONFIG_FBWHIPTAIL=y + +CONFIG_LINUX_USB=y +CONFIG_LINUX_E1000E=y + +export CONFIG_TPM=y +export CONFIG_BOOTSCRIPT=/bin/gui-init +export CONFIG_BOOT_REQ_HASH=n +export CONFIG_BOOT_REQ_ROLLBACK=n +export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on intel_iommu=igfx_off" +export CONFIG_BOOT_KERNEL_REMOVE="quiet" +export CONFIG_BOOT_DEV="/dev/sda1" +export CONFIG_BOOT_GUI_MENU_NAME="ThinkPad X220 Heads Boot Menu" +export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0" +export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0" +export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image bios" diff --git a/boards/x230-vboot/x230-vboot.config b/boards/x230-vboot/x230-vboot.config new file mode 100644 index 000000000..24cd898aa --- /dev/null +++ b/boards/x230-vboot/x230-vboot.config @@ -0,0 +1,47 @@ +# Configuration for a x230 running Qubes and other OSes +export CONFIG_COREBOOT=y +export CONFIG_COREBOOT_VERSION=4.12 +export CONFIG_LINUX_VERSION=4.14.62 + +CONFIG_COREBOOT_CONFIG=config/coreboot-x230-vboot.config +CONFIG_LINUX_CONFIG=config/linux-x230.config + +CONFIG_CRYPTSETUP=y +CONFIG_FLASHROM=y +CONFIG_FLASHTOOLS=y +CONFIG_GPG2=y +CONFIG_KEXEC=y +CONFIG_UTIL_LINUX=y +CONFIG_LVM2=y +CONFIG_MBEDTLS=y +CONFIG_PCIUTILS=y +CONFIG_POPT=y +CONFIG_QRENCODE=y +CONFIG_TPMTOTP=y +CONFIG_DROPBEAR=y + +CONFIG_CAIRO=y +CONFIG_FBWHIPTAIL=y + +CONFIG_LINUX_USB=y +CONFIG_LINUX_E1000E=y + +export CONFIG_TPM=y +export CONFIG_BOOTSCRIPT=/bin/gui-init +export CONFIG_BOOT_REQ_HASH=n +export CONFIG_BOOT_REQ_ROLLBACK=n +export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on intel_iommu=igfx_off" +export CONFIG_BOOT_KERNEL_REMOVE="quiet" +export CONFIG_BOOT_DEV="/dev/sda1" +export CONFIG_BOOT_GUI_MENU_NAME="Thinkpad X230 Heads Boot Menu" +export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0" +export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0" +export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image bios" + +# This board has two SPI flash chips, an 8 MB that holds the IFD, +# the ME image and part of the coreboot image, and a 4 MB one that +# has the rest of the coreboot and the reset vector. +# +# Only flashing to the bios region is safe to do. The easiest is to +# flash internally when the IFD is unlocked for writing, and x230-flash +# is installed first. diff --git a/config/coreboot-t420-vboot.config b/config/coreboot-t420-vboot.config new file mode 100644 index 000000000..bc68b538f --- /dev/null +++ b/config/coreboot-t420-vboot.config @@ -0,0 +1,28 @@ +CONFIG_LOCALVERSION="heads" +CONFIG_ANY_TOOLCHAIN=y +# CONFIG_INCLUDE_CONFIG_FILE is not set +# CONFIG_COLLECT_TIMESTAMPS is not set +CONFIG_USE_BLOBS=y +CONFIG_MEASURED_BOOT=y +CONFIG_VENDOR_LENOVO=y +CONFIG_ONBOARD_VGA_IS_PRIMARY=y +CONFIG_HAVE_IFD_BIN=y +CONFIG_HAVE_ME_BIN=y +CONFIG_HAVE_GBE_BIN=y +CONFIG_IFD_BIN_PATH="../../blobs/t420-vboot/ifd.bin" +CONFIG_ME_BIN_PATH="../../blobs/t420-vboot/me.bin" +CONFIG_BOARD_LENOVO_T420=y +CONFIG_DRIVERS_PS2_KEYBOARD=y +CONFIG_NO_POST=y +CONFIG_GBE_BIN_PATH="../../blobs/t420-vboot/gbe.bin" +CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000 +CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y +CONFIG_PAYLOAD_LINUX=y +CONFIG_PAYLOAD_FILE="../../build/t420-vboot/bzImage" +CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3" +CONFIG_LINUX_INITRD="../../build/t420-vboot/initrd.cpio.xz" +CONFIG_DEBUG_SMM_RELOCATION=y +CONFIG_FMDFILE="src/mainboard/lenovo/t420/vboot-ro-me_clean.fmd" +CONFIG_VBOOT=y +# CONFIG_VBOOT_SLOTS_RW_A is not set +# CONFIG_VBOOT_SLOTS_RW_AB is not set diff --git a/config/coreboot-t430-vboot.config b/config/coreboot-t430-vboot.config new file mode 100644 index 000000000..8df5ce79d --- /dev/null +++ b/config/coreboot-t430-vboot.config @@ -0,0 +1,30 @@ +CONFIG_LOCALVERSION="heads" +CONFIG_ANY_TOOLCHAIN=y +# CONFIG_INCLUDE_CONFIG_FILE is not set +# CONFIG_COLLECT_TIMESTAMPS is not set +CONFIG_USE_BLOBS=y +CONFIG_MEASURED_BOOT=y +CONFIG_VENDOR_LENOVO=y +# CONFIG_POST_IO is not set +# CONFIG_POST_DEVICE is not set +CONFIG_DRIVERS_UART_8250IO=y +CONFIG_BOARD_LENOVO_THINKPAD_T430=y +CONFIG_DRIVERS_PS2_KEYBOARD=y +CONFIG_UART_PCI_ADDR=0 +# CONFIG_CONSOLE_SERIAL is not set +CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000 +CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y +CONFIG_PAYLOAD_LINUX=y +CONFIG_PAYLOAD_FILE="../../build/t430-vboot/bzImage" +CONFIG_PAYLOAD_OPTIONS="" +# CONFIG_PXE is not set +CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet" +CONFIG_LINUX_INITRD="../../build/t430-vboot/initrd.cpio.xz" +CONFIG_DEBUG_SMM_RELOCATION=y +CONFIG_USE_OPTION_TABLE=y +CONFIG_STATIC_OPTION_TABLE=y +CONFIG_FMDFILE="src/mainboard/lenovo/t430/vboot-ro-me_clean.fmd" +CONFIG_VBOOT=y +# CONFIG_VBOOT_SLOTS_RW_A is not set +# CONFIG_VBOOT_SLOTS_RW_AB is not set + diff --git a/config/coreboot-x220-vboot.config b/config/coreboot-x220-vboot.config new file mode 100644 index 000000000..7cf0d663b --- /dev/null +++ b/config/coreboot-x220-vboot.config @@ -0,0 +1,28 @@ +CONFIG_LOCALVERSION="heads" +CONFIG_ANY_TOOLCHAIN=y +# CONFIG_INCLUDE_CONFIG_FILE is not set +# CONFIG_COLLECT_TIMESTAMPS is not set +CONFIG_USE_BLOBS=y +CONFIG_MEASURED_BOOT=y +CONFIG_VENDOR_LENOVO=y +CONFIG_ONBOARD_VGA_IS_PRIMARY=y +CONFIG_HAVE_IFD_BIN=y +CONFIG_HAVE_ME_BIN=y +CONFIG_HAVE_GBE_BIN=y +CONFIG_IFD_BIN_PATH="../../blobs/x220-vboot/ifd.bin" +CONFIG_ME_BIN_PATH="../../blobs/x220-vboot/me.bin" +CONFIG_BOARD_LENOVO_X220=y +CONFIG_DRIVERS_PS2_KEYBOARD=y +CONFIG_NO_POST=y +CONFIG_GBE_BIN_PATH="../../blobs/x220-vboot/gbe.bin" +#CONFIG_DEBUG_TPM=y +CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000 +CONFIG_PAYLOAD_LINUX=y +CONFIG_PAYLOAD_FILE="../../build/x220-vboot/bzImage" +CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3" +CONFIG_LINUX_INITRD="../../build/x220-vboot/initrd.cpio.xz" +CONFIG_DEBUG_SMM_RELOCATION=y +CONFIG_FMDFILE="src/mainboard/lenovo/x220/vboot-ro-me_clean.fmd" +CONFIG_VBOOT=y +# CONFIG_VBOOT_SLOTS_RW_A is not set +# CONFIG_VBOOT_SLOTS_RW_AB is not set diff --git a/config/coreboot-x230-vboot.config b/config/coreboot-x230-vboot.config new file mode 100644 index 000000000..205db7627 --- /dev/null +++ b/config/coreboot-x230-vboot.config @@ -0,0 +1,32 @@ +CONFIG_LOCALVERSION="heads" +CONFIG_ANY_TOOLCHAIN=y +# CONFIG_INCLUDE_CONFIG_FILE is not set +# CONFIG_COLLECT_TIMESTAMPS is not set +CONFIG_USE_BLOBS=y +CONFIG_MEASURED_BOOT=y +CONFIG_VENDOR_LENOVO=y +CONFIG_CBFS_SIZE=0x710000 +# CONFIG_POST_IO is not set +# CONFIG_POST_DEVICE is not set +CONFIG_DRIVERS_UART_8250IO=y +CONFIG_BOARD_LENOVO_X230=y +CONFIG_DRIVERS_PS2_KEYBOARD=y +CONFIG_UART_PCI_ADDR=0 +CONFIG_NO_GFX_INIT=y +# CONFIG_CONSOLE_SERIAL is not set +CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000 +CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y +CONFIG_PAYLOAD_LINUX=y +CONFIG_PAYLOAD_FILE="../../build/x230-vboot/bzImage" +CONFIG_PAYLOAD_OPTIONS="" +# CONFIG_PXE is not set +CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet" +CONFIG_LINUX_INITRD="../../build/x230-vboot/initrd.cpio.xz" +CONFIG_DEBUG_SMM_RELOCATION=y +CONFIG_USE_OPTION_TABLE=y +CONFIG_STATIC_OPTION_TABLE=y +CONFIG_FMDFILE="src/mainboard/lenovo/x230/vboot-ro-me_clean.fmd" +CONFIG_VBOOT=y +# CONFIG_VBOOT_SLOTS_RW_A is not set +# CONFIG_VBOOT_SLOTS_RW_AB is not set + From 9646575a51ef645908bc213321ff9233d05bff7b Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 11 Dec 2020 17:29:34 -0500 Subject: [PATCH 2/3] Add previous patches to have the boards built by CI and remove warning as error inside of coreboot module --- .circleci/config.yml | 42 +++++++++++++++++++++++++++++++++++++++++- modules/coreboot | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6edb6d36b..7bc5a3761 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 python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract + 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 python2 python3 wget gnat cpio ccache pkg-config cmake libusb-1.0-0-dev autoconf texinfo ncurses-dev libssl-dev doxygen graphviz udev libudev1 libudev-dev automake libtool rsync innoextract - checkout - run: @@ -386,6 +386,46 @@ jobs: - store-artifacts: path: build/x230-hotp-verification + - run: + name: x230-vboot + command: | + rm -rf build/x230-vboot/* build/log/* && make CPUS=4 V=1 BOARD=x230-vboot || touch /tmp/failed_build + no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi + - run: + name: Output x230-vboot hashes + command: | + cat build/x230-vboot/hashes.txt \ + - run: + name: Archiving build logs for x230-nkstorecli + command: | + tar zcvf build/x230-vboot/logs.tar.gz build/log/* + - store-artifacts: + path: build/x230-vboot + + - run: + name: t430-vboot + command: | + rm -rf build/t430-vboot/* build/log/* && make CPUS=4 V=1 BOARD=t430-vboot || touch /tmp/failed_build + no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi + - run: + name: Output t430-vboot hashes + command: | + cat build/t430-vboot/hashes.txt \ + - run: + name: Archiving build logs for t430-vboot + command: | + tar zcvf build/t430-vboot/logs.tar.gz build/log/* + - store-artifacts: + path: build/t430-vboot + - run: name: x230-nkstorecli command: | diff --git a/modules/coreboot b/modules/coreboot index b5ba25af0..724404f37 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -34,7 +34,7 @@ CONFIG_COREBOOT_CONFIG ?= config/coreboot-$(BOARD).config # Ensure that touching the config file will force a rebuild $(build)/$(coreboot_dir)/.configured: $(CONFIG_COREBOOT_CONFIG) -EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-error=packed-not-aligned +EXTRA_FLAGS := -fdebug-prefix-map=$(pwd)=heads -gno-record-gcc-switches -Wno-error=packed-not-aligned -Wno-address-of-packed-member coreboot_configure := \ mkdir -p "$(build)/$(coreboot_dir)" \ From 1aaf4cc38bd222f37634973fbcbb70d1932f1d78 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 11 Dec 2020 22:54:20 -0500 Subject: [PATCH 3/3] Revert coreboot module to not use musl-cross-make but use per coreboot toolchain for its compilation - remove coreboot patches to build coreboot against musl-cross-make directly - musl-cross-make only responsible to build the rest of the modules --- .circleci/config.yml | 33 ++++++++++++------- modules/coreboot | 6 +++- .../0010-cross-compiler-support.patch | 32 ------------------ .../0010-cross-compiler-support.patch | 28 ---------------- .../0010-cross-compiler-support.patch | 27 --------------- 5 files changed, 26 insertions(+), 100 deletions(-) delete mode 100644 patches/coreboot-4.11/0010-cross-compiler-support.patch delete mode 100644 patches/coreboot-4.12/0010-cross-compiler-support.patch delete mode 100644 patches/coreboot-4.8.1/0010-cross-compiler-support.patch diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bc5a3761..5766573a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,10 +62,12 @@ jobs: - run: 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) \ + rm -rf build/kgpe-d16_workstation/* build/log/* && make CPUS=4 V=1 BOARD=kgpe-d16_workstation || touch /tmp/failed_build no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \ - run: name: Ouput kgpe-d16_workstation hashes command: | @@ -80,10 +82,12 @@ jobs: - run: 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) \ + rm -rf build/kgpe-d16_workstation-usb_keyboard/* build/log/* && make CPUS=4 V=1 BOARD=kgpe-d16_workstation-usb_keyboard || touch /tmp/failed_build no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \ - run: name: Ouput kgpe-d16_workstation-usb_keyboard hashes command: | @@ -98,10 +102,12 @@ jobs: - run: 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) \ + rm -rf build/kgpe-d16_server/* build/log/* && make CPUS=4 V=1 BOARD=kgpe-d16_server || touch /tmp/failed_build no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \ - run: name: Ouput kgpe-d16_server hashes command: | @@ -116,10 +122,12 @@ 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 || touch /tmp/failed_build no_output_timeout: 3h + - run: + name: Output build failing logs + command: | + if [[ -f /tmp/failed_build ]]; then find ./build/ -name "*.log" -type f -mmin -1|while read log; do echo ""; echo '==>' "$log" '<=='; echo ""; cat $log;done; exit 1;else echo "Not failing. Continuing..."; fi \ - run: name: Ouput kgpe-d16_server-whiptail hashes command: | @@ -130,6 +138,7 @@ 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: | diff --git a/modules/coreboot b/modules/coreboot index 724404f37..1e31e1826 100644 --- a/modules/coreboot +++ b/modules/coreboot @@ -70,7 +70,11 @@ coreboot_target := \ coreboot_output := coreboot.rom coreboot_depend += linux initrd $(musl_dep) -$(build)/$(coreboot_dir)/.configured: $(COREBOOT_IASL) +COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile" +$(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary + $(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS crossgcc-i386 + +$(build)/$(coreboot_dir)/.configured: $(COREBOOT_IASL) $(COREBOOT_TOOLCHAIN) $(COREBOOT_IASL): $(build)/$(coreboot_base_dir)/.canary $(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS iasl diff --git a/patches/coreboot-4.11/0010-cross-compiler-support.patch b/patches/coreboot-4.11/0010-cross-compiler-support.patch deleted file mode 100644 index aa925348b..000000000 --- a/patches/coreboot-4.11/0010-cross-compiler-support.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/Makefile b/Makefile -index f3f9592649..cb37557c81 100644 ---- a/Makefile -+++ b/Makefile -@@ -164,6 +164,24 @@ $(if $(wildcard .xcompile)$(NOCOMPILE),,$(eval $(shell util/xcompile/xcompile $( - - -include .xcompile - -+ifneq "$(CROSS)" "" -+ $(info coreboot: Using $(CROSS)gcc) -+ CROSS_COMPILE_x86_32 := $(CROSS) -+ CC_x86_32 := $(CROSS_COMPILE_x86_32)gcc -+ CPP_x86_32 := $(CROSS_COMPILE_x86_32)cpp -+ AS_x86_32 := $(CROSS_COMPILE_x86_32)as --32 -+ LD_x86_32 := $(CROSS_COMPILE_x86_32)ld.bfd -b elf32-i386 -melf_i386 -+ NM_x86_32 := $(CROSS_COMPILE_x86_32)nm -+ OBJCOPY_x86_32 := $(CROSS_COMPILE_x86_32)objcopy -+ OBJDUMP_x86_32 := $(CROSS_COMPILE_x86_32)objdump -+ READELF_x86_32 := $(CROSS_COMPILE_x86_32)readelf -+ STRIP_x86_32 := $(CROSS_COMPILE_x86_32)strip -+ AR_x86_32 := $(CROSS_COMPILE_x86_32)ar -+ GNATBIND_x86_32 := $(CROSS_COMPILE_x86_32)gnatbind -+ COMPILER_RT_x86_32 := $(shell $(CC_x86_32) --print-libgcc-file-name) -+endif -+ -+ - ifneq ($(XCOMPILE_COMPLETE),1) - $(shell rm -f .xcompile) - $(error .xcompile deleted because it's invalid. \ --- -2.20.1 - diff --git a/patches/coreboot-4.12/0010-cross-compiler-support.patch b/patches/coreboot-4.12/0010-cross-compiler-support.patch deleted file mode 100644 index c87f64f90..000000000 --- a/patches/coreboot-4.12/0010-cross-compiler-support.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/Makefile b/Makefile -index 027aae2faa..8251a9a478 100644 ---- a/Makefile -+++ b/Makefile -@@ -176,6 +176,23 @@ $(if $(wildcard .xcompile)$(NOCOMPILE),,$(eval $(shell util/xcompile/xcompile $( - - -include .xcompile - -+ifneq "$(CROSS)" "" -+ $(info coreboot: Using $(CROSS)gcc) -+ CROSS_COMPILE_x86_32 := $(CROSS) -+ CC_x86_32 := $(CROSS_COMPILE_x86_32)gcc -+ CPP_x86_32 := $(CROSS_COMPILE_x86_32)cpp -+ AS_x86_32 := $(CROSS_COMPILE_x86_32)as --32 -+ LD_x86_32 := $(CROSS_COMPILE_x86_32)ld.bfd -b elf32-i386 -melf_i386 -+ NM_x86_32 := $(CROSS_COMPILE_x86_32)nm -+ OBJCOPY_x86_32 := $(CROSS_COMPILE_x86_32)objcopy -+ OBJDUMP_x86_32 := $(CROSS_COMPILE_x86_32)objdump -+ READELF_x86_32 := $(CROSS_COMPILE_x86_32)readelf -+ STRIP_x86_32 := $(CROSS_COMPILE_x86_32)strip -+ AR_x86_32 := $(CROSS_COMPILE_x86_32)ar -+ GNATBIND_x86_32 := $(CROSS_COMPILE_x86_32)gnatbind -+ COMPILER_RT_x86_32 := $(shell $(CC_x86_32) --print-libgcc-file-name) -+endif -+ - ifneq ($(XCOMPILE_COMPLETE),1) - $(shell rm -f .xcompile) - $(error .xcompile deleted because it's invalid. \ diff --git a/patches/coreboot-4.8.1/0010-cross-compiler-support.patch b/patches/coreboot-4.8.1/0010-cross-compiler-support.patch deleted file mode 100644 index b99941df7..000000000 --- a/patches/coreboot-4.8.1/0010-cross-compiler-support.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- clean/coreboot-4.8.1/Makefile 2018-05-16 21:00:17.000000000 +0200 -+++ coreboot-4.8.1/Makefile 2020-01-08 17:01:32.998287979 +0100 -@@ -152,6 +152,24 @@ - - -include .xcompile - -+ifneq "$(CROSS)" "" -+ $(info coreboot: Using $(CROSS)gcc) -+ CROSS_COMPILE_x86_32 := $(CROSS) -+ CC_x86_32 := $(CROSS_COMPILE_x86_32)gcc -+ CPP_x86_32 := $(CROSS_COMPILE_x86_32)cpp -+ AS_x86_32 := $(CROSS_COMPILE_x86_32)as --32 -+ LD_x86_32 := $(CROSS_COMPILE_x86_32)ld.bfd -b elf32-i386 -melf_i386 -+ NM_x86_32 := $(CROSS_COMPILE_x86_32)nm -+ OBJCOPY_x86_32 := $(CROSS_COMPILE_x86_32)objcopy -+ OBJDUMP_x86_32 := $(CROSS_COMPILE_x86_32)objdump -+ READELF_x86_32 := $(CROSS_COMPILE_x86_32)readelf -+ STRIP_x86_32 := $(CROSS_COMPILE_x86_32)strip -+ AR_x86_32 := $(CROSS_COMPILE_x86_32)ar -+ GNATBIND_x86_32 := $(CROSS_COMPILE_x86_32)gnatbind -+ COMPILER_RT_x86_32 := $(shell $(CC_x86_32) --print-libgcc-file-name) -+endif -+ -+ - ifneq ($(XCOMPILE_COMPLETE),1) - $(shell rm -f .xcompile) - $(error .xcompile deleted because it's invalid. \