From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: MIME-Version: 1.0 References: <592943eab0a32f9e1b892960e84e0524a6f56c14.camel@pengutronix.de> In-Reply-To: From: Brian Hutchinson Date: Tue, 15 Jun 2021 15:07:30 -0400 Message-ID: Content-Type: multipart/alternative; boundary="0000000000003046a605c4d2b091" Subject: Re: [RAUC] Create bundles from command line outside of yocto? To: =?UTF-8?Q?Jan_L=C3=BCbbe?= Cc: rauc@pengutronix.de List-ID: --0000000000003046a605c4d2b091 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 15, 2021 at 12:17 AM Brian Hutchinson wrote: > Hi Jan, > > So using your manifest example and my partition scheme from earlier ... > > RAUC A slots: > /dev/mmcblk2gp0p1 (kernel/dtb) > /dev/mmcblk2gp0p2 (rootfs) > /dev/mmcblk2p1 (appfs) > > RAUC B slots: > /dev/mmcblk2gp1p1 (kernel/dtb) > /dev/mmcblk2gp1p2 (rootfs) > /dev/mmcblk2p2 (appfs) > > On Tue, May 25, 2021 at 2:56 AM Jan L=C3=BCbbe wrote= : > >> >> So your manifest might look like: >> [update] >> compatible=3Drauc-example >> version=3D2021.05-1 >> >> [bundle] >> format=3Dverity >> >> [image.kernel] >> filename=3Dkernel.img >> >> [image.rootfs] >> filename=3Drootfs.tar >> >> [image.appfs] >> filename=3Dappfs.tar >> >> >> Best regards, >> Jan >> >> >> > My system.conf (using my example partition layout for earlier email) file > would look something like: > > [system] > compatible=3Drauc-example > bootloader=3Duboot > > [keyring] > path=3D/etc/rauc/ca.cert.pem > > [slot.kernel.0] > device=3D/dev/mmcblk2gp0p1 > type=3Dvfat > parent=3Drootfs.0 > > [slot.kernel.1] > device=3D/dev/mmcblk2gp1p1 > type=3Dvfat > parent=3Drootfs.1 > > [slot.rootfs.0] > device=3D/dev/mmcblk2gp0p2 > type=3Dext4 > bootname=3DA > > [slot.rootfs.1] > device=3D/dev/mmcblk2gp1p2 > type=3Dext4 > bootname=3DB > > [slot.appfs.0] > device=3D/dev/mmcblk2p1 > type=3Dext4 > parent=3Drootfs.0 > > [slot.appfs.1] > device=3D/dev/mmcblk2p2 > type=3Dext4 > parent=3Drootfs.1 > > So I should use "parent" to tie both kernel and appfs slots to the rootfs= ? > > And for now, the rootfs is r/w on a ext4 filesystem, but in the future it > will be a squashfs. So once that happens would 'type=3Dext4' then change= to > 'type=3Draw'? > > Just trying to make sure I understand how to make manifest and system.con= f > map together for making bundles etc. > > Regards, > > Brian > > > Now my problem is the rauc install of the bundle fails: I'm using rauc 1.5 from Dunfell. root@imx8mmevk:~# rauc --debug install update-mybundle.raucb rauc-Message: 18:58:29.648: Debug log domains: 'rauc' (rauc:2812): rauc-DEBUG: 18:58:29.655: install started (rauc:2812): rauc-DEBUG: 18:58:29.655: input bundle: /home/root/update-mybundle.raucb (rauc:2812): rauc-DEBUG: 18:58:29.667: Trying to contact rauc service installing 0% Installing 0% Determining slot states 20% Determining slot states done. 20% Checking bundle 20% Verifying signature 40% Verifying signature done. 40% Checking bundle done. 40% Checking manifest contents 60% Checking manifest contents done. 60% Determining target install group 80% Determining target install group done. 80% Updating slots 80% Checking slot kernel.1 83% Checking slot kernel.1 done. 83% Copying image to kernel.1 86% Copying image to kernel.1 failed. 100% Updating slots failed. 100% Installing failed. LastError: Installation error: Failed updating slot kernel.1: failed to run tar extract: Child process exited with code 1 idle Installing `/home/root/update-mybundle.raucb` failed My system.conf: [system] compatible=3DMyTarget bootloader=3Duboot [keyring] path=3D/etc/rauc/ca.cert.pem [slot.kernel.0] device=3D/dev/mmcblk2gp0p1 type=3Dvfat parent=3Drootfs.0 [slot.kernel.1] device=3D/dev/mmcblk2gp1p1 type=3Dvfat parent=3Drootfs.1 [slot.rootfs.0] device=3D/dev/mmcblk2gp0p2 type=3Dext4 bootname=3DA [slot.rootfs.1] device=3D/dev/mmcblk2gp1p2 type=3Dext4 bootname=3DB [slot.appfs.0] device=3D/dev/mmcblk2p1 type=3Dext4 parent=3Drootfs.0 [slot.appfs.1] device=3D/dev/mmcblk2p2 type=3Dext4 parent=3Drootfs.1 My manifest.rauc: [update] compatible=3DMyTarget version=3D2021.06-15 [image.kernel] sha256=3D045fb07d617e387e8b39426847a93f517f2af005fb65aced6a7a3028a2adad70 size=3D21084160 filename=3Dmytarget-fsl-linux-5.4.114.tar.bz2 [image.rootfs] sha256=3Dd8b18918b7bfeec3f82d8eb454da42aca41da4fc8095cbeb52f4ebce5fb5e29c size=3D169139859 filename=3Dmytarget_yocto-3.1.7_dunfell_fslc-linux-5.4.114.tar.bz2 [image.appfs] sha256=3D0a46530a2387bd1eafa0912ab00dbc4f21077578f1c0b5e7a3b051b9cc36785a size=3D196 filename=3Dmytarget-appfs.tar.bz2 mytarget-fsl-linux-5.4.114.tar.bz2 is a tar of two files (kernel and device tree blob): Image and imx8mm-evk.dtb Can I not do a .tar for a vfat target slot? Regards, Brian --0000000000003046a605c4d2b091 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Jun 15, 2021 at 12:17 AM Bria= n Hutchinson <b.hutchman@gmail.c= om> wrote:
Hi Jan,

So using your mani= fest example and my partition scheme from earlier ...

RAUC A slots:
/dev/mmcblk2gp0p1 (kernel/dtb)
/dev/mmcblk2gp0p2 (rootfs)
/dev/mmcblk2p1 (appfs)

RAUC B slots:
/dev/mmcblk2gp1p1 (kernel/dtb)
/dev/mmcblk2gp1p2 (rootfs)
/dev/mmcblk2p2 (appfs)

On Tue, May 25, 2021 at 2:56 AM Jan L=C3=BCbb= e <jlu@pengutron= ix.de> wrote:

So your manifest might look like:
[update]
compatible=3Drauc-example
version=3D2021.05-1

[bundle]
format=3Dverity

[image.kernel]
filename=3Dkernel.img

[image.rootfs]
filename=3Drootfs.tar

[image.appfs]
filename=3Dappfs.tar


Best regards,
Jan



My system.conf (using my example p= artition layout for earlier email) file would look something like:

[system]
compatible=3Drauc-example
bootloader=3Duboot

[keyring]
path=3D/etc/rauc/ca.cert.pem
=C2=A0
[slo= t.kernel.0]
device= =3D/dev/mmcblk2gp0p1
type=3Dvfat
parent= =3Drootfs.0

[slot.kernel.1]
device=3D/dev/mmcblk2g= p1p1
type=3Dvfat
parent=3Drootfs.1

[slot.rootfs.0]
device=3D/dev/mmcblk2gp0p2
type=3Dext4
bootname=3DA

[slot.rootfs.1]
device=3D/dev/mmcblk2gp1p2
type=3Dext4
bootname=3DB
[slot.appfs.0]
device=3D/dev/mmcblk2p1=
type=3Dext4<= /div>
parent=3Drootfs.0

[slot.appfs.1]
device=3D/dev/mmcblk2p2
type=3Dext4
parent=3Drootfs.1

So I should use "parent" to tie both kernel and app= fs slots to the rootfs?

And for now= , the rootfs is r/w on a ext4 filesystem, but in the future it will be a sq= uashfs.=C2=A0 So once that happens would 'type=3Dext4' then change = to 'type=3Draw'?

Just tryin= g to make sure I understand how to make manifest and system.conf map togeth= er for making bundles etc.

<= /div>
Regards,
<= span style=3D"font-family:monospace">
Brian

Now my problem is the rau= c install of the bundle fails:

I'm using rauc = 1.5 from Dunfell.

ro= ot@imx8mmevk:~# rauc --debug install update-mybundle.raucb =C2=A0rauc-Message: 18:58:29.648: Debug log domains: 'rauc'
(rauc:2812): rauc-DEBUG: 18:58:29.655: install started
(rauc:2812): rauc-DEBUG: 18:58:29.655: input bundle: /ho= me/root/update-mybundle.raucb
(rauc:2812): rauc-DEBUG: 18:58:29.667: Trying to contact= rauc service
installing
=C2=A00% Installing
=C2=A00% Determining slot states
20% Determining slot states done.
20% Checking bundle
20% Verifying signature
40% Verifying signature done.
40% Checking bundle done.
40% Checking manifest contents
60% Checking manifest contents done.
60% Determining target install group
80% Determining target install group done.
80% Updating slots
80% Checking slot kernel.1
83% Checking slot kernel.1 done.
83% Copying image to kernel.1
86% Copying image to kernel.1 failed.
100% Updating slots failed.
100% Installing failed.
LastError: Installation error: Failed updating slot kernel.1: failed to= run tar extract: Child process exited with code 1
idle
Installing `/home/root/update-mybundle.raucb` failed

My system.conf:

= [system]
compatible=3DMyTarget
bootloader=3Duboot

[keyring]
path=3D/etc/rauc/ca.cert.pem

[slot.kernel.0]
device=3D/dev/mmcblk2gp0p1
type=3Dvfat
parent=3Drootfs.0

[slot.kernel.1]
device=3D/dev/mmcblk2gp1p1
type=3Dvfat
parent=3Drootfs.1

[slot.rootfs.0]
device=3D/dev/mmcblk2gp0p2
type=3Dext4
bootname=3DA

[slot.rootfs.1]
device=3D/dev/mmcblk2gp1p2
type=3Dext4
bootname=3DB

[slot.appfs.0]
device=3D/dev/mmcblk2p1
type=3Dext4
parent=3Drootfs.0

[slot.appfs.1]
device=3D/dev/mmcblk2p2
type=3Dext4
parent=3Drootfs.1

My manife= st.rauc:

=
[update]
compatible=3DMyTarget
version=3D2021.06-15

[image.kernel]
sha256=3D045fb07d617e387e8b39426847a93f517f2af005fb65aced6a7a3028a2adad= 70
size=3D21084160
filename=3Dmytarget-fsl-linux-5.4.114.tar.bz2

[image.rootfs]
sha256=3Dd8b18918b7bfeec3f82d8eb454da42aca41da4fc8095cbeb52f4ebce5fb5e2= 9c
size=3D169139859
filename=3Dmytarget_yocto-3.1.7_dunfell_fslc-linux-5.4.114.tar.bz2

[image.appfs]
sha256=3D0a46530a2387bd1eafa0912ab00dbc4f21077578f1c0b5e7a3b051b9cc3678= 5a
size=3D196
filename=3Dmytarget-appfs.tar.bz2

mytarget-fsl-linux-5.4.114.tar.bz2 is a tar of two fi= les (kernel and device tree blob):=C2=A0 Image and imx8mm-evk.dtb

Can I not do a .tar for a vfa= t target slot?

Regar= ds,

Brian
=


--0000000000003046a605c4d2b091--