Hi Piotr,
On 05/07/2016 00:40, Piotr Król wrote:
> Hi all,
> I'm research various approach to system upgrade for consumer product
> based on Internet connected Intel NUC. SWUpdate looks great, but I have
> some questions.
>
> System features to provide brief description:
> * application is GUI based (GTK) with various components (ie. MySQL
> database) - lot of different libraries used
> * Debian as OS
Well, it is not exactly for embedded...the size of the whole image is
then very large.
> * Connected on consumer location over Ethernet
> * Location distributed geographically
> * SATA HDD as storage (with possible improvements to SSD)
> * manually and periodically triggered updates
> * fallback - there should be always working copy of software
> * future need for encryption (TPM, TEE)
>
> Because SATA used I have a lot of space, so dual image approach fit
> best I think.
ok
>
> * My hardware configuration do not exactly fall in to "embedded" grade,
Right.
> is
> SWUpdate still applicable for those kind of hardware ?
It is not a choice of hardware. There are some other considerations.
SWUpdate is an image installer, suitable for embedded systems. The
system is completely updated or not, there are not steps in between: the
update is like a transaction and it is "atomic".
If you use it to update a Linux distro, the resulting image is very big,
even if you want to update just a couple of files. Debian and Linux
distros have other ways for updating, and a solution based on a package
manager is more suitable for a Linux-PC / Linux-distro.
I am expecting that the resulting debian image is so big that an update
through SWUpdate could be done only in a LAN, and even in this case it
is very time-expensive.
The other aspect you have to take care updating your embedded device is
that the update must be power-cut proof.
If you have the Intel NUC, I am expecting you have BIOS and Grub as
bootloader. Grub has a fallback facility, but it has not two copies of
the environment, as far as I know (am I wrong ?). Because you have two
copies of the software, you need to update at least the "rootfs=" string
in the kernel command line, that is you need to change grub.cfg.
Because updating the file is not safe for power-cut, you can damage the
file while updating during a power-cut, resulting a bricked device.
In projects based on Intel Chips (mainly Quark), we ported U-Boot to the
device, replacing BIOS and Grub. U-Boot has two copies of the
environment and changing the environment is power-cut safe, that is the
reason.
I have no idea (or I have not found) about any development for Grub to
have a redundant environment - anyway, Grub is thought for PCs, more as
for embedded.
> Or maybe there
> is better approach and I'm missing something.
>
> * Are there any cons of not using Poky as build system ?
Do not ask me - I am a Yocto's fan and I use Yocto in all my projects....
> Building Debian
> and all required packages would be complex and time consuming task and
> I'm not sure if it is worth invest in this.
If you "build", you need to set up the whole Debian buildsystem, and I
am afraid this is not worth. Who does build it with a PC ? Simply use
the distro !
If you switch to Yocto, you have a buildsystem for embedded and you can
fine tune it - it requires also some effort to set up, of course.
>
> * Are there any instruction/tutorial to try/triage SWUpdate ie. with
> QEMU ? I would like to setup proof of concept environment.
You do not need qemu. Of course, a lot of handlers are thought for a
specific hardware. You cannot use the UBI handler if you do not have
UBI. But the raw-handler, for example, can be used with any system.
Just compile SWUpdate native on your PC and run it. It works and I use
it to test not hardware-relevant parts.
>
> * What server you can recommend ? I see you mention hawkBit on wiki,
> what other configuration worked for you ?
Moving from a update agent to a full deployment system is something
recent and introduced just in this release. The implementation is
general, but the "connector" to an external server is just for hawkbit.
Further connectors can be added, and this is also stated in the roadmap.
Anyway, the question is : which deployment systems are currently
developed as FOSS and are in a good status, that makes sense to add a
connector for it ? At the moment, I only see hawkBit, but of course more
other servers could be supported in future.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de
=====================================================================