Skip to content

Instantly share code, notes, and snippets.

@eduardofilo
Last active June 7, 2022 16:39
Show Gist options
  • Save eduardofilo/eced05b5fcafb86178834f4d708dcfa9 to your computer and use it in GitHub Desktop.
Save eduardofilo/eced05b5fcafb86178834f4d708dcfa9 to your computer and use it in GitHub Desktop.
abraha2d's OpenAuto fork compilation
Starting point is release "NG Alpha-5 2019-06-08" of Crankshaft (https://github.com/opencardev/crankshaft/releases/tag/csng-alpha5). Tested on Raspberry Pi3 Model B and Model B+.
1. Activate DEV mode in Crankshaft. See this guide: https://github.com/opencardev/crankshaft/wiki/Dev-Mode-and-Debug-Mode
I used first method changing DEV_MODE=1 in /boot/crankshaft/crankshaft_env.sh mounting the microSD in my computer.
2. Attach Ethernet cable to Raspberry/Crankshaft, boot, find out IP and login through SSH (user: pi; pwd: raspberry).
3. Update distribution and install some packages:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install -y libboost-all-dev libusb-1.0.0-dev cmake libprotobuf-dev protobuf-c-compiler protobuf-compiler librtaudio-dev
4. Download 'development' branch of abraha2d's aasdk fork:
$ cd ~
$ git clone -b development https://github.com/abraha2d/aasdk.git
5. (OPTIONAL) I compiled commit 361380e7d74ddeaf17afd8cd89882001bb62c77e. If there are problems with new commits, do the following checkout:
$ cd aasdk
$ git checkout 361380e7d74ddeaf17afd8cd89882001bb62c77e
6. Compile aasdk:
$ cd ~
$ mkdir aasdk_build
$ cd aasdk_build
$ cmake -DCMAKE_BUILD_TYPE=Release ../aasdk
$ make
7. Install some packages to compile ilclient:
$ sudo apt-get install -y libraspberrypi-doc libraspberrypi-dev
$ cd /opt/vc/src/hello_pi/libs/ilclient
$ make
8. Download 'crankshaft-ng' branch of abraha2d's openauto fork:
$ cd ~
$ git clone -b crankshaft-ng https://github.com/abraha2d/openauto.git
9. (OPTIONAL) I compiled commit d56417bfd6b2af9beacb104f8659aea8bff94a72. If there are problems with new commits, do the following checkout:
$ cd openauto
$ git checkout d56417bfd6b2af9beacb104f8659aea8bff94a72
10. Compile openauto:
$ cd ~
$ mkdir openauto_build
$ cd openauto_build
$ sudo apt-get install -y libtag1-dev libblkid-dev
$ cmake -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=TRUE -DAASDK_INCLUDE_DIRS="/home/pi/aasdk/include" -DAASDK_LIBRARIES="/home/pi/aasdk/lib/libaasdk.so" -DAASDK_PROTO_INCLUDE_DIRS="/home/pi/aasdk_build" -DAASDK_PROTO_LIBRARIES="/home/pi/aasdk/lib/libaasdk_proto.so" ../openauto
$ make
11. Replace binary in Crankshaft:
$ sudo cp /home/pi/openauto/bin/autoapp /usr/local/bin/autoapp
12. Revert DEV mode change from step 1 and boot normally.
@eduardofilo
Copy link
Author

Can somebody help yet another noob out?

I got to step three. Really long line to type, but that worked. Then step 4

1. Download 'development' branch of abraha2d's aasdk fork:

$ cd ~
$ git clone -b development https://github.com/abraha2d/aasdk.git

When I type this en press enter I get a message git command not found. Am I doing something wrong?

Hi @LaabNavNoyd

The problem is that your system doesn't have installed the git package. The solution is to execute the command:

$ sudo apt-get install git

But the git package is installed by default in "NG Alpha-5 2019-06-08" of Crankshaft, that it is the first requirement for this guide to work. So I fear that you are using another distribution and will have other problems once git is installed (like compiling openauto in former comments).

Regards...

@LaabNavNoyd
Copy link

Can somebody help yet another noob out?
I got to step three. Really long line to type, but that worked. Then step 4

1. Download 'development' branch of abraha2d's aasdk fork:

$ cd ~
$ git clone -b development https://github.com/abraha2d/aasdk.git
When I type this en press enter I get a message git command not found. Am I doing something wrong?

Hi @LaabNavNoyd

The problem is that your system doesn't have installed the git package. The solution is to execute the command:

$ sudo apt-get install git

But the git package is installed by default in "NG Alpha-5 2019-06-08" of Crankshaft, that it is the first requirement for this guide to work. So I fear that you are using another distribution and will have other problems once git is installed (like compiling openauto in former comments).

Regards...

Thank you! Stargazzer you as well. But after reading I had a older version I restarted and now it works. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment