From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a0c:dd05:: with SMTP id u5mr3973909qvk.143.1598261306141; Mon, 24 Aug 2020 02:28:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:a408:: with SMTP id n8ls998218qke.5.gmail; Mon, 24 Aug 2020 02:28:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwop3T7gZ0slwz282l/2+DkVTfOY5VwCHqBEJp3qqueoEGBseovorub0f2SzWAq8kp3s4Yv X-Received: by 2002:a37:4c84:: with SMTP id z126mr3860076qka.130.1598261305713; Mon, 24 Aug 2020 02:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598261305; cv=none; d=google.com; s=arc-20160816; b=pYInD8ik04OgkK6pcEUWsVhh6XarciduDJUqzVGtxZDosOF7dyir+paWSHvfafL2WJ Hvs6jFh/qyfhKJITzBQ/fe9VxnpA/B/Aw3a/KE2wEy9CObuZ9c6lhxBxu78rYRt0USiC Q/S6A/++z8ARthozbWWZKYoDJ7xVnjAAEUL98YLXKmRANvjn+kJQrcUkr5wXEwFkl15p oooqT8F8vTOWfqQHVX/WggPdMwB5gM44bgnZ4uGXylsKd3nwNVZJ77u0xUtVcnr+ne+V QvcsXXda2O5EhEVD5pxBUlGkhQKbxFOmFkh5eDZo4GEeTSjFgyy4snunRTrA5g7JPijq jNtg== 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=09JohtYCVfuW0IDkMmms8EGF7jRzys5kdqnGDPqT+SjZ/Agjam1k6tZL4bKtz2ykRJ yQZb4aSqyK2nc1Q0gQM7wZFicuuda8IyzXImMoFvsY65Qy2aAY+rWkqAkHdEHrp9H9E6 5hktZdKbwIC7uOmzeTNZX4urToKAcu5ivr1qvZo4umta+5oRBsJPIID9DG5WhYwfXSNb d41kVAVAmJDeR+NKqf4kcZSzBDHjTMDmUCKymT3ROoJQAKlGaqMJ8aZw+CE5ZFfjS70h kg1p0IlDKP18oImWdrjrYCzij0fp0qBE4OoR1bOOcDea/f6pRtFvsdCm3iDYBpcKfZkc 0PNA== 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 e16si360474qto.5.2020.08.24.02.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 02:28:25 -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: AmW3uWY4yu27OdHzTIGyen1rECIvvCuozQqvxebUZ1CGek5/5XuHbrjIJDEqHwxCS/8hJBkLY4 0soPIiRHpMSeAxN1ISVP61KXizuEW5KTrY/8AQ8DkTqwfiTxHLZOvwJs/Tzp7F+26jPh9T4/RT WGEeAOYgBgnaPUgYs9y/bb4kfTn2nRlzL9G2wvCyJI2l7koq5rufByvRmANqQv+dPh8KXpgrsR iPOXpMkcwpWecHm4XRwWSq3Up3Ek6R+PDoiMF3DK2iAs2C6ewr3ys4GzEwzkP7I17gpaEpYOK5 0g4= X-IronPort-AV: E=Sophos;i="5.76,348,1592899200"; d="scan'208";a="54369369" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 24 Aug 2020 01:28:25 -0800 IronPort-SDR: 2xiyY5XqaZ0jCSISu83cYBxzl2f1y2AMdUAcjvaSawtar+WOdwWhIPtfnBMVexOT8rai8QCeIo e/ej/pWx/57inmx8qPFpdype2mbQ43+NwSL0EfWDjRoazV4kBbQN9wSmeJ+CwEvvoMiV01EDpS ZQYzw+0RTimo6RxdvJ8Nru8vFEWD/2XI98c/6OFRHvjtKACGR48t3owGbAngX52tK5JAYABGXH oeV3AAo6feeMTKTUz6/PyUtQqIVBvoFRCnUbwy4FY2NK08Wtc8R/KhvcaTUh+R/PIdh8tP0h/n G4g= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [RFC PATCH 02/10] wic/plugins: Fix wic plugins to work with the latest wic Date: Mon, 24 Aug 2020 14:57:42 +0530 Message-ID: <20200824092750.19642-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200824092750.19642-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200824092750.19642-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: ZgRjvZam9ufL 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