From patchwork Wed Oct 14 04:27:23 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: 143 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:e04f:0:0:0:0:0 with SMTP id v15csp550278oos; Wed, 14 Oct 2020 06:28:08 -0700 (PDT) X-Received: by 2002:a19:820c:: with SMTP id e12mr1265311lfd.215.1602682087839; Wed, 14 Oct 2020 06:28:07 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1602682087; cv=pass; d=google.com; s=arc-20160816; b=V6ASpxfp+VmmwcapCxEFmOs9m87+aT8NR3q6Y2paPaCjlsNWKoAAT9ITCUNMjjT0H2 bsELJH16PiRFZictB8woEPQADCSdEH/cYSgNoxiB76fIJqalG11hTWANi467H9oYCD9n 5sQufCMhWdcO6cr+GO2I1K2LCt9fhxWnN7+b5tVofJTEXN9iTJfX1ymqbb0+hUff1x9m T4uzwmAc6+jKXrHkbGKesUixXZ+MRUTZyj7n/OXd9hw8/BOHcrakhoHtQk5zTVEm5AIn bAUa6v87P+UyRiOcIw+cttc+bYIK0TZMuXrl576K4EdOM1e7uGG3pCL6h6ST+rt7GhAB jo1g== 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:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=NoF+xFgyFWRDIxHfMJEKFuGGWXgoPr1r8qfp54s+qAo=; b=SHOKhaByQOB37K9bvhCoSuFrY6G5lHkFjmOeMpefJ/mrU4Jt9klttbgdxnNVs69D0f mWbc39UxPk5XYb1S/AeR2RMtKWzmmXEmR2sbKEWxEsONXZL3oWu7RskYpqbNM9grAjLs /ItPxykSNh4aD7h0ZoSvaT5nuOIMO2C8iUmRCBI/q1bHadkcZ3+3TYNGDLJ/DpFrmK4R BwvseKAG83/N00Zxm1R+UOM0hmyegPvivvjWP66De+cwO6UHNMcVavs4VVFytFYNIX+j 2VKQfIhesiA/RRt8qCsUVUaqteBRfmfAWglcy25Z9yNQK2C+NAFf3Bi0YF7KK9lFhWyh puKA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=TtHMF5uJ; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz7ztp6akgqe6b5dtti@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZ7ZTP6AKGQE6B5DTTI@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 e144sor652328lfd.163.2020.10.14.06.28.07 (Google Transport Security); Wed, 14 Oct 2020 06:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz7ztp6akgqe6b5dtti@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=TtHMF5uJ; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbz7ztp6akgqe6b5dtti@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBZ7ZTP6AKGQE6B5DTTI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1602682087; cv=pass; d=google.com; s=arc-20160816; b=XXu0LCYqpkwz1Fd6f6K54QJF1fZKkU4d7uqRsqbYhEbBLK6pXK1H572ibKOSBp4jxO mEOwnD1O7HQLvto8/d3kjNwKYckNk9jDAIKpPMQhIqjCKc1YFBtCRXykIIgxguh1qDlu uW/GERuG5hfYyZ7JYW7HtZHCj4HuBGLg5UMObRUdFNJa7ZskUomz3Qe7UxAH5LKsZeDc ZaXZb+a7Pqtks86ug67rj65K49Ht/50aVio7udfADGzhso7EZSwoiY7+NvqWXlqqgckh Gh7PKeXhAjEzxvYddBDMlTtEw712j5Ue3v43pavhVuF2aWn01pDIWg5fA6ojT8BgEjhG W7Aw== 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:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=NoF+xFgyFWRDIxHfMJEKFuGGWXgoPr1r8qfp54s+qAo=; b=XZyldFWykkdQSxvI6XFpTc7EXwxuAX47B4Zehpbeb7rOw8dzYUJ+DL7iNvHB7AdqjH 0jYQ5UJ3bdvKLVCQ+mhl9Es4mRx0ASB/EYSSJx1tJV3zngbc1ivqokgNN3vNgbKqiKPr 01GvND2no9max0BznMGmZii0dJtALYWQxSp21t0BgT8PhOBIJs1RMxHshPbQN/IfeZN8 54uCuaHtxSoIvLvkcA4pkZwJY+kPcYDVWeWfLBz/93FP+xyAMQTUSgEEWMOtEAh1peYa AD0+xK580Au5kQ/x26uAXlA9T2VIamjrAn9+47CFUMe37Ah65EG67XAQRdaLrhnQR7K/ auBg== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc: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=NoF+xFgyFWRDIxHfMJEKFuGGWXgoPr1r8qfp54s+qAo=; b=TtHMF5uJEdfFl71YpLdtHd/FNlN2BS9fvr/DCaXo6+JTybwP+1au/N4wqJj+lw1JlT 8wb7JjxyFPZYWoszE8J5Rm1Y7iH+LCSwk2wCEfNE+Rq4REeTc9asGsmDbiAnc0HTeZfV kNTWXbFNgLOFe1aY2XYZOnOaDiTqUZAHhigZrIMAzJmQREosZIT0Pn6IMrgc97J27zIb j4DogKCSW/rZU0cIR4R7ADrk/8gwrXD0Y8yDna9vdfiU3D/7wD88cZP6p41i28Wsz1en OlpOt8sF7wn6GQGCdCoMl3gOqi+x666QvLoWfHBJ4I/xw2OQKFW+Hw1f86oxvkdcRRDU FMkg== 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:cc :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=NoF+xFgyFWRDIxHfMJEKFuGGWXgoPr1r8qfp54s+qAo=; b=ko2mEAnqBcPwcZUu7I8Q9rcnvbpb3Sd7G0sP+JNpTQeG4UzkfbD6/iGOeaKMfscp6d fzdGY0o70oVHsZAjJ8+PaSec88aW5BSdsN1uXVkrROzd2H67TJC6tlaQXO1b1ocWa8HN MYdlKMYaVgYSxhJr8rXd8FasYQ6fRWMlm8WrEV/xgCds+Acz2TgtZ7JTuIote9D97Kyh 5mmQcN6rhHG7DimV0d5usONGRkWF7aBcHzNkKBPltuM1MSC1M+qNMHqQN7d1jj+/0npf YvHa/4n92FhDzGDgmoxbD4Nt9Gi0v/qCyaA5RvjkRqHfGgPJNuJmwSHltHTQ8a7QAN0F su8Q== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531sk2RuLYHUYxqv+6TyujQVXe4wlQAid9/HGWwlhNlks53hccgE A1TC07EP5bUdL5m2a5xSh0U= X-Google-Smtp-Source: ABdhPJwSGX8nVDsYDQGjo9ZHMEdGQkfwLFae9yD9eg7CqcaSKfZXVjpEBeUIi7iK5ul/EjdNdL+UAA== X-Received: by 2002:a19:8906:: with SMTP id l6mr1563408lfd.136.1602682087481; 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-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 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; 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 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-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.137.180 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?1680533972868421666?= X-GMAIL-MSGID: =?utf-8?q?1680533972868421666?= 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')