From patchwork Wed Sep 16 06:50:15 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: 50 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp517796ooj; Wed, 16 Sep 2020 07:51:00 -0700 (PDT) X-Received: by 2002:a9d:768e:: with SMTP id j14mr17610391otl.50.1600267860587; Wed, 16 Sep 2020 07:51:00 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600267860; cv=pass; d=google.com; s=arc-20160816; b=LTOEuHF2M0rSs0cP9QRTftYOW257EkFHlx5QbS/1D06bPMUbyDqqCWObfpuRkWPfPi GfDM8ktOkQ0LMzNSj6GXwK1QWAHSJooFruxaIF0FwloXurnLYiysKpMQmURMqdr2iyNR oR0aytP5vKf/HjZNSjvpD//8RGVuePS6JZRkjbErfgDVgSusMj4U22uKo2R7yk6nkedp UXyTDpeqlCGrJMbKUODsevhXgyfYs8nuEvUsvN1Y47+JKQCUlq9Ui1kymF7OqmawQXXb uWH63Qd87oOm3vPQ1D0L3YNP6mAA9ZAyFSeV86u4KNlQqdtV1S0JvJhen/T+4SOl+Qcs R5ww== 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=3QkQ0cfVNEqSZAnABGsmiBaMZjp5KNLafRbVmUXhN8k=; b=V3SQ1Nm7khU2EJAKIjeI/5WUR1Lidb5rw+vhQDa6gMpGBPm9OOpmMGLNkFwe7oGe3X yYk3DLRMY29yHCJRy4SLsf8Sa0ZfoR3CoDnTZ5rKTo6Bmeqx37t3Iy4/uO66en8mcwup sxtafaXm/kUY4cfOvQGP2az12z3o1G3GVbSvFBUrhvzusd+ttDMli5qKHgYW5PwCSKx9 7BZ3ghiY9uwBnBdP6Jc0xCZx6wJ68+g6wyiOpjxFedTBqJ4tJ3CrLhiUq7QTsagciCxA u8FXgJo92mqfbxG3o9NmYFkHrB/+kdmeXcFM6hjZmIBSiyIBDh0x/+Y42miFGc3iKtE4 kNIw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="oUgQ/19b"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbvgmrd5qkgqeszr3soq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBVGMRD5QKGQESZR3SOQ@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 d8sor4294380oij.2.2020.09.16.07.51.00 (Google Transport Security); Wed, 16 Sep 2020 07:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbvgmrd5qkgqeszr3soq@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="oUgQ/19b"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbvgmrd5qkgqeszr3soq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBVGMRD5QKGQESZR3SOQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600267860; cv=pass; d=google.com; s=arc-20160816; b=iSVqXtLDRs6qtV6gZwkUiUa4WUZ351K+opOjHHHVYJMTkmUruDUg2RX4CQ6DVdP/xV pCXEMzZsRmLfWzmuoCQfM1H6OkwR8AquCHb0+EdhoXb70EsHusCFJlLSKzueCu006l8k Ct7Jj3HlOaX7eNZwlDuOuGia/wYM2wzx7+CPpbyvowq8JpSJH1C7KTIraBU4ja9ITRlf 65k3ABsJdg3nkbeXzeioXrip8mz092Wbs0SbSUrABwOFRAYiPAs7aURgOLNmy8cBFlA1 uUD2+9ay4WPM+sr5EkB+cuumqJhCiuvbqOQheME7XpABbiPkXE8jEdenymA6xDvrQT7P /0FQ== 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=3QkQ0cfVNEqSZAnABGsmiBaMZjp5KNLafRbVmUXhN8k=; b=E0vFSkddzwFJ4LLDiI2nAqTRoLoS4mYUHcJbXMUgxw3K6ymnHbBWnyvGvf0kSEz2SZ TyC9z9TTbK7HmAQ4tsX+SQbTMOOKqT4nqSz/hEsqw8C2+lDKazYACu5VJpfgVjtdN9i2 GD4OZstmcqQB+vyyOYbQVwEzR1LDVU1AwuMFAL8CidHoEC57qsSwqkAnGD5kt5SfHbw9 a294vOq9mMVtjtEKlWcq7nXysBvtY9D5M4GFoEzGBU6TbLoC37AdvkWtW1661SYxpUJ7 wOvgBbkGTlQQQGvbisHE/41VUNRKPgikewvjbgaPbpLFWAM2wMX5yIfdv+rlra3+D6OA aEwA== 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=3QkQ0cfVNEqSZAnABGsmiBaMZjp5KNLafRbVmUXhN8k=; b=oUgQ/19bmH4N7FkXjtZ5WRjS2RbsTw4CMcNg7puPc7SbXbyf1WkwSf7nj9fcS4QMSm x3pot7r9XViFGUtID0ruUfx74IkpAjY18UjEE/WXxVgNjKCZt0oWSJ1KWIVSj+eyIo+3 xKlCRqDYsSptilgNOoeODIzJO3hCqDvzclLS77OSh/YNLlTy1kDsZP/b5A2EZRF6caol IWQV9UOxHo5ubgd20tlbv7Y2ZqkIeVwxacnJdmZ24fonT0a6kNvqLJeRmwn0jlv/0+Co K31PNTcTietDD3KjHTIi4PN5UTxGnRHwGyIjizw3ndiYMQbQRNnyN1BLRdAhRk4zhD6+ DA5w== 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=3QkQ0cfVNEqSZAnABGsmiBaMZjp5KNLafRbVmUXhN8k=; b=e2gHs1F0kH62Jj++oXJ5cfAJUz6x+gly9kcgSxZSsNyj8oISvGgxT95fUuSTTr8kTj BksdlxWn2HM2XP0iBgCDkbrwBD6itqARIFaSvh7a93NgXJJ58JtzN0dSRho5Nj0dxJoL 73jtiSKPPjBfONEg03BnYnXrppy/6FRI5qrEHiHIax7P0bFRPGN12M5TOJj4JgEa1I7s g9RlWH7NZsgMlayVt+d/NbLQnNLhMYMIoSaEW1O0kvkCR/mGqSCjsaQ4v0E416+G+FNC BTH6UvCTPpiz+NX0sVZ3SziEz89EoTO0Wya7KrhHz0w9g0T8t09dLsY+coLtoCQ62nnq pGIw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532xxU86ErZ0HulTtmU57NmB2lrWpobfNF+9Zguz08dCdK23vmB8 BFPVuLQZteDMwdhlaULeGFo= X-Google-Smtp-Source: ABdhPJxA0wRvkV93IRBoaX/RTNDARNPYtkbC6qXgVgsK32sGIedtdBRzUme9VsikPZc2aYJtO5wkcg== X-Received: by 2002:a05:6808:183:: with SMTP id w3mr3479089oic.176.1600267860261; Wed, 16 Sep 2020 07:51:00 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aca:b905:: with SMTP id j5ls571023oif.0.gmail; Wed, 16 Sep 2020 07:50:59 -0700 (PDT) X-Received: by 2002:a54:4783:: with SMTP id o3mr3508679oic.89.1600267859846; Wed, 16 Sep 2020 07:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600267859; cv=none; d=google.com; s=arc-20160816; b=mSP4iPoa38C+RlDPeUVkFa2X/9+A8jgJiXeBWhnbIZFyfnD6Ey45RWdyX/L2PvY3gq Uuo2T11s6BzdaSIaqwAS4lGtuerXZ6kS6H96Wk15PdfM7faI9a4tS0adE84aNIzlWr/h Y8uj3VZRDQOmatjje6+CQcMWyejQELU4HFZBv5v7VeikKrzhtksnvkKWUgt0gatNegdy EQ4PQ1l2BKLDI/qerQEe+6WDFZfcxOep5kgDUfzD2lR7fLRfTbusXlTPZEVk2fXqVP/y YXNlJosv/f+GsguhzNBK0rQHeLaVvLsn8gGFjVujtt6kZdxR7LSjcoCKvcPQsGpLR7ls sS4A== 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=X0/jNYPAEDr0NSw+66JVf7rdBB6dDp1d1MaTcEPmVwVL82e1zQXqpFG4TNRYIwFwQQ J2vOcPhYON7IwNY6XluhtD4QJcE00OZ7pDAwoT3GbmYsJwTVq3B2osVV5AACYC9K5+RW ZWGPTJUkZgXvXlhwYqEkzTXQqiyCiCSm8kNGS9nL18YRPwSXOFo8FDeUAZyJHO/gzTBB lRIzSXXZNJPL36usts4xRRP9650wxMPXc98TlYyt34yCvy/DdH3GJoWcwNPT+c9n5oYf HnMxmhso2lytZ32fLX/8rBEl+YOE7RReyNcC60Uloe5RnQybW+mqF+R6/BF0V6aO/JIm zuTw== 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 q10si1058241oov.2.2020.09.16.07.50.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2020 07:50:59 -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: aiNHJZDPx3MqD+BSzq+AcWGq6Khi4k4475u0h9QgJXe7Z2bFclNuqqYM2oGX2AQ5hUT0scOFJw I0XWqnWP+3nCHUn122HE5KXGiCGYdPzlWrQhC/JgwlKZXGT36Cjp2YHcXWQBsnddKa8ObgEog1 wOFOVnJgYWEFLdzxMtv8FTXpKw/wts04+RkuPwGhgtyxLqNWZwGm0XHuK39feweuYeJfS5KNpw Gt10QdsOS1tzdODgFiAwFbMM8TIvvacovf7u0EIQs09gsw9KHsgonwUkiyJMUCze24CI2dB1X8 bRA= X-IronPort-AV: E=Sophos;i="5.76,433,1592899200"; d="scan'208";a="52989547" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 16 Sep 2020 06:50:59 -0800 IronPort-SDR: sSlXA7NilGFgCj16IlTkWf5isxhlGI1caJIop9rOh3RA1o3FX03CeSt4F/JiQFI4SJ6gd0yfue VsuxYq957oeR/Ws9N4HU8qGEGOwL8tNOxlmafreQb/dwRXD1r0UlJel5CYyrN+OxgxbpDs16ea vseUPbDgyUPrKNKviDVHDO9OhnGWIkpqSsgTF+G+k9vtyQl/NI9N117Uu3qa91xVi1NrNTG6em dGcVSw66gtTso4Gy9Rl3JN5e3m6aQV9r//4VbC80uAlsZd9A4s4dqCzrRzPgEUvK+K+qi7Mfkx CB0= From: Vijai Kumar K To: , , Subject: [PATCH v4 2/8] wic/plugins: Fix wic plugins to work with the latest wic Date: Wed, 16 Sep 2020 20:20:15 +0530 Message-ID: <20200916145021.5856-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) 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?1678002472465798444?= X-GMAIL-MSGID: =?utf-8?q?1678002472465798444?= 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')