Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a49f85f
extra_x64: Enable TPM and TPM2 CONFIG options
usercw88 Jan 9, 2026
c5926be
x64.conf: add tpm2 to MACHINE_FEATURES
Jan 13, 2026
9ba2c52
grub-efi: styling cleanups
Jan 12, 2026
72d8278
grub-efi: add tpm module
Jan 12, 2026
acf44e4
grub-efi: remove warning suppression
Jan 12, 2026
c2f1c1c
grub: enable measured boot
Jan 12, 2026
2c5a9f2
pkggrp-ni-base: add TPM/crypt utils
Jan 20, 2026
2c307a8
grub: remove unused RAUC parts
Jan 21, 2026
cfc4a78
jose: add jose library recipe
Feb 2, 2026
24bd889
luksmeta: add recipe at version 10
Feb 2, 2026
e606869
clevis: add clevis package at v21
Feb 2, 2026
41e4d7c
add clevis to NILRT
Feb 2, 2026
c9e7ea5
ovmf: ouptut raw OVMF images
Feb 3, 2026
cfabb7a
fstab: mount securityfs
Feb 23, 2026
c9e0de9
initrdscripts: create init-nilrt-runmode-initramfs
Mar 12, 2026
a6f50ac
initrdscripts: remove init-nilrt-ramfs
Mar 12, 2026
88cfe40
images: Add NILRT x64 runmode initramfs
Feb 23, 2026
26347ac
docs: update and break out example bb recipe
Mar 4, 2026
652c60c
docs/example.bb: suggest using DISTRO_VERSION for PV
Mar 12, 2026
3ee544a
recipes-ni: add ni-device-encryption recipe
Mar 4, 2026
24bc292
pkggrp-ni-restoremode: remove tpm-tis module
Mar 6, 2026
d29db46
pkggrps: add ni-device-encryption to base and initramfs
Mar 12, 2026
8b4a3ea
pkgfeed-ni-core: build init-nilrt-runmode-initramfs
Mar 18, 2026
ebd6832
nilrt-runmode-rootfs: add ramdisk.xz to bootfs
Mar 18, 2026
478655a
grub: boot the runmode initramfs
Mar 12, 2026
9d60fb9
grub: suppress error about missing runmode
Mar 23, 2026
2eba478
nilrt-runmode-rootfs: cleanup /boot files in arm BSI
rajendra-desai-ni Mar 2, 2026
1eff31f
BSI: stage ARM runmode ITB to prevent bricked targets on BSI failure
Shreejit-03 Mar 5, 2026
6d06b0e
nilrt-bsi.postinst: remove pre-8.0 safemode logic
Shreejit-03 Mar 5, 2026
154e4c0
pkggrps: clean up tpm package declarations
Mar 24, 2026
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
2 changes: 2 additions & 0 deletions conf/machine/x64.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ DEFAULTTUNE ?= "core2-64"
require conf/machine/include/x86/tune-core2.inc
require conf/machine/include/x86/x86-base.inc

MACHINE_FEATURES:append = " tpm2"

XSERVER = "\
${XSERVER_X86_BASE} \
${XSERVER_X86_EXT} \
Expand Down
1 change: 1 addition & 0 deletions files/group
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ni:x:500:
openvpn:x:499:
niwscerts:x:498:
# free space
clevis:x:405:
krill:x:404:
xrdp:x:403:
arpwatch:x:402:
Expand Down
1 change: 1 addition & 0 deletions files/passwd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ webserv:x:501::::
lvuser:x:500::::
openvpn:x:499::::
# free space
clevis:x:405::::
krill:x:404::::
xrdp:x:403::::
arpwatch:x:402::::
Expand Down
26 changes: 0 additions & 26 deletions recipes-bsp/grub/grub-bootconf_%.bbappend

This file was deleted.

50 changes: 39 additions & 11 deletions recipes-bsp/grub/grub-efi_2.%.bbappend
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
require grub-nilrt.inc

GRUB_BUILDIN += "smbios chain multiboot efi_uga font gfxterm gfxmenu terminal \
minicmd iorw echo reboot terminfo loopback memdisk tar help serial \
ls search_fs_uuid udf btrfs ntfs reiserfs xfs lvm ata \
regexp probe"

# Downstream NI-branch code quality is not yet ready to build with -Werror
CFLAGS:append = " -Wno-error"
GRUB_BUILDIN:append = " \
ata \
btrfs \
chain \
echo \
efi_uga \
font \
gfxmenu \
gfxterm \
help \
iorw \
loopback \
ls \
lvm \
memdisk \
minicmd \
multiboot \
ntfs \
probe \
reboot \
regexp \
reiserfs \
search_fs_uuid \
serial \
smbios \
tar \
terminal \
terminfo \
tpm \
udf \
xfs \
"

PACKAGES:prepend = "${PN}-nilrt "

Expand All @@ -17,10 +42,13 @@ do_install:append:class-target() {
# unchanged so that we may use it with USB provisioning tool
# and other removable storage.
(
cd "${B}"
grub-mkimage -p /efi/nilrt -d ./grub-core/ \
-O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}nilrt-${GRUB_IMAGE} \
${GRUB_BUILDIN}
cd "${B}"
grub-mkimage \
--prefix=/efi/nilrt \
--directory=./grub-core/ \
--format=${GRUB_TARGET}-efi \
--output=./${GRUB_IMAGE_PREFIX}nilrt-${GRUB_IMAGE} \
${GRUB_BUILDIN}
)

# Install NILRT grub image
Expand Down
1 change: 0 additions & 1 deletion recipes-bsp/grub/grub-nilrt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ SRC_URI += "\
file://cmd-test-Add-bitwise-AND-document-the-feature.patch \
file://grub-advertise-NI-NILRT-over-GNU-GRUB.patch \
file://add-inbit-command-to-io-module.patch \
file://grub.cfg \
file://cfg \
file://grub.d \
"
Expand Down
1 change: 1 addition & 0 deletions recipes-bsp/grub/grub/grub-safemode.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ set sys_reset=false
set system_manufacturer=""
set smbios_bootmode=0
set smbios_tablelen=0
set measure_on=true

# Set the root variable to NI's bootfs partition
search --set root --label nibootfs
Expand Down
30 changes: 0 additions & 30 deletions recipes-bsp/grub/grub/grub.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions recipes-core/packagegroups/packagegroup-ni-base.bb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ RDEPENDS:${PN}:append:x64 = "\
efibootmgr \
efivar \
pstore-save \
clevis \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: not sorted. Maybe break out tpm related packages into their own RDEPENDS:${PN}:append:x64 section if we want to keep them together?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It gets fixed up by the final commit in the patchset. These items are moved into packagegroup-ni-tpm.

cryptsetup \
libtss2-tcti-device \
tpm2-tools \
"

RDEPENDS:${PN}:append:xilinx-zynq = "\
Expand Down
3 changes: 3 additions & 0 deletions recipes-core/packagegroups/packagegroup-ni-tpm.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ inherit packagegroup

RDEPENDS:${PN} = "\
packagegroup-security-tpm2 \
clevis \
cryptsetup \
libtss2-tcti-device \
tpm2-tools \
"
10 changes: 10 additions & 0 deletions recipes-kernel/linux/files/extra_x64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ CONFIG_HWMON_VID=m
CONFIG_HWPOISON_INJECT=m
CONFIG_HW_RANDOM_BA431=m
CONFIG_HW_RANDOM_TIMERIOMEM=m
CONFIG_HW_RANDOM_TPM=m
CONFIG_HW_RANDOM_XIPHERA=m
CONFIG_HX711=m
CONFIG_HYPERV_VSOCKETS=m
Expand All @@ -1083,8 +1084,10 @@ CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD756_S4882=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_AMD_MP2=m
CONFIG_I2C_BOARDINFO=m
CONFIG_I2C_CBUS_GPIO=m
CONFIG_I2C_CHT_WC=m
CONFIG_I2C_COMPAT=m
CONFIG_I2C_CP2615=m
CONFIG_I2C_CROS_EC_TUNNEL=m
CONFIG_I2C_DIOLAN_U2C=m
Expand Down Expand Up @@ -2460,6 +2463,7 @@ CONFIG_RDS_RDMA=m
CONFIG_RDS_TCP=m
CONFIG_REALTEK_PHY=m
CONFIG_REED_SOLOMON=m
CONFIG_REGMAP_I2C=m
CONFIG_REGMAP_I3C=m
CONFIG_REGMAP_SCCB=m
CONFIG_REGMAP_SLIMBUS=m
Expand Down Expand Up @@ -2510,6 +2514,7 @@ CONFIG_RT2800_LIB_MMIO=m
CONFIG_RT2X00_LIB_MMIO=m
CONFIG_RT2X00_LIB_PCI=m
CONFIG_RT61PCI=m
CONFIG_RTC_I2C_AND_SPI=m
CONFIG_RTL8180=m
CONFIG_RTL8188EE=m
CONFIG_RTL8192CE=m
Expand Down Expand Up @@ -2656,6 +2661,7 @@ CONFIG_SCSI_WD719X=m
CONFIG_SDIO_UART=m
CONFIG_SDR_MAX2175=m
CONFIG_SD_ADC_MODULATOR=m
CONFIG_SECURITYFS=m
CONFIG_SEL3350_PLATFORM=m
CONFIG_SENSEAIR_SUNRISE_CO2=m
CONFIG_SENSIRION_SGP30=m
Expand Down Expand Up @@ -3065,8 +3071,11 @@ CONFIG_TAHVO_USB=m
CONFIG_TAP=m
CONFIG_TARGET_CORE=m
CONFIG_TCG_ATMEL=m
CONFIG_TCG_CRB=m
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as #957 we don't need CONFIG_TCG_CRB, CONFIG_TCG_TIS, CONFIG_TCG_TIS_CORE, CONFIG_TCG_TPM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have a commit from a later patchset that I will backport to fix this. But honestly, I'm considering just implementing the allmoddefconfig task that we discussed offline.

CONFIG_TCG_INFINEON=m
CONFIG_TCG_NSC=m
CONFIG_TCG_TIS=m
CONFIG_TCG_TIS_CORE=m
CONFIG_TCG_TIS_I2C=m
CONFIG_TCG_TIS_I2C_ATMEL=m
CONFIG_TCG_TIS_I2C_CR50=m
Expand All @@ -3076,6 +3085,7 @@ CONFIG_TCG_TIS_SPI=m
CONFIG_TCG_TIS_ST33ZP24=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
CONFIG_TCG_TIS_ST33ZP24_SPI=m
CONFIG_TCG_TPM=m
CONFIG_TCG_VTPM_PROXY=m
CONFIG_TCG_XEN=m
CONFIG_TCM_FC=m
Expand Down
67 changes: 67 additions & 0 deletions recipes-security/clevis/clevis_21.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
SUMMARY = "Clevis - Automated Encryption Framework"
DESCRIPTION = "Clevis is a pluggable framework for automated decryption. It \
can be used to provide automated decryption of data or even automated \
unlocking of LUKS volumes."
HOMEPAGE = "https://github.com/latchset/clevis"
SECTION = "security"
LICENSE = "GPL-3.0-or-later"
LIC_FILES_CHKSUM = "\
file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.openssl;md5=a78c00d154a43f35ef1dc1292a234c6d \
"


DEPENDS = "\
cryptsetup \
cryptsetup-native \
jansson \
jose \
keyutils-native \
"

SRC_URI = "\
https://github.com/latchset/clevis/releases/download/v${PV}/${BP}.tar.xz \
"
SRC_URI[sha256sum] = "a0388a544c77139dc751cdbf66bdd38fc29c43f9e81a1cdfd119c84109ffca3f"


# ==============================================================================
# BBCLASSES
# ==============================================================================

# CONFIGURATION AND BUILD
inherit meson pkgconfig

PACKAGECONFIG ??= ""
PACKAGECONFIG[docs] = ",, asciidoc-native"
PACKAGECONFIG[dracut] = ",, dracut, dracut"
PACKAGECONFIG[luks] = ",, luksmeta, cryptsetup jq"
PACKAGECONFIG[pkcs11] = ",, opensc-native, opensc"
PACKAGECONFIG[tpm2] = ",, tpm2-tools-native, tpm2-tools"
# TODO: Add support for systemd systems.
# initramfs-tools integration intentionally skipped due to no-support in OE.


inherit bash-completion


# PTESTING

inherit ptest

do_install_ptest () {
install -d ${D}${PTEST_PATH}
install -m 0744 ${S}/src/luks/tests/* ${D}${PTEST_PATH}
# TODO: more tests
}

RDEPENDS:${PN}-ptest += " bash cryptsetup"
RRECOMMENDS:${PN}-ptest += " jq keyutils"


# ==============================================================================
# PACKAGING
# ==============================================================================
# clevis
FILES:${PN} += " ${libdir}/dracut/*"
RDEPENDS:${PN} += " bash tpm2-tools"
1 change: 1 addition & 0 deletions recipes-security/clevis/clevis_21.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PACKAGECONFIG = "docs dracut luks pkcs11 tpm2"
33 changes: 33 additions & 0 deletions recipes-security/jose/jose_14.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
SUMMARY = "Jose - C-language implementation of Javascript Object Signing and \
Encryption"
DESCRIPTION = "José is a C-language implementation of the Javascript Object \
Signing and Encryption standards. Specifically. José is extensively tested \
against the RFC test vectors."
HOMEPAGE = "https://github.com/latchset/jose"
SECTION = "security"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "\
file://COPYING;md5=34400b68072d710fecd0a2940a0d1658 \
"

DEPENDS = "\
openssl \
jansson \
zlib \
"


SRC_URI = "\
https://github.com/latchset/jose/releases/download/v14/jose-14.tar.xz \
"
SRC_URI[sha256sum] = "cee329ef9fce97c4c025604a8d237092f619aaa9f6d35fdf9d8c9052bc1ff95b"


# ==============================================================================
# BBCLASSES
# ==============================================================================

inherit meson pkgconfig


BBCLASSEXTEND = "native"
29 changes: 29 additions & 0 deletions recipes-support/luksmeta/luksmeta_10.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SUMMARY = "LUKSMeta"
DESCRIPTION = "Welcome to LUKSMeta! LUKSMeta is a simple library for storing \
metadata in the LUKSv1 header. This library is licensed under the GNU LGPLv2+."
HOMEPAGE = "https://github.com/latchset/luksmeta"
SECTION = "security"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "\
file://COPYING;md5=4e9dfcb21c14eb0c40ae8ba436d3bb7a \
"

DEPENDS = "\
cryptsetup \
"


SRC_URI = "\
https://github.com/latchset/luksmeta/releases/download/v10/luksmeta-10.tar.bz2 \
"
SRC_URI[sha256sum] = "a842538ba39680c8319c41dac0bcc082fe40fb43342561761925c0daa1a48f28"


inherit autotools pkgconfig

# ==============================================================================
# PACKAGING
# ==============================================================================


BBCLASSEXTEND = "native"