Add irq_affinity changes to the roborio for use.

Signed-off-by: Xander Yee <xander.yee@gmail.com>
Change-Id: I2555f0ff9afd02cc4e83c9e3497105a0a1e16c4c
diff --git a/aos/starter/BUILD b/aos/starter/BUILD
index 8d3f4f5..9b03907 100644
--- a/aos/starter/BUILD
+++ b/aos/starter/BUILD
@@ -1,6 +1,8 @@
 load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
 load("//aos:config.bzl", "aos_config")
 
+exports_files(["roborio_irq_config.json"])
+
 # This target is everything which should get deployed to the robot.
 filegroup(
     name = "starter",
diff --git a/aos/starter/roborio_irq_config.json b/aos/starter/roborio_irq_config.json
new file mode 100644
index 0000000..d6ea0db
--- /dev/null
+++ b/aos/starter/roborio_irq_config.json
@@ -0,0 +1,24 @@
+{
+  "irqs": [
+    {
+      "name": "e0002000.usb",
+      "affinity": [1]
+    },
+    {
+      "name": "mmc0",
+      "affinity": [0]
+    },
+    {
+      "name": "eth0",
+      "affinity": [0]
+    }
+  ],
+  "kthreads": [
+    {
+      "name": "irq/*-e0002000",
+      "scheduler": "SCHEDULER_FIFO",
+      "priority": 45,
+      "affinity": [1]
+    }
+  ]
+}
diff --git a/y2023/BUILD b/y2023/BUILD
index 40aa841..16273e5 100644
--- a/y2023/BUILD
+++ b/y2023/BUILD
@@ -9,6 +9,7 @@
     ],
     data = [
         ":aos_config",
+        "//aos/starter:roborio_irq_config.json",
         "@ctre_phoenix_api_cpp_athena//:shared_libraries",
         "@ctre_phoenix_cci_athena//:shared_libraries",
         "@ctre_phoenixpro_api_cpp_athena//:shared_libraries",
@@ -20,6 +21,7 @@
     start_binaries = [
         "//aos/events/logging:logger_main",
         "//aos/network:web_proxy_main",
+        "//aos/starter:irq_affinity",
         ":joystick_reader",
         ":wpilib_interface",
         "//aos/network:message_bridge_client",
@@ -35,6 +37,7 @@
     name = "pi_download",
     binaries = [
         "//frc971/vision:intrinsics_calibration",
+        "//aos/starter:irq_affinity",
         "//aos/util:foxglove_websocket",
         "//y2023/vision:viewer",
         "//y2023/vision:aprilrobotics",
diff --git a/y2023/y2023_roborio.json b/y2023/y2023_roborio.json
index e4a9c38..6a4dcd6 100644
--- a/y2023/y2023_roborio.json
+++ b/y2023/y2023_roborio.json
@@ -476,6 +476,16 @@
       ]
     },
     {
+      "name": "roborio_irq_affinity",
+      "executable_name": "irq_affinity",
+      "args": [
+        "--irq_config=/home/admin/bin/roborio_irq_config.json"
+      ],
+      "nodes": [
+        "roborio"
+      ]
+    },
+    {
       "name": "joystick_reader",
       "executable_name": "joystick_reader",
       "nodes": [