Skip to content

Commit

Permalink
coreboot 4.12 changes to apply on top of linuxboot#721 to have builda…
Browse files Browse the repository at this point in the history
…ble boards (x230 and qemu-coreboot boards CBFS regions expended)
  • Loading branch information
tlaurion authored and Thrilleratplay committed Oct 15, 2020
1 parent 92e9a24 commit 8ed25db
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 58 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ jobs:
- store-artifacts:
path: build/qemu-coreboot

- run:
name: qemu-coreboot-fbwhiptail
command: |
rm -rf build/qemu-coreboot-fbwhiptail/* build/log/* && make --load 2 \
V=1 \
BOARD=qemu-coreboot-fbwhiptail \
no_output_timeout: 3h
- run:
name: Output qemu-coreboot-fbwhiptail hashes
command: |
cat build/qemu-coreboot-fbwhiptail/hashes.txt \
- run:
name: Archiving build logs for qemu-coreboot-fbwhiptail
command: |
tar zcvf build/qemu-coreboot-fbwhiptail/logs.tar.gz build/log/*
- store-artifacts:
path: build/qemu-coreboot-fbwhiptail

- 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" }}{{ .Environment.CACHE_VERSION }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# the qemu emulator in GUI mode thanks to FBWhiptail

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu-fbwhiptail.config
Expand Down
2 changes: 1 addition & 1 deletion boards/qemu-coreboot/qemu-coreboot.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# the qemu emulator. Note that the TPM does not work, so this
# will just drop into the recovery shell.
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu.config
Expand Down
2 changes: 1 addition & 1 deletion boards/t430-flash/t430-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BOARD=t430.flash

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_FLASHROM=y
Expand Down
2 changes: 1 addition & 1 deletion boards/t430/t430.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration for a t430 running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-t430.config
Expand Down
2 changes: 1 addition & 1 deletion boards/x230-flash/x230-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BOARD=x230.flash

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_FLASHROM=y
Expand Down
4 changes: 2 additions & 2 deletions boards/x230-hotp-verification/x230-hotp-verification.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configuration for a x230-hotp-verification (Nitrokey/Purism USB Security dongle enabled HOTP support)
# Configuration for a x230-hotp-verification (Nitrokey/Purism USB Security dongle enabled HOTP support)
# running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-x230-hotp-verification.config
Expand Down
2 changes: 1 addition & 1 deletion boards/x230/x230.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration for a x230 running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12
export CONFIG_LINUX_VERSION=4.14.62

CONFIG_COREBOOT_CONFIG=config/coreboot-x230.config
Expand Down
11 changes: 5 additions & 6 deletions config/coreboot-qemu-fbwhiptail.config
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
CONFIG_LOCALVERSION="-heads"
CONFIG_ANY_TOOLCHAIN=y
# CONFIG_INCLUDE_CONFIG_FILE is not set
CONFIG_CBFS_SIZE=0x700000
CONFIG_CBFS_SIZE=0x800000
# CONFIG_POST_IO is not set
CONFIG_BOARD_EMULATION_QEMU_X86_Q35=y
# CONFIG_CONSOLE_SERIAL is not set
# CONFIG_POST_DEVICE is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_COREBOOT_ROMSIZE_KB_8192=y
CONFIG_LINUX_COMMAND_LINE="debug console=ttyS0 vga=786"
CONFIG_COREBOOT_ROMSIZE_KB_10240=y
CONFIG_PCIEXP_ASPM=y
CONFIG_PCIEXP_COMMON_CLOCK=y
CONFIG_UART_PCI_ADDR=0
CONFIG_CPU_MICROCODE_CBFS_GENERATE=y
# CONFIG_CONSOLE_SERIAL is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_LINUX_COMMAND_LINE="debug"
CONFIG_PAYLOAD_FILE="../../build/qemu-coreboot-fbwhiptail/bzImage"
CONFIG_LINUX_INITRD="../../build/qemu-coreboot-fbwhiptail/initrd.cpio.xz"
7 changes: 3 additions & 4 deletions config/coreboot-qemu.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ CONFIG_ANY_TOOLCHAIN=y
CONFIG_CBFS_SIZE=0x700000
# CONFIG_POST_IO is not set
CONFIG_BOARD_EMULATION_QEMU_X86_Q35=y
# CONFIG_CONSOLE_SERIAL is not set
# CONFIG_POST_DEVICE is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_LINUX_COMMAND_LINE="debug console=ttyS0 vga=786"
CONFIG_COREBOOT_ROMSIZE_KB_8192=y
CONFIG_PCIEXP_ASPM=y
CONFIG_PCIEXP_COMMON_CLOCK=y
CONFIG_UART_PCI_ADDR=0
CONFIG_CPU_MICROCODE_CBFS_GENERATE=y
# CONFIG_CONSOLE_SERIAL is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_6=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_LINUX_COMMAND_LINE="debug console=ttyS0 vga=786"
CONFIG_PAYLOAD_FILE="../../build/qemu-coreboot/bzImage"
CONFIG_LINUX_INITRD="../../build/qemu-coreboot/initrd.cpio.xz"
9 changes: 4 additions & 5 deletions config/coreboot-t430-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ 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=0x400000
# CONFIG_POST_DEVICE is not set
CONFIG_DRIVERS_UART_8250IO=y
CONFIG_BOARD_LENOVO_THINKPAD_T430=y
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DRIVERS_UART_8250IO=y
# CONFIG_POST_DEVICE is not set
CONFIG_UART_PCI_ADDR=0
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
Expand Down
20 changes: 8 additions & 12 deletions config/coreboot-t430.config
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
CONFIG_LOCALVERSION="heads"
CONFIG_ANY_TOOLCHAIN=y
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=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_CONSOLE_SERIAL is not set
CONFIG_BOARD_LENOVO_THINKPAD_T430=y
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DRIVERS_UART_8250IO=y
# CONFIG_POST_DEVICE is not set
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_UART_PCI_ADDR=0
# CONFIG_CONSOLE_SERIAL is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/t430/bzImage"
CONFIG_PAYLOAD_OPTIONS=""
# CONFIG_PXE is not set
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_LINUX_INITRD="../../build/t430/initrd.cpio.xz"
CONFIG_DEBUG_SMM_RELOCATION=y
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=y
10 changes: 4 additions & 6 deletions config/coreboot-x230-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ 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=0x400000
# CONFIG_POST_DEVICE is not set
CONFIG_DRIVERS_UART_8250IO=y
CONFIG_BOARD_LENOVO_X230=y
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DRIVERS_UART_8250IO=y
# CONFIG_POST_DEVICE is not set
CONFIG_UART_PCI_ADDR=0
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/x230-flash/bzImage"
CONFIG_LINUX_INITRD="../../build/x230-flash/initrd.cpio.xz"
CONFIG_DEBUG_SMM_RELOCATION=y
6 changes: 3 additions & 3 deletions config/coreboot-x230-hotp-verification.config
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
CONFIG_LOCALVERSION="heads"
CONFIG_ANY_TOOLCHAIN=y
CONFIG_MEASURED_BOOT=y
CONFIG_VENDOR_LENOVO=y
CONFIG_NO_POST=y
CONFIG_CBFS_SIZE=0x710000
CONFIG_BOARD_LENOVO_X230=y
CONFIG_NO_POST=y
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_UART_PCI_ADDR=0
CONFIG_NO_GFX_INIT=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/x230-hotp-verification/bzImage"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_LINUX_INITRD="../../build/x230-hotp-verification/initrd.cpio.xz"
20 changes: 8 additions & 12 deletions config/coreboot-x230.config
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
CONFIG_LOCALVERSION="heads"
CONFIG_ANY_TOOLCHAIN=y
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=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_CONSOLE_SERIAL is not set
CONFIG_BOARD_LENOVO_X230=y
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DRIVERS_UART_8250IO=y
# CONFIG_POST_DEVICE is not set
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_UART_PCI_ADDR=0
CONFIG_NO_GFX_INIT=y
# CONFIG_CONSOLE_SERIAL is not set
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x80000
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_5=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/x230/bzImage"
CONFIG_PAYLOAD_OPTIONS=""
# CONFIG_PXE is not set
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet"
CONFIG_LINUX_INITRD="../../build/x230/initrd.cpio.xz"
CONFIG_DEBUG_SMM_RELOCATION=y
CONFIG_USE_OPTION_TABLE=y
CONFIG_STATIC_OPTION_TABLE=y
27 changes: 25 additions & 2 deletions modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
else
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
endif
endif

#coreboot_version := git
#coreboot_repo := https://github.com/osresearch/coreboot
Expand Down Expand Up @@ -61,7 +61,16 @@ coreboot_target := \
coreboot_output := coreboot.rom
coreboot_depend += linux initrd $(musl_dep)

$(build)/$(coreboot_dir)/.configured: $(COREBOOT_IASL)
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
COREBOOT_TOOLCHAIN=""
$(COREBOOT_TOOLCHAIN):
else
COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile"
$(COREBOOT_TOOLCHAIN): $(build)/$(coreboot_base_dir)/.canary
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=`nproc` crossgcc-i386
endif

$(build)/$(coreboot_dir)/.configured: $(COREBOOT_IASL) $(COREBOOT_TOOLCHAIN)
$(COREBOOT_IASL): $(build)/$(coreboot_base_dir)/.canary
$(MAKE) -C "$(build)/$(coreboot_base_dir)" CPUS=$$CPUS iasl

Expand Down Expand Up @@ -104,6 +113,7 @@ modules-y += coreboot-blobs

coreboot-blobs_version := $(coreboot_version)
coreboot-blobs_tar := coreboot-blobs-$(coreboot-blobs_version).tar.xz
<<<<<<< HEAD
coreboot-blobs_url := https://www.coreboot.org/releases/$(coreboot-blobs_tar)

ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
Expand All @@ -112,6 +122,19 @@ ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
else
coreboot-blobs_tar_opt := --strip 2
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty
=======
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_url := https://www.coreboot.org/releases/$(coreboot-blobs_tar)
coreboot-blobs_hash := 18aa509ae3af005a05d7b1e0b0246dc640249c14fc828f5144b6fd20bb10e295
else
coreboot-blobs_tar_opt := --strip 2
coreboot-blobs_dir := coreboot-$(coreboot-blobs_version)/3rdparty
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
>>>>>>> 83954fe... coreboot 4.12 changes to apply on top of #721 to have buildable boards (x230 and qemu-coreboot boards CBFS regions expended)
endif

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

0 comments on commit 8ed25db

Please sign in to comment.