From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6880180325712920576 X-Received: by 2002:a2e:8e88:: with SMTP id z8mr2026191ljk.13.1602682087558; Wed, 14 Oct 2020 06:28:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:b6d4:: with SMTP id m20ls677784ljo.1.gmail; Wed, 14 Oct 2020 06:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFOXB0Pa6kt82qREyGDPfE6hQYfMnTKf9JdkbxyUI95lSQoaKOLjPZRuemGXY9UhodLFIS X-Received: by 2002:a05:651c:297:: with SMTP id b23mr2034496ljo.363.1602682086340; Wed, 14 Oct 2020 06:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602682086; cv=none; d=google.com; s=arc-20160816; b=XuO8EzmD4x23tufFZjovL4ghjcW+BoVFHZOxQmRSvaVi1qGG7WSNpTdJKne4DSZrcK xdFefiwIaVreLG3+q/sP7b61dE/PL+cU88QcyCa60mzjZHxpdKtqcrkzU7RVK0r8XRfz 2bSMuGK349e45Ze0N37QXs5/6wzCUaN79QPu7khQM3AvQ+UQ8/86tZFkrwrjcqdec1fC M14aaIqjmfkaTfK52NrdAchf/OVYDNnOhA+IGO+VmzB2+ZQN3Hjo33qtRiBnmxGD4ml3 Hdgd/KGovM0yb4uCNk6PWxvF/o7B1FJjwRdxgjNKqoXu/XaGUA10aT9itZTZ9pURQHdy vV7A== 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=vMzpLsaQYLoTQWj9vIBB5CLbxcnKYRQpIgPQnCq74s/CRUaGhEokPw35d+Na0Cgwcs q1ax/zPaoaal+tKVW2FhLcFUKqWo51sQkkdYYOdaU3qXX4xAn1Wesp9qxiCH0OBtgeI6 DICG2Pi+LR0HqbHYIl8XTbFvP3AQR0uXiun1IJnBBH3uTcER1KRTYEqtK2xVcDt35qTq rr6HG33aKqwNXCIHz0OBz+ApGjQI1cowPWvAQqU+vUqB/9ikFB3U8S7QTTzOzgCNkcRg UFsoJ+Wf7Gz6q12BBqMzkTklyFy6xVtE0fJJ68jrPPmnWy1tkg3Zp5IeGT3x0M4ZYPoO VjBw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id x19si96295ljh.2.2020.10.14.06.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2020 06:28:06 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: jmSwGzE7PjoFnjT4K57z0eTJooPJW78jkKFf1zz3AjSvCzyLyru3rYa6RSgETBoSiuVITXYUTg loeoJD7pmgkBMaCJlvTvMuQC56YPoiARnzai1OtxFR5rVML0co5rw3rG771+bAHZbxRpfI/Cxr JKocnmhK8BlFtvbT++3PwsaDA8/LxNdQ4YnVnCnFSrtiTMmjnvfbxTy0bupdQmbVCuqouuFrMb qMEAFTRBV3EYURE7raJonFSffKYlxGq9OZtPFoWeEMYHY8IR3lHh1izBS0N3nlmFpnCO+6s7uw 66Q= X-IronPort-AV: E=Sophos;i="5.77,374,1596528000"; d="scan'208";a="53925684" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 14 Oct 2020 05:28:04 -0800 IronPort-SDR: Iu9apa9DipF3uGgn6pJx6Syi5U2EnrmD4AjUlSiEFMHmHTO9qnYPs0tteJS/9li+iN/cdmBxdq 8AjtvoR6hYWgE0UCulbJE7eQx+Rxxzyfc74H5/h9eJiNRb+wWYjy2Ebu8XlTAV1EyIqgzBM8JV uc5GRVcT2KCgtOssA643E8cQFkMBHWyGCjHjMYzle35OqFCvN9LQCqsVavMRmTP5YK1BMxachC WywPyBsWD1xDajURUFgwXl2BFAPHFBq/12dUVoH95Fy58iqee7K8lWidaoNdmcnUdKdnAjTM6W dMQ= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v6 2/8] wic/plugins: Fix wic plugins to work with the latest wic Date: Wed, 14 Oct 2020 18:57:23 +0530 Message-ID: <20201014132729.18571-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201014132729.18571-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201014132729.18571-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: 3aHtdFxY9dIo 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