From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a05:6830:1f2b:: with SMTP id e11mr2168075oth.296.1600267860312; Wed, 16 Sep 2020 07:51:00 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aca:b905:: with SMTP id j5ls571023oif.0.gmail; Wed, 16 Sep 2020 07:50:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6V92qVjfArlVrO3zBl7EqM+mss8W+MgI4JjO6rA4gGupVxqEssN+nuEo5MraKjWWdkYzT X-Received: by 2002:a54:4783:: with SMTP id o3mr3508679oic.89.1600267859846; Wed, 16 Sep 2020 07:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600267859; cv=none; d=google.com; s=arc-20160816; b=mSP4iPoa38C+RlDPeUVkFa2X/9+A8jgJiXeBWhnbIZFyfnD6Ey45RWdyX/L2PvY3gq Uuo2T11s6BzdaSIaqwAS4lGtuerXZ6kS6H96Wk15PdfM7faI9a4tS0adE84aNIzlWr/h Y8uj3VZRDQOmatjje6+CQcMWyejQELU4HFZBv5v7VeikKrzhtksnvkKWUgt0gatNegdy EQ4PQ1l2BKLDI/qerQEe+6WDFZfcxOep5kgDUfzD2lR7fLRfTbusXlTPZEVk2fXqVP/y YXNlJosv/f+GsguhzNBK0rQHeLaVvLsn8gGFjVujtt6kZdxR7LSjcoCKvcPQsGpLR7ls sS4A== 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=X0/jNYPAEDr0NSw+66JVf7rdBB6dDp1d1MaTcEPmVwVL82e1zQXqpFG4TNRYIwFwQQ J2vOcPhYON7IwNY6XluhtD4QJcE00OZ7pDAwoT3GbmYsJwTVq3B2osVV5AACYC9K5+RW ZWGPTJUkZgXvXlhwYqEkzTXQqiyCiCSm8kNGS9nL18YRPwSXOFo8FDeUAZyJHO/gzTBB lRIzSXXZNJPL36usts4xRRP9650wxMPXc98TlYyt34yCvy/DdH3GJoWcwNPT+c9n5oYf HnMxmhso2lytZ32fLX/8rBEl+YOE7RReyNcC60Uloe5RnQybW+mqF+R6/BF0V6aO/JIm zuTw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id q10si1058241oov.2.2020.09.16.07.50.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2020 07:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: aiNHJZDPx3MqD+BSzq+AcWGq6Khi4k4475u0h9QgJXe7Z2bFclNuqqYM2oGX2AQ5hUT0scOFJw I0XWqnWP+3nCHUn122HE5KXGiCGYdPzlWrQhC/JgwlKZXGT36Cjp2YHcXWQBsnddKa8ObgEog1 wOFOVnJgYWEFLdzxMtv8FTXpKw/wts04+RkuPwGhgtyxLqNWZwGm0XHuK39feweuYeJfS5KNpw Gt10QdsOS1tzdODgFiAwFbMM8TIvvacovf7u0EIQs09gsw9KHsgonwUkiyJMUCze24CI2dB1X8 bRA= X-IronPort-AV: E=Sophos;i="5.76,433,1592899200"; d="scan'208";a="52989547" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 16 Sep 2020 06:50:59 -0800 IronPort-SDR: sSlXA7NilGFgCj16IlTkWf5isxhlGI1caJIop9rOh3RA1o3FX03CeSt4F/JiQFI4SJ6gd0yfue VsuxYq957oeR/Ws9N4HU8qGEGOwL8tNOxlmafreQb/dwRXD1r0UlJel5CYyrN+OxgxbpDs16ea vseUPbDgyUPrKNKviDVHDO9OhnGWIkpqSsgTF+G+k9vtyQl/NI9N117Uu3qa91xVi1NrNTG6em dGcVSw66gtTso4Gy9Rl3JN5e3m6aQV9r//4VbC80uAlsZd9A4s4dqCzrRzPgEUvK+K+qi7Mfkx CB0= From: Vijai Kumar K To: , , Subject: [PATCH v4 2/8] wic/plugins: Fix wic plugins to work with the latest wic Date: Wed, 16 Sep 2020 20:20:15 +0530 Message-ID: <20200916145021.5856-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: HgrPhBYOyTF4 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