From patchwork Wed Sep 2 10:56:17 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: 22 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp654280ooj; Wed, 2 Sep 2020 11:57:07 -0700 (PDT) X-Received: by 2002:a17:90b:100a:: with SMTP id gm10mr3441266pjb.30.1599073027864; Wed, 02 Sep 2020 11:57:07 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1599073027; cv=pass; d=google.com; s=arc-20160816; b=owZ4aPQF1gdOoK3hN3JzfWavjOdwXxN39zSVRa+hl6bMs4mj+oD8i4XDLZmir97fwZ 0Hpd95MWf/sj3t0/96bg0iaR1sJrQk5s87pw9Jjy7XFgzh3Bhr5zZEIZRlPn+Y4LZ8Bq ccqD8AJYIf1wVsz0jYMyS+kQsLB71mVhT9PUb08ZnuFaKAnhij1g4S5ts1a42k4wja7D xN5EDRLhNMjT/narNf6+o+1RCvfzfzTEMfavl2WqRy49MBh/XMK1gqOw8PojYmkQQ07v EXAc+MvRweN5MTvfj2SIf4SjkE/pux9y2Uv704wHIZcuL7yuXStGAO8NNUIq124AqpP6 30Rg== 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=7bwBeiNwxvRe/d2YPDF1tDRz5Yh45NwGJ9B/n8L7p/U=; b=hn8Yy4H/hbTYllrXBhCYiXJ+LHTdlflFsUybcR+1uApNcuC6voYsLbzjseTc4aEvQV 04KiO4xyTE5sbCNx0P2d9rmkMDIDJhzGmwq/TOCnoYz6R5zEoVGdmI3wgCC0sFLzAx/+ riJFtjKo2VdPUX/aZbfid/X8jWIIP30pLaRlj263+uhI9/gEyacJZW20jBYsS53V/0pB g5yhZa2H0IRUXhi6qXB6TNoeESnwZwaL65MP+ORCgNWfR1VSQK5rubufS69f1HmsL13a yVWSGbixUzjR7uiL/tJKwYsY0SZ3/2D8v0X4ubeK59V15+uvQrIvpIJ6HWtEQ9Fba2RI lkSA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="X/uU0SzD"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrba6wx75akgqev6fyysi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBA6WX75AKGQEV6FYYSI@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 25sor198935pfh.41.2020.09.02.11.57.07 (Google Transport Security); Wed, 02 Sep 2020 11:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrba6wx75akgqev6fyysi@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="X/uU0SzD"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrba6wx75akgqev6fyysi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBA6WX75AKGQEV6FYYSI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1599073027; cv=pass; d=google.com; s=arc-20160816; b=LAYuYrgHL2ygl+rjG2nODD87GghL3w5TZZbUHfwBZNl47TvJl91/0EM4ror4jvW2+I jfe2BsTkhEWTt/qGP0yIXUQdwNFvydayw7aHyV2PaKxAqh3zJkqPB5ehdI8MPbzfMkoi /E2QT5V6NRZrGFRRV90j6dO5copzar+LP06PA39Rc02sh6UvDjdouB45aKAt/MnvKTza jgzRTLzfx42+ek93E1fyJAthbg6gQ9GDpri2Fe+DLw+4lBHtXSrKBd5R0okl1HulE0I7 7PyTAGRqTe4Y4e9lFwL+rkZseHJg42wy2SSn7trz0kN244ZB5UdPYP6BC4bLCgzDo0Rp Pctg== 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=7bwBeiNwxvRe/d2YPDF1tDRz5Yh45NwGJ9B/n8L7p/U=; b=zIA5uba0l6sE/Sr1XOXzvZ4m685yd0EVdJX99aJ8AAkVj1yYJPjiWYHTa5M3LMH8Ps FQqPDG/trvQKDirZTfbf2sIrZBZER0G4yO3kvPLrpcUPsppy93r0SDgul7p8yEsP7DyL AIESZc69QmI66qVwspMQAzE/KEkNrTb0mUADrmt5X4Ap+wYEpIZejwFdAs1kVHHQWPDy 82NFN3mknHP8nOq4oChCZ6RDaqeS2HBkgVXTJw0F6MEvKNymFsn0QOE/52eDatH8nEWs txdIJOzv8HxbKZVI4zA4QzL8V84KYXBnQv/xs7Dn3JgJJv2179hrQPXM0y+V5MYv2I8d 0C3Q== 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: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=7bwBeiNwxvRe/d2YPDF1tDRz5Yh45NwGJ9B/n8L7p/U=; b=X/uU0SzDvxsAWrDil0lr8nOYSlAiVU4eRVfTwUXH+BCJZkbdckucuLbs2hWgJ/ifsM wtHgAUfvtlehgT8gGLGcqI4wWS0CfLRKyiPpRS+ohCURv9PhlN7v6wUOW3fNf+5dnWxq eVqu6yeyDLDQzUL5Zvn5fLEDvUsrLQ7SNPXhATMbkAXzgw8WsK0osPFReBufNaX4Xc6C A07TNbYEXOfKq3kOolxXuBMct/aFG2+zdRgQg+9xKDTMkl0T1G3OcGTOG7G5VTGmY5B0 5PTHbcfREKQtYgA4wSHOyvdoxDIvDFOb4o0OtsYD/49kH+terbKw+Pn9um1VmHYCudkv C/6w== 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=7bwBeiNwxvRe/d2YPDF1tDRz5Yh45NwGJ9B/n8L7p/U=; b=feaze/IRsTcfb3SQJg2t+8E40Y/S5jcVErRiq5hsGOnkqp/9DexzbCLz1mbmeDtTy8 XV3yjtNZ8Xq0F8Y4q8YoKbZ4niu93x1RHHiaiR5XtwzmrcBdRIyIOoCZhmFJlleH46Qu fOJTZwllNZBOsGnLPB1vj6u96MEoUyjcfumWooalUgKzWlEzld5I9QahovfSc7lWpj7H 3DHEcFHdmjHeMMDyNdMZFpG5WSjJeb2GJ/AFxh1nIOnuQGLGA6I7SZCCAeDvHOspSTqj 9NVpkBj+DDuBteV6PTsovFeMGjW2MP5cJqUD0D3LRzU4h8UcEZU62ynquHg9SgWV+2ZX NW+w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530GYja9d81YvPE3TXqVLzjjoh59PAGmglUuOC2XzwIc19V2EupS /GlSQAsUwag3oY46R1WLNhw= X-Google-Smtp-Source: ABdhPJwduhuNRiY3o6/oR9HYFMsWH02d6YCteWx0eY6giKKUyL0V1lyE4tASWScDTysq1jsjFFKBug== X-Received: by 2002:a62:63c6:: with SMTP id x189mr4399065pfb.216.1599073027372; Wed, 02 Sep 2020 11:57:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:8d89:: with SMTP id v9ls1633790plo.4.gmail; Wed, 02 Sep 2020 11:57:07 -0700 (PDT) X-Received: by 2002:a17:90a:c24a:: with SMTP id d10mr3528182pjx.31.1599073026898; Wed, 02 Sep 2020 11:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599073026; cv=none; d=google.com; s=arc-20160816; b=IUtdow0VbaV8xYivQpHZpaJ4dECx1dN12lhmXRF6T2Cumh+HmvxXoU3wtjMkg5GkM+ yGCcXRan4ajQZQF7RX3Maqh73QPdmhu1Owz1qP9hVNp3sBQ1f4lApm34sHQQj+b+CGJp PTQFJq7o/SFAd2Pnk25pGF2XbV4CorGfKT8yDYSfzkffyB1X8Vrup/Yn6MmhASzEgUte 1W9vTc88d1KlWoeWHoq7ZLrd23FSQs7xsxB4KMFApNr5QGVwZgv3g8OGD4brNZ1Lu222 aEi1HmgdTrcQAf7LCptnrUvuU16O4xOCq836XOTl4Eg80r55aIGYw99PR9qdMu5iAMTD D5FQ== 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=OrLuNMyHVxxcStkRcuyuJODLf+QWu430PBk1dReaB5o=; b=iymjrePZEzkKcF5WEjaKXB3qbucSNaUJ1eckprmAi24mRAD40DfIkSw6xMVZH4cHLC bC9PZx+4JzitkupvreO9wi3oVZ6+s8N/ZBuqGAE1fuzLafAinzYPs5aE6bJZuCmHrHgI 6Zgmxw9Z4JwFqpOULd3AjMoSOSU78z5zU7pdSwFFWlsBrTWsiXzYCnaPfHkw5/hggXBA PNppiXwtVzVe2aUfjoN54XvC+3E5Dvh80VEm2MG1l273+XeV3nsW+zw0iP6JsFyae0wi 7k3AqZIsARJhh0xgNQKf1n9fawICBD1Wph2b0I3uDlhfzYjDAnil8njWLgKe6S0/hkKi 2fGw== 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 a199si43434pfd.1.2020.09.02.11.57.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2020 11:57:06 -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: oW8Yj3n9Tb1glfMOFW1B5qWlskEVNzSpBPBYT4LCcbIM4x+OWq4WWweSZnlDLS15eVNvoAUR7I jPZMBZi0hB6TEr4L9f4SidL3b6xPWt2R56oD30TE7QZz9zgnFiizyUNgipgsQ0Doxkty57AZIG Wl1M8+ViT56hqPCfhIZeGIv1QKqB14d3fir00R3mFJp9n8d+Mnqq8W8AsZcCi8OVZ5cz2Hy6/O PYPyb4o+ebFkV0pOQRsgt6CDzNRYSjEa/3ytaHpdyGwd08h2FHJWM8lIUbyl0BUrv7wKVi/IdQ VrE= X-IronPort-AV: E=Sophos;i="5.76,383,1592899200"; d="scan'208";a="54698481" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 02 Sep 2020 10:57:06 -0800 IronPort-SDR: 2E/Y9esPAZdmE8tZFqY3vwMrWfENuU0l7mOfYi/ejX56JiGga3a48GyyKWMhlCWeHkKNu6VbH6 IsdOyCEf39aAG6CShBb+HaPn74bAPjiS0+Po/Y9+wOhmDS6nutT4zPcfehDQXmPaKu4LS4GHHM 2/AnvB5Brf/Of7vI5dpseWJFDMgkkG3FmVpLfq0ebHj0cEWES1g/4nBW2Ajlydms11MdMhNA3J 4mJHWb0vqzNn6bkRxmKaKX6qzxSTSxPBNbAKriR5YpBnxCZogJH9ErhJUxPAbVpFZNuwaw7D4N ntA= From: Vijai Kumar K To: , Subject: [PATCH v2 03/10] wic-img: Satisfy the quirks of latest wic Date: Thu, 3 Sep 2020 00:26:17 +0530 Message-ID: <20200902185624.15044-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) 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?1676749599247518366?= X-GMAIL-MSGID: =?utf-8?q?1676749599247518366?= The latest WIC doesnot use fakeroot if pseudo_dir(IMAGE_ROOTFS/../pseudo) is non-existent. This results in wic_fakeroot not being used. Create a dummy pseudo_dir to satisfy wic. WIC hardcodes the python(/usr/bin/python3-native/python3) to be used while running bmaptool. The above path is OE specific and hence breaks build in ISAR. Create a symbolic link in the above location to satisfy wic. Signed-off-by: Vijai Kumar K --- meta/classes/wic-img.bbclass | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index afab394..a2c9627 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -143,6 +143,7 @@ EOSUDO export FAKEROOTCMD=${FAKEROOTCMD} export BUILDDIR=${BUILDDIR} export MTOOLS_SKIP_CHECK=1 + mkdir -p ${IMAGE_ROOTFS}/../pseudo # create the temp dir in the buildchroot to ensure uniqueness WICTMP=$(cd ${BUILDCHROOT_DIR}; mktemp -d -p tmp) @@ -157,22 +158,31 @@ EOSUDO IMAGE_FULLNAME="$6" IMAGE_BASENAME="$7" shift 7 - + # The python path is hard-coded as /usr/bin/python3-native/python3 in wic. Handle that. + mkdir -p /usr/bin/python3-native/ + if [ $(head -1 $(which bmaptool) | grep python3) ];then + ln -s /usr/bin/python3 /usr/bin/python3-native/python3 + else + ln -s /usr/bin/python2 /usr/bin/python3-native/python3 + fi export PATH="$ISARROOT/bitbake/bin:$PATH" "$ISARROOT"/scripts/wic create "$WKS_FULL_PATH" \ --vars "$STAGING_DIR/$MACHINE/imgdata/" \ -o "/$WICTMP/${IMAGE_FULLNAME}.wic/" \ --bmap \ - -e "$IMAGE_BASENAME" $@' \ + -e "$IMAGE_BASENAME" $@ + rm -rf /usr/bin/python3-native' \ my_script "${ISARROOT}" "${WKS_FULL_PATH}" "${STAGING_DIR}" \ "${MACHINE}" "${WICTMP}" "${IMAGE_FULLNAME}" "${IMAGE_BASENAME}" \ ${WIC_CREATE_EXTRA_ARGS} + sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/$WICTMP/${IMAGE_FULLNAME}.wic/*.direct | head -1) sudo chown -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP} mv -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} mv -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap rm -rf ${BUILDCHROOT_DIR}/${WICTMP} + rm -rf ${IMAGE_ROOTFS}/../pseudo } do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"