Skip to content

Commit 9561728

Browse files
tlauriondaringer
authored andcommitted
nv41/ns50: coreboot+coreboot patch+CircleCI config: adapt to have nv41/ns50 build on top of #1417 and #1462
1 parent 0565780 commit 9561728

File tree

4 files changed

+64
-7
lines changed

4 files changed

+64
-7
lines changed

.circleci/config.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,23 +215,35 @@ workflows:
215215
# version. The last board in the sequence is the dependency
216216
# for the parallel boards built at the end, and also save_cache.
217217

218-
# Coreboot 4.19
218+
# coreboot 4.19
219219
- build_and_persist:
220220
name: x230-hotp-maximized
221221
target: x230-hotp-maximized
222222
subcommand: ""
223223
requires:
224224
- prep_env
225225

226-
# Coreboot 4.17
226+
# coreboot-git librems
227227
- build_and_persist:
228228
name: librem_14
229229
target: librem_14
230230
subcommand: ""
231231
requires:
232232
- x230-hotp-maximized
233233

234-
# Coreboot for Talos (PPC)
234+
# coreboot-git Nitropads depending on x230-hotp-maximized cache
235+
# since kernel is 6.x and coreboot is git is unshared
236+
# We use nitropad's coreboot's fork crossgcc
237+
# No need to wait further for other board's cache.
238+
# We reuse built modules from x230-hotp-maximized cache only
239+
- build_and_persist:
240+
name: nitropad-nv41
241+
target: nitropad-nv41
242+
subcommand: ""
243+
requires:
244+
- x230-hotp-maximized
245+
246+
# coreboot-git Talos II (PPC)
235247
- build_and_persist:
236248
name: talos-2
237249
arch: ppc64
@@ -243,10 +255,9 @@ workflows:
243255
#Cache one workspace per architecture. Make sure workspace caches are chainloaded and the last in chain for an arch is saved.
244256
- save_cache:
245257
requires:
246-
- librem_14
247258
- talos-2
259+
- nitropad-nv41
248260

249-
#
250261
#
251262
# Those onboarding new boards should add their entries below.
252263
#
@@ -498,7 +509,7 @@ workflows:
498509
requires:
499510
- x230-hotp-maximized
500511

501-
#Coreboot 4.17 boards
512+
#coreboot-git librem boards
502513
- build:
503514
name: librem_13v2
504515
target: librem_13v2
@@ -541,6 +552,14 @@ workflows:
541552
requires:
542553
- librem_14
543554

555+
#coreboot-git dasharo clevo_release + staging IASL patch
556+
- build:
557+
name: nitropad-ns50
558+
target: nitropad-ns50
559+
subcommand: ""
560+
requires:
561+
- nitropad-nv41
562+
544563
# - build:
545564
# name: UNTESTED_kgpe-d16_workstation-usb_keyboard
546565
# target: UNTESTED_kgpe-d16_workstation-usb_keyboard

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,17 @@ define define_module =
304304
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
305305
elif [ "$$$$(cat "$$@")" != '$($1_repo)|$($1_commit_hash)' ]; then \
306306
echo "Switching $1 to $($1_repo) at $($1_commit_hash)" && \
307-
git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) && \
307+
git -C "$(build)/$($1_base_dir)" reset --hard HEAD^ && \
308+
echo "git fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no" && \
309+
git -C "$(build)/$($1_base_dir)" fetch $($1_repo) $($1_commit_hash) --recurse-submodules=no && \
310+
echo "git reset --hard $($1_commit_hash)" && \
308311
git -C "$(build)/$($1_base_dir)" reset --hard $($1_commit_hash) && \
312+
echo "git clean" && \
309313
git -C "$(build)/$($1_base_dir)" clean -df && \
310314
git -C "$(build)/$($1_base_dir)" clean -dffx payloads util/cbmem && \
315+
echo "git submodule sync" && \
311316
git -C "$(build)/$($1_base_dir)" submodule sync && \
317+
echo "git submodule update" && \
312318
git -C "$(build)/$($1_base_dir)" submodule update --init --checkout && \
313319
echo -n '$($1_repo)|$($1_commit_hash)' > "$$@"; \
314320
fi

modules/coreboot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ coreboot-purism_repo := https://source.puri.sm/firmware/coreboot.git
8585
coreboot-purism_commit_hash := a899f08d2789db1dd9b02cff34179c4d38e6d0e3
8686
$(eval $(call coreboot_module,purism,))
8787

88+
#Nitrokey nv41/ns50 are based on Dasharo coreboot port,
89+
# with patches staging under coreboot-clevo_release
90+
coreboot-nitrokey_repo := https://github.com/dasharo/coreboot
91+
coreboot-nitrokey_commit_hash := ae10b20f5c6abc9c23f709b65c46be6525da8c13
92+
coreboot-nitrokey_patch_version := clevo_release
93+
#We use clevo_release's crossgcc for now, unshared but between nitropad nv41/ns50
94+
$(eval $(call coreboot_module,nitrokey,))
95+
8896
# Check that the board configured the coreboot version correctly
8997
ifeq "$(CONFIG_COREBOOT_VERSION)" ""
9098
$(error "$(BOARD): does not specify coreboot version under CONFIG_COREBOOT_VERSION")
@@ -99,6 +107,7 @@ coreboot_dir := $($(coreboot_module)_dir)
99107
coreboot_base_dir := $($(coreboot_module)_base_dir)
100108

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

103112
# coreboot builds are specialized on a per-target basis.
104113
# The builds are done in a per-target subdirectory
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 6328eebb101fd0ded7168e1377da6a1a82a8e2da Mon Sep 17 00:00:00 2001
2+
From: Markus Meissner <[email protected]>
3+
Date: Wed, 19 Jul 2023 20:36:57 +0200
4+
Subject: [PATCH] change acpica-unix2 location to a mirror
5+
6+
---
7+
util/crossgcc/buildgcc | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
11+
index 03c24da1be9..8880c89ea66 100755
12+
--- a/util/crossgcc/buildgcc
13+
+++ b/util/crossgcc/buildgcc
14+
@@ -52,7 +52,7 @@ MPFR_ARCHIVE="https://ftpmirror.gnu.org/mpfr/mpfr-${MPFR_VERSION}.tar.xz"
15+
MPC_ARCHIVE="https://ftpmirror.gnu.org/mpc/mpc-${MPC_VERSION}.tar.gz"
16+
GCC_ARCHIVE="https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz"
17+
BINUTILS_ARCHIVE="https://ftpmirror.gnu.org/binutils/binutils-${BINUTILS_VERSION}.tar.xz"
18+
-IASL_ARCHIVE="https://acpica.org/sites/acpica/files/acpica-unix2-${IASL_VERSION}.tar.gz"
19+
+IASL_ARCHIVE="https://gsdview.appspot.com/chromeos-localmirror/distfiles/acpica-unix2-${IASL_VERSION}.tar.gz"
20+
# CLANG toolchain archive locations
21+
LLVM_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/llvm-${CLANG_VERSION}.src.tar.xz"
22+
CLANG_ARCHIVE="https://github.com/llvm/llvm-project/releases/download/llvmorg-${CLANG_VERSION}/clang-${CLANG_VERSION}.src.tar.xz"
23+

0 commit comments

Comments
 (0)