mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-09-18 16:34:37 +00:00
29 lines
775 B
Bash
Executable File
29 lines
775 B
Bash
Executable File
#!/bin/bash
|
|
|
|
partprobe
|
|
|
|
kpartx -va $DRIVE
|
|
|
|
image=$1
|
|
|
|
if [ -z "$image" ]; then
|
|
echo "No image specified"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -e "$WORKDIR/luet.yaml" ]; then
|
|
ls -liah $WORKDIR
|
|
echo "No valid config file"
|
|
cat "$WORKDIR/luet.yaml"
|
|
exit 1
|
|
fi
|
|
set -ax
|
|
TEMPDIR="$(mktemp -d)"
|
|
echo $TEMPDIR
|
|
mount "${device}p1" "${TEMPDIR}"
|
|
sudo luet install --config $WORKDIR/luet.yaml -y --system-target $TEMPDIR firmware/u-boot-rpi64
|
|
sudo luet install --config $WORKDIR/luet.yaml -y --system-target $TEMPDIR firmware/raspberrypi-firmware
|
|
sudo luet install --config $WORKDIR/luet.yaml -y --system-target $TEMPDIR firmware/raspberrypi-firmware-config
|
|
sudo luet install --config $WORKDIR/luet.yaml -y --system-target $TEMPDIR firmware/raspberrypi-firmware-dt
|
|
umount "${TEMPDIR}"
|