Merge "Allow pre-compiling arm trajectories"
diff --git a/frc971/rockpi/README.md b/frc971/rockpi/README.md
index c71ee08..4f44739 100644
--- a/frc971/rockpi/README.md
+++ b/frc971/rockpi/README.md
@@ -17,9 +17,74 @@
# Installing
+We're currently installing the filesystem onto the eMMC of the Rock
+Pis. This involves a multi-step process:
+
+* Create an SD card with the image. The Pi will boot off of this in order to flash the eMMC
+
+Assuming the SD card shows up on your system as /dev/sda, then you can use the command:
+
`sudo dd if=arm64_bullseye_debian.img of=/dev/sda status=progress`
-The default user is `pi`, and password is `raspberry`.
+WARNING: any time you're using 'dd' to write data, make SURE you've got the right output
+device, e.g., here of=/dev/sda. It's possible your hard drive is /dev/sda, and you
+don't want to over-write that!!
+
+* Create a USB drive with the image on it. We'll use this to copy the image to the eMMC
+
+We're using the xfs filesystem for USB thumb drives. To create this, do the following:
+* Insert the thumbdrive
+* Figure out which device this is and unmount it. E.g., if it's /dev/sdb1, do
+ * `sudo umount /dev/sdb1`
+* Run fdisk to create an empty partition:
+ * `sudo fdisk /dev/sdb`
+ * Type "o" to create an empty DOS partition table
+ * Type "n" to create a new partition
+ * Type "p" to select primary partition
+ * Accept the next 3 default values (1, 2048, 500170751) (or whatever end block is given)
+ * Type "w" to write this information to the partition table
+* Run mkfs to make this an xfs file system:
+ * `sudo mkfs -t xfs -f /dev/sdb1`
+ * (Note, you might have to install the xfs file system support for mkfs)
+* Change permissions on the drive to make it write-able
+ * `sudo chmod a+rwx [path-to-drive]`
+ * where `[path-to-drive]` is the path to the drive, e.g., /media/jim/XXXX
+ (I believe /dev/sdb1 should work, also)
+
+# Writing the disk image to the eMMC
+
+Insert the SD card and the thumbdrive and boot the Pi.
+
+It should come up as pi-971-1 (IP: 10.9.71.101). The default user is
+`pi`, and password is `raspberry`. Note: if you don't have your ssh
+key installed, you should get that added to the base image.
+
+Once booted, login and write the image to the eMMC:
+
+`sudo dd if=/media/sda1/arm64_bullseye_debian.img of=/dev/mmcblk1 status=progress`
+
+Then, power down the Pi, remove the SD card and the USB thumb drive, and power on the Pi
+
+Once it's up, login again.
+
+Change the hostname to the desired hostname, e.g., if you want it to be pi-9971-2, use
+
+`sudo /root/bin/change_hostname.sh pi-9971-2`
+
+It's a good idea here to reboot the Pi one more time to make sure it
+came up with the expected IP address and hostname.
+
+# Additional steps in setting up the Rock Pis
+
+We also have been plugging in a USB thumb drive to each Pi to do logging.
+
+We are formatting these as xfs filesystems. To do this follow the
+above instructions on a new USB drive to format as xfs.
+
+That's it!!
+
+
+# Other notes:
# State of RK3399 image processing.
diff --git a/frc971/rockpi/build_rootfs.sh b/frc971/rockpi/build_rootfs.sh
index 78ae6ac..d19a260 100755
--- a/frc971/rockpi/build_rootfs.sh
+++ b/frc971/rockpi/build_rootfs.sh
@@ -12,14 +12,14 @@
# Check if dependencies are missing.
missing_deps=()
REQUIRED_DEPS=(
- flex
bison
- gcc-arm-none-eabi
- gcc-aarch64-linux-gnu
- u-boot-tools
- device-tree-compiler
- swig
debootstrap
+ device-tree-compiler
+ flex
+ gcc-aarch64-linux-gnu
+ gcc-arm-none-eabi
+ swig
+ u-boot-tools
)
for dep in "${REQUIRED_DEPS[@]}"; do
if ! dpkg-query -W -f='${Status}' "${dep}" | grep -q "install ok installed"; then
@@ -258,6 +258,13 @@
target "apt-get clean"
+# Add a file to show when this image was last modified and by whom
+TIMESTAMP_FILE="${PARTITION}/home/pi/.ImageModifiedDate.txt"
+echo "Date modified:"`date` > "${TIMESTAMP_FILE}"
+echo "Image file: ${IMAGE}" >> "${TIMESTAMP_FILE}"
+echo "Git tag: "`git rev-parse HEAD` >> "${TIMESTAMP_FILE}"
+echo "User: "`whoami` >> "${TIMESTAMP_FILE}"
+
sudo chroot ${PARTITION} qemu-aarch64-static /bin/bash
# TODO(austin): This appears to not be working... pi_target doesn't apper to be happy
diff --git a/frc971/rockpi/contents/root/bin/change_hostname.sh b/frc971/rockpi/contents/root/bin/change_hostname.sh
index 43e6528..785903e 100755
--- a/frc971/rockpi/contents/root/bin/change_hostname.sh
+++ b/frc971/rockpi/contents/root/bin/change_hostname.sh
@@ -33,10 +33,16 @@
# Put corret team number in pi's IP addresses, or add them if needed
if grep '^10\.[0-9]*\.[0-9]*\.[0-9]*\s*pi-[0-9]*-[0-9] pi[0-9]$' /etc/hosts >/dev/null ;
then
- sed -i "s/^10\.[0-9]*\.[0-9]*\(\.[0-9]*\s*pi-\)[0-9]*\(-[0-9] pi[0-9]\)$/${IP_BASE}\1${TEAM_NUMBER}\2/" /etc/hosts
+ sed -i "s/^10\.[0-9]*\.[0-9]*\(\.[0-9]*\s*pi-\)[0-9]*\(-[0-9] pi[0-9]\)\(.*\)$/${IP_BASE}\1${TEAM_NUMBER}\2\3/" /etc/hosts
else
for i in {1..6}; do
- echo -e "${IP_BASE}.$(( i + 100 ))\tpi-${TEAM_NUMBER}-${i} pi${i}" >> /etc/hosts
+ imu=""
+ # Add imu name to pi6. Put space in this string, since extra
+ # spaces otherwise will make the above grep fail
+ if [[ ${i} == 6 ]]; then
+ imu=" imu"
+ fi
+ echo -e "${IP_BASE}.$(( i + 100 ))\tpi-${TEAM_NUMBER}-${i} pi${i}${imu}" >> /etc/hosts
done
fi
diff --git a/y2023/y2023_logger.json b/y2023/y2023_logger.json
index 641b1da..861372a 100644
--- a/y2023/y2023_logger.json
+++ b/y2023/y2023_logger.json
@@ -41,7 +41,7 @@
]
},
{
- "name": "/camera",
+ "name": "/logger/camera",
"type": "y2023.vision.GamePieces",
"source_node": "logger",
"logger": "LOCAL_AND_REMOTE_LOGGER",
@@ -64,7 +64,7 @@
]
},
{
- "name": "/logger/aos/remote_timestamps/roborio/camera/y2023-vision-GamePieces",
+ "name": "/logger/aos/remote_timestamps/roborio/logger/camera/y2023-vision-GamePieces",
"type": "aos.message_bridge.RemoteMessage",
"source_node": "logger",
"logger": "NOT_LOGGED",