Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/rocko3 #75

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions meta-iot2000-example/README.SWUPDATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Example for efibootguard + SWUpdate support with meta-iot2000

The [kas](https://pypi.python.org/pypi/kas) recipes in

```
meta-iot2000/meta-iot2000-example/kas-update{,-rt}.yml
```

build the base image as well as an update artifact without and with a
real-time kernel respectively, ready to be fed to `SWUpdate`. The recipes contain all needed layer
references.

For `SWUpdate` integration, the official [meta-swupdate](https://github.com/sbabic/meta-swupdate)
layer is used. Per default it installs an init script to start up a webserver for update purposes,
which is not needed for manual updates. For this purpose, it is replaced by an empty
init script.

This example of `SWUpdate` and `efibootguard` integration provides manual update capability only.


The manual update process means, that the `swu` file must be copied onto the finished SD-card. To use it with swupdate, the following command is used:

```
swupdate -i <filepath>.swu
```

Copy link
Collaborator

@jan-kiszka jan-kiszka Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I need reboot (swupdate tells me, but better state this again). But how do I declare the update successful after the reboot? Without that, I will fall back into v1 again.

bg_setenv -c is what I want, I suppose.

## Created artifacts

The aforementioned kas yml files produce the folllowing artifacts in the build folder:

* A flashable image: `tmp/deploy/images/iot2000/iot2000-example-image-iot2000.wic`
* An update artifact: `tmp/deploy/images/iot2000/iot2000-update-image-iot2000.swu`

*Note*:
Per default, the root filesystem included in the update artifact is identical to the one contained in the wic file. The simplest way to enhance the update artifact is to make it depend on a different image and set `SWUPDATE_IMAGES, SWUPDATE_IMAGES_FSTYPES, and IMAGE_DEPENDS` accordingly. See `meta-iot2000-example/recipes-core/images/iot2000-update-image.bb` for example.