Skip to content

Commit

Permalink
fix: Tegra, Jetpack 5: PR feedback on AGX Xavier working target
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-westgaard committed Feb 13, 2024
1 parent 5a1f806 commit 3150349
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 171 deletions.
2 changes: 1 addition & 1 deletion meta-mender-tegra/meta-mender-tegra-jetpack5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Mender integration layer for NVIDIA Tegra hardware.
The supported and tested boards are:

- AGX Orin
- AGX Jetson
- AGX Xavier

Visit the individual board links above for more information on status of the
integration and more detailed instructions on how to build and use images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ PREFERRED_PROVIDER_libubootenv:tegra234 = "libubootenv-fake"
PREFERRED_PROVIDER_libubootenv:tegra194 = "libubootenv-fake"
MENDER_FEATURES_DISABLE:append:tegra194 = " mender-uboot"

# Enable redundant flash layout for mender
USE_REDUNDANT_FLASH_LAYOUT_DEFAULT = "1"

# Note: this isn't really a boot file, just put it here to keep the mender build from
# complaining about empty IMAGE_BOOT_FILES. We won't use the full image anyway, just the mender file
IMAGE_BOOT_FILES = "u-boot-dtb.bin"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DEPENDS += "mender-custom-flash-layout"
MENDER_PARTITION_FILE = "${STAGING_DATADIR}/mender-flash-layout/flash_mender.xml"
PARTITION_FILE = "${MENDER_PARTITION_FILE}"

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,13 @@ EXTRADEPS:tegra194 = "tegra-bup-payload libubootenv-fake mender-update-verifier"
EXTRADEPS:tegra234 = "tegra-bup-payload libubootenv-fake mender-update-verifier"
RDEPENDS:${PN} += "${EXTRADEPS}"

FILESEXTRAPATHS:prepend:tegra234 := "${THISDIR}/files/tegra234:"
FILESEXTRAPATHS:prepend:tegra194 := "${THISDIR}/files/tegra194:"

SRC_URI:remove:mender-persist-systemd-machine-id = " \
file://mender-client-set-systemd-machine-id.sh \
"
SRC_URI:append:tegra234:mender-persist-systemd-machine-id = " \
file://tegra234-mender-client-set-systemd-machine-id.sh \
file://efi_systemd_machine_id.sh \
"
SRC_URI:append:tegra194:mender-persist-systemd-machine-id = " \
file://tegra194-mender-client-set-systemd-machine-id.sh \
file://efi_systemd_machine_id.sh \
"

do_install:prepend:tegra234:class-target:mender-persist-systemd-machine-id() {
install -d -m 755 ${D}${bindir}
install -m 755 ${WORKDIR}/efi_systemd_machine_id.sh ${D}${bindir}/
cp ${WORKDIR}/tegra234-mender-client-set-systemd-machine-id.sh ${WORKDIR}/mender-client-set-systemd-machine-id.sh
}
do_install:prepend:tegra194:class-target:mender-persist-systemd-machine-id() {
do_install:prepend:class-target:mender-persist-systemd-machine-id() {
install -d -m 755 ${D}${bindir}
install -m 755 ${WORKDIR}/efi_systemd_machine_id.sh ${D}${bindir}/
cp ${WORKDIR}/tegra194-mender-client-set-systemd-machine-id.sh ${WORKDIR}/mender-client-set-systemd-machine-id.sh
}
cp ${WORKDIR}/mender-client-set-systemd-machine-id.sh ${WORKDIR}/mender-client-set-systemd-machine-id.sh
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ get_bootpart() {
reset_unbootable_status() {
local AB="AB"
local slot="Slot${AB:$1:1}"
local varname="/opt/nvidia/esp/EFI/NVDA/Variables/RootfsStatus${slot}-781e084c-a330-417c-b678-38e696380cb9"
local varname="781e084c-a330-417c-b678-38e696380cb9-RootfsStatus${slot}"

local f=$(mktemp)
printf "\x07\x00\x00\x00\x00\x00\x00\x00" > $f
dd if=$f of=$varname
printf "\x00\x00\x00\x00" > $f
efivar -n "${varname}" -f $f -w
rm ${f}
}

Expand All @@ -35,6 +35,7 @@ fi

echo "next_slot=$next_slot" >&2
nvbootctrl set-active-boot-slot $next_slot
oe4t-set-uefi-OSIndications
reset_unbootable_status $next_slot

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fi

echo "next_slot=$next_slot" >&2
nvbootctrl set-active-boot-slot $next_slot
oe4t-set-uefi-OSIndications
reset_unbootable_status $next_slot

exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7ca

S = "${WORKDIR}"

RDEPENDS:${PN} = "tegra-uefi-capsules"

inherit mender-state-scripts

PERSIST_MACHINE_ID=""
Expand Down

0 comments on commit 3150349

Please sign in to comment.