30 lines
842 B
Bash
Executable File
30 lines
842 B
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir -p "$ROOTFS/var/cache/apk"
|
|
mkdir -p "$ROOTFS/build"
|
|
mount --bind /var/cache/apk "$ROOTFS/var/cache/apk"
|
|
mount --bind /dev "$ROOTFS/dev"
|
|
mount --bind /proc "$ROOTFS/proc"
|
|
mount --bind /sys "$ROOTFS/sys"
|
|
mount --bind /run "$ROOTFS/run"
|
|
|
|
cp /usr/bin/qemu-aarch64-static "$ROOTFS/usr/bin/"
|
|
cp /etc/resolv.conf "$ROOTFS/etc/resolv.conf"
|
|
cp /build/crio.tar.gz "$ROOTFS/build/"
|
|
|
|
chroot "$ROOTFS" /bin/sh -c "ln -s /var/cache/apk /etc/apk/cache"
|
|
# chroot "$ROOTFS" /bin/sh -c "apk update"
|
|
chroot "$ROOTFS" /bin/sh -c "apk add bash curl"
|
|
cp "/install-packages.sh" "$ROOTFS/install-packages.sh"
|
|
chroot "$ROOTFS" /bin/bash /install-packages.sh
|
|
|
|
umount "$ROOTFS/var/cache/apk"
|
|
umount "$ROOTFS/dev"
|
|
umount "$ROOTFS/proc"
|
|
umount "$ROOTFS/sys"
|
|
umount "$ROOTFS/run"
|
|
|
|
rm -r "$ROOTFS/build"
|
|
|
|
# Begin making full disk image for the device
|