From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a05:6808:6cf:: with SMTP id m15mr58081oih.178.1599495503110; Mon, 07 Sep 2020 09:18:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a4a:ca86:: with SMTP id x6ls1174020ooq.5.gmail; Mon, 07 Sep 2020 09:18:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhXgdKy3QFaFnwfoXZcvW7aPt1V5pbFNCXgcYflPQ80le5rJFXqv1jMwnTW+IOlpPo6/lB X-Received: by 2002:a4a:344b:: with SMTP id n11mr15366924oof.89.1599495502674; Mon, 07 Sep 2020 09:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599495502; cv=none; d=google.com; s=arc-20160816; b=AmnqmRV1c0HpNhMyqAKCBOZ4s5dJcYwQvLeLajKw3yet2KO222Tx2ntaZ61vY5X8mO lIBngVfNOzqtvr74pUE5pkRsK3J/x5AdVhu0SYNrHVTLz3GfUMpokMtYvcte3DNeiSTc amSborzeMVR63gVlQzbnfOnD6WinQyW640UNSFCXASbPbmAroIfyVey9ZtDtmfwz7NK5 umWKpqzS7yOCzetvkRiWwI5kRSPM5D6EatXLBYo/VmOzeG/i71u2UVzhuvXYf+NQWF6n ke2llZXyB9z5aAEL60t5S6sA5KdP9Isk9Dlx+HFbag34NEnAHxoUREz4Jo2AnbGO/RkH yUyw== 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=kvgGUnu2Fit/VWOc9wWJXEjZ7ANOTlskVeD3VfJCqbLRM6Bq6VLw1O4zN96XMhJ3J2 in82IIPdDocwPx3z345stWqPUfY2+9RBvBCenOt0MMb7x6AA4n4zDuBXcM6N+vfA52s2 cGinfzVGXRWqQOwXZkRRoDdP5YilSbgV+AaDddCSi5914Y5QCXRVo8XnM40NCu3bxiVG P8esM99yrmLKrUnDYg7S0dN2sBE8LgAH1TRWxSw4Qz4gdUX856/5F2AvLCbKqVz2YJ5M KAHXDVakf9H2xxtSbETubTqs5KN4KpnZLemuD2CBTBUTizOm7L1QfeRMspNUakQa55pX Ga3A== 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 d11si862274oti.2.2020.09.07.09.18.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2020 09:18:22 -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: W3L+GCVQgbwEvjtmwA/KUarYssj9JxGRYpPq/P2Pu5iWjQB/ytkX+61h8bSvSd51x3ofNPmtQz dy4++fifaDun3IcTdc5XMEru/KnTBWCTtJ3GzS72ESb21n1pTmqUEVcvdmnPffFsNpALnqbjGl 3rCFTZB0XqDTkiLMjOc+n/FrBxDGSZZ+NrmRbx6Nqn5Tkl/0ZYnCal80955Cj59J9+mIhftJS1 HnR99/wWacZaGAYQXqhWrga93iT1/Ynvp2Jbp0oa1ja+Zv/9ozc2zn7Dxja87g+4bXi7twftQU x9E= X-IronPort-AV: E=Sophos;i="5.76,402,1592899200"; d="scan'208";a="52670206" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 07 Sep 2020 08:18:22 -0800 IronPort-SDR: 06HqnUPAaLRXtZ2xEH8Ugorgia56uMrdYZl5nGrEYYLH0lJocyXZ0YaN5UmKiTAsql7u52t8Gt f6p30Of2ei2Pjno1s5nKWgDqDuN6rYEj4waVkltX1+klWhkkEeDmJI+0ZLbCXiQSwtuV4TqydM WwgKL3wbf5zS5YZkK9pEIsgOEF8uQLwn9rcfjMdutExUOymAcYSJWOIg+3vxYZShEzzF33t7Y2 8BizVpXjUS2Ne6CKAAqYJWkfItRL051c9bfHX6kRfHKCyq9Tgz7bs9v3iuhu7WHk1F7C88BGku fUI= From: Vijai Kumar K To: , Subject: [PATCH v3 2/9] wic/plugins: Fix wic plugins to work with the latest wic Date: Mon, 7 Sep 2020 21:47:49 +0530 Message-ID: <20200907161756.16372-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200907161756.16372-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200907161756.16372-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: cK19et1TKIJx 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