Skip to content

Commit

Permalink
Add new board: Purism Librem Server L1UM (#858)
Browse files Browse the repository at this point in the history
* modules/coreboot: add option to use coreboot 4.11

Port patches from coreboot 4.8.1 to 4.11:
* 0000-measure-boot -> 0001
* 0010-cross-compiler-support

All other patches for coreboot 4.8.1 have either already been
integrated, or are for platforms which do not need to be migrated
to coreboot 4.11 (they will move to 4.12 or newer).

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* patches/coreboot-4.11: Add Broadwell-DE platform patch

Add a patch for FSP Broadwell-DE to make use of Heads' measured boot.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* patches/coreboot-4.11: Add patch to read serial # from CBFS

Will be used by multiple Librem boards.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* patches/coreboot-4.11: add board support for Librem Server L1UM

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* Librem Server L1UM: add new board

Add board config, coreboot config, kernel config files.
Add conditional purism-blobs dependency to coreboot-4.11 module.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* flash.sh: add special handling for librem_l1um board

Add support for persisting PCIe config via PCHSTRP9 in flash descriptor.
This is needed to support multiple variants of the L1UM server which
use the same firmware but differ in PCIe lane configuration via the
PCH straps configuration in the flash descriptor.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* patches/coreboot-4.11: Add 'Use PRIxPTR to print uintptr_t' patch

Cherry-picked from upstream coreboot (post-4.11), fixes compilation issue.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>

* CircleCI: add target to build board librem_l1um

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
  • Loading branch information
MrChromebox authored Oct 18, 2020
1 parent 636e404 commit 85d7e29
Show file tree
Hide file tree
Showing 12 changed files with 3,114 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ jobs:
# - store-artifacts:
# path: build/qemu-linuxboot/hashes.txt

- run:
name: librem_l1um
command: |
rm -rf build/librem_l1um/* 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: |
Expand Down
43 changes: 43 additions & 0 deletions boards/librem_l1um/librem_l1um.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration for a librem_l1um
CONFIG_LINUX_CONFIG=config/linux-librem_l1um.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_l1um.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.11
export CONFIG_LINUX_VERSION=4.19.139
export CONFIG_PURISM_BLOBS=y

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_CAIRO=y
CONFIG_FBWHIPTAIL=y
CONFIG_HOTPKEY=y

CONFIG_LINUX_USB=y

export CONFIG_TPM=y
export CONFIG_TPM_NO_LUKS_DISK_UNLOCK=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"
export CONFIG_BOOT_KERNEL_REMOVE="plymouth.ignore-serial-consoles"
export CONFIG_BOOT_DEV="/dev/nvme0n1p1"
export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem Server L1UM 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_AUTO_BOOT_TIMEOUT=5
export CONFIG_FLASHROM_OPTIONS="-p internal"
export CONFIG_USB_KEYBOARD=y
28 changes: 28 additions & 0 deletions config/coreboot-librem_l1um.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CONFIG_LOCALVERSION="heads"
CONFIG_ANY_TOOLCHAIN=y
CONFIG_USE_BLOBS=y
CONFIG_MEASURED_BOOT=y
CONFIG_VENDOR_PURISM=y
CONFIG_CBFS_SIZE=0xC00000
CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Purism"
CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="Librem Server L1UM"
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_l1um/flashdescriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_l1um/me.bin"
CONFIG_HAVE_IFD_BIN=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_BOARD_PURISM_LIBREM_L1UM=y
CONFIG_PCIEXP_COMMON_CLOCK=y
CONFIG_FSP_EHCI1_ENABLE=y
CONFIG_FSP_EHCI2_ENABLE=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_l1um/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_NO_GFX_INIT=y
CONFIG_DRIVERS_GENERIC_CBFS_SERIAL=y
CONFIG_SMBIOS_ENCLOSURE_TYPE=0x17
CONFIG_USER_TPM1=y
CONFIG_NO_POST=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem_l1um/bzImage"
CONFIG_LINUX_INITRD="../../build/librem_l1um/initrd.cpio.xz"
CONFIG_LINUX_COMMAND_LINE="quiet loglevel=3"
Loading

0 comments on commit 85d7e29

Please sign in to comment.