BlueWave Studio forum
Update your car RPI by plugging a USB (not OAP update!) - Printable Version

+- BlueWave Studio forum (https://bluewavestudio.io/community)
+-- Forum: Community (https://bluewavestudio.io/community/forum-85.html)
+--- Forum: How to (https://bluewavestudio.io/community/forum-69.html)
+--- Thread: Update your car RPI by plugging a USB (not OAP update!) (/thread-2923.html)



Update your car RPI by plugging a USB (not OAP update!) - KreAch3R - 09-10-2021

Hello,

If you're like me, you develop your new scripts/automation/OAP changes in a virtualbox or a second RPI at home, and then you need to transfer the changes "out in the field", on your car RPI. This assumes getting the sdcard or RPI out of the car is tricky and/or troublesome to do. 

I developed a script that works kinda like the automatic installation update of embedded systems, consoles etc where you create a specific structure in the USB stick and just by plugging it in, an installation sequence starts and when it ends, everything is where it's supposed to be without ssh'ing, phonetyping commands etc.

You can find it here:
https://github.com/KreAch3R/navipi-usb-update

Basically, the events go like this:
1. Plug in the USB
2. udev starts a script that locates a USB stick with "navipi.update" file
3. Copies every .zip file inside /tmp, and installs their contents
4. Run specific installation commands
5. Logs everything into a log file
6. That's it, everything installed

IMPORTANT: I didn't make it work with an official openauto_update.zip, to limit troubleshooting for the developers if users try to use my script to install an official update. To each its own.

Suggestions/critique welcome!


RE: Update your car RPI by plugging a USB (not OAP update!) - KreAch3R - 09-15-2021

Update: I managed to make it open a terminal window and live output the results of the script. It will also ask for confirmation on important steps:


https://github.com/KreAch3R/navipi-usb-update/commit/c7797faeab3fb50ce3af3df8fe9e8706fc8b3cb9