From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6880180325712920576 X-Received: by 2002:a63:4416:: with SMTP id r22mr415760pga.248.1601916822838; Mon, 05 Oct 2020 09:53:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:ca92:: with SMTP id y18ls93244pjt.1.gmail; Mon, 05 Oct 2020 09:53:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ78bw5n1U9RpKmh5a2UT04VE3FSfgHdOq0jh1N276d9hbu/WDi2SvY6pa0L1/bsDImzIy X-Received: by 2002:a17:90a:e98b:: with SMTP id v11mr286381pjy.97.1601916821972; Mon, 05 Oct 2020 09:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601916821; cv=none; d=google.com; s=arc-20160816; b=QWTqCBzs7hM8SSJrN+KDr0SES1uiC1gijNwwE9TbWy+/T0FVEhTjMNXtle6IuomgeI jf+/X+m0kpR9pIGLvhRZJcmSRPgX6D05Ivdd5s0LogMCC5f/oIoZCwApetgCCORFCnOp 9Cr+d0yk7kEMgQDfKXN5vLoQUNqqHLXM8l/pL0h8l07kU3hjNDJeHJ57cV1S90Lv4C66 fsvowVTMJHROXU3awTFilu9j3o8ebLDq+SmmI0q2JYL3dDtARnReoxXcp5s00KxVjOVI 4Ab2RDl5Mg828PAn2NKE5NbWvLD1xiNjxDUP339uSP54O3zSwBSLzH7pBRhFG7AAC4/n Rz+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=eA3rFi5Yw/rKCAUfpPayu1cqYlt/1vqmnItkHrUUAtE=; b=C/8BEvqiQfGgbXK5eMM+JyxOhERd0WiSk4tyGelmDn9RMf6HqxfxLli01kC/icLN3o TLiKjv2cLJzzyKGs4low9qsSt0tNMSPoPt96d++qImOF+uPRdUTPByEcVNpPQGfN0N9+ s6F1+pu41oFoIh5OZUNBptpYvZvRBA1h/3/3fKbiaNRA3VNFQ7lgSDT5r23jOuKCgv8R KAhhCYt6VWRg5taChwu65N+/hdFu0ET1GW1sQ2YovNGw9IBnjMcjNaQoznBHqEabIJPi YfXPjhbCJgzpaJK9huDh71WdBrKWaQU1IgNrEre011eZ1XAgl9/tkkAxDJgNkogaJ4GU MV9A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id w15si67056pfu.6.2020.10.05.09.53.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2020 09:53:41 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: xK6jBiTQRfGdW1B6l8QKXB/3MT5tSqTxmJ8/usmGGfK14D9DutPXHc7/A2OmbWABLNyAGglCQO a+1Im+TaUIyPrUI9f4U8Rs1jbbuVTg77LVP/VHtWlKeOV4OA3MDhkKGpdTdYtVDtmUCmZAeuPl qo6WSDhs6pSjGtwP+n0RSvRK04TRmGp8lVDTqQKn1fS30HQEidvKhlBTQDzWg69fuVO+eqGGV4 aKhVnQp+Z7gr/NQHRtYEmXHohzSLv+LNRSNjhoYR+6Pw1aK7KTDPmcUE7dTzmlat/lpaqDncJX 2bA= X-IronPort-AV: E=Sophos;i="5.77,340,1596528000"; d="scan'208";a="55837567" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 05 Oct 2020 08:53:41 -0800 IronPort-SDR: a1FosC25fEVje0j05JdhUzLFPnASB6QvV+1dqiTZcFjpRGUcXrFxqYEyX+4NREZ6lIHemfCsKN qINLlXjKwRq/p5cOclw761WJ5M/DpfYIAQmUHlr59DkxTCFfgMqpRPgM3bv8xR45dvB/cYetEy 2bD7CDr/IzyXU5avtPuVfzPJWN/Hkf6y2oyWJGXfQuQB6S/r6ZkaCipjA1IdeY2i69Ue4s528V BORiT8bS5O5dMml/5PoirT0u7a2x6dlIszOxw4hbUTEz7bUXtgGpg6VKrTc3CoNaXL5zAv43RW 4Ec= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v5 2/8] wic/plugins: Fix wic plugins to work with the latest wic Date: Mon, 5 Oct 2020 22:23:01 +0530 Message-ID: <20201005165307.14668-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201005165307.14668-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201005165307.14668-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: dPiiB+ghq4xo In the latest wic, wic.utils is removed and part of the implmentation is moved to wic.misc. Fix the wic imports accordingly. Signed-off-by: Vijai Kumar K --- meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 2 +- .../lib/wic/plugins/source/bootimg-pcbios-isar.py | 9 +++------ meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index 25b12ca..2285d2e 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -31,7 +31,7 @@ import shutil from wic import WicError from wic.engine import get_custom_config from wic.pluginbase import SourcePlugin -from wic.utils.misc import (exec_cmd, get_bitbake_var, BOOTDD_EXTRA_SPACE) +from wic.misc import (exec_cmd, get_bitbake_var, BOOTDD_EXTRA_SPACE) logger = logging.getLogger('wic') diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index 0423862..4d916d6 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ -29,9 +29,8 @@ import os from wic import WicError from wic.engine import get_custom_config -from wic.utils import runner from wic.pluginbase import SourcePlugin -from wic.utils.misc import (exec_cmd, exec_native_cmd, +from wic.misc import (exec_cmd, exec_native_cmd, get_bitbake_var, BOOTDD_EXTRA_SPACE) logger = logging.getLogger('wic') @@ -83,10 +82,8 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): logger.debug("Installing MBR on disk %s as %s with size %s bytes", disk_name, full_path, disk.min_size) - rcode = runner.show(['dd', 'if=%s' % mbrfile, - 'of=%s' % full_path, 'conv=notrunc']) - if rcode != 0: - raise WicError("Unable to set MBR to %s" % full_path) + dd_cmd = "dd if=%s of=%s conv=notrunc" % (mbrfile, full_path) + exec_cmd(dd_cmd, native_sysroot) @classmethod def do_configure_partition(cls, part, source_params, creator, cr_workdir, diff --git a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py index f60afb8..3ac0aa0 100644 --- a/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py +++ b/meta/scripts/lib/wic/plugins/source/rootfs-u-boot.py @@ -18,7 +18,7 @@ import os from wic import WicError from wic.plugins.source.rootfs import RootfsPlugin -from wic.utils.misc import exec_cmd +from wic.misc import exec_cmd logger = logging.getLogger('wic') -- 2.17.1