mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-09-17 23:58:29 +00:00
Add ARM build script in tools-image
This commit is contained in:
21
tools-image/arm/boards/odroid_c2.sh
Executable file
21
tools-image/arm/boards/odroid_c2.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
sudo luet install --config $WORKDIR/luet.yaml -y --system-target $WORKDIR firmware/odroid-c2
|
||||
# conv=notrunc ?
|
||||
dd if=$WORKDIR/bl1.bin.hardkernel of=$image conv=fsync bs=1 count=442
|
||||
dd if=$WORKDIR/bl1.bin.hardkernel of=$image conv=fsync bs=512 skip=1 seek=1
|
||||
dd if=$WORKDIR/u-boot.odroidc2 of=$image conv=fsync bs=512 seek=97
|
28
tools-image/arm/boards/rpi64.sh
Executable file
28
tools-image/arm/boards/rpi64.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/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}"
|
Reference in New Issue
Block a user