From patchwork Wed Nov 25 22:03:28 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: 221 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1102218oou; Thu, 26 Nov 2020 00:04:07 -0800 (PST) X-Received: by 2002:a05:6402:17d9:: with SMTP id s25mr1356605edy.132.1606377846981; Thu, 26 Nov 2020 00:04:06 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606377846; cv=pass; d=google.com; s=arc-20160816; b=rknG0cfUZ1TDKc+3GsZw+k0b9qHrcPoqsUXlr4lEvGSRUQMfdEXcVvjzqI3Zq9ARyb vhU2Rsl04EF7KRPc8Udnc8yoOCyebVbuq57bGglHck0FL6Spo1A9J8c8AvB2Rwiue4DB kJciqC8vADSqHveHyfiAxfzmzzT0EUjpZC6opiBbzpf6qEVnn6/hTU8XjPubrZVi0LbR wnOgBmqNZo8B4bGpRy5VI+BzNiPx2I5n0h9NGpGGEwhjl1c+WlNqgVxfBglBYy9b5d01 XYwDRGi9rgruXenEcMG5RsIaaDGGLVQVHjemFzlMsnAD0Y/KPZFcLkcR4RLDU4h9dRle gsUw== 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:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr:sender:dkim-signature; bh=mObw0mgV6QdlOYQGcjMEE1mzDF4xBK78S/Kwhjeulfg=; b=Havz2Yr0yi+p8NUVIJHpoL1ClALas79VWCMzonvBVbeEt8y30pJ5BTUqCey3lLaNs4 t1X7mgPneYIL51pblryFC0tivXrkRqIiaxxyoy2rv8DM9jYSkF8xSdcKLSPZHbGw6KD6 dKxPVHYnzs9XdyQ7pIePVm25XYX2XapXi/SWOP9MM+9SRW/Ta17oUYsZpxqPcQ6axk7q imqCoj5ToOhWjcyyEDyEe93GDzr33jnoJWbRZVZ+sg9ZdWDFRgRLKQ6UmtzfRUVve0rl cgzqTf5KVsp2TgnSNBcJsjR36ich6TT4X0xgLOCfneAh4KXPoFUftFcjGQVgR0W1MO+T 6NvA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=FxC45jyx; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5wc7x6qkgqevpqbtva@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5WC7X6QKGQEVPQBTVA@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 y18sor3096132edl.0.2020.11.26.00.04.06 (Google Transport Security); Thu, 26 Nov 2020 00:04:06 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5wc7x6qkgqevpqbtva@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=FxC45jyx; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5wc7x6qkgqevpqbtva@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5WC7X6QKGQEVPQBTVA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606377846; cv=pass; d=google.com; s=arc-20160816; b=iAm1KuyACrCuEdF9Fs4CduxwRwsV2TWRE6OTM2p2gGqdIrqB2e7GWbzdfLRoDnzVpv 5/iBeg+Rz3vMMYdn7+ntRDHYNWlbq5f+6JwWHmwHB52OxILubh6C0jSH+g8RcnHROF3r V4/tzD2GWVpVXb62+Rhlyl4muTLJMlE1VOk+qzVrTg/DD0bO4j9dSgWeKJCeFwJEJes2 z9ExwrnLMbK6ECL3u7FRLNCHuypVdKyBA76M57GxNEV3/3MPLxdiLG9IGnECC1VRuVyY mufZnx9BZa9Kmj3oMebh7JafT22lBjsYZG1gEBXDpYwiSJR5UI8+JDqwxdCZ25vP+odf BeOg== 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:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr:sender:dkim-signature; bh=mObw0mgV6QdlOYQGcjMEE1mzDF4xBK78S/Kwhjeulfg=; b=B8tfx0R009qZeVh0sGmbjjhdnUGEJnhnzXmAZYxFHdz8aYfqd3eFY7nlEao263hZJC Zkh4hDSjKZbOEFF0e47oloA9k0bMc3SP7n4YD5wOxr0h1X5YPojIo2JZTA3EF/ijHcHP ii7IAf6qcvHQ5eYd3jdcNXi/a8vI/ZSpETJ6LGAiUDpPDqyPPl+5CjnM5psTX2IbRy8q 2Qw3fcz9PcJ2YjtbZ2MPveg/ebUDYDgdM8QxeLpW8wP1re9NGDVsI8PMIUO9uxWy29nA kErns48ZPm993m0UCMFOAQ6pWRUp/3I3oGJvTOmDE2+8x+zabKFpmFhDZ3Drn7uD+sHb /KPQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 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 :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=mObw0mgV6QdlOYQGcjMEE1mzDF4xBK78S/Kwhjeulfg=; b=FxC45jyxLAF2USFyfz0gKoa3CB0XhE1UAGl801u8BwipIrXt7EK2h00367EWXrrQgD QplfjKMDOgZzJJo24jTeyNHwUAtcz9jkaoE7N+RvrFRW4t9zN0oL6igIFPO+6e0STncc s6Ck4gyAcafFbkbw59upqzVvfTDs/DnPNnCQCnmJDkMwHTmCtyD0ex2f5g0glJDSpPC3 ytque922LsOsw6jueCjTRgyWrBrv/mAFhosn+NwfVZNJlceGXLbPN8SKWuEvO7tOq7S/ l0XBNjPUaa/VEEO/KqCVS28uJpjV070i74ACN7uMBEN3dkqgNOyjrvjUzky34ufYN/41 malg== 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: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=mObw0mgV6QdlOYQGcjMEE1mzDF4xBK78S/Kwhjeulfg=; b=q7lnC6WjuPPV6OuiLnl3u9PMp3mX75vPSuHFo2jBu49OrZDHo+yJNUWaj8ID7U/M4X jZGrTSpNpIbSZmX4Z1+9mTPCq5pmMCTzRO/QnRBpn/SNfG9JsDrolGHQPQzKbAUdLLe4 XnbCu3Y2tBe2wXKWChR+2nHfPZ1FiUsJEsgIEd1Ga4COnBIoWS/SJSwnWVK/Rnf2ICZd CRUCbKKLN5V6C7wx2/oWnvo5J57CTGKmY6U0D8mRbKpu4z3HKIe2HADd9DTw3XpYff54 gV1bQirp9mwOxK0bYfFZspgRwjArXGXjOZice9c6XjZjtkkJ+cEqGpGXY1Nmz1jHLQJR NwPw== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532SLAvO9CpPExizntHvvTexW9R+ApSYsDPE9zaxgp/yFRxDvLws XtpY0EShWPt+6B1LEYati8c= X-Google-Smtp-Source: ABdhPJzTz8S2PdbQYPHqTSPo5k5uqKL4IYWqqGGiKGbsjVGtR9aPt+8XpueBYDU2PPysdWa1lwyhpQ== X-Received: by 2002:aa7:c704:: with SMTP id i4mr1365328edq.51.1606377846561; Thu, 26 Nov 2020 00:04:06 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b2cd:: with SMTP id cf13ls339443ejb.1.gmail; Thu, 26 Nov 2020 00:04:05 -0800 (PST) X-Received: by 2002:a17:906:6713:: with SMTP id a19mr1689287ejp.468.1606377845563; Thu, 26 Nov 2020 00:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606377845; cv=none; d=google.com; s=arc-20160816; b=dItU+KnYhvcicy2XN4csLGRPtJ8qhcLBIt3dIgveChatr9DGWiNj1XGhTlFwBikTrd RkRxbPuGqj2f9AZKbLeB9q2OpsptJhdVsozjxqbsAOSBFFNlk6bBAefDxiy3fF1yn6UE nqvnZCASRls+PXJBLSMpOzCUsd9OMu+mAqCjIhJetxQznTrJiv0czZDUat5RSjPFI2u5 eafZgj0pl63xYHl+3lTd/Bv3u0yeAiWNZtbAEk0NErt1ghF6fAYXEZQ4vVq22veEYG4z iM9oEITtAwiVMkjEUw9o1c/502mJ9fovNQ9ZTTvdUEC23iTplwiLQoysiulIXUFQbH5w OUhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=Xks3ci/ZitnfhXQ0rygWrRRDo8VgAZ+2jA8qpPMyTaU=; b=R2DvYSl2IEYYPErT87lIQ6UMr5YsOednE7wUdQXh67jYtpBFqLzZW38LzVNIFDztUQ ByAvelnO/QRICiB8eQYIVeUBj8MMgN94Vg6lkVPkfXxatfWHi7/7MHudtxYOrUTOnO0E eo+/MrL1zP0+uJBZ++uO91JkSBPSPKwNzc9BsgTYRQ6VXoPVT5O0JS/hJpwbFxlV+qpu luDCVL3l1wKSifAbnxt24ha885DVCws1tH449YjbkuoGXcCMC2uVEUGYf7yVq3mBLTS5 ptvlu/DnlQUi7XrwCwsT8ZD1SyqpkJAf3hU/GW1MsXmDjTKeg0mE4O8SaAuWBmqF6ysK k/aQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id h5si145622ejl.1.2020.11.26.00.04.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 00:04:05 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; IronPort-SDR: keaIAvVWe60H9GxAQm60pW85+rjWVSm+x+noXm4OtUDn9pPenQTnXNdbtQjsoUNZ1TDX1+TkUD /ABSpOAzwlaElwtu4fMN7XfdcNSiHGrWWfIaiDXyBvE0tQZ8vF423T3py14o6SBJBr2EQyvS6i NWfKo2sm4i0oz2Osfdvn/qeLFG8NajPyw9BteQJBv/eaRPQ/MhXCsRukoQOnyznq80wxgCv0lw P3sBGF/kPQ8hZymxLMnt0EdYlDLnT1uCfL3JWtsALoFNKEKe9AP5zsON2EwSsikEWzmqmpBGS5 gss= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55624998" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 00:04:03 -0800 IronPort-SDR: 0jk+ll0CKFnk4xmXcJwT/irJk4sGQ2SRQLTIezoiWltA02TblMU0LLf8GmuBkVN7VpIc7w0IiY 4Jkkh8wI1GGhB1oO+TMW20UwDSQFV9uOm0ttt5ThkADhLeSKOFVt42uk0dF1xyOTDJLytnZub9 7uUQjiZKUACB93oSrvukpqzZKU9LVLk39bpofZZ022tSCON4gfnOwvpnD+2uqL6hfQj+MtANFk bD/6boqlm2BIM5wDMwbuR4lyAXmLY9JuAXByTRTBQkzYbePlS1aZY9BucpSoBaLY0yUM7SA3uv sDs= From: Vijai Kumar K To: CC: , Vijai Kumar K Subject: [PATCH] wic/plugins: Fix boot plugin Date: Thu, 26 Nov 2020 13:33:28 +0530 Message-ID: <20201126080328.26721-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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.252 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?1684409257430232210?= X-GMAIL-MSGID: =?utf-8?q?1684409257430232210?= When we use --use-uuid along with bootimg plugin, it is observed that the uuid updated in /etc/fstab is not same as the one the disk created by bootimg has. The latest wic[1] creates a UUID for use for these plugins, our ISAR version of these plugins were not consuming the uuid generated by wic while generating the partition. Instead a default volume id is generated which is different from what is written by wic in fstab; resulting in boot failure. Fix the ISAR bootimg plugins to use the uuid from wic. Also, enable --use-uuid with bootimg-pcbios-isar plugin in common-isar.wks.inc for a testcase. [1] https://github.com/openembedded/openembedded-core/commit/9256b8799495634ee8aee5d16ff71bd6e6e25ed4 Reported-by: Henning Schild Signed-off-by: Vijai Kumar K --- meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc | 2 +- meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 3 ++- meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc index cc38a01..4290edb 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc +++ b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory -part /boot --source bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024 +part /boot --use-uuid --source bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --exclude-path=boot 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 2285d2e..6b2fbc2 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -276,7 +276,8 @@ class BootimgEFIPlugin(SourcePlugin): # dosfs image, created by mkdosfs bootimg = "%s/boot.img" % cr_workdir - dosfs_cmd = "mkdosfs -n efi -C %s %d" % (bootimg, blocks) + dosfs_cmd = "mkdosfs -n efi -i %s -C %s %d" % \ + (part.fsuuid, bootimg, blocks) exec_cmd(dosfs_cmd) mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) 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 493615b..b3d71c5 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ -209,7 +209,8 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): # dosfs image, created by mkdosfs bootimg = "%s/boot.img" % cr_workdir - dosfs_cmd = "mkdosfs -n boot -S 512 -C %s %d" % (bootimg, blocks) + dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \ + (part.fsuuid, bootimg, blocks) exec_native_cmd(dosfs_cmd, native_sysroot) mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir)