public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3] bmap: generate bmap for wic images
@ 2019-06-05  8:14 Daniel Sangorrin
  2019-06-13  5:08 ` daniel.sangorrin
  2019-06-19 11:24 ` Baurzhan Ismagulov
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Sangorrin @ 2019-06-05  8:14 UTC (permalink / raw)
  To: isar-users; +Cc: cip-dev

bmap shortens the time required to flash an image.
This can be useful when you need a fixed-size image, for
example to update partitions with swupdate.

Example usage:
sudo bmaptool copy --bmap \
build/tmp/deploy/images/iwg20m/cip-core-image-cip-core-iwg20m.wic.img.bmap \
build/tmp/deploy/images/iwg20m/cip-core-image-cip-core-iwg20m.wic.img \
/dev/sdf

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 meta/classes/wic-img.bbclass        | 5 ++++-
 meta/conf/distro/debian-common.conf | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 86a918d..94f0b02 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -147,9 +147,12 @@ EOSUDO
         ${ISARROOT}/scripts/wic create ${WKS_FULL_PATH} \
             --vars "${STAGING_DIR}/${MACHINE}/imgdata/" \
             -o /tmp/${IMAGE_FULLNAME}.wic/ \
+            --bmap \
             -e ${IMAGE_BASENAME} ${WIC_CREATE_EXTRA_ARGS}
     sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true
-    cp -f $(ls -t -1 ${BUILDCHROOT_DIR}/tmp/${IMAGE_FULLNAME}.wic/*.direct | head -1) ${WIC_IMAGE_FILE}
+    WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/tmp/${IMAGE_FULLNAME}.wic/*.direct | head -1)
+    cp -f ${WIC_DIRECT} ${WIC_IMAGE_FILE}
+    cp -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap
 }
 
 do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"
diff --git a/meta/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
index 5a47483..b845c73 100644
--- a/meta/conf/distro/debian-common.conf
+++ b/meta/conf/distro/debian-common.conf
@@ -11,7 +11,8 @@ WIC_IMAGER_INSTALL = "parted \
                       dosfstools \
                       mtools \
                       e2fsprogs \
-                      python3"
+                      python3 \
+                      bmap-tools"
 
 GRUB_BOOTLOADER_INSTALL_amd64 = "grub-efi-amd64-bin"
 GRUB_BOOTLOADER_INSTALL_i386 = "grub-efi-ia32-bin"
-- 
2.17.1


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

* [PATCH v3] bmap: generate bmap for wic images
  2019-06-05  8:14 [PATCH v3] bmap: generate bmap for wic images Daniel Sangorrin
@ 2019-06-13  5:08 ` daniel.sangorrin
  2019-06-13  8:56   ` Baurzhan Ismagulov
  2019-06-19 11:24 ` Baurzhan Ismagulov
  1 sibling, 1 reply; 5+ messages in thread
From: daniel.sangorrin @ 2019-06-13  5:08 UTC (permalink / raw)
  To: isar-users

Hi all,

It seems the patch below didn't get into ISAR.
#Probably because I posted other patches for the isar-cip-core layer, and that created confusion. Sorry^^.

Thanks,
Daniel

> -----Original Message-----
> From: isar-users@googlegroups.com <isar-users@googlegroups.com> On Behalf Of Daniel Sangorrin
> Sent: Wednesday, June 5, 2019 5:14 PM
> To: isar-users@googlegroups.com
> Cc: cip-dev@lists.cip-project.org
> Subject: [PATCH v3] bmap: generate bmap for wic images
> 
> bmap shortens the time required to flash an image.
> This can be useful when you need a fixed-size image, for
> example to update partitions with swupdate.
> 
> Example usage:
> sudo bmaptool copy --bmap \
> build/tmp/deploy/images/iwg20m/cip-core-image-cip-core-iwg20m.wic.img.bmap \
> build/tmp/deploy/images/iwg20m/cip-core-image-cip-core-iwg20m.wic.img \
> /dev/sdf
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  meta/classes/wic-img.bbclass        | 5 ++++-
>  meta/conf/distro/debian-common.conf | 3 ++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
> index 86a918d..94f0b02 100644
> --- a/meta/classes/wic-img.bbclass
> +++ b/meta/classes/wic-img.bbclass
> @@ -147,9 +147,12 @@ EOSUDO
>          ${ISARROOT}/scripts/wic create ${WKS_FULL_PATH} \
>              --vars "${STAGING_DIR}/${MACHINE}/imgdata/" \
>              -o /tmp/${IMAGE_FULLNAME}.wic/ \
> +            --bmap \
>              -e ${IMAGE_BASENAME} ${WIC_CREATE_EXTRA_ARGS}
>      sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar
> ${ISARROOT}/scripts || true
> -    cp -f $(ls -t -1 ${BUILDCHROOT_DIR}/tmp/${IMAGE_FULLNAME}.wic/*.direct | head -1)
> ${WIC_IMAGE_FILE}
> +    WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/tmp/${IMAGE_FULLNAME}.wic/*.direct | head -1)
> +    cp -f ${WIC_DIRECT} ${WIC_IMAGE_FILE}
> +    cp -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap
>  }
> 
>  do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"
> diff --git a/meta/conf/distro/debian-common.conf b/meta/conf/distro/debian-common.conf
> index 5a47483..b845c73 100644
> --- a/meta/conf/distro/debian-common.conf
> +++ b/meta/conf/distro/debian-common.conf
> @@ -11,7 +11,8 @@ WIC_IMAGER_INSTALL = "parted \
>                        dosfstools \
>                        mtools \
>                        e2fsprogs \
> -                      python3"
> +                      python3 \
> +                      bmap-tools"
> 
>  GRUB_BOOTLOADER_INSTALL_amd64 = "grub-efi-amd64-bin"
>  GRUB_BOOTLOADER_INSTALL_i386 = "grub-efi-ia32-bin"
> --
> 2.17.1
> 
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> isar-users+unsubscribe@googlegroups.com.
> To post to this group, send email to isar-users@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/20190605081428.7596-1-daniel.sangorrin%40toshiba.co.jp.
> For more options, visit https://groups.google.com/d/optout.

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

* Re: [PATCH v3] bmap: generate bmap for wic images
  2019-06-13  5:08 ` daniel.sangorrin
@ 2019-06-13  8:56   ` Baurzhan Ismagulov
  0 siblings, 0 replies; 5+ messages in thread
From: Baurzhan Ismagulov @ 2019-06-13  8:56 UTC (permalink / raw)
  To: isar-users

On Thu, Jun 13, 2019 at 05:08:55AM +0000, daniel.sangorrin@toshiba.co.jp wrote:
> It seems the patch below didn't get into ISAR.
> #Probably because I posted other patches for the isar-cip-core layer, and that created confusion. Sorry^^.

Seems we missed it indeed, thanks for pinging. Let us have a look.

With kind regards,
Baurzhan.

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

* Re: [PATCH v3] bmap: generate bmap for wic images
  2019-06-05  8:14 [PATCH v3] bmap: generate bmap for wic images Daniel Sangorrin
  2019-06-13  5:08 ` daniel.sangorrin
@ 2019-06-19 11:24 ` Baurzhan Ismagulov
  2019-06-21  2:48   ` daniel.sangorrin
  1 sibling, 1 reply; 5+ messages in thread
From: Baurzhan Ismagulov @ 2019-06-19 11:24 UTC (permalink / raw)
  To: isar-users

On Wed, Jun 05, 2019 at 05:14:28PM +0900, Daniel Sangorrin wrote:
> bmap shortens the time required to flash an image.
> This can be useful when you need a fixed-size image, for
> example to update partitions with swupdate.

Applied to next, thanks.

Would you like to add a brief section on motivation and usage to the user
manual?

With kind regards,
Baurzhan.

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

* RE: [PATCH v3] bmap: generate bmap for wic images
  2019-06-19 11:24 ` Baurzhan Ismagulov
@ 2019-06-21  2:48   ` daniel.sangorrin
  0 siblings, 0 replies; 5+ messages in thread
From: daniel.sangorrin @ 2019-06-21  2:48 UTC (permalink / raw)
  To: ibr, isar-users

Hello Baurzhan,

> -----Original Message-----
> From: isar-users@googlegroups.com <isar-users@googlegroups.com> On Behalf Of Baurzhan Ismagulov
> Sent: Wednesday, June 19, 2019 8:25 PM
> To: isar-users@googlegroups.com
> Subject: Re: [PATCH v3] bmap: generate bmap for wic images
> 
> On Wed, Jun 05, 2019 at 05:14:28PM +0900, Daniel Sangorrin wrote:
> > bmap shortens the time required to flash an image.
> > This can be useful when you need a fixed-size image, for
> > example to update partitions with swupdate.
> 
> Applied to next, thanks.
> 
> Would you like to add a brief section on motivation and usage to the user
> manual?

OK, I will. Just give me a bit of time.

Thanks,
Daniel

> 
> With kind regards,
> Baurzhan.
> 
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> isar-users+unsubscribe@googlegroups.com.
> To post to this group, send email to isar-users@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/isar-users/20190619112452.GY3977%40yssyq.m.ilbers.de.
> For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2019-06-21  2:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05  8:14 [PATCH v3] bmap: generate bmap for wic images Daniel Sangorrin
2019-06-13  5:08 ` daniel.sangorrin
2019-06-13  8:56   ` Baurzhan Ismagulov
2019-06-19 11:24 ` Baurzhan Ismagulov
2019-06-21  2:48   ` daniel.sangorrin

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