-
Notifications
You must be signed in to change notification settings - Fork 76
howto add a new machine to venus
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 also adding the raspberrypi2 is quite far underway.
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.
-> ccgxhf <- in there you'll find the ccgx specific files. Note that ccgxhf can also a be a symlink to ccgx.
-> 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: each machine has its own kernel, see 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 a similiar list. A mix of some backported fixes as well as modifications to the defconfig & dts files: https://github.com/victronenergy/linux/commits/bbb-4.1.36
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 optional for boards without onboard eMMC, notably boards that boot from external media such as an sdcard. 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.
-
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.