From e214537acde17c9a37417fe5256df1f8280b81a9 Mon Sep 17 00:00:00 2001 From: Alexandru Costache Date: Thu, 10 Oct 2024 15:33:17 +0000 Subject: [PATCH] tegra-binaries/tegra-nvpmodel: Use bind-mounted path for configuration file ... and print active power model to the journal Signed-off-by: Alexandru Costache --- .../tegra-nvpmodel/nvpmodel-os-deps.conf | 6 ++++++ .../tegra-binaries/tegra-nvpmodel_36.3.0.bbappend | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel/nvpmodel-os-deps.conf create mode 100644 layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel_36.3.0.bbappend diff --git a/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel/nvpmodel-os-deps.conf b/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel/nvpmodel-os-deps.conf new file mode 100644 index 00000000..50e39413 --- /dev/null +++ b/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel/nvpmodel-os-deps.conf @@ -0,0 +1,6 @@ +[Unit] +After=etc-nvpmodel\x2dconfig.mount os-power-mode.service +Requires=etc-nvpmodel\x2dconfig.mount os-power-mode.service + +[Service] +ExecStartPost=/usr/bin/os-power-mode -q diff --git a/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel_36.3.0.bbappend b/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel_36.3.0.bbappend new file mode 100644 index 00000000..44b52642 --- /dev/null +++ b/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-nvpmodel_36.3.0.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/tegra-nvpmodel:" + +SRC_URI += " \ + file://nvpmodel-os-deps.conf \ +" + +do_install:append() { + install -d -m 0755 ${D}${libdir}/systemd/system/nvpmodel.service.d + install -m 0644 ${WORKDIR}/nvpmodel-os-deps.conf \ + ${D}${libdir}/systemd/system/nvpmodel.service.d/ + + sed -i 's|/etc/nvpmodel.conf|/etc/nvpmodel-config/nvpmodel.conf|g' ${D}${systemd_system_unitdir}/nvpmodel.service +} + +FILES:${PN}:append = " /usr/lib/systemd/system/nvpmodel.service.d/nvpmodel-os-deps.conf "