Skip to content

Commit 2c3987f

Browse files
authored
Merge pull request #1485 from Nitrokey/nx-nitropad
add Nitropad NV41/NS50 TPM2 boards (2nd)
2 parents 54bce87 + 2cc7164 commit 2c3987f

File tree

16 files changed

+5397
-8
lines changed

16 files changed

+5397
-8
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: 8 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
@@ -527,6 +533,7 @@ bin_modules-$(CONFIG_KBD) += kbd
527533
bin_modules-$(CONFIG_ZSTD) += zstd
528534
bin_modules-$(CONFIG_E2FSPROGS) += e2fsprogs
529535
bin_modules-$(CONFIG_EXFATPROGS) += exfatprogs
536+
bin_modules-$(CONFIG_IOTOOLS) += iotools
530537

531538
$(foreach m, $(bin_modules-y), \
532539
$(call map,initrd_bin_add,$(call bins,$m)) \
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Nitrokey Nitropad NS51 board configuration
2+
3+
export CONFIG_COREBOOT=y
4+
export CONFIG_COREBOOT_VERSION=nitrokey
5+
export CONFIG_LINUX_VERSION=6.1.8
6+
7+
CONFIG_COREBOOT_CONFIG=config/coreboot-nitropad-ns50.config
8+
CONFIG_LINUX_CONFIG=config/linux-nitropad-x.config
9+
10+
CONFIG_NITROKEY_BLOBS=y
11+
12+
CONFIG_KEXEC=y
13+
CONFIG_QRENCODE=y
14+
CONFIG_TPMTOTP=y
15+
CONFIG_POPT=y
16+
CONFIG_FLASHTOOLS=y
17+
CONFIG_FLASHROM=y
18+
CONFIG_PCIUTILS=y
19+
CONFIG_UTIL_LINUX=y
20+
CONFIG_CRYPTSETUP2=y
21+
CONFIG_GPG2=y
22+
CONFIG_LVM2=y
23+
CONFIG_MBEDTLS=y
24+
25+
CONFIG_IOTOOLS=y
26+
27+
CONFIG_DROPBEAR=y
28+
29+
CONFIG_MSRTOOLS=y
30+
CONFIG_HOTPKEY=y
31+
32+
CONFIG_CAIRO=y
33+
CONFIG_FBWHIPTAIL=y
34+
35+
CONFIG_LINUX_USB=y
36+
37+
CONFIG_LINUX_E1000=y
38+
39+
export CONFIG_BOOTSCRIPT=/bin/gui-init
40+
41+
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=igfx_off"
42+
export CONFIG_BOOT_KERNEL_REMOVE="intel_iommu=on intel_iommu=igfx_off"
43+
44+
# TPM2 requirements
45+
export CONFIG_TPM2_TOOLS=y
46+
export CONFIG_PRIMARY_KEY_TYPE=ecc
47+
CONFIG_TPM2_TSS=y
48+
CONFIG_OPENSSL=y
49+
50+
export CONFIG_TPM_NO_LUKS_DISK_UNLOCK=y
51+
52+
export CONFIG_BOOT_DEV="/dev/nvme0n1"
53+
export CONFIG_BOARD_NAME="Nitropad NS50"
54+
export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal"
55+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Nitrokey Nitropad NV41 board configuration
2+
3+
export CONFIG_COREBOOT=y
4+
export CONFIG_COREBOOT_VERSION=nitrokey
5+
export CONFIG_LINUX_VERSION=6.1.8
6+
7+
CONFIG_COREBOOT_CONFIG=config/coreboot-nitropad-nv41.config
8+
CONFIG_LINUX_CONFIG=config/linux-nitropad-x.config
9+
10+
CONFIG_NITROKEY_BLOBS=y
11+
12+
CONFIG_KEXEC=y
13+
CONFIG_QRENCODE=y
14+
CONFIG_TPMTOTP=y
15+
CONFIG_POPT=y
16+
CONFIG_FLASHTOOLS=y
17+
CONFIG_FLASHROM=y
18+
CONFIG_PCIUTILS=y
19+
CONFIG_UTIL_LINUX=y
20+
CONFIG_CRYPTSETUP2=y
21+
CONFIG_GPG2=y
22+
CONFIG_LVM2=y
23+
CONFIG_MBEDTLS=y
24+
25+
CONFIG_IOTOOLS=y
26+
27+
CONFIG_DROPBEAR=y
28+
29+
CONFIG_MSRTOOLS=y
30+
CONFIG_HOTPKEY=y
31+
32+
CONFIG_CAIRO=y
33+
CONFIG_FBWHIPTAIL=y
34+
35+
CONFIG_LINUX_USB=y
36+
37+
CONFIG_LINUX_E1000=y
38+
39+
export CONFIG_BOOTSCRIPT=/bin/gui-init
40+
41+
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=igfx_off"
42+
export CONFIG_BOOT_KERNEL_REMOVE="intel_iommu=on intel_iommu=igfx_off"
43+
44+
# TPM2 requirements
45+
export CONFIG_TPM2_TOOLS=y
46+
export CONFIG_PRIMARY_KEY_TYPE=ecc
47+
CONFIG_TPM2_TSS=y
48+
CONFIG_OPENSSL=y
49+
50+
export CONFIG_TPM_NO_LUKS_DISK_UNLOCK=y
51+
52+
export CONFIG_BOOT_DEV="/dev/nvme0n1"
53+
export CONFIG_BOARD_NAME="Nitropad NV41"
54+
export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal"
55+

0 commit comments

Comments
 (0)