Support rpi3 and rpi 4 boards

Due to rpi3 not supporting GPT disks, we need to separate the building
into rpi3 and 4 so rpi4 gets GPT disks and can auto-expand the last
partition properly (and add extra partitions and so on)

This also includes some cleanup for the luet cache dirs, includes the
kairos-agent which was missing from the image for pulling images, and
cleans up the lvm vgs if they were left

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka
2023-08-08 14:56:39 +02:00
parent a549b5e9d9
commit c813e546d0
4 changed files with 123 additions and 58 deletions

22
tools-image/arm/boards/rpi4.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
partprobe
kpartx -va $DRIVE
image=$1
if [ -z "$image" ]; then
echo "No image specified"
exit 1
fi
set -ax
TEMPDIR="$(mktemp -d)"
echo $TEMPDIR
mount "${device}p1" "${TEMPDIR}"
# Copy all rpi files
cp -rfv /rpi/* $TEMPDIR
umount "${TEMPDIR}"