blob: ecfa90c1754c79c60c38719ab08a1f9b217c57b9 [file] [log] [blame]
Austin Schuh51014832023-10-20 17:44:45 -07001#!/bin/bash
2set -ex
3
4TMPDIR=$(mktemp -d /tmp/yoctoflash.XXXXXXXXXX)
5
6# Cleanup on exit.
7function finish {
8 sudo rm -rf "${TMPDIR}"
9}
10trap finish EXIT
11
12# Assumes that the image has been copied into ./
13tar xf frc971-image-orin-nx-8g.tegraflash.tar.gz -C "${TMPDIR}"
14
15# Replace the rootfs with our new image.
16cp --sparse=always arm64_bookworm_debian_yocto.img "${TMPDIR}/frc971-image.ext4"
17
18cd ${TMPDIR}
19
20sudo ./initrd-flash