Files
meta-tegra/recipes-core/initrdscripts/tegra-minimal-init/platform-preboot-cboot.sh
Matt Madison 74af7320d3 meta: unify initramfs and initrdscripts recipes
and name them with prefix 'tegra' instead of 'tegraXXX',
since they apply across multiple tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-12-25 07:18:42 -08:00

19 lines
433 B
Bash

slotsfx=""
mayberoot=""
for bootarg in `cat /proc/cmdline`; do
case "$bootarg" in
boot.slot_suffix=*) slotsfx="${bootarg##boot.slot_suffix=}" ;;
root=*) mayberoot="${bootarg##root=}" ;;
ro) opt="ro" ;;
rootwait) wait="yes" ;;
esac
done
rootdev=`blkid -l -t PARTLABEL=APP$slotsfx | cut -d: -f1`
if [ -z "$rootdev" ]; then
if [ -n "$mayberoot" ]; then
rootdev="$mayberoot"
else
rootdev="/dev/mmcblk0p1"
fi
fi