Use the new 64 bit root filesystem for the pi's

This also pulls in our RT kernel, and the script to build it.

We still need to package up and build the kernel module for the
adis16505, and enable the overlay.  Not a huge deal.

Change-Id: I1a100d8ec3ce4406af27af6b555fd08840fb71fd
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/raspi/rootfs/modify_rootfs.sh b/frc971/raspi/rootfs/modify_rootfs.sh
index a340c64..0020f35 100755
--- a/frc971/raspi/rootfs/modify_rootfs.sh
+++ b/frc971/raspi/rootfs/modify_rootfs.sh
@@ -3,16 +3,18 @@
 set -xe
 
 # Full path to Raspberry Pi Bullseye disk image
-IMAGE="2021-10-30-raspios-bullseye-armhf-lite.img"
+IMAGE="2022-01-28-raspios-bullseye-arm64-lite.img"
+# Kernel built with build_kernel.sh
+KERNEL="kernel_5.10.tar.gz"
 BOOT_PARTITION="${IMAGE}.boot_partition"
 PARTITION="${IMAGE}.partition"
 
 function target() {
-  HOME=/root/ USER=root sudo proot -0 -q qemu-arm-static -w / -r "${PARTITION}" "$@"
+  HOME=/root/ USER=root sudo proot -0 -q qemu-aarch64-static -w / -r "${PARTITION}" "$@"
 }
 
 function user_pi_target() {
-  USER=root sudo proot -0 -q qemu-arm-static -w / -r "${PARTITION}" sudo -h 127.0.0.1 -u pi "$@"
+  USER=root sudo proot -0 -q qemu-aarch64-static -w / -r "${PARTITION}" sudo -h 127.0.0.1 -u pi "$@"
 }
 
 
@@ -37,6 +39,8 @@
 # For now, disable the new libcamera driver in favor of legacy ones
 sudo sed -i s/^camera_auto_detect=1/#camera_auto_detect=1/ "${BOOT_PARTITION}/config.txt"
 
+sudo tar -zxvf "${KERNEL}" --strip-components 2 -C ${BOOT_PARTITION}/ ./fat32
+
 # Seeing a race condition with umount, so doing lazy umount
 sudo umount -l "${BOOT_PARTITION}"
 rmdir "${BOOT_PARTITION}"
@@ -82,6 +86,7 @@
 sudo cp logind.conf "${PARTITION}/etc/systemd/logind.conf"
 sudo cp change_hostname.sh "${PARTITION}/tmp/change_hostname.sh"
 sudo cp frc971.service "${PARTITION}/etc/systemd/system/frc971.service"
+sudo cp frc971chrt.service "${PARTITION}/etc/systemd/system/frc971chrt.service"
 sudo cp rt.conf "${PARTITION}/etc/security/limits.d/rt.conf"
 sudo cp usb-mount@.service "${PARTITION}/etc/systemd/system/usb-mount@.service"
 sudo cp 99-usb-mount.rules "${PARTITION}/etc/udev/rules.d/99-usb-mount.rules"
@@ -89,6 +94,9 @@
 target /bin/mkdir -p /home/pi/.ssh/
 cat ~/.ssh/id_rsa.pub | target tee /home/pi/.ssh/authorized_keys
 
+sudo rm -rf "${PARTITION}/lib/modules/"*
+sudo tar -zxvf "${KERNEL}" --strip-components 4 -C "${PARTITION}/lib/modules/" ./ext4/lib/modules/
+
 # Downloads and installs our target libraries
 target /bin/bash /tmp/target_configure.sh