From: Enrico Joerns <ejo@pengutronix.de>
To: "Middelschulte, Leif" <Leif.Middelschulte@klsmartin.com>
Cc: "rauc@pengutronix.de" <rauc@pengutronix.de>
Subject: Re: [RAUC] Progress indication
Date: Thu, 4 May 2017 12:29:54 +0200 [thread overview]
Message-ID: <30eb89be-17c9-3e4e-766b-7e833ccc93f7@pengutronix.de> (raw)
In-Reply-To: <1493222588.17528.21.camel@klsmartin.com>
Hi Leif,
On 04/26/2017 06:03 PM, Middelschulte, Leif wrote:
> Hi,
>
> I want to flash a µCtrl, as part of a "Install group" using RAUC and (if necessary) a custom Handler (?).
>
> Looking at https://github.com/rauc/rauc/blob/master/test/install-content/custom_handler.sh I was wondering about the progress indication.
> What's the supposed way to extend RAUC to handle some kind of binary bundled within the raucb and communicate the update progress back to the (already implemented) Update Controller?
the `custom handler` you took a look at is something different than what
you require. It is a way to fully customize the entire RAUC installation
process using a script or a binary.
I guess this is not what you intend to do.
If I got it right, you only want to have a custom handling for a single
slot class.
This is what RAUCs `hooks` [1] are for. Or, to be more detailed, what
the per-slot `install` hook [2] is for.
Hooks are defined in your Bundles manifest and provided by a single
`hook` script that must be placed inside the bundle and referred to in
the bundle section `[hooks]`:
[hooks]
filename=my-hooks.sh
Then you have to add to your µCtrl-Slots image section the line
[image.uctrl]
...
hooks=install
This will make RAUC calling the hook skript instead of performing the
default installation routine for this slot.
In the hook script you should check for being executed with the
arguments matching your slot. An example for this is in the
documentation. Slightly adapted to your needs it will look something
like this:
#!/bin/sh
case "$1" in
slot-install)
# only uctrl needs to be handled
test "$RAUC_SLOT_CLASS" = "uctrl" || exit 0
uctrl-update-routine "$RAUC_IMAGE_NAME"
;;
*)
exit 1
;;
esac
exit 0
Does that help you?
Best regards
Enrico
[1]
http://rauc.readthedocs.io/en/latest/using.html#bundle-based-customization-hooks
[2] http://rauc.readthedocs.io/en/latest/using.html#install-hook
--
Pengutronix e.K. | Enrico Jörns |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
RAUC mailing list
next prev parent reply other threads:[~2017-05-04 10:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 16:03 Middelschulte, Leif
2017-05-04 10:29 ` Enrico Joerns [this message]
2017-05-04 14:33 ` Middelschulte, Leif
2017-05-10 13:22 ` Enrico Joerns
2017-05-11 10:29 ` Middelschulte, Leif
2017-05-16 9:21 ` Enrico Joerns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30eb89be-17c9-3e4e-766b-7e833ccc93f7@pengutronix.de \
--to=ejo@pengutronix.de \
--cc=Leif.Middelschulte@klsmartin.com \
--cc=rauc@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox