From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a62:7f06:: with SMTP id a6mr4370050pfd.300.1599073027541; 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-Google-Smtp-Source: ABdhPJxxiFmLK08tidOXDx8qhOj5FPH+MVEUSpC1nuAT6ui4n8UoSCjuoZ5qaLehyFeJqgeYVLVP 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 Return-Path: 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; 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 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 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com 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-TUID: U5kKVW1HKiv7 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}" -- 2.17.1