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

Add new board: Purism Librem Mini #806

Merged
merged 6 commits into from
Sep 2, 2020
Merged
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 @@ -150,6 +150,24 @@ jobs:
- store-artifacts:
path: build/x230-hotp-verification

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

- run:
name: qemu-coreboot
command: |
Expand Down
4 changes: 2 additions & 2 deletions blobs/librem_kbl/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The script depends on: wget sha256sum python2.7 bspatch pv
You can now compile the image with:

```
make BOARD=librem13v4
make BOARD=librem_13v4
or
make BOARD=librem15v4
make BOARD=librem_15v4
```
4 changes: 3 additions & 1 deletion blobs/librem_skl/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ The script depends on: wget sha256sum python2.7 bspatch pv
You can now compile the image with:

```
make BOARD=librem13v2
make BOARD=librem_13v2
or
make BOARD=librem_15v3
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration for a librem13v2
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem13v2.config
# Configuration for a librem_13v2
CONFIG_LINUX_CONFIG=config/linux-librem_common.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_13v2.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration for a librem13v4
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem13v4.config
# Configuration for a librem_13v4
CONFIG_LINUX_CONFIG=config/linux-librem_common.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_13v4.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Configuration for a librem15v3

# The L15v3 Linux config is the same as the L13v2 linux config
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem15v3.config
# Configuration for a librem_15v3
CONFIG_LINUX_CONFIG=config/linux-librem_common.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_15v3.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Configuration for a librem15v4

# The L15v4 Linux config is the same as the L13v2 linux config
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem15v4.config
# Configuration for a librem_15v4
CONFIG_LINUX_CONFIG=config/linux-librem_common.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_15v4.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.8.1
Expand Down
42 changes: 42 additions & 0 deletions boards/librem_mini/librem_mini.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Configuration for a librem mini
CONFIG_LINUX_CONFIG=config/linux-librem_common.config
CONFIG_COREBOOT_CONFIG=config/coreboot-librem_mini.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=4.12
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=""
export CONFIG_BOOT_DEV="/dev/nvme0n1p1"
export CONFIG_BOOT_GUI_MENU_NAME="Purism Librem Mini 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="-p internal"
export CONFIG_USB_KEYBOARD=y
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ CONFIG_FSP_M_XIP=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem13v2/bzImage"
CONFIG_PAYLOAD_FILE="../../build/librem_13v2/bzImage"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3"
CONFIG_LINUX_INITRD="../../build/librem13v2/initrd.cpio.xz"
CONFIG_LINUX_INITRD="../../build/librem_13v2/initrd.cpio.xz"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ CONFIG_FSP_M_XIP=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem13v4/bzImage"
CONFIG_PAYLOAD_FILE="../../build/librem_13v4/bzImage"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3"
CONFIG_LINUX_INITRD="../../build/librem13v4/initrd.cpio.xz"
CONFIG_LINUX_INITRD="../../build/librem_13v4/initrd.cpio.xz"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ CONFIG_FSP_M_XIP=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem15v3/bzImage"
CONFIG_PAYLOAD_FILE="../../build/librem_15v3/bzImage"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3"
CONFIG_LINUX_INITRD="../../build/librem15v3/initrd.cpio.xz"
CONFIG_LINUX_INITRD="../../build/librem_15v3/initrd.cpio.xz"
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ CONFIG_FSP_M_XIP=y
# CONFIG_DRIVERS_INTEL_WIFI is not set
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem15v4/bzImage"
CONFIG_PAYLOAD_FILE="../../build/librem_15v4/bzImage"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=3"
CONFIG_LINUX_INITRD="../../build/librem15v4/initrd.cpio.xz"
CONFIG_LINUX_INITRD="../../build/librem_15v4/initrd.cpio.xz"
14 changes: 14 additions & 0 deletions config/coreboot-librem_mini.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CONFIG_LOCALVERSION="PureBoot-beta"
CONFIG_VENDOR_PURISM=y
CONFIG_INTEL_GMA_VBT_FILE="3rdparty/purism-blobs/mainboard/purism/librem_whl/vbt.bin"
CONFIG_IFD_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_whl/flashdescriptor.bin"
CONFIG_ME_BIN_PATH="3rdparty/purism-blobs/mainboard/purism/librem_whl/me.bin"
CONFIG_HAVE_IFD_BIN=y
CONFIG_BOARD_PURISM_LIBREM_MINI=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_CPU_UCODE_BINARIES="3rdparty/purism-blobs/mainboard/purism/librem_whl/cpu_microcode_blob.bin"
CONFIG_HAVE_ME_BIN=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_PAYLOAD_FILE="../../build/librem_mini/bzImage"
CONFIG_LINUX_INITRD="../../build/librem_mini/initrd.cpio.xz"
CONFIG_LINUX_COMMAND_LINE="intel_iommu=igfx_off quiet loglevel=2"
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,4 @@ CONFIG_CRC8=m
CONFIG_XZ_DEC_TEST=m
CONFIG_CORDIC=m
CONFIG_IRQ_POLL=y
# CONFIG_RETPOLINE is not set
1 change: 1 addition & 0 deletions modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ else ifeq "$(CONFIG_COREBOOT_VERSION)" "4.12"
coreboot_version := 4.12
coreboot_hash := edcad000ee9b73183c396ea76155629b3d27c693e0f1ae83e3424c4d936e2be2
coreboot-blobs_hash := 4735ee6850d55d1e65dee8b08cc9b28b8af00b42acf31365f5d9545406579104
coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrChromebox We can chainload multiple if here for different board configurations?

coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
coreboot_depends := $(if $(CONFIG_xx30_BLOBS),xx30-blobs)

etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrChromebox We can chainload multiple if here for different board configurations?

would need to be a single line I believe:
coreboot_depends := $(if $(CONFIG_PURISM_BLOBS), purism-blobs) $(if $(CONFIG_xx30_BLOBS),xx30-blobs)

else
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
endif
Expand Down
12 changes: 12 additions & 0 deletions modules/purism-blobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
modules-$(CONFIG_PURISM_BLOBS) += purism-blobs

purism-blobs_base_dir := coreboot-$(CONFIG_COREBOOT_VERSION)/3rdparty/purism-blobs
purism-blobs_version := f53d4074a81c70352d39839884caac20181274d1
purism-blobs_tar := purism-blobs-${purism-blobs_version}.tar.gz
purism-blobs_tar_opt := --strip 1
purism-blobs_url := https://source.puri.sm/coreboot/purism-blobs/-/archive/${purism-blobs_version}/${purism-blobs_tar}
purism-blobs_hash := f1abd419f085a6d519a2b9b141aee9900553aabf644f0fe1801618fb54157556

## there is nothing to be built
purism-blobs_output := .built
purism-blobs_configure := echo -e 'all:\n\ttouch .built' > Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 32e60b698d33eec419bf0e4865ece7b86ea1355a Mon Sep 17 00:00:00 2001
From: Matt DeVillier <[email protected]>
Date: Fri, 19 Jun 2020 17:02:22 -0500
Subject: [PATCH] soc/cannonlake/me.c: Always print ME status

Print the ME status even if the CSE device is disabled, so
we know which disabled state it's in.

Change-Id: I939333199aa699039fec727beb094e4eb2ad7149
Signed-off-by: Matt DeVillier <[email protected]>
---
src/soc/intel/cannonlake/me.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/src/soc/intel/cannonlake/me.c b/src/soc/intel/cannonlake/me.c
index a51b702e6a..3fae0bf534 100644
--- a/src/soc/intel/cannonlake/me.c
+++ b/src/soc/intel/cannonlake/me.c
@@ -103,9 +103,6 @@ void dump_me_status(void *unused)
union me_hfsts5 hfsts5;
union me_hfsts6 hfsts6;

- if (!is_cse_enabled())
- return;
-
hfsts1.data = me_read_config32(PCI_ME_HFSTS1);
hfsts2.raw = me_read_config32(PCI_ME_HFSTS2);
hfsts3.data = me_read_config32(PCI_ME_HFSTS3);
--
2.20.1

Loading