-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dynamic-layers/meta-mender-tegra: add bbappend for libubootenv-fake
which uses tegra-boot-tools for getting the current boot slot. Signed-off-by: Matt Madison <matt@madison.systems>
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...-support/dynamic-layers/meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake/fw_printenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
...a-support/dynamic-layers/meta-mender-tegra/recipes-bsp/u-boot/libubootenv-fake_%.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" | ||
|
||
RDEPENDS_${PN} += "tegra-boot-tools" |