mail archive of the rauc mailing list
 help / color / mirror / Atom feed
* [RAUC] Regarding usage of hook
@ 2018-09-26 11:59 Abhishek Kumar Rai
  2018-09-26 14:22 ` Enrico Joerns
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Kumar Rai @ 2018-09-26 11:59 UTC (permalink / raw)
  To: rauc


[-- Attachment #1.1: Type: text/plain, Size: 3016 bytes --]

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=eximius
bootloader=uboot
mountprefix=/mnt/rauc
statusfile=/factory/rauc.status

[keyring]
path=cert.pem

[slot.rescue.0]
#device=/dev/mmcblk1p0
device=/dev/disk/by-path/platform-219c000.usdhc-part0
type=raw
bootname=rescue

[slot.factory.0]
#device=/dev/mmcblk1p1
device=/dev/disk/by-path/platform-219c000.usdhc-part1
type=ext4
bootname=factory

[slot.servicewatch_datalogger.0]
#device=/dev/mmcblk1p2
device=/dev/disk/by-path/platform-219c000.usdhc-part2
type=ext4
bootname=servicewatch_datalogger

[slot.datalogger_space.0]
#device=/dev/mmcblk1p3
device=/dev/disk/by-path/platform-219c000.usdhc-part3
type=ext4
bootname=datalogger_space

[slot.rootfs.0]
#device=/dev/mmcblk1p4
device=/dev/disk/by-path/platform-219c000.usdhc-part4
type=ext4
bootname=A

[slot.rootfs.1]
#device=/dev/mmcblk1p5
device=/dev/disk/by-path/platform-219c000.usdhc-part5
type=ext4
bootname=B

[slot.appfs.0]
#device=/dev/mmcblk1p6
device=/dev/disk/by-path/platform-219c000.usdhc-part6
type=ext4
parent=rootfs.0

[slot.appfs.1]
#device=/dev/mmcblk1p7
device=/dev/disk/by-path/platform-219c000.usdhc-part7
type=ext4
parent=rootfs.1

[slot.appdata.0]
#device=/dev/mmcblk1p8
device=/dev/disk/by-path/platform-219c000.usdhc-part8
type=ext4
parent=rootfs.0

[slot.appdata.1]
#device=/dev/mmcblk1p9
device=/dev/disk/by-path/platform-219c000.usdhc-part9
type=ext4
parent=rootfs.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?

Regards,
Abhishek

-- 














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. If you are not an intended recipient of this e-mail, or 
believe 


that you have received this e-mail in error, please notify the 
sender 


immediately (by replying to this e-mail), delete any and all 
copies of 


this e-mail (including any attachments) from your system, and 
do not


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






-- 
_This e-mail message (including any attachments) may be confidential, 
proprietary, privileged, or otherwise exempt from disclosure under 
applicable laws. If you are not an intended recipient, please delete this 
message. Thank you.
_

[-- Attachment #1.2: Type: text/html, Size: 4932 bytes --]

[-- Attachment #2: Type: text/plain, Size: 65 bytes --]

_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RAUC] Regarding usage of hook
  2018-09-26 11:59 [RAUC] Regarding usage of hook Abhishek Kumar Rai
@ 2018-09-26 14:22 ` Enrico Joerns
  2018-09-26 15:30   ` Abhishek Kumar Rai
  0 siblings, 1 reply; 4+ messages in thread
From: Enrico Joerns @ 2018-09-26 14:22 UTC (permalink / raw)
  To: Abhishek Kumar Rai; +Cc: rauc

Hi Abhishek,

On 9/26/18 1:59 PM, Abhishek Kumar Rai wrote:
> 
>       Abhishek 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=eximius
> bootloader=uboot
> mountprefix=/mnt/rauc
> statusfile=/factory/rauc.status
> 
> [keyring]
> path=cert.pem
> 
> [...]
>
> [slot.appdata.0]
> #device=/dev/mmcblk1p8
> device=/dev/disk/by-path/platform-219c000.usdhc-part8
> type=ext4
> parent=rootfs.0
> 
> [slot.appdata.1]
> #device=/dev/mmcblk1p9
> device=/dev/disk/by-path/platform-219c000.usdhc-part9
> type=ext4
> parent=rootfs.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=yourhookscript.sh

[image.appdata]
image=foo.img
hooks=install

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ö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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RAUC] Regarding usage of hook
  2018-09-26 14:22 ` Enrico Joerns
@ 2018-09-26 15:30   ` Abhishek Kumar Rai
  2018-09-27  6:46     ` Enrico Joerns
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Kumar Rai @ 2018-09-26 15:30 UTC (permalink / raw)
  To: ejo; +Cc: rauc


[-- Attachment #1.1: Type: text/plain, Size: 4408 bytes --]

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.
-        “Post Install Hook” 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 * “Post
Install Hook” in manifest file. ?


*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:
> >
> >       Abhishek 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=eximius
> > bootloader=uboot
> > mountprefix=/mnt/rauc
> > statusfile=/factory/rauc.status
> >
> > [keyring]
> > path=cert.pem
> >
> > [...]
> >
> > [slot.appdata.0]
> > #device=/dev/mmcblk1p8
> > device=/dev/disk/by-path/platform-219c000.usdhc-part8
> > type=ext4
> > parent=rootfs.0
> >
> > [slot.appdata.1]
> > #device=/dev/mmcblk1p9
> > device=/dev/disk/by-path/platform-219c000.usdhc-part9
> > type=ext4
> > parent=rootfs.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=yourhookscript.sh
>
> [image.appdata]
> image=foo.img
> hooks=install
>
> 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ö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 |
>
>

-- 














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. If you are not an intended recipient of this e-mail, or 
believe 


that you have received this e-mail in error, please notify the 
sender 


immediately (by replying to this e-mail), delete any and all 
copies of 


this e-mail (including any attachments) from your system, and 
do not


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






-- 
_This e-mail message (including any attachments) may be confidential, 
proprietary, privileged, or otherwise exempt from disclosure under 
applicable laws. If you are not an intended recipient, please delete this 
message. Thank you.
_

[-- Attachment #1.2: Type: text/html, Size: 7779 bytes --]

[-- Attachment #2: Type: text/plain, Size: 65 bytes --]

_______________________________________________
RAUC mailing list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RAUC] Regarding usage of hook
  2018-09-26 15:30   ` Abhishek Kumar Rai
@ 2018-09-27  6:46     ` Enrico Joerns
  0 siblings, 0 replies; 4+ messages in thread
From: Enrico Joerns @ 2018-09-27  6:46 UTC (permalink / raw)
  To: Abhishek Kumar Rai; +Cc: rauc

Hi Abhishek,

On 9/26/18 5:30 PM, Abhishek Kumar Rai wrote:
> 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.
> -“Post Install Hook” 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 “Post Install Hook” in manifest file. ?

note that ATM, there is only a per-slot post-install hook. But, we have a post per-installation post-install *handler*.
This means, the hook will be executed right after, e.g., your App image is copied and could be used to also write additional files you have in the bundle to the same slot (despite I would assume to have .db files in the datafs instead of appfs).

For copying DataFS content, you might want to join the discussion we have here:

https://github.com/rauc/rauc/issues/333

Maybe the discussion in https://github.com/rauc/rauc/issues/325 is also something that might be useful for your purposes.


Best regards, Enrico


-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-27  6:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 11:59 [RAUC] Regarding usage of hook Abhishek Kumar Rai
2018-09-26 14:22 ` Enrico Joerns
2018-09-26 15:30   ` Abhishek Kumar Rai
2018-09-27  6:46     ` Enrico Joerns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox