Skip to content

Commit

Permalink
nv41/ns50: coreboot+coreboot patch+CircleCI config: adapt to have nv4…
Browse files Browse the repository at this point in the history
…1/ns50 build on top of #1417 and #1462
  • Loading branch information
tlaurion authored and daringer committed Aug 30, 2023
1 parent 0565780 commit 9561728
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 7 deletions.
31 changes: 25 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,23 +215,35 @@ workflows:
# version. The last board in the sequence is the dependency
# for the parallel boards built at the end, and also save_cache.

# Coreboot 4.19
# coreboot 4.19
- build_and_persist:
name: x230-hotp-maximized
target: x230-hotp-maximized
subcommand: ""
requires:
- prep_env

# Coreboot 4.17
# coreboot-git librems
- build_and_persist:
name: librem_14
target: librem_14
subcommand: ""
requires:
- x230-hotp-maximized

# Coreboot for Talos (PPC)
# coreboot-git 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
# No need to wait further for other board's cache.
# We reuse built modules from x230-hotp-maximized cache only
- build_and_persist:
name: nitropad-nv41
target: nitropad-nv41
subcommand: ""
requires:
- x230-hotp-maximized

# coreboot-git Talos II (PPC)
- build_and_persist:
name: talos-2
arch: ppc64
Expand All @@ -243,10 +255,9 @@ workflows:
#Cache one workspace per architecture. Make sure workspace caches are chainloaded and the last in chain for an arch is saved.
- save_cache:
requires:
- librem_14
- talos-2
- nitropad-nv41

#
#
# Those onboarding new boards should add their entries below.
#
Expand Down Expand Up @@ -498,7 +509,7 @@ workflows:
requires:
- x230-hotp-maximized

#Coreboot 4.17 boards
#coreboot-git librem boards
- build:
name: librem_13v2
target: librem_13v2
Expand Down Expand Up @@ -541,6 +552,14 @@ workflows:
requires:
- librem_14

#coreboot-git dasharo clevo_release + staging IASL patch
- build:
name: nitropad-ns50
target: nitropad-ns50
subcommand: ""
requires:
- nitropad-nv41

# - build:
# name: UNTESTED_kgpe-d16_workstation-usb_keyboard
# target: UNTESTED_kgpe-d16_workstation-usb_keyboard
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,17 @@ define define_module =
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \
echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \
git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) && \
git -C "$(build)/$($1_base_dir)" reset --hard HEAD^ && \
echo "git fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no" && \
git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no && \
echo "git reset --hard $($1_commit_hash)" && \
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && \
echo "git clean" && \
git -C "$(build)/$($1_base_dir)" clean -df && \
git -C "$(build)/$($1_base_dir)" clean -dffx payloads util/cbmem && \
echo "git submodule sync" && \
git -C "$(build)/$($1_base_dir)" submodule sync && \
echo "git submodule update" && \
git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
fi
Expand Down
9 changes: 9 additions & 0 deletions modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ coreboot-purism_repo := https://source.puri.sm/firmware/coreboot.git
coreboot-purism_commit_hash := a899f08d2789db1dd9b02cff34179c4d38e6d0e3
$(eval $(call coreboot_module,purism,))

#Nitrokey nv41/ns50 are based on Dasharo coreboot port,
# with patches staging under coreboot-clevo_release
coreboot-nitrokey_repo := https://github.com/dasharo/coreboot
coreboot-nitrokey_commit_hash := ae10b20f5c6abc9c23f709b65c46be6525da8c13
coreboot-nitrokey_patch_version := clevo_release
#We use clevo_release's crossgcc for now, unshared but between nitropad nv41/ns50
$(eval $(call coreboot_module,nitrokey,))

# Check that the board configured the coreboot version correctly
ifeq "$(CONFIG_COREBOOT_VERSION)" ""
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
Expand All @@ -99,6 +107,7 @@ coreboot_dir := $($(coreboot_module)_dir)
coreboot_base_dir := $($(coreboot_module)_base_dir)

$(coreboot_module)_depends += $(if $(CONFIG_PURISM_BLOBS), purism-blobs)
$(coreboot_module)_depends += $(if $(CONFIG_NITROKEY_BLOBS), nitrokey-blobs)

# coreboot builds are specialized on a per-target basis.
# The builds are done in a per-target subdirectory
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 6328eebb101fd0ded7168e1377da6a1a82a8e2da Mon Sep 17 00:00:00 2001
From: Markus Meissner <[email protected]>
Date: Wed, 19 Jul 2023 20:36:57 +0200
Subject: [PATCH] change acpica-unix2 location to a mirror

---
util/crossgcc/buildgcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 03c24da1be9..8880c89ea66 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -52,7 +52,7 @@ MPFR_ARCHIVE="https://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz"
MPC_ARCHIVE="https://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz"
GCC_ARCHIVE="https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz"
BINUTILS_ARCHIVE="https://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz"
-IASL_ARCHIVE="https://acpica.org/sites/acpica/files/acpica-unix2-${IASL_VERSION}.tar.gz"
+IASL_ARCHIVE="https://gsdview.appspot.com/chromeos-localmirror/distfiles/acpica-unix2-${IASL_VERSION}.tar.gz"
# CLANG toolchain archive locations
LLVM_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/llvm-${CLANG_VERSION}.src.tar.xz"
CLANG_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/clang-${CLANG_VERSION}.src.tar.xz"

0 comments on commit 9561728

Please sign in to comment.