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

WiP: galp5 build based on librem_11 (GOP based iGPU) #1774

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
56d112e
galp5: initial effort by @loftlifter31
loftlifter31 Aug 29, 2024
24bcfee
Delete boards/galp5/TigerLakeFspBinPkg/Client/.ignore
loftlifter31 Aug 29, 2024
bb33a5b
modules/coreboot: add system76 coreboot fork, using latest head commit
tlaurion Sep 3, 2024
63b6e7a
boards/galp5: base on librem_11, use system76 coreboot fork, reorganize
tlaurion Sep 3, 2024
e097266
galp5 coreboot config: WiP: start from clean menuconfig, save, borrow…
tlaurion Sep 3, 2024
7c210f0
glap5 linux config: WiP start from librem_11 share 6.x kernel config
tlaurion Sep 3, 2024
cbc0e33
galp5: blobs, coreboot config; move ifd and me to blobs dir, make con…
tlaurion Sep 3, 2024
9b6c722
galp5: board dir; remove redundant files in coreboot fork
tlaurion Sep 3, 2024
cda4740
CircleCI: add galp5 based on librem_14 since sharing kernel, but not …
tlaurion Sep 3, 2024
103468b
BOARD_TESTERS.md: add Galago 5 board owner/tester at the get go
tlaurion Sep 3, 2024
cb84802
galp5 board: add HCL information in header as comment
tlaurion Sep 3, 2024
e383df4
galp5 board config: merge needed changed to pack tpm2 toolstack, unif…
tlaurion Sep 5, 2024
cc99c5e
galp5 board config: add runtime configurable USB Keyboard support, co…
tlaurion Sep 5, 2024
8605386
galp5 : change CONFIG_HEAP_SIZE to 0x400000 copy patch from patches/c…
tlaurion Sep 5, 2024
1e840fc
galp5 : add console debug output to SPI so that unbootable system can…
tlaurion Sep 5, 2024
753e1e6
coreboot Makefile helper: make sure real.remove_canary_files-extract_…
tlaurion Sep 11, 2024
37f809e
coreboot patches: remove lib/jpeg patches for heap increase and alloc…
tlaurion Sep 11, 2024
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
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ workflows:
requires:
- x230-hotp-maximized

# coreboot system76
- build_and_persist:
name: galp5
target: galp5
subcommand: ""
requires:
- librem_14

# coreboot nitropad
# Nitropads depending on x230-hotp-maximized cache since kernel is 6.x and coreboot is git is unshared
# We use nitropad's coreboot's fork crossgcc
Expand Down
3 changes: 3 additions & 0 deletions BOARD_TESTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ Librems:
- [ ] Librem 15v3 (Skylake): @JonathonHall-Purism
- [ ] Librem 15v4 (Kabylake): @JonathonHall-Purism

System76:
- [ ] Galago Pro 5 (Tiger Lake-U, Intel 11th Gen CPU, iGPU): @loftlifter31

Clevo:
===
- [ ] Nitropad NS50 (AlderLake) : @daringer
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ real.remove_canary_files-extract_patch_rebuild_what_changed:
@echo "Only a minimal time is needed for rebuilding, which is also good for your SSD."
@echo "*** USE THIS APPROACH FIRST ***"
find ./build/ -type f -name ".canary" -print -delete
find ./build/ -type f -name ".patched" -print -delete
find ./install/*/* -print -exec rm -rf {} +

real.gitclean_keep_packages_and_build:
Expand Down
Binary file added blobs/galp5/ifd.bin
Binary file not shown.
Binary file added blobs/galp5/me.bin
Binary file not shown.
89 changes: 89 additions & 0 deletions boards/galp5/galp5.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Configuration System76 Galago Pro 5 https://tech-docs.system76.com/models/galp5/README.html
CONFIG_LINUX_CONFIG=config/linux-galp5.config
CONFIG_COREBOOT_CONFIG=config/coreboot-galp5.config

export CONFIG_COREBOOT=y
export CONFIG_COREBOOT_VERSION=system76
export CONFIG_LINUX_VERSION=6.1.8

#Enable only one RESTRICTED/BASIC boot modes below to test them manually (we cannot inject config under QEMU (no internal flashing)
#export CONFIG_RESTRICTED_BOOT=y
#export CONFIG_BASIC=y

#Enable HAVE_GPG_KEY_BACKUP to test GPG key backup drive (we cannot inject config under QEMU (no internal flashing))
#export CONFIG_HAVE_GPG_KEY_BACKUP=y

#Enable DEBUG output
#export CONFIG_DEBUG_OUTPUT=y
#export CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT=y
#Enable TPM2 pcap output under /tmp
#export CONFIG_TPM2_CAPTURE_PCAP=y

#On-demand hardware support (modules.cpio)
CONFIG_LINUX_USB=y
CONFIG_LINUX_E1000=y
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@loftlifter31 unclear what ethernet controller is present under HCL https://tech-docs.system76.com/models/galp5/README.html you might need to adapt

Choose a reason for hiding this comment

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

Not sure why I would need ethernet during boot up. Once control is passed to full linux kernel that will take care of loading correct drivers, yes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why I would need ethernet during boot up. Once control is passed to full linux kernel that will take care of loading correct drivers, yes?

This driver needs to be right (e1000e, igb whatnot) to be able to use network-init-recovery script (which syncs time through ntp and get an address from dhcp prior) from recovery shell today. It's completely on demand and nothing today does the loading of the driver automatically outside of this codepath.

Heads hopefully will evolve into squashfs+overlayfs overlays so that things can be pulled from the network (wyng, docker whatever) depending of the use case pushed by the oem down to its users (dasharo DTS being one desired case, to bypass need of ipxe: we could wget kernel +initrd and kexec into it), another one being python3 overlayfs to jump into getting system state restoration as a service.

Note that the board config as it is already included android network tethering drivers also prompting the user to be used transparently through network-init-recovery today.

Tldr: on demand network access, loading drivers not on standard boot path, measures then load additional drivers, changing PCR content and preventing heads to release secrets that were sealed to unseal only on default boot path. So loading any on-demand driver will prevent efficiently any secret to be unsealed. Same applies to recovery shell access: doing on demand operations extend PCR banks which invalidates measurements .

Todo: Getting the right Ethernet driver there is needed for on-demand networking. Gotta figure out if it's igb e1000 or e1000e

Choose a reason for hiding this comment

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

Docs say it should come with Intel NIC however mine seems to come with Realtek 8111 chipset.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Docs say it should come with Intel NIC however mine seems to come with Realtek 8111 chipset.

need actual loaded driver and dependencies from booted linux os lsmod

Choose a reason for hiding this comment

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

driver is r8169. No listed dependencies.

CONFIG_MOBILE_TETHERING=y
#Runtime on-demand additional hardware support (modules.cpio)
#export CONFIG_LINUX_USB_COMPANION_CONTROLLER=y
#Pack but not use USB keyboard support by default (Needs runtime+ flash under config menu)
export CONFIG_SUPPORT_USB_KEYBOARD=y



#Modules packed into tools.cpio
CONFIG_CRYPTSETUP2=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
#Runtime tools to write to MSR
CONFIG_MSRTOOLS=y
#Remote attestation support
# TPM2 requirements
CONFIG_TPM2_TSS=y
CONFIG_OPENSSL=y
#Remote Attestation common tools
CONFIG_POPT=y
CONFIG_QRENCODE=y
CONFIG_TPMTOTP=y
#HOTP based remote attestation for supported USB Security dongle
#With/Without TPM support
CONFIG_HOTPKEY=y
#Nitrokey Storage admin tool (deprecated)
#CONFIG_NKSTORECLI=n
#GUI Support
#Console based Whiptail support(Console based, no FB):
#CONFIG_SLANG=y
#CONFIG_NEWT=y
#FBWhiptail based (Graphical):
CONFIG_CAIRO=y
CONFIG_FBWHIPTAIL=y
#Additional tools (tools.cpio):
#SSH server (requires ethernet drivers, eg: CONFIG_LINUX_E1000E)
#CONFIG_DROPBEAR=y


#Runtime configuration
#Automatically boot if HOTP is valid
export CONFIG_AUTO_BOOT_TIMEOUT=5
#TPM2 requirements
export CONFIG_TPM2_TOOLS=y
export CONFIG_PRIMARY_KEY_TYPE=ecc
#TPM1 requirements
#export CONFIG_TPM=y
export CONFIG_BOOTSCRIPT=/bin/gui-init
#text-based original init:
#export CONFIG_BOOTSCRIPT=/bin/generic-init
export CONFIG_BOOT_REQ_HASH=n
export CONFIG_BOOT_REQ_ROLLBACK=n
export CONFIG_BOOT_KERNEL_ADD=""
export CONFIG_BOOT_KERNEL_REMOVE=""
export CONFIG_BOOT_DEV="/dev/nvme0n1p1"
export CONFIG_BOARD_NAME="Galago Pro 5"
export CONFIG_FLASHROM_OPTIONS="-p internal"

export CONFIG_AUTO_BOOT_TIMEOUT=5
Loading