From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a17:90b:100a:: with SMTP id gm10mr3441032pjb.30.1599073024424; Wed, 02 Sep 2020 11:57:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:5c45:: with SMTP id q66ls1307711pfb.7.gmail; Wed, 02 Sep 2020 11:57:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh/4EQBaauMkOHNA0ccGcRj5CKES2d+zkVksDw6DvQJvGE8f6EoaA5eEqzNJ//SuN+8d3L X-Received: by 2002:aa7:92d7:: with SMTP id k23mr4415964pfa.295.1599073023761; Wed, 02 Sep 2020 11:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599073023; cv=none; d=google.com; s=arc-20160816; b=YXVGWOHC2Hg+FvIjyDK/kuPri8JIn5ynGXyoVlFVzzxPVgKRnLPwD4kuqfdvZEueTn L5ADuw7SbeUF9iQ7qGgR5Z/3V21tBT+nBbJyQWwbMgDZ0yOQ460RxD3rYitltb/r7p77 sBXyJ0bHA3V6wjYNHpWYdK5msTLqqzItUsyHmT6MRUSVthvbxaD1GygbJcpKkgjnWBMG gky1hHPhWEJZluJyOQY6R6RpyYYeCBkEZC4a/PAJlROYIDQx0Fr0Xyx394VVLxl5QecP 9Yh3+exBkf0zlBEqQRf18k9TjD+/y4Lfq+r4aLDSYzfK6Yn2VOT4vKxZcWipxAynpiUu p1sg== 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:to:from :ironport-sdr:ironport-sdr; bh=eA3rFi5Yw/rKCAUfpPayu1cqYlt/1vqmnItkHrUUAtE=; b=SWKzzcIS9iOcenHUlaW3VR/JpFJUgbLIjmd7FwiAKKO+uU+zyzpOtirSp9TbOAygAM b+kYKCPrjM56s66Eqs7on+LHGlyo3LwxyDFDWWK++FJqg5Tkx+piq9LcR/C9Mo+Pl7NS PM4lx8b0buCPYbq1AYqTGJ3kw70DNDw1MSkdXxRdfzsQ/zW5i3T7MalV5FkLJPKEvLCX OyQ/xt+WmY+TrkpePBSMZ9cWAxLjg15p66LmJIRl7mK1LfdYCRWio/MYRG8LN7OCxkxc WYfCSlemvKg+iaVdOyw3Vc7xfygtc38PHQNLSIYQ4DJOFCllPRQzXlqJl8Ndu14m2WDq KPWQ== 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 a199si43434pfd.1.2020.09.02.11.57.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2020 11:57:03 -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: CAwLoMMCSP3JGQ+VOZECVE7SNTBjfZIky3Kd6KufMz+1jwD0zjQPcheuHLYpC2bHfruu+1VqhB m6Acy7gSUHy0S25Ph/IqFOycICiSf4qzmRI2XdJ/afZjyHUx0O47s31mWM8uI6FzEqFuqK5qF5 5xIxICZGb0lTVNhVD+HHw/cQyFoJM/yNac5wP0IBO87uvnlTj9/H73MOYSNBT1toOqnDoN8faH y50eTwl6/IAP4WEImywcR/IVE+5Q2h0oh5tWRL+A2sZccvYb5OS0iu83SK48XfVfXmHDsmGvYo H2o= X-IronPort-AV: E=Sophos;i="5.76,383,1592899200"; d="scan'208";a="54698480" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 02 Sep 2020 10:57:03 -0800 IronPort-SDR: hGEKu9RM2AM7aKSKvWmktMhQPSzRWxE3InkZxc/VTT7S2aKZ//QTcuQeEzBKM18UAhVOYr69uq kaNbuq4XYjVV7cv/U+hE1ZPeknpNGNx8L3EoRSBuQTGpJzq9T/FtlxkllatntUw1sgJUh4B0Cw j1RFYawcwIo0vP77qD7svG89u/6j+ZVX6fSjK02LNHzCzDj6rOHHaZzN6WpZypghug0gjIgtlK EPt+ceWz6Z8RjtfTMqkp8MX3Ba+vFu29yVVnVg6ifhpyiBP4ax6T/VAV/dC+ZtfN4sHa1q1bJC 6Jw= From: Vijai Kumar K To: , Subject: [PATCH v2 02/10] wic/plugins: Fix wic plugins to work with the latest wic Date: Thu, 3 Sep 2020 00:26:16 +0530 Message-ID: <20200902185624.15044-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: CN95HXj7Wa3s 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