Skip to content

Commit

Permalink
jetson-qspi-helpers: Use device-specific name when setting efivars
Browse files Browse the repository at this point in the history
... so that the UEFI capsule update can be triggered based
on the actual device type.

Signed-off-by: Alexandru Costache <alexandru@balena.io>
  • Loading branch information
acostach committed Nov 28, 2024
1 parent 619e7ab commit 68a5cb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ RDEPENDS:${PN} += " bash "

inherit allarch systemd

COMPAT_SPEC_NAME="jetson-orin-nano-devkit"
COMPAT_SPEC_NAME:jetson-agx-orin-devkit="jetson-agx-orin-devkit"
COMPAT_SPEC_NAME:jetson-agx-orin-devkit-64gb="jetson-agx-orin-devkit"

SYSTEMD_SERVICE:${PN} = " \
jetson-qspi-manager.service \
"
Expand All @@ -30,6 +34,8 @@ do_install() {
install -m 0755 ${WORKDIR}/jetson-qspi-manager ${D}${bindir}/
install -m 0644 ${WORKDIR}/jetson-qspi-helpers ${D}/${libexecdir}/

sed -i -e 's,@ORIN_DEVICE_TYPE@,${COMPAT_SPEC_NAME},g' ${D}/${libexecdir}/jetson-qspi-helpers

if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system/
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ platform_compat_spec_efivar="${efivars_dir}TegraPlatformCompatSpec-781e084c-a330
os_indications_efivar="${efivars_dir}OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c"
tmp_file="/tmp/platformspecfile.bin"

device_type="jetson-orin-nano-devkit"
device_type="@ORIN_DEVICE_TYPE@"
boardspec=$(tegra-boardspec 2>/dev/null)
TegraPlatformSpec="${boardspec}-${device_type}-"
compatspec=$(echo "$boardspec" | gen_compat_spec)
Expand Down

0 comments on commit 68a5cb5

Please sign in to comment.