From patchwork Mon Oct 5 07:53:01 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: 107 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp3887233ooj; Mon, 5 Oct 2020 09:53:43 -0700 (PDT) X-Received: by 2002:a17:90b:4b05:: with SMTP id lx5mr334242pjb.42.1601916823183; Mon, 05 Oct 2020 09:53:43 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1601916823; cv=pass; d=google.com; s=arc-20160816; b=gNUnzvtp3ku8quAoNT2AKu62R9dYokH8ahyEw6w24Uv17UFc5iUVKUasBGcMiaTtRb oENNVARHbkUvXLdbWCQ8mGo72c/SA+dqc+2ou5dYB7SN7VdTiZYSV+SwzIFCflWzAghD k1gS6Zri2alRSb3L6/iAjDUUq7VA3w2sHP7zbgWPUqR7FoQCoIBenJ3NccKZFl4tDXh2 zdKcaHPHLzXWY9JtCpeIjSyf6pcna8bnrI/WJUZlXCiKrunHlmSB8KtQNw+y9duNkwdE zePb/gEV+6CcsSXYfTv/VO8sytC+BBsIfSW4PPLN1VhMNQLbInZDBq5FpMlpSv0pyWHJ kkQw== 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=d3M/iEnd/So23v4lp5wg6BiQHUuL7LSNC8B+YgWQSAs=; b=FJ3tUN0gIVoI5Subee11H5X7bWgKNPuYia6bV2jGpvTV8UiUk2m5v+syjWWEk3WIql vLvRPVN0f8jnJSHxzCfLMAWu8CF4UZXwgWXKvkpKmxMXMYa9cHVlFfPNOGvQqwDh6tgH +p8/KFP7o2hDlZf0QG6dcew+EIcmf0AR9Qh45GuSHVnwI6Evlaf0/l+QqrXJL8vCCdl/ I7YfYwr9VBQtjrUAMBY2T1DCFEI0SH/GXD7c5tBC6JL2f5MJWaAF4jZZVTEk8Ur5Dvk8 Yk5TFFuzAojA1Sghp2YXd+vBpADxO7eoBW3f8rljTn0wc1+5ZX8rDKMxMvsBSPToqE15 p7GQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=RwANcHWQ; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbfu75x5qkgqe2cwpjqi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBFU75X5QKGQE2CWPJQI@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 s9sor231484pgp.77.2020.10.05.09.53.42 (Google Transport Security); Mon, 05 Oct 2020 09:53:43 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbfu75x5qkgqe2cwpjqi@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=RwANcHWQ; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbfu75x5qkgqe2cwpjqi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBFU75X5QKGQE2CWPJQI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1601916822; cv=pass; d=google.com; s=arc-20160816; b=Bii6pISoIZrLthCpSnSHG7LT18tQASS8Zl/Zal8jVnAuoVRU+ZFkXLkYMe6oMruo7f 9n5hr+ylFvuh6nEzMBnGh9f0j4U2geNCRk/ZCcEPs+Lf4OZ4u5Mxscndwmh8nUFcYPlt WGUnMMjeaJRsEJvR7WGo0VCNFhG/kJUpoGOvVgZYMeWL7i4ENDRG+3jh7kaTg+yQ3bGM CABLnLGNDUbzNqsUXnW22vLWEI/BqM+lxHgKEXlfz32E+Nn4RcBKkPgPFUccC/0arDdu xQN4UFvOnJO0Hiy6dEXAsdALAZnZOI/UCfg0S/dHfzVm43ssh5raNbeVjFjNxQkTP9sv CYDw== 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=d3M/iEnd/So23v4lp5wg6BiQHUuL7LSNC8B+YgWQSAs=; b=MHS1GRjMvtamsR17KhWWvRfjzqYmgmAyBf96bi4wjzoVNGS6U4GELVwIYPrmuBdENH IhlF3yaENFJxi+tlm46QEOAs42u6pTFQPN1fi+7jmadzxNTs4AyecDULo0NjBlawOEFU ddFkBH1CR+oe/acemQrtH8PfjCwhmmd/+jz8ri+LtsgJTYtI0kONjOfmvg5gmgJ4LyV2 mMIiCmOJnX5noaNKi5cE9hUJi/Z3OB1oOxDoZuP9OokYu1F2pbq21DTltYenG54nDIkz No6vdvEz1kXZs2roPyeSnaQUnwnEC6IccnJzILlTC6w1Tmoxyqoxs8ZaaRzpleChf6N7 NLGw== 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: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=d3M/iEnd/So23v4lp5wg6BiQHUuL7LSNC8B+YgWQSAs=; b=RwANcHWQORV9xuBM2W7uDJoNLQs84Xfb+5pt52jtHN+0tbseEsbM+EE0oyXp3Wyaff tS+k3KcqcvKrtjAV2TnTTfRoNl2LAI8+gfGEts3yEcT5MdPhOs7xrHdpEoEmEHgbAerZ ItvswTyf5TqGOKZCfPBH9oWYH1dcnYSmfLIsHMi7PGGqR8ZQ7TTYGw0FtVeFHTqGXQVN +8GLuXrJxsUu1suU5DYK5KDNlVUTXR1XpqUuFkwAYjePCY/7NVdSLQFekRye3Zu9qUbK cvgGJQi4ar/R3y23js0TyemCOLUkCKd/Stx19LfBpQo4aC2yanH3vjCGa+VV6pX64nKO btOA== 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=d3M/iEnd/So23v4lp5wg6BiQHUuL7LSNC8B+YgWQSAs=; b=PL0EBLw589D/bwsdd5axmUzOrLiFA+/aS48aapfjwygYHJk51W5+mAb+54nC+GI6Aq OthXCRUDGtUuK013D0J6mT8rcIR7nhlwFV4lgyrhYk68BccZzF6WZfaS9RfrEOAezjcI pbBOgwkrZTYG7C8kXlSUy8la9NJE3TnaN89c+sSIAQT/8g8MJhL9s0F3w99i3djkiu2N zZ2ZdUx+y3Ws9cKDHU+qHl7Qg/YysyOCuQygK5Tt5raOCxSVeKW0ypGoQlLywIURinhs WLNLv1ZR4qaUbDGcns8y8yOXChAVSe5NJ3QMlQqEqN2Cl48AwbUEilGTyMdV71qjV14s aY9w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530SgizM39nLEUo34Bm6CB7olCCaGTiFEVOB3Bwo9Z8aPZJQ9uik KJcr79RaNxOwhHG3ztCE2AM= X-Google-Smtp-Source: ABdhPJyb94tAOpQuilu0yFgRIGULGTqhlWf1ip6uzKZwGBOkznwi1eGoo1r8lld9spdcAA+ONO1Ucg== X-Received: by 2002:a63:160d:: with SMTP id w13mr357218pgl.97.1601916822758; Mon, 05 Oct 2020 09:53:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:ca92:: with SMTP id y18ls93244pjt.1.gmail; Mon, 05 Oct 2020 09:53:42 -0700 (PDT) X-Received: by 2002:a17:90a:e98b:: with SMTP id v11mr286381pjy.97.1601916821972; Mon, 05 Oct 2020 09:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601916821; cv=none; d=google.com; s=arc-20160816; b=QWTqCBzs7hM8SSJrN+KDr0SES1uiC1gijNwwE9TbWy+/T0FVEhTjMNXtle6IuomgeI jf+/X+m0kpR9pIGLvhRZJcmSRPgX6D05Ivdd5s0LogMCC5f/oIoZCwApetgCCORFCnOp 9Cr+d0yk7kEMgQDfKXN5vLoQUNqqHLXM8l/pL0h8l07kU3hjNDJeHJ57cV1S90Lv4C66 fsvowVTMJHROXU3awTFilu9j3o8ebLDq+SmmI0q2JYL3dDtARnReoxXcp5s00KxVjOVI 4Ab2RDl5Mg828PAn2NKE5NbWvLD1xiNjxDUP339uSP54O3zSwBSLzH7pBRhFG7AAC4/n Rz+w== 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=C/8BEvqiQfGgbXK5eMM+JyxOhERd0WiSk4tyGelmDn9RMf6HqxfxLli01kC/icLN3o TLiKjv2cLJzzyKGs4low9qsSt0tNMSPoPt96d++qImOF+uPRdUTPByEcVNpPQGfN0N9+ s6F1+pu41oFoIh5OZUNBptpYvZvRBA1h/3/3fKbiaNRA3VNFQ7lgSDT5r23jOuKCgv8R KAhhCYt6VWRg5taChwu65N+/hdFu0ET1GW1sQ2YovNGw9IBnjMcjNaQoznBHqEabIJPi YfXPjhbCJgzpaJK9huDh71WdBrKWaQU1IgNrEre011eZ1XAgl9/tkkAxDJgNkogaJ4GU MV9A== 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 w15si67056pfu.6.2020.10.05.09.53.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2020 09:53:41 -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: xK6jBiTQRfGdW1B6l8QKXB/3MT5tSqTxmJ8/usmGGfK14D9DutPXHc7/A2OmbWABLNyAGglCQO a+1Im+TaUIyPrUI9f4U8Rs1jbbuVTg77LVP/VHtWlKeOV4OA3MDhkKGpdTdYtVDtmUCmZAeuPl qo6WSDhs6pSjGtwP+n0RSvRK04TRmGp8lVDTqQKn1fS30HQEidvKhlBTQDzWg69fuVO+eqGGV4 aKhVnQp+Z7gr/NQHRtYEmXHohzSLv+LNRSNjhoYR+6Pw1aK7KTDPmcUE7dTzmlat/lpaqDncJX 2bA= X-IronPort-AV: E=Sophos;i="5.77,340,1596528000"; d="scan'208";a="55837567" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 05 Oct 2020 08:53:41 -0800 IronPort-SDR: a1FosC25fEVje0j05JdhUzLFPnASB6QvV+1dqiTZcFjpRGUcXrFxqYEyX+4NREZ6lIHemfCsKN qINLlXjKwRq/p5cOclw761WJ5M/DpfYIAQmUHlr59DkxTCFfgMqpRPgM3bv8xR45dvB/cYetEy 2bD7CDr/IzyXU5avtPuVfzPJWN/Hkf6y2oyWJGXfQuQB6S/r6ZkaCipjA1IdeY2i69Ue4s528V BORiT8bS5O5dMml/5PoirT0u7a2x6dlIszOxw4hbUTEz7bUXtgGpg6VKrTc3CoNaXL5zAv43RW 4Ec= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v5 2/8] wic/plugins: Fix wic plugins to work with the latest wic Date: Mon, 5 Oct 2020 22:23:01 +0530 Message-ID: <20201005165307.14668-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201005165307.14668-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201005165307.14668-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 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-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?1679731535072143057?= X-GMAIL-MSGID: =?utf-8?q?1679731535072143057?= 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')