tegra-minimal-init: add platform-pre-switchroot

Optionally run any custom initialization just before
switching the rootfs.
This commit is contained in:
Bryan Cisneros
2020-07-23 03:15:04 -07:00
committed by Matt Madison
parent 05d7f4fc9d
commit 4d33518fe7

View File

@@ -33,6 +33,9 @@ if [ -n "$wait" -a ! -b "${rootdev}" ]; then
fi
echo "Mounting ${rootdev}..."
mount -t "${fstype}" -o "${opt}" "${rootdev}" /mnt || exec sh
[ ! -f /etc/platform-pre-switchroot ] || . /etc/platform-pre-switchroot
echo "Switching to rootfs on ${rootdev}..."
mount --move /sys /mnt/sys
mount --move /proc /mnt/proc