All of lore.kernel.org
 help / color / mirror / Atom feed
From: daniel.sangorrin@toshiba.co.jp (Daniel Sangorrin)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] [isar-cip-core][next] bmap: apply bmap patch to isar until we upgrade
Date: Thu, 13 Jun 2019 14:51:38 +0900	[thread overview]
Message-ID: <20190613055138.6769-1-daniel.sangorrin@toshiba.co.jp> (raw)

A similar bmap patch has been sent to ISAR upstream,
but while it gets accepted and until we update the ISAR
version, we can use this backport.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 0001-bmap-generate-bmap-for-wic-images.patch | 57 ++++++++++++++++++++
 kas.yml                                      |  4 ++
 2 files changed, 61 insertions(+)
 create mode 100644 0001-bmap-generate-bmap-for-wic-images.patch

diff --git a/0001-bmap-generate-bmap-for-wic-images.patch b/0001-bmap-generate-bmap-for-wic-images.patch
new file mode 100644
index 0000000..63ebe54
--- /dev/null
+++ b/0001-bmap-generate-bmap-for-wic-images.patch
@@ -0,0 +1,57 @@
+From 4bf7d60b4fb64ed0a7a131431cc6a2573e7178a4 Mon Sep 17 00:00:00 2001
+From: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
+Date: Thu, 13 Jun 2019 13:51:28 +0900
+Subject: [PATCH] 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 | 4 ++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
+index 09d9f2e..f227655 100644
+--- a/meta/classes/wic-img.bbclass
++++ b/meta/classes/wic-img.bbclass
+@@ -151,9 +151,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..c1e5d6b 100644
+--- a/meta/conf/distro/debian-common.conf
++++ b/meta/conf/distro/debian-common.conf
+@@ -10,8 +10,8 @@ WIC_IMAGER_INSTALL = "parted \
+                       util-linux \
+                       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
+
diff --git a/kas.yml b/kas.yml
index 21a776e..c726079 100644
--- a/kas.yml
+++ b/kas.yml
@@ -20,6 +20,10 @@ repos:
   isar:
     url: https://github.com/ilbers/isar
     refspec: 596732aa99c361b756655434bc90e0108e1caa33
+    patches:
+      bmap:
+        repo: cip-core
+        path: 0001-bmap-generate-bmap-for-wic-images.patch
     layers:
       meta:
 
-- 
2.17.1

             reply	other threads:[~2019-06-13  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13  5:51 Daniel Sangorrin [this message]
2019-06-19 16:24 ` Jan Kiszka
2019-06-21  2:39   ` daniel.sangorrin at toshiba.co.jp

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=20190613055138.6769-1-daniel.sangorrin@toshiba.co.jp \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=cip-dev@lists.cip-project.org \
    --subject='Re: [cip-dev] [isar-cip-core][next] bmap: apply bmap patch to isar until we upgrade' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.