Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
69 changes: 69 additions & 0 deletions docs/example.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
SUMMARY = "foobar - The example project"
DESCRIPTION = "\
foobar is an example project, used when you need to communicate concepts to \
developers."
HOMEPAGE = "https://github.com/ni/meta-nilrt"
SECTION = "test"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"


# ==============================================================================
# RECIPE VARIABLES
# ==============================================================================

# If the recipe sources are entirely within OE, we can set the package version
# to match the DISTRO_VERSION.
# PV = "${DISTRO_VERSION}"


# ==============================================================================
# SOURCE VARIABLES
# ==============================================================================

SRC_URI = "\
file://foo-file.1 \
file://foo-file.2 \
file://foo.initd \
"

S = "${UNPACKDIR}"


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

# UPDATE-RC.D
inherit update-rc.d
INITSCRIPT_PARAMS = "default"
INITSCRIPT = "foo"


# ==============================================================================
# TASKS
# ==============================================================================

pkglibdir = "${libdir}/${BPN}"

do_install () {
install -d ${D}${sysconfdir}/init.d
install foo.initd ${D}${sysconfdir}/init.d/foo

install -d ${D}${pkglibdir}
install --mode=0755 foo-file.1 ${D}${pkglibdir}/foo-file.1
install --mode=0744 foo-file.2 ${D}${pkglibdir}/foo-file.2
}


# ==============================================================================
# PACKAGING
# ==============================================================================
# FOO
RDEPENDS:${PN} = "bash"


# ==============================================================================
# CLASS EXTENSIONS
# ==============================================================================
# BBCLASSEXTEND = "native"
58 changes: 0 additions & 58 deletions docs/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,61 +138,3 @@ At a minimum, you should add an additional message trailer declaring the [upstre
#### .patch file names

When bitbake applies `.patch` files to a recipe, it copies all `.patch` files into the recipe's workspace, then applies them in alphanumeric-order. In your PR, be mindful of how your `.patch` file is ordered versus the other files in the recipe. Keep in mind that some `.patch` files might come from other layers.


# Example Recipe
This is an example recipe for a package whose source is contained in the meta-nilrt layer.

`.../foobar/`
```
foobar/
|- files/
| |- foo-file.1
| |- foo-file.2
| \- foo.initd
\- foobar.bb
```
----
`.../foobar/foobar.bb`
```
SUMMARY = "foobar - The example project"
DESCRIPTION = "\
foobar is an example project, used when you need to communicate concepts to \
developers."
HOMEPAGE = "https://github.com/ni/meta-nilrt"
SECTION = "test"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"


PV = "1.0"


SRC_URI = "\
file://foo-file.1 \
file://foo-file.2 \
file://foo.initd \
"

S = "${UNPACKDIR}"


inherit update-rc.d
INITSCRIPT_PARAMS = "default"
INITSCRIPT = "foo"


prefix_lib=${libdir}/${BPN}

do_install () {
install -d ${D}${sysconfdir}/init.d
install foo.initd ${D}${sysconfdir}/init.d/foo

install -d ${D}${prefix_lib}
install --mode=0755 foo-file.1 ${D}${prefix_lib}/foo-file.1
install --mode=0744 foo-file.2 ${D}${prefix_lib}/foo-file.2
}


RDEPENDS:${PN} = "bash"
```
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-runmode-bootimage.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

set consoleparam='console=tty0 console=ttyS0,115200n8'
set kernel_path='/runmode/bzImage'
set ramdisk_path='/runmode/ramdisk.xz'

set otherbootargs="rootwait rw usbcore.usbfs_memory_mb=0 consoleblank=0 rcu_nocbs=all ibt=off "

Expand Down
58 changes: 36 additions & 22 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 Expand Up @@ -125,30 +126,33 @@ function setterminal {
}

function check_valid_os {
#safemode
for file in $safemode_files
do
if [ ! -f /.safe/$file ]; then
set valid_safemode=0
break
fi
done

#runmode
for file in $runmode_files
do
if [ ! -f /runmode/$file ]; then
set valid_runmode=0
break
fi
done
# Safemode
if [ ! -d /.safe ]; then
set valid_safemode=0
else
for file in $safemode_files
do
if [ ! -f /.safe/$file ]; then
set valid_safemode=0
break
fi
done
fi

if [ $valid_safemode = 0 -a $valid_runmode = 0 ]; then
set fail_state=1
# Runmode
if [ ! -d /runmode ]; then
set valid_runmode=0
else
for file in $runmode_files
do
if [ ! -f /runmode/$file ]; then
set valid_runmode=0
break
fi
done
fi

# rootuuid is only generated at system provision - treat missing value as requiring recovery
if [ "$rootuuid" = "" ]; then
if [ $valid_safemode = 0 -a $valid_runmode = 0 ]; then
set fail_state=1
fi
}
Expand All @@ -165,7 +169,15 @@ function boot_runmode {
setconsoleparam
setusbgadgetparam

linux $kernel_path root=PARTUUID=$rootuuid $otherbootargs $usb_gadget_args $kernellogparam $consoleparam $othbootargs sys_reset=$sys_reset
if [ -n "$ramdisk_path" ]; then
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.

The reason we have if/else here is because we want to support old BSIs without ramdisk?
And that's also the reason we're not adding ramdisk.xz to runmode_files?

I'm wondering if we should also check for existence of ramdisk_path (if it's set) in check_valid_os.

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.

That's correct.

ramdisk_path is set in the bootmode's bootimage.cfg file, which is already checked to exist in the validation steps. So I think we can assume that the contents of that file are correct. Legacy runmode bootimage.cfg files don't set ramdisk_path at all.

echo 'Loading Linux ...'
linux $kernel_path $otherbootargs $usb_gadget_args $kernellogparam $consoleparam $othbootargs sys_reset=$sys_reset
echo 'Loading initial ramdisk ...'
initrd $ramdisk_path
else
echo 'Loading Linux ...'
linux $kernel_path root=PARTUUID=$rootuuid $otherbootargs $usb_gadget_args $kernellogparam $consoleparam $othbootargs sys_reset=$sys_reset
fi
}

function boot_safemode {
Expand All @@ -180,7 +192,9 @@ function boot_safemode {
setconsoleparam
setusbgadgetparam

echo 'Loading Linux ...'
linux $kernel_path $rootfs_path $otherbootargs $usb_gadget_args $kernellogparam $consoleparam $othbootargs sys_reset=$sys_reset
echo 'Loading safemode ramdisk ...'
initrd $ramdisk_path
}

Expand Down
30 changes: 0 additions & 30 deletions recipes-bsp/grub/grub/grub.cfg

This file was deleted.

Loading