Skip to content

Commit

Permalink
dynamic-layers/meta-mender-tegra: add bbappend for libubootenv-fake
Browse files Browse the repository at this point in the history
which uses tegra-boot-tools for getting the current
boot slot.

Signed-off-by: Matt Madison <matt@madison.systems>
  • Loading branch information
madisongh committed Dec 30, 2020
1 parent 4daff7b commit 62a558a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
quiet=
if [ "$1" = "-n" ]; then
quiet="yes"
shift
if [ -z "$1" ]; then
echo "ERR: missing var name with -n" >&2
exit 1
fi
fi
if [ -z "$1" ]; then
echo "mender_boot_part=`tegra-boot-control --current-slot`"
exit 0
fi
while [ -n "$1" ]; do
case "$1" in
mender_boot_part|mender_boot_part_hex)
[ -n "$quiet" ] || echo -n "$1="
tegra-boot-control --current-slot
;;
mender_uboot_separator)
[ -n "$quiet" ] || echo -n "$1="
echo "something other than just 1"
;;
upgrade_available)
[ -n "$quiet" ] || echo -n "$1="
if [ -e "/var/lib/mender/upgrade_available" ]; then
echo "1"
else
echo "0"
fi
;;
*)
echo "ERR: no such variable: $1" >&2
exit 1
esac
shift
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"

RDEPENDS_${PN} += "tegra-boot-tools"

0 comments on commit 62a558a

Please sign in to comment.