From patchwork Wed Jun 5 06:30:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sangorrin X-Patchwork-Id: 10976367 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 BE919924 for ; Wed, 5 Jun 2019 06:30:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB4742807B for ; Wed, 5 Jun 2019 06:30:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E9262843C; Wed, 5 Jun 2019 06:30:31 +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 54C252807B for ; Wed, 5 Jun 2019 06:30:31 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 42FBBB2F; Wed, 5 Jun 2019 06:30:27 +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 E20A6A95 for ; Wed, 5 Jun 2019 06:30:25 +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 37CBF34F for ; Wed, 5 Jun 2019 06:30:25 +0000 (UTC) Received: by mo-csw.securemx.jp (mx-mo-csw1515) id x556UJKB000962; Wed, 5 Jun 2019 15:30:19 +0900 X-Iguazu-Qid: 34ts1uRUfTiP9wjFUn X-Iguazu-QSIG: v=2; s=0; t=1559716218; q=34ts1uRUfTiP9wjFUn; m=juHqPMjKOOUkmpXmSQuHvUJ6w/ghTGlrQnuMSNoBSuM= Received: from imx2.toshiba.co.jp (imx2.toshiba.co.jp [106.186.93.51]) by relay.securemx.jp (mx-mr1513) id x556UImC001908; Wed, 5 Jun 2019 15:30:18 +0900 Received: from enc01.localdomain ([106.186.93.100]) by imx2.toshiba.co.jp with ESMTP id x556UIKD021500; Wed, 5 Jun 2019 15:30:18 +0900 (JST) Received: from hop001.toshiba.co.jp ([133.199.164.63]) by enc01.localdomain with ESMTP id x556UIGs023603; Wed, 5 Jun 2019 15:30:18 +0900 From: Daniel Sangorrin To: isar-users@googlegroups.com Date: Wed, 5 Jun 2019 15:30:14 +0900 X-TSB-HOP: ON Message-Id: <20190605063014.18193-2-daniel.sangorrin@toshiba.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190605063014.18193-1-daniel.sangorrin@toshiba.co.jp> References: <20190605063014.18193-1-daniel.sangorrin@toshiba.co.jp> Cc: cip-dev@lists.cip-project.org Subject: [cip-dev] [ISAR] 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 because it skips areas with zeros. 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/recipes-devtools/buildchroot/buildchroot-target.bb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index 09d9f2e..8fd2ff8 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -151,9 +151,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/recipes-devtools/buildchroot/buildchroot-target.bb b/meta/recipes-devtools/buildchroot/buildchroot-target.bb index ce6bd93..15b4be0 100644 --- a/meta/recipes-devtools/buildchroot/buildchroot-target.bb +++ b/meta/recipes-devtools/buildchroot/buildchroot-target.bb @@ -19,6 +19,7 @@ BUILDCHROOT_PREINSTALL ?= "gcc \ automake \ devscripts \ equivs \ - adduser" + adduser \ + bmap-tools" do_build[depends] = "isar-apt:do_cache_config isar-bootstrap-target:do_bootstrap"