open_source:ccgx:installing_ccgx_func_on_raspberry_pi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
open_source:ccgx:installing_ccgx_func_on_raspberry_pi [2015-02-28 23:49] – mvader | open_source:ccgx:installing_ccgx_func_on_raspberry_pi [2019-06-22 15:47] (current) – mvader | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installing CCGX functionality on a raspberry pi ====== | ====== Installing CCGX functionality on a raspberry pi ====== | ||
- | (in progress, everybody reading | + | The contents of this page were moved to the Venus OS wiki: |
- | The goal of this page is to run as much as possible of the CCGX functionality on a raspberry pi. Just for fun. Below steps have been done on a raspberry pi 2. Much of the source code is not yet available publicly. So to start, I am putting instructions down for all the projects that are available. And for projects that contain private Victron source code I'll. | + | https:// |
- | ===Cross compile vs compiling locally=== | ||
- | There are many differeny ways to make the ccgx functionality run on a rpi. For example do something with Poky/ | ||
- | ===Optimizing make and gcc (not required!)=== | ||
- | Below steps have all been done on my new raspberry pi 2, running this version: | ||
- | < | ||
- | pi@raspberrypi ~ $ cat / | ||
- | Linux version 3.18.7-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015 | ||
- | pi@raspberrypi ~ $ cat /etc/issue | ||
- | Raspbian GNU/Linux 7 \n \l | ||
- | pi@raspberrypi ~ $ gcc --version | ||
- | gcc (Debian 4.6.3-14+rpi1) 4.6.3 | ||
- | </ | ||
- | |||
- | [[http:// | ||
- | |||
- | To see if there really was an improvement in compile time, I have timed compiling the git sources. Running make clean before retrying. | ||
- | |||
- | With the original gcc version (4.6), it took 12m26s | ||
- | With the original gcc version, and -j4, it took only 4m12 ! | ||
- | |||
- | Then switched to the new compiler: | ||
- | export CC=gcc-4.8 | ||
- | |||
- | And ran make clean again, and ./configure --prefix=/ | ||
- | |||
- | With gcc-4.8, and -j4 it took | ||
- | |||
- | ===== Steps ===== | ||
- | |||
- | ==== 1. Install daemontools ==== | ||
- | [[http:// | ||
- | |||
- | To install daemontools follows [[http:// | ||
- | < | ||
- | -include / | ||
- | </ | ||
- | |||
- | Daemontools will now be running, to make sure check the processlist: | ||
- | < | ||
- | pi@raspberrypi ~ $ ps ax | grep svscan | ||
- | 2171 ? Ss 0:00 /bin/sh / | ||
- | 2173 ? S 0:00 svscan /service | ||
- | 2260 pts/0 S+ 0:00 grep --color=auto svscan | ||
- | </ | ||
- | |||
- | But is not doing anything yet, as there are no services setup in /service yet. | ||
- | |||
- | ==== 2. Install the dbus-cli ==== | ||
- | [[https:// | ||
- | |||
- | First, get the code from above, and put it somewhere in the path. | ||
- | |||
- | Then, get some dependencies, | ||
- | sudo apt-get install python-pip | ||
- | | ||
- | Then install lxml, which is needed by dbus-cli: | ||
- | sudo apt-get install libxml2-dev libxslt1-dev python-dev | ||
- | sudo pip install lxml | ||
- | | ||
- | Done! If all works, you'll be able to run dbus -y from the commandline: | ||
- | pi@raspberrypi ~ $ dbus -y | ||
- | org.freedesktop.DBus | ||
- | |||
- | ==== 3. Install dbus-modbustcp ==== | ||
- | [[https:// | ||
- | |||
- | First get the sources: | ||
- | cd | ||
- | mkdir dev | ||
- | cd dev | ||
- | git clone git@github.com: | ||
- | | ||
- | Install the qt libraries: | ||
- | sudo apt-get install libqt4-dev | ||
- | | ||
- | Run qmake to create the makefile (set MACHINE to ccgx to make dbus_modbustcp use the system D-Bus): | ||
- | export MACHINE=ccgx && qmake | ||
- | | ||
- | Run make to compile the sources: | ||
- | make | ||
- | | ||
- | Done! Run the binary to see that you were successful: | ||
- | ~/ | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | ERROR 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | | ||
- | Note that I have not yet looked into that error! | ||
- | |||
- | ==== 4. Install dbus_qwacs ==== | ||
- | [[https:// | ||
- | |||
- | To compile, follow the same steps as dbus_modbustcp. | ||
- | |||
- | When done, output will look like this: | ||
- | ~/ | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | INFO 2015-02-27T21: | ||
- | |||
- | And that goes on forever, since the local settings process is not yet installed, lets do that first! | ||
- | |||
- | ==== 5. Local settings ==== | ||
- | [[https:// | ||
- | |||
- | Steps to install (probably not as it should be done with regards to rights etc, welcome to correct this! Also it is perhaps better to make a install script for localsettings. Instead of just cloning the whole thing and adding some files, same thing: if you can improve, please do): | ||
- | cd /opt | ||
- | sudo mkdir color-control | ||
- | cd ./ | ||
- | chmod a+w . | ||
- | git clone --recursive git@github.com: | ||
- | cd localsettings | ||
- | | ||
- | sudo apt-get install python-gobject | ||
- | |||
- | Create the folder where localsettings will store settings.xml | ||
- | sudo mkdir /conf | ||
- | sudo chmod a+w /conf | ||
- | | ||
- | All done (except for setting this up with daemontools). Run it to see what happens: | ||
- | ./ | ||
- | ===== DISQUS ===== | ||
- | ~~DISQUS~~ |
open_source/ccgx/installing_ccgx_func_on_raspberry_pi.1425163766.txt.gz · Last modified: by mvader