From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a0c:f84b:: with SMTP id g11mr4054737qvo.184.1598261308761; Mon, 24 Aug 2020 02:28:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:4986:: with SMTP id f6ls1908007qtq.11.gmail; Mon, 24 Aug 2020 02:28:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3Er3MYTZSaSj0VorxvBx+HL7su4uy+zqK0jp0g5jFE7JEmcxLeSXOkLUmwkqRTZAT37fn X-Received: by 2002:ac8:43c4:: with SMTP id w4mr3908471qtn.319.1598261308370; Mon, 24 Aug 2020 02:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598261308; cv=none; d=google.com; s=arc-20160816; b=kNRKHipPIupC4ys1MHLe7i0c5/nTcHqmANqFOFeb+4/QNiEMKYQf7tM0igl9b25fQh 7ZQIVI1qq5rB1evC4Q+u/VS67wV8K/oTorUdOpMUPFLCEjo3reWdpH8HEyBCfcuT81ZO 69Ib35xgbAmQQeFTuHHbwXnB4fUYoNHAhweL1aJXFqpnwIvyVS6qPzzfopqr7C7dvy8W GFMiyFEtgM/C4EJOUrmEKOC4762Nf/ltNg5Ky1NI/aqQlbzvTTsmWg138l78IX78JpHf LZo6YX+tpYXVBjxIQTqFZJ9a/93Uy0LBx0+a7xEa4dlDMTJjpjovXNn1kmRcdA3OQ2kF kcVw== 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=OrLuNMyHVxxcStkRcuyuJODLf+QWu430PBk1dReaB5o=; b=JZvmhs4PuLE+8rTz5jN6nJXeykmRH7a4C+GetUCZRcaeDJ2/EUqPPQLwzDcASOyZX7 IRlpCm2C/6vLTjaKKzEBALjLw70PuahftAJLAqUohXU+kmaQIQ3n3nqpGM8w9IZGzOCv 3+d5unQmjbT+BfWtnIMXGYGrpvEhT+5XgJ7d/bYcbN3ibKoSrtzaNghs6MWM7TMUaR1A LqCYMXQPspkp3G7bMS4Sh9HPy+CwWOd74FVpxSAezl2tm0c/Yhyg9qw69vsitXbThyXt F1cRdxVMePlyokokursknoWg9EQG/g9DO2nWInn3088Jd0vW4Hh50cyyH5pgqZwm0j1u rrZg== 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 e16si360474qto.5.2020.08.24.02.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 02:28:28 -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: 7Tf/6B0BKx9MhGHEcA3hLfwRTKVOBe6DkP14Wm/UGhyYmUirMrSyrl058Rj44HDsqkd/RBE4og qJADDSQ/LvjTkqeQP/22qHqL46NwCuev1Y9XglgzMTHoCBX3en8SADVCdfRLRCjOv384MFYnLm 7z00bZnppMzIeZfDcHSIshUq902cACJZtqosqKO1NNLX5jFKrNjknZUw6THDjk3GaJ6TESe93t vAGnlo61DXpmEXKRukFuynKB//6kpsc8qMDceK8l6w5OgFLbzFXVoMsEcku4ewGUwlPPYdlMt4 vZ0= X-IronPort-AV: E=Sophos;i="5.76,348,1592899200"; d="scan'208";a="54369370" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 24 Aug 2020 01:28:27 -0800 IronPort-SDR: d2rrFIqNT61WTs+aOTkdLCskKxd5vzQxheB0BtG4jScznLnJYYpo7+FHvGGyv1rUYVL0xRNbEQ /dWrnHOcygUmglYrYp3qL5ENmGObKgWMcZUbkcs1VkKaQOXcTeecX7GFU2Pbsola5QeKJLLsJ1 zLNDro6v/8/E4VKgztq3DKQoaaRz4YGzDIIIwH6KYM3C/uA1hjNFboGqs9To/g7KaEqpjF+kjb RO0AmUSU+mgDHXh2hxjI+qVxzFZiqtbCypfyoqfSgUHJ9IQ5FKIVrGroWkWjY9XKMOMNkW2ya6 lY8= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [RFC PATCH 03/10] wic-img: Satisfy the quirks of latest wic Date: Mon, 24 Aug 2020 14:57:43 +0530 Message-ID: <20200824092750.19642-4-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 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com 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-TUID: JEbo6ePAEp2W 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