From patchwork Wed Jun 5 07:17:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sangorrin X-Patchwork-Id: 10976371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 798BA3A3F for ; Wed, 5 Jun 2019 07:17:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 607F62884A for ; Wed, 5 Jun 2019 07:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 499B928862; Wed, 5 Jun 2019 07:17:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D12622884E for ; Wed, 5 Jun 2019 07:17:20 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2B4EFA70; Wed, 5 Jun 2019 07:17:20 +0000 (UTC) X-Original-To: cip-dev@lists.cip-project.org Delivered-To: cip-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id A07E52C for ; Wed, 5 Jun 2019 07:17:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mo-csw.securemx.jp (mo-csw1515.securemx.jp [210.130.202.154]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E94054C3 for ; Wed, 5 Jun 2019 07:17:17 +0000 (UTC) Received: by mo-csw.securemx.jp (mx-mo-csw1515) id x557HDdg009598; Wed, 5 Jun 2019 16:17:13 +0900 X-Iguazu-Qid: 34trdEsBZS1S8o6qRt X-Iguazu-QSIG: v=2; s=0; t=1559719033; q=34trdEsBZS1S8o6qRt; m=GJeWhwNEFVxvA1Y3TOr6sxfS/xFR2ZwH3RyAnJQ/Wfg= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1510) id x557HCRJ036296; Wed, 5 Jun 2019 16:17:12 +0900 Received: from enc01.localdomain ([106.186.93.100]) by imx2.toshiba.co.jp with ESMTP id x557HCIv015693; Wed, 5 Jun 2019 16:17:12 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.localdomain with ESMTP id x557HCke003631; Wed, 5 Jun 2019 16:17:12 +0900 From: Daniel Sangorrin To: isar-users@googlegroups.com Date: Wed, 5 Jun 2019 16:17:09 +0900 X-TSB-HOP: ON Message-Id: <20190605071709.12908-2-daniel.sangorrin@toshiba.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190605071709.12908-1-daniel.sangorrin@toshiba.co.jp> References: <20190605071709.12908-1-daniel.sangorrin@toshiba.co.jp> Cc: cip-dev@lists.cip-project.org Subject: [cip-dev] [[PATCH v2]] bmap: generate bmap for wic images X-BeenThere: cip-dev@lists.cip-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cip-dev-bounces@lists.cip-project.org Errors-To: cip-dev-bounces@lists.cip-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- meta/classes/wic-img.bbclass | 2 ++ meta/conf/distro/debian-common.conf | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index 86a918d..09fdfec 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -147,9 +147,11 @@ 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} + cp -f $(ls -t -1 ${BUILDCHROOT_DIR}/tmp/${IMAGE_FULLNAME}.wic/*.direct.bmap | head -1) ${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"