From patchwork Mon Sep 7 08:17:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 35 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp3466212ooj; Mon, 7 Sep 2020 09:18:23 -0700 (PDT) X-Received: by 2002:a9d:27c1:: with SMTP id c59mr15773549otb.103.1599495503409; Mon, 07 Sep 2020 09:18:23 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1599495503; cv=pass; d=google.com; s=arc-20160816; b=j1z1MdlHSBxadEjKsggIugdPSB0jsGQmkcftbRxKBF4Fc3TVxOBqHeT3XqeO+yhrrU Iw2w2JGERAc4+z4OKVJ99qEMl3wqSk8ag6silViftjmG7FTe0A5zW+qUXBwRUhHj39GS P4dHtYs7qMH5uzTqq/l23HfJj6PJYOHCmJp4vBBnoFyX0gXgIvro4DWwx2RrzDc3RGGv Omr2HIJ6F9ltNdd4+6Iw7AaDS+wgSR45oM1UTAWaBNGaOMkIBRoqPefqQFnuiA1/1o25 dkmvlF3SeV5hPgRmP5pRZ6LJNQiHKPLMPd2jvKUwtxi/IwP5TnF6tFtRubTAyeWgFoMX 0jAA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=euehJcddR3DhzCDhMKn2MM7RqVMN7eNFBLZnP88DXds=; b=sAKUt6vI4Hu9vKIqlzrhj6CnN6qfZezSNAbaA0Bixvqa3ajWRe9KCjfnThi2rGa5gv HC4osTHxr8apv+gnwYKFbEd7C45Bej0XcTwGz6IziNmN4wjAvkTlDPr203Qw5DKpq2Td lvEio6rbBi2D0tw1NpPe04r2duamBDUAnyWfgMSheqalxgwROoqfTdt6zd2/9a29gyt7 FAHndbAmVzL3tMqweWJf3gECac2OTL/huEJCUEcXbyFYL7SkaA3+a/2m/jqPFJENXm4E RsKLuomYeLm5TcFjBhhqvAci+dS6FLsQqhRTb0eZ89ed4xT3nqiWilMXL9g0BBsdPAo1 wo/g== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ojqBz0Ve; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtv23h5akgqedkl63dy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBTV23H5AKGQEDKL63DY@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id a11sor952715otp.17.2020.09.07.09.18.23 (Google Transport Security); Mon, 07 Sep 2020 09:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtv23h5akgqedkl63dy@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=ojqBz0Ve; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbtv23h5akgqedkl63dy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBTV23H5AKGQEDKL63DY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1599495503; cv=pass; d=google.com; s=arc-20160816; b=BYcMil+jKOE3t1hHX6L2c4Ai/tvXtiDujVhhZ/Q9tzCH/6WJlEVP4Sm2okXXoeeZXJ NHI3HkMZTsLdXCCm35hyr9Ox8rZpQFNu6wqq1zAzDgmlTpnINCS+HGJK9X83+oJyXvZe 9VgFilIqlLruilDDGheO4dKdm91G12LBGhJpOv1RTxDcApD70I6GbkgqwAZQITR/g7ES HRugY1HBHFVPdcaLE5olQuH1rRYLlAiggfUzL0KvE6JhjChfyHpzPDNDPzq5lD90nZna pXf11TP+rFMHc0MXVauNgz9WFvpPaeOPknG2grfAJdkti2py04baRMx+ZhurXgnDCHlw rrxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=euehJcddR3DhzCDhMKn2MM7RqVMN7eNFBLZnP88DXds=; b=aeYP6LDWPNAiVwsJ0I4ytrhAhPfR3MiuJdYW0tuMVFa1ad7gOSIBj+GfpooZnime6+ wPsFlAtDKPuZooCPWg4KWMH8E4LAmeIktwbmr90/XGcBe6EFJMwiAtcDleffJbq1AwcC 4cr4568Au6lpAsM2PJBB5GhnyWOuGMqvWGx2xNxoXcb5E2czbsxdCtFO0BM/9OxRS8X/ 87UM25rspYP7ScDg8IKNzEHmOfxI+SdqqCGP8ggeQLUGbca43hikZ7/IE9+facKmV5iF SVyeoarto6GJUNmBuuId2dZAUyPlS0ISmPMjtawH8svj+HIcDobN/Ki/CJsbF+ZlGj77 +Qvg== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=euehJcddR3DhzCDhMKn2MM7RqVMN7eNFBLZnP88DXds=; b=ojqBz0VeG2oQUettPWoMqNX0iSXgMHOlvA31Deq8pqNuxpw4ZTwpcMexX4Ek38Xr9r O2E7ogP9VE/gBdjrLs5OwHcnEozlE0W2jPt/xbMgSqCtcRipCvN+OFeJFJwPhSjOOQWd hZN9kdBkZjhTHE36PDMZsvpBxqhvcWRRSdJ7OP1XjFcOF0G0pizgKOuMo//uBA0tBYhW Xtgg1pXAm3kUdztwlFVJZCwdkcq4ciwUd4wpV9UYjErQl5zzGdtDd73V7dHUvQNWYxwv 1Z3RGCBsXvYRnoGhsA5bEOozfCs/TMnjvcuGL+r4rTniREOR7HPxHJdNyotyTZvUaFbF UK2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:subject :date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=euehJcddR3DhzCDhMKn2MM7RqVMN7eNFBLZnP88DXds=; b=a76M3mX5VXOWKDsj3h/5qQqsgxEsTrOw19xyR3+8bMkMRSBrB/KOMx2oTkIv8PRK3N HmyoyymiORixVr8zKuK4KY+BaQAIRA6qwcNKkmwQy9mkg4Ka3cPOcJZrbIh33020ZCZ9 1ifRLUlcJBWAllabp5MqJqv5KUolSNjsG9dx7LOh+2GSubz3t+Tuwy1CG7Xyfm2GKc5K 6uDdAb04Zkakk/xVxsUqVWBkRzXjQDCVMQXtV5Dmdb64OZ/3+hzvKyeij/tNO7gKDaad pAb/V4OhXbHOiEHtVXrGsXMtJ9+eX2yrkdRfDuJO9AfVXCaitPFdHv4NNGm2cY155HDy z5BA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530cM7jfyJOEKC82lk+Tmh0v+aWkonNFUuVyg+RNUrin4GGCQ7xM JTxBdzPhzajlk1E16QESkQ8= X-Google-Smtp-Source: ABdhPJw5rpe20Ggq2Jsez9KRSNvP99WCcla+l15dffMSmTjIUUs5lpkLbPu5a5Fsq7o8IP467zUzJQ== X-Received: by 2002:a9d:2264:: with SMTP id o91mr15046452ota.290.1599495503046; 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-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 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; 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 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-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1677192596958407883?= X-GMAIL-MSGID: =?utf-8?q?1677192596958407883?= 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')