Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coreboot 412 additional requirements (WiP) #802

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,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" }}
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

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu-fbwhiptail.config
CONFIG_LINUX_CONFIG=config/linux-qemu.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

CONFIG_COREBOOT_CONFIG=config/coreboot-qemu.config
CONFIG_LINUX_CONFIG=config/linux-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

CONFIG_FLASHROM=y
CONFIG_FLASHTOOLS=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

CONFIG_COREBOOT_CONFIG=config/coreboot-t430.config
CONFIG_LINUX_CONFIG=config/linux-x230.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

CONFIG_FLASHROM=y
#CONFIG_GPG=y
Expand Down
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)
# running Qubes and other OSes
export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
export CONFIG_COREBOOT_VERSION=4.12

CONFIG_COREBOOT_CONFIG=config/coreboot-x230-hotp-verification.config
CONFIG_LINUX_CONFIG=config/linux-x230.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

CONFIG_COREBOOT_CONFIG=config/coreboot-x230.config
CONFIG_LINUX_CONFIG=config/linux-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=0x800000
# 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"
22 changes: 9 additions & 13 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=0x700000
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
23 changes: 21 additions & 2 deletions modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ modules-$(CONFIG_COREBOOT) += coreboot
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
coreboot_version := 4.8.1
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
else
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
endif
Expand Down Expand Up @@ -55,7 +58,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=`nproc` iasl

Expand Down Expand Up @@ -98,10 +110,17 @@ modules-y += coreboot-blobs

coreboot-blobs_version := $(coreboot_version)
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_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
endif

## there is nothing to build for the blobs, this should be
## made easier to make happen
Expand Down