Most of the infrastructure that is used to deploy code to a roboRIO can be reused to deploy code to a Raspberry Pi. The key things to do are to configure build.gradle to deploy to a Pi, modify SSH settings, and put Java on the Pi.
- Install the JRE with
sudo apt install openjdk-17-jre
. You do not need the JDK unless you are programming on the Pi. - Edit
sshd_config
to allow root login and empty passwords, as well as password authentication if you haven't done so already. - Run
sudo passwd -d root
to remove the password off the root user. This allows Gradle to login as the root user without a password and is necessary for it to deploy all the files. - Download the zip file here and click the latest link at the top. Then download the correct artifact for your architecture (Arm32 if you have the 32-bit version installed, Arm64 if you have the 64-bit version installed, and Linux if you're not using a Pi, but a x86 Linux machine.)
- Download the contents of this repo.
- Extract the contents of the zip file, and move them into the deploy directory of your robot project (src/main/deploy). Also move the two .sh files into the deploy directory as well. This will copy all the required files to the Pi.
- Replace your build.gradle file with the one from this repo. If you have a custom build.gradle, it is up to you to combine them manually.
- Connect to the network your Pi is on.
- Edit the address in the build.gradle file to point to the Pi. You can use mDNS if you don't want to mess with IP addresses, but be aware that the address may not resolve in time, and the deploy will fail. If it fails, try again a few more times, and if it doesn't succeed, check your setup.
REVLib will deploy without any custom setup. For Phoenix 6, you will need to follow the instructions for installing Phoenix 6 on a Linux machine. The navX library is completely unsupported, so if you really want to use it, you'll have to figure it out. If you figure it out, please send a PR! Everything else not mentioned may or may not work. Let us know what vendordeps do and don't work and we'll add it to the list.