From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1g5BmP-0008VH-Eg for rauc@pengutronix.de; Wed, 26 Sep 2018 17:31:10 +0200 Received: by mail-lf1-x12d.google.com with SMTP id r191-v6so11101912lff.2 for ; Wed, 26 Sep 2018 08:31:08 -0700 (PDT) MIME-Version: 1.0 References: <4995aef7-7e3c-835c-8bce-a1e1c94a18ab@pengutronix.de> In-Reply-To: <4995aef7-7e3c-835c-8bce-a1e1c94a18ab@pengutronix.de> From: Abhishek Kumar Rai Date: Wed, 26 Sep 2018 21:00:55 +0530 Message-ID: Subject: Re: [RAUC] Regarding usage of hook List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1530034811==" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: ejo@pengutronix.de Cc: rauc@pengutronix.de --===============1530034811== Content-Type: multipart/alternative; boundary="0000000000004954bb0576c7e90f" --0000000000004954bb0576c7e90f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Enrico, Thanks for your prompt reply. In my design , I have to do following things. - Create a RAUC bundle consisting of App images and dbs -> ProductControl.bin, Controls.bin, Operations.bin, ProductControl.db, Controls.db, Operations.db etc. ->*Bundle.raucb* *- *- On installation, both the images and db should go into AppFS. DataFS should remain unaffected. - =E2=80=9CPost Install Hook=E2=80=9D in RAUC shall be used to copy = configuration data from the current slot of DataFS to the newly installed slot. *Can we achieve above scenario(with system.conf in previous mail) **using * =E2=80=9CPost Install Hook=E2=80=9D in manifest file. ? *Regards,* *Abhishek* On Wed, Sep 26, 2018 at 7:52 PM Enrico Joerns wrote: > Hi Abhishek, > > On 9/26/18 1:59 PM, Abhishek Kumar Rai wrote: > > > > Abhishek Kumar Rai abhishekr@eximiusdesign.com>> > > > > 5:12 PM (16 minutes ago) > > to rauc-request > > > > Hi team , > > > > I am new to rauc .Please solve my query > > > > I have written system.conf file > > > > {{{ > > abhishek@abhishek-Latitude-5490:~$ cat system.conf > > [system] > > compatible=3Deximius > > bootloader=3Duboot > > mountprefix=3D/mnt/rauc > > statusfile=3D/factory/rauc.status > > > > [keyring] > > path=3Dcert.pem > > > > [...] > > > > [slot.appdata.0] > > #device=3D/dev/mmcblk1p8 > > device=3D/dev/disk/by-path/platform-219c000.usdhc-part8 > > type=3Dext4 > > parent=3Drootfs.0 > > > > [slot.appdata.1] > > #device=3D/dev/mmcblk1p9 > > device=3D/dev/disk/by-path/platform-219c000.usdhc-part9 > > type=3Dext4 > > parent=3Drootfs.1 > > }}} > > > > how to use hook in order to preserve the data of appdata0, while > installing bundle . > > In which file i have to give hook option? > > Hooks are part of the bundle, thus you have to define them in the bundle'= s > manifest, e.g.: > > [hooks] > filename=3Dyourhookscript.sh > > [image.appdata] > image=3Dfoo.img > hooks=3Dinstall > > Note that your bundle generation has to place yourhookscript.sh into the > bundle in order to make this work. > > > Potentially, you could also do this in a post-install hook for your appfs > in case you know where your appdata copies are located. > > > Best regards, > > Enrico > > > The information contained in this e-mail message (including any > > attachments) may be confidential, proprietary, privileged, or otherwise > > exempt from disclosure under applicable laws. It is intended to be > > conveyed only to the designated recipient(s). Any use, dissemination, > > distribution, printing, retaining or copying of this e-mail (including > its > > attachments) by unintended recipient(s) is strictly prohibited and may > > be unlawful. > > > Not sure if I will get in prison when replying on this mail on a > world-accessible mailing list... ;) > > > -- > Pengutronix e.K. | Enrico J=C3=B6rns = | > 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 = | > > --=20 The information contained in this e-mail message (including=20 any=C2=A0 attachments) may be confidential, proprietary, privileged, or=20 otherwise exempt from disclosure under applicable laws. It is intended to=20 be=C2=A0 conveyed only to the designated recipient(s). Any use, dissemination,=C2=A0 distribution, printing, retaining or copying of this e-mail (including=20 its=C2=A0 attachments) by unintended recipient(s) is strictly prohibited and=20 may=C2=A0 be unlawful. If you are not an intended recipient of this e-mail, or=20 believe=C2=A0 that you have received this e-mail in error, please notify the=20 sender=C2=A0 immediately (by replying to this e-mail), delete any and all=20 copies of=C2=A0 this e-mail (including any attachments) from your system, and=20 do not disclose the content of this e-mail to any other person. Thank you=20 for your cooperation. --=20 _This e-mail message (including any=C2=A0attachments) may be confidential,= =20 proprietary, privileged, or otherwise=C2=A0exempt from disclosure under=20 applicable laws. If you are not an intended recipient, please delete this= =20 message. Thank you. _ --0000000000004954bb0576c7e90f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Enrico,
Thanks for your prompt reply.

In my design , I have to do following things.

-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Create a RAUC bundle consisting of App images and dbs -> ProductContro= l.bin, Controls.bin, Operations.bin, ProductControl.db, Controls.db, Operat= ions.db etc. ->Bundle.raucb
-=C2=A0-=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0On installation, both the images and db= should go into AppFS. DataFS should remain unaffected.
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=E2=80=9CPost= Install Hook=E2=80=9D in RAUC shall be used to copy configuration data fro= m the current slot of DataFS to the newly installed slot.


Can we achieve ab= ove scenario(with system.conf in previous mail)=C2=A0using=C2=A0=C2=A0=E2=80=9CPos= t Install Hook=E2=80=9D in manifest file. ?
<= br>

<= b>Regards,
Abhishek

On Wed, Sep 26, 2018 at 7:52 PM Enrico= Joerns <ejo@pengutronix.de>= ; wrote:
Hi Abhishek,

On 9/26/18 1:59 PM, Abhishek Kumar Rai wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Abhishek Kumar Rai <abhishekr@eximiusdesign.com= <mailto:abhishekr@eximiusdesign.com>>
>
> 5:12 PM (16 minutes ago)
> to rauc-request
>
> Hi team ,
>
> I am new to rauc .Please solve my query
>
> I have written system.conf file
>
> {{{
> abhishek@abhishek-Latitude-5490:~$ cat system.conf
> [system]
> compatible=3Deximius
> bootloader=3Duboot
> mountprefix=3D/mnt/rauc
> statusfile=3D/factory/rauc.status
>
> [keyring]
> path=3Dcert.pem
>
> [...]
>
> [slot.appdata.0]
> #device=3D/dev/mmcblk1p8
> device=3D/dev/disk/by-path/platform-219c000.usdhc-part8
> type=3Dext4
> parent=3Drootfs.0
>
> [slot.appdata.1]
> #device=3D/dev/mmcblk1p9
> device=3D/dev/disk/by-path/platform-219c000.usdhc-part9
> type=3Dext4
> parent=3Drootfs.1
> }}}
>
> how to use hook in order to preserve the data of appdata0, while insta= lling bundle .
> In which file i have to give hook option?

Hooks are part of the bundle, thus you have to define them in the bundle= 9;s manifest, e.g.:

[hooks]
filename=3Dyourhookscript.sh

[image.appdata]
image=3Dfoo.img
hooks=3Dinstall

Note that your bundle generation has to place yourhookscript.sh into the bu= ndle in order to make this work.


Potentially, you could also do this in a post-install hook for your appfs i= n case you know where your appdata copies are located.


Best regards,

Enrico

> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwis= e
> exempt from disclosure under applicable laws. It is intended to be
> conveyed only to the designated recipient(s). Any use, dissemination,<= br> > distribution, printing, retaining or copying of this e-mail (including= its
> attachments) by unintended recipient(s) is strictly prohibited and may=
> be unlawful.


Not sure if I will get in prison when replying on this mail on a world-acce= ssible mailing list... ;)


--
Pengutronix e.K.=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| Enrico J=C3=B6rns=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
Industrial Linux Solutions=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0| http://www.pengutronix.de/=C2=A0 |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |<= br> Amtsgericht Hildesheim, HRA 2686=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| = Fax:=C2=A0 =C2=A0+49-5121-206917-5555 |


The information contained in this e-mail message (including any=C2= =A0

attachments) may be confidential, proprietary, privileged, or othe= rwise

exempt from disclosure under applicable laws. It is intended to be= =C2=A0

conveyed only to the designated recipient(s). Any use, disseminati= on,=C2=A0

distribution, printing, retaining or copying of this e-mail (inclu= ding its=C2=A0

attachments) by unintended recipient(s) is strictly prohibited and= may=C2=A0

be unlawful. If you are not an intended recipient of this e-mail, = or believe=C2=A0

that you have received this e-mail in error, please notify the sen= der=C2=A0

immediately (by replying to this e-mail), delete any and all copie= s of=C2=A0

this e-mail (including any attachments) from your system, and do n= ot

disclose the content of this e-mail to any other person. Thank you= for your cooperation.


This e-mail message (including any=C2=A0attachments) may be= confidential, proprietary, privileged, or otherwise=C2=A0exempt from discl= osure under applicable laws. If you are not an intended recipient, please d= elete this message. Thank you.
--0000000000004954bb0576c7e90f-- --===============1530034811== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KUkFVQyBtYWls aW5nIGxpc3Q= --===============1530034811==--