improving the dev workflow friction is paramount to innovating openpilot
PRs accepted! What cool shit do you do to your ssh session with your car??
This tool was created by Alice Knag - @emu#6969
on Discord, and is widely contributed to by ShaneSmiskol - Shane#6175
If you have any questions about the development process, or have any ideas you want to see happen, check out CONTRIBUTING.md and/or DM one of us on Discord or ask in #custom-forks
To install these utilities, SSH into your comma device running neos (ie Comma 2, Eon, etc), and paste in the following:
bash <(curl -fsSL install.emu.sh) # the brain of the bird
source /data/community/.bashrc
Read the README for https://github.com/b-ryan/powerline-shell. You will need to install the fonts on the computer/terminal emulator that you SSH from
Alternately, you can install Nerd Fonts, as it provides more icons than powerline fonts, and is more maintained.
Once NEOS 15 comes out, zsh will be used and powerlevel10k will be the optimal powerline
The default directory of your bash/ssh session is now /data/openpilot
. Much easier to git pull after shelling in.
Emu my neo!
You should now be able to use the emu
command.
Once you've installed, you can update via the utility
emu update
This will essentially perform a git pull and replace all current files in the /data/community/.oh-my-comma
directory with new ones, if an update is available, as well as check the integrity of the files that must remain elsewhere on the filesystem such as the .bashrc and powerline configs
emu update
: ๐ Updates this tool, recommended to restart ssh sessionemu uninstall
: ๐ Uninstalls emu
emu fork
: ๐ด Manage installed forks, or install a new oneemu fork switch
: ๐ด Switch between any openpilot forkemu fork list
: ๐ See a list of installed forks and branches
emu panda
: ๐ผ panda interfacing toolsemu panda flash
: ๐ผ flashes panda with make recover (usually works with the C2)emu panda flash2
: ๐ flashes panda using Panda module (usually works with the EON)
emu debug
: de-๐-ing toolsemu debug controlsd
: ๐ฌ logs controlsd to /data/output.log by default
emu device
: ๐ Statistics about your deviceemu device battery
: ๐ see information about the state of your batteryemu device reboot
: โก safely reboot your deviceemu device shutdown
: ๐ safely shutdown your deviceemu device settings
: โ open the Settings app
To see more information about each command and its arguments, checkout the full command documentation here.
When you first run any emu fork
command, emu
will ask you to perform a one-time setup of cloning the base repository of openpilot from commaai. This may take a while, but upon finishing the setup you will be able to switch to any openpilot fork much quicker than the time it usually takes to full-clone a new fork the old fashioned way.
For each new fork you install with the emu fork switch
command, Git is able to re-use blobs already downloaded from commaai/openpilot and other similar installed forks, enabling quicker install times.
In a rw filesystem, you can edit your git config so you can push your changes up easily.
mount -o rw,remount /system
git config --global user.name "your_username"
git config --global user.email "[email protected]"
git config --global credential.helper store
git pull
mount -o r,remount /system
if the git pull fails, just do some action on git that requires authentication, and you should be good to go