howto add a new machine to venus - victronenergy/venus GitHub Wiki
Looking for the Beaglebone project instead? See project bbb.
Venus can be run on different hardware. Already it runs on the CCGX (TI / Technexxion TAM), a beaglebone, and the some members of the raspberrypi family.
The intention of below list is to give some starting points on how to add a new machine.
Note that below step list amazingly over simplifies the work involved. Doing this requires knowledge of Open Embedded, as well as knowing your way around with Linux kernels, u-boot, shell scripting, etc. etc.
In general you'll see in OE that machine specific versions of scripts are in subdirs with the machine names. For example:
files
-> beaglebone <- in there you'll find the beaglebone specific files.
-> ccgx <- in there you'll find the ccgx specific files.
-> raspberrypi2 <- in there you'll find files specific to the raspberry pi 2/3.
. <- and there you'll find the generic scripts.
To know the details on how that works, read the Open Embedded or Yocto manuals.
The steps:
-
Add a machine conf file
-
u-boot: each machine has its own u-boot, see here
-
kernel: see linux-venus here
Typically the kernel and u-boot are standard versions, but with a few hardware specific patches that we keep in github to make clear what was modified. See for example the u-boot for the Beaglebone. Currently they are a total of 9 patches on top of generic u-boot v2015.7: https://github.com/victronenergy/u-boot/commits/beaglebone
For Linux; there is linux-venus and only for raspberrypis there isa different kernel tree.
For some boards, a tree with included patches might be available in another repository and can be used unchanged. For example, a kernel tree for the raspberry pi boards, with a number of patches and an ongoing effort to get those accepted into the main line, can be found at: https://github.com/raspberrypi/linux
-
Make the install scripts, add to venus-install-initramfs
That initramfs will be included when bitbaking the venus-install-sdcard image. Which then partitions and formats the nand/flash/whichever on your machine. And then installs the dual rootfs setup.
Note that this part is for boards with onboard eMMC. Boards that boot from external media such as an sdcard dont need it. For those boards, you should instead build an image that can be flashed directly to bootable media. See here.
-
Headless vs non-headless gui run script.
-
Double check machine-conf recipe that creates the files in /etc/venus, which are used runtime. Especially
get-unique-id
&hw-revision
. -
If the board has GPIOs, configure the pins here. Add gpio-export as a platform dependency in packagegroup-venus-machine.
Once all is up and running perfectly fine, make the firmware updater work:
-
Add machine specific scripts for swupdate-scripts.
-
Add the files necessary to make the swu file recipes-images/venus-swu.
-
Remember to include a cron job for automatic updating.