From patchwork Wed Sep 2 10:56:16 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: 20 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp654250ooj; Wed, 2 Sep 2020 11:57:04 -0700 (PDT) X-Received: by 2002:a17:90a:bc8d:: with SMTP id x13mr3493581pjr.229.1599073024811; Wed, 02 Sep 2020 11:57:04 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1599073024; cv=pass; d=google.com; s=arc-20160816; b=WOZMfvhbBF1u8onRJKJVXvWSmoKC/F/gk8WqLAnbHCVkObwg1wk0uiM6Mq5+EZlisL pix+fPYzwnBsFLKboZLtOBxvEg7t9lltknob35GWys3XmSV+6FnYUfqL+CCFyR+qKYPX XqgWIpRB6bJOO8n3W8e6QGZULFiPj7mNl2BVq05/2hUlRAi71EHIo+3QyK88U9u+UGrO /GGr+91lPoEhOURZ5UBUX7569Np/KwpHK8tWXajfFDqcMrwU2Ytm+IBbj9BdTL6mamoX ku6z6sfJgoCCq7I2R3d4QOPPhTCDR95cvmXyl++Ykfii7/r9GYxf6GOauGT8I3uoyhmQ QJDg== 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=Oob/gzz1h64uRy+jKcrX2U2gXsKwFSrP32Z5Cch2nJA=; b=IImgkayQhuw7dEf9okg1y/Nt+AjAlbLYiG3tvofxdHaxa0UtPAIyAhJjizeRdGfwUQ 4ywqanjFfv+HlSMICXPlp00snkWagcordULCdZNeToFQCTzhZut+U++igttoTdlQvtwy LQK5cBdtQx2WFSjAvKJl99rRTj8jdVlae1bQXWhlx89vWthQ3cAGK2B7NN7XEO8Ata+L qiZDwDTdg4ohHa2GY3sP0jpvUDGtH9GsZE3gJn4zRaKkwCW2moUSQ8wVmUzJ9vw2tiNx /VYm5TK1BzZmR2ccZ+Ppq5i1ckRUpWAAgiupN3HGRgH3VTD8qiGeRiU0a0H4qRfchqte c/cg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=k18Vrjr8; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbagwx75akgqeaqbe7ai@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBAGWX75AKGQEAQBE7AI@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 m6sor258162pgs.16.2020.09.02.11.57.04 (Google Transport Security); Wed, 02 Sep 2020 11:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbagwx75akgqeaqbe7ai@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=k18Vrjr8; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbagwx75akgqeaqbe7ai@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBAGWX75AKGQEAQBE7AI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1599073024; cv=pass; d=google.com; s=arc-20160816; b=SODAqAkoXYD9NwSae1l5g6Y6DXqJXAthxDnZ4SP4HZe17vBJcs6PObqPIyB6Mkn3qG bcpsTnkv++SKmAoU9y7DkTz0gKgHkRqiWdbGt5LXmJnf6S53kzrHqX5hMrPyARwf+0+m EWSMux7kWofgqtbNGMWbPV6sU6AV0BS69yKhRJJ0NIkgDx4S3fObv/FjwcTE95fQnt1U JAO0kuOw6wa1X3v666aoqA3HccYqeZUWF0lpfdxI/qlil2yYNqorei2BZm7EnvRDPYo/ cdcG/gzeFKDtytTDiNgmvgWWb+tL9Q871JmtR7RabQbg0S3GDSzkO63Zfu30LbAluFMr rSvQ== 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=Oob/gzz1h64uRy+jKcrX2U2gXsKwFSrP32Z5Cch2nJA=; b=wHQ90G0GrLyH4elK4wTvX7Xm61BXZPLsK2F6Ta8UoJkf16r9vALlCWSM8pVyk7yYuI q1OaqJmGyH8BlDGNTzUMcsyIBnh9U97C1WJLMTkEcaHHKwCwhFfAHhaJ3F339CILyJa0 jTDT6BGNC1dyPaS/o9VXLbDkh6YRLhYnHBmFNX2YtgCpSOYHTCmRQkxeI2v0JRuVCt8Q NjvALrYSv82wc8sikMYok++gK1XF1YrcBMBVjE4MGSYLfcXQtIGVTj6IG+dWAMHyNQfr xmzfDZduch4rWFU3JGm9MKsdFuVhcP+wq9g1Bxx59nZrPSIcX6GH5PcJj53ptyszJRBs AeLA== ARC-Authentication-Results: i=2; 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 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=Oob/gzz1h64uRy+jKcrX2U2gXsKwFSrP32Z5Cch2nJA=; b=k18Vrjr8VTch5waFIpuQLspNG9gAeuwr41R9sCCex8fvHPEhti4OeEy6fA/34t2uuc y+WOFTiLTg3QNuGe1P3GD7RSuAq33s2RtkSEOu/Edf5mKdD50t1swJlH6l7D39waBPjI NpSf1bZkYzErnNuRb0Mm7WhGc2kRb4TuY3vtrqNFAJL5dLWAM1kUveq5amXIfHO+Mohz NH2eDnmlyTvTTjn/jo7wXkK2qbuigEA8XPS1p1Hedhvj4xaJrctAlqpfYl3WqXdEcmTB QdIPrNznRU7SZ1vq7etvBVDWwRTYxiZnQkAXCscC89amclP4sZLCfu0FjCrnprE8jkuN hNtw== 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=Oob/gzz1h64uRy+jKcrX2U2gXsKwFSrP32Z5Cch2nJA=; b=pPSD8vrLXzoIoqUQwRmWkxilgk3W0kw+Pe8uwY1jc8Lt8mg/beVIBYMQeIXprID7vb fFuMAOvQg6otdr+rfS0DwDYD9uhnQh5jKW4sqfm+cdtmCYTcMlaKcYRXjtats7tvqNZv yx7EoAgPwfe50MlnwcpRO4bUw94CJm1hOvGyPXaoOhJBIzGeXXoFQyBfP8wS2JRnoWWW Y+Gh0MfexzzL7wry8bZihNYa3f9ZGjxLOwVYWyO2W5psCLvgRjpAc0QC6eq9Dd+4WJMd S57GpBLhgl22FpssieDs7LUIEGVo6FktShVPSqt/qGlsCm5c2ZrjuhJFY3XNnleDaymR NIKw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532/jw3P+WLXNlr5h259QO55c1ec4d4zp68/qGqL+56GZSAxJMMM lIMNQehpgXpu4JVHarzYb5c= X-Google-Smtp-Source: ABdhPJzUm/T5Tc3KxAZMPORiFijplfPOIvL6oJxzxI3a5DWHbPPhTbWfe6YH+JWhSaVPhBz3AMEdcA== X-Received: by 2002:a63:6e01:: with SMTP id j1mr2954956pgc.147.1599073024347; Wed, 02 Sep 2020 11:57:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:5c45:: with SMTP id q66ls1307711pfb.7.gmail; Wed, 02 Sep 2020 11:57:03 -0700 (PDT) X-Received: by 2002:aa7:92d7:: with SMTP id k23mr4415964pfa.295.1599073023761; Wed, 02 Sep 2020 11:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599073023; cv=none; d=google.com; s=arc-20160816; b=YXVGWOHC2Hg+FvIjyDK/kuPri8JIn5ynGXyoVlFVzzxPVgKRnLPwD4kuqfdvZEueTn L5ADuw7SbeUF9iQ7qGgR5Z/3V21tBT+nBbJyQWwbMgDZ0yOQ460RxD3rYitltb/r7p77 sBXyJ0bHA3V6wjYNHpWYdK5msTLqqzItUsyHmT6MRUSVthvbxaD1GygbJcpKkgjnWBMG gky1hHPhWEJZluJyOQY6R6RpyYYeCBkEZC4a/PAJlROYIDQx0Fr0Xyx394VVLxl5QecP 9Yh3+exBkf0zlBEqQRf18k9TjD+/y4Lfq+r4aLDSYzfK6Yn2VOT4vKxZcWipxAynpiUu p1sg== 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=SWKzzcIS9iOcenHUlaW3VR/JpFJUgbLIjmd7FwiAKKO+uU+zyzpOtirSp9TbOAygAM b+kYKCPrjM56s66Eqs7on+LHGlyo3LwxyDFDWWK++FJqg5Tkx+piq9LcR/C9Mo+Pl7NS PM4lx8b0buCPYbq1AYqTGJ3kw70DNDw1MSkdXxRdfzsQ/zW5i3T7MalV5FkLJPKEvLCX OyQ/xt+WmY+TrkpePBSMZ9cWAxLjg15p66LmJIRl7mK1LfdYCRWio/MYRG8LN7OCxkxc WYfCSlemvKg+iaVdOyw3Vc7xfygtc38PHQNLSIYQ4DJOFCllPRQzXlqJl8Ndu14m2WDq KPWQ== 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 Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id a199si43434pfd.1.2020.09.02.11.57.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2020 11:57:03 -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; IronPort-SDR: CAwLoMMCSP3JGQ+VOZECVE7SNTBjfZIky3Kd6KufMz+1jwD0zjQPcheuHLYpC2bHfruu+1VqhB m6Acy7gSUHy0S25Ph/IqFOycICiSf4qzmRI2XdJ/afZjyHUx0O47s31mWM8uI6FzEqFuqK5qF5 5xIxICZGb0lTVNhVD+HHw/cQyFoJM/yNac5wP0IBO87uvnlTj9/H73MOYSNBT1toOqnDoN8faH y50eTwl6/IAP4WEImywcR/IVE+5Q2h0oh5tWRL+A2sZccvYb5OS0iu83SK48XfVfXmHDsmGvYo H2o= X-IronPort-AV: E=Sophos;i="5.76,383,1592899200"; d="scan'208";a="54698480" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 02 Sep 2020 10:57:03 -0800 IronPort-SDR: hGEKu9RM2AM7aKSKvWmktMhQPSzRWxE3InkZxc/VTT7S2aKZ//QTcuQeEzBKM18UAhVOYr69uq kaNbuq4XYjVV7cv/U+hE1ZPeknpNGNx8L3EoRSBuQTGpJzq9T/FtlxkllatntUw1sgJUh4B0Cw j1RFYawcwIo0vP77qD7svG89u/6j+ZVX6fSjK02LNHzCzDj6rOHHaZzN6WpZypghug0gjIgtlK EPt+ceWz6Z8RjtfTMqkp8MX3Ba+vFu29yVVnVg6ifhpyiBP4ax6T/VAV/dC+ZtfN4sHa1q1bJC 6Jw= From: Vijai Kumar K To: , Subject: [PATCH v2 02/10] wic/plugins: Fix wic plugins to work with the latest wic Date: Thu, 3 Sep 2020 00:26:16 +0530 Message-ID: <20200902185624.15044-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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.129.153 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?1676749595985535165?= X-GMAIL-MSGID: =?utf-8?q?1676749595985535165?= 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')