[yocto] Deploying Yocto build images

Stefano Babic sbabic at denx.de
Thu Nov 21 09:08:25 PST 2013


Hi Bryan,

On 21/11/2013 16:48, Bryan Evenson wrote:
> Stefano,
> 
> Looks interesting.  I have a question that I didn't see covered in
> the documentation (yet).

I know, this is my fault. Writing documentation is a task that is always
postponed ;-)

> I can see the benefit to having a single image firmware upgrade, but
> how does swupdate handle configuration differences?  I can see cases
> in which the majority of the software will be the same but there will
> be configuration file differences from device to device.  I like the
> idea of a single image upgrade, but not at the cost of wiping the
> device-specific configuration.

I explain how it was done in a real project. The scope was to have a
single image, containing update for multiple devices. Let's say this is
an update of version Y for a whole family of products, but each product
has its own parts (mostly kernel differs, but not only).

In that case, an external parser was used. The sw-description is written
as XML, with a syntax like this:

<?xml version="1.0" encoding="UTF-8"?>
<software version="1.0">
  <name>Update Image</name>
  <version>1.0.0</version>
   <description>Firmware for XXXXX Project</description>

   <images>
   <image device="firstdevice" version="0.9">
     <stream name="dev1-uImage" type="ubivol" volume="kernel" />
     <stream name="dev1.dtb" type="ubivol" volume="dtb" />
     <stream name="dev1-rootfs.ubifs" type="ubivol" volume="rootfs"/>
     <stream name="dev1-uboot-env" type="uboot" />
     <stream name="raw_vfat" type="raw" dest="/dev/mmcblk0p4" />
     <stream name="sdcard.lua" type="lua" />
   </image>

   <image device="seconddevice" version="0.9">
     <stream name="dev2.dtb" rev="0.9" type="dtb" />
     <stream name="dev2-uImage" rev="0.9" type="kernel" />
......

That is: there is a single description, that describes the components
for all devices. Each device must recognized where it is running - this
was done with a configuration file or reading directly from hardware
(GPIOs, SPI EPROM).

When the image is downloaded, the description is parsed and only the
significant parts are extracted - the rest is discarded.
Of course, the image can be significantly bigger - it contains the
software for many devices. In my real project, this was not an issue -
the scope was really to have a single image for a product family.

Note: this is only an example how the tool was used. But this shows also
that the syntax of the sw-description is open. I could also add the LUA
script/XML parser to the repository, it is at the moment not stored - I
have thought at it as a custom specific requirement.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================



More information about the yocto mailing list