kjn260 Posted June 28, 2017 Posted June 28, 2017 Hi Guys, I have recently been contracted to a new project where I have moved out of my comfort zone (embedded 8-bit/32-bit uC) and have started my work on a H3 based device (currently NanoPi Neo) with Armbian. Over the course of my work I have managed to get up to speed with the basics; configuration, scripting, hardware and interfaces and device trees to a point where I can now work on the device as a proof of concept. The work that has been contributed so-far to the armbian project is impressive as is the active and knowledgeable forum - to which I hope I can contribute. One element which I cannot find an easy solution to is one of remote update. In the embedded world because your whole program/environment is loaded from flash into device ram it is very easy (if you have a device with network connectivity) to have a RPC to download and reflash new firmware - this is very useful for installations where physical access is restricted or unavailable and changes must be made to the firmware. While it is possible to for example remote access (via SSH or some other means) to do system upgrades, I think a "whole-image" approach has some benefits especially when considering critical system deployments. So I have been researching options that may be easily deployed into the Armbian build environment - there are quite a few options I have found (https://wiki.yoctoproject.org/wiki/System_Update), however on looking at all the options the best suited to the Armbian environment is mender.io in my opinion. It is compatible with block devices (uSD/eMMC), compatible with uboot, has a "secure" and robust update mechanism with fallback, is open source and has agreeable licencing for integration with Armbian/Commerical Products etc. The only downside is that it is currently built for integration with the Yocto project and only has a reference hardware of a Beagle Bone Black. There has been some information provided for custom target/build integration: https://mender.io/blog/porting-mender-to-a-non-yocto-build-system. After reading this I have made some notes, but I am obviously still learning and feedback from those more experienced than I would be appreciated. 1) Partition Layout At the moment the RESIZE_FS flag in the armbian build enviroment causes the rootfs partition to expand to the whole size of the available device, this can be overwritten to a fixed size at build time. Presumably with some modification to the script it could partition the device as required: https://docs.mender.io/1.0/devices/partition-layout 2) Go/mender Client libraries These should be possible to be added as user-packages in the build stage? 3)uBoot Patches: 0001-Generic-boot-code-for-Mender.patch 0002-Integration-of-Mender-boot-code-into-U-Boot.patch Should be able to be applied as user uboot patches at build stage? 4)Artifact creation (e.g. update images): Can be completed with an additional post-build script using the mender artifact tool or integrated as an script in Armbian build environment. I suppose my questions are: -is there interest in such an addition of this feature into armbian? -for the people that are well versed in the armbian build environment - is there any potential pinch points for integration? 2
grg Posted July 29, 2017 Posted July 29, 2017 I find this super interesting. I'm going to dig in and see what it would take.
Recommended Posts