From patchwork Mon Aug 24 01:27:42 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: 8 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a05:7000:4605:0:0:0:0 with SMTP id b5csp2149877mae; Mon, 24 Aug 2020 02:28:26 -0700 (PDT) X-Received: by 2002:a37:620d:: with SMTP id w13mr3713466qkb.162.1598261306402; Mon, 24 Aug 2020 02:28:26 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1598261306; cv=pass; d=google.com; s=arc-20160816; b=NyTzXe9wtx2trS/GtBz3FNTzJRrJEQ5JhhKyJbX9Bp7YFQI0n6hW2AA1eXXaozr9pZ 45tl6onmR9afTSwrv9xYUPbJf+PhQ4u54CDM3vyUqXDk5TXK/2go9kzcmHUab8OBQn+4 i7vS19gYDrikDL/CQRjBFRCVprSZsq0+RICxuyHxHUPrn60PMr0Hdp/fsvt6k8XgxKMK vRlvJqaAGcw5o8sHUJaDTP3WfjkqgTAZCsTy5JqWTSShPi9NLkjx9sBFDGZzIgsl9UNV oE5ax8V9faYUtc2mD5T0QtL7No8sjSz9t1uP+u/lGVv0rGtyjsLuxQgwrK0CSrol8ly+ L+RA== 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=/j0OUWyHJ8llQ291DIRSkll7Ro2Gytq+RThY/sA1IVU=; b=ErjEJpgfWWZ3qf8M8t33GmthYQoT57F7sAdfvo3Bno9ShusKHRegbfb3xOk3NLSTBO tWhXcr/jF1cGUoWKt0uFOgK7i0Dx95PtLiS5eTvePERmz/VzWyBMcS2DD0S06EnwXik2 t4p3tyjXBiZjRXwN0Y3hFQAhtzhi4AJ5anxYscegFKqgO+aGsBMpA3g4WNJgYWC/3nY6 mh2Bt1V7/emEhfd4arSM7fjHeju9jE1SlSreO15kxTgKm5DHpEtzKz+7PKb8NptvtXgW JzFR2/CL5GQL6/pFwvHBpeZQxB4pxmNETG48Zu084t/oT05yuQqaDfuMT1YUalLeDBy0 A5aQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=aDKdcoXr; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcw7ho6fuybrbomqr35akgqeg4odubi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCW7HO6FUYBRBOMQR35AKGQEG4ODUBI@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 o6sor7324356qtr.50.2020.08.24.02.28.26 (Google Transport Security); Mon, 24 Aug 2020 02:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcw7ho6fuybrbomqr35akgqeg4odubi@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=aDKdcoXr; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcw7ho6fuybrbomqr35akgqeg4odubi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCW7HO6FUYBRBOMQR35AKGQEG4ODUBI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1598261306; cv=pass; d=google.com; s=arc-20160816; b=SBWHwGZjKr1Erhovqem539Es1hn4FW+Bry5IuVFdqnsccDCk+9OdLpxF2QYZbomdK6 1DOfalA6AeMeRXHFjcnWn6z5XUdeTk9eacu6NzI5aHGWjGwaSqP76IfV+P2mG4wjPZMh 4SR2ziPpI54HuvSR01pkshQN+vNzc8+zKJ+YqLYkKVo00sQvLoWFcapRjEtvV11P85Fc h5XGRDmBshGTMK/7DrTRxHQ4eoViQGxy+P02LGdAXoC4YzwxyUOWYfSuDa71mrb2SGE7 XoXNwxG5GQlkR44FJZSqQeRA2twfUWd8+SNz30Q6RfE/izLkjcLhZovVWBPhrs4QyRZ5 fiAQ== 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=/j0OUWyHJ8llQ291DIRSkll7Ro2Gytq+RThY/sA1IVU=; b=n/3r5NDe8tRCKXMn66UhF763A4BAw9MjUXnn1KusplV4Z8kj+1dw6CsDzWep3Msi5B ztd9nenF+blOEVHMBN/ZSxt72iA9W86dL2BprEri72HAtR7Dt+3cSrw7QvMKeN6NAylu SfDk6vCl7rEnziJI2eTlB6tz4QfvmHYb/v1Q3ZjrekF4AgnXcVqwFRITCpk2Rc3bUHK1 5ZzN/46SC3Jr6HtJkzKD9P0B1HBcMh4btyq/iqXAKpuuQuKyHMhTK9SWNZT+f/UfYNUo RUbYTmyaVVSj91sm7FHfJAUrLhAAft1Dot7L39KNzU4yGuKTMYRM/ppslBk23K3Aocsa lf1g== 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=/j0OUWyHJ8llQ291DIRSkll7Ro2Gytq+RThY/sA1IVU=; b=aDKdcoXrd4XRtIXoJMkfCHSU8bR9TbVJNpMni7h989YQaB1x7bOS/P8zBzPODVLt0N zdClPXWkUK98aP0WK+qwxfdQDQpc25bwIuaQP4sf0/+aQGt49jfTwXiH/3MPjUu5sKMj CKRiAEPdyYOT06OS6xePWVosh1wG6PqkwNq1yRr/DxrR973LQ6ksQEKjZL/WQ9tSdB2S DrR2Twgk075j3Zg6eGojoaedG8FayPQIdklN3RxMBbUe8feoXfDtJXIt17BQi+k7AxqE rvoHFicaUs9zJo9W4JpBV9guFK4Yn6gHRmvJ/Ht1DJcgiG7AKQFsVcObh1dw78ukNhLs sWbw== 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=/j0OUWyHJ8llQ291DIRSkll7Ro2Gytq+RThY/sA1IVU=; b=KVrj0EQv55MW0nnorVEKT7qtLasEqELrB09vesdQoUFDJehGjO+2TYScG+jTCUL0/Y CUylU0ioTHQbmAvlKbX/o4SQHWR1ZsjhRiZNJillXxc0OJDzEogdiMygYXQS9HCRgu/3 yiHof6PT4ZCwElCZwG+30X7noTzk7DGgvNU+GLGHN+2SM2VBrfxxQ/uOyI7q88tYBp1g YqTsMDF1s0Z/EaQqbVOjF7END1AM0nhIUk2Kr3Jk1JR/ZpbZ6tUE6MbTgFKhIXA7TpKP mTRL3WNE1OALorblUgR71a2uG+CZQKbezFDU9ippfluayjFI5tcccxbjt/UF7fmXdOQ8 L3sQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533hrH11lQk72zwbVDXev0v3pLscxq9Ffy2f8cwCP0ii32Ebd7zl N1rObH4aq8+M3FXgZSvo71s= X-Google-Smtp-Source: ABdhPJw0SzgRwe4ddVMxpw6zdVDxW7WEtXUfEg/HdPbiEcqe1Kd7+sRTdwFAVXKxOq9hQ00nzU02dA== X-Received: by 2002:aed:22a1:: with SMTP id p30mr3891903qtc.193.1598261306065; Mon, 24 Aug 2020 02:28:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:a408:: with SMTP id n8ls998218qke.5.gmail; Mon, 24 Aug 2020 02:28:25 -0700 (PDT) X-Received: by 2002:a37:4c84:: with SMTP id z126mr3860076qka.130.1598261305713; Mon, 24 Aug 2020 02:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598261305; cv=none; d=google.com; s=arc-20160816; b=pYInD8ik04OgkK6pcEUWsVhh6XarciduDJUqzVGtxZDosOF7dyir+paWSHvfafL2WJ Hvs6jFh/qyfhKJITzBQ/fe9VxnpA/B/Aw3a/KE2wEy9CObuZ9c6lhxBxu78rYRt0USiC Q/S6A/++z8ARthozbWWZKYoDJ7xVnjAAEUL98YLXKmRANvjn+kJQrcUkr5wXEwFkl15p oooqT8F8vTOWfqQHVX/WggPdMwB5gM44bgnZ4uGXylsKd3nwNVZJ77u0xUtVcnr+ne+V QvcsXXda2O5EhEVD5pxBUlGkhQKbxFOmFkh5eDZo4GEeTSjFgyy4snunRTrA5g7JPijq jNtg== 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=09JohtYCVfuW0IDkMmms8EGF7jRzys5kdqnGDPqT+SjZ/Agjam1k6tZL4bKtz2ykRJ yQZb4aSqyK2nc1Q0gQM7wZFicuuda8IyzXImMoFvsY65Qy2aAY+rWkqAkHdEHrp9H9E6 5hktZdKbwIC7uOmzeTNZX4urToKAcu5ivr1qvZo4umta+5oRBsJPIID9DG5WhYwfXSNb d41kVAVAmJDeR+NKqf4kcZSzBDHjTMDmUCKymT3ROoJQAKlGaqMJ8aZw+CE5ZFfjS70h kg1p0IlDKP18oImWdrjrYCzij0fp0qBE4OoR1bOOcDea/f6pRtFvsdCm3iDYBpcKfZkc 0PNA== 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 e16si360474qto.5.2020.08.24.02.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 02:28:25 -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: AmW3uWY4yu27OdHzTIGyen1rECIvvCuozQqvxebUZ1CGek5/5XuHbrjIJDEqHwxCS/8hJBkLY4 0soPIiRHpMSeAxN1ISVP61KXizuEW5KTrY/8AQ8DkTqwfiTxHLZOvwJs/Tzp7F+26jPh9T4/RT WGEeAOYgBgnaPUgYs9y/bb4kfTn2nRlzL9G2wvCyJI2l7koq5rufByvRmANqQv+dPh8KXpgrsR iPOXpMkcwpWecHm4XRwWSq3Up3Ek6R+PDoiMF3DK2iAs2C6ewr3ys4GzEwzkP7I17gpaEpYOK5 0g4= X-IronPort-AV: E=Sophos;i="5.76,348,1592899200"; d="scan'208";a="54369369" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 24 Aug 2020 01:28:25 -0800 IronPort-SDR: 2xiyY5XqaZ0jCSISu83cYBxzl2f1y2AMdUAcjvaSawtar+WOdwWhIPtfnBMVexOT8rai8QCeIo e/ej/pWx/57inmx8qPFpdype2mbQ43+NwSL0EfWDjRoazV4kBbQN9wSmeJ+CwEvvoMiV01EDpS ZQYzw+0RTimo6RxdvJ8Nru8vFEWD/2XI98c/6OFRHvjtKACGR48t3owGbAngX52tK5JAYABGXH oeV3AAo6feeMTKTUz6/PyUtQqIVBvoFRCnUbwy4FY2NK08Wtc8R/KhvcaTUh+R/PIdh8tP0h/n G4g= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [RFC PATCH 02/10] wic/plugins: Fix wic plugins to work with the latest wic Date: Mon, 24 Aug 2020 14:57:42 +0530 Message-ID: <20200824092750.19642-3-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200824092750.19642-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200824092750.19642-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?1675898447621167627?= X-GMAIL-MSGID: =?utf-8?q?1675898447621167627?= 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')