public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "vijaikumar....@gmail.com" <vijaikumar.kanagarajan@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v5 3/8] wic-img: Satisfy the quirks of latest wic
Date: Wed, 14 Oct 2020 01:59:57 -0700 (PDT)	[thread overview]
Message-ID: <23c1d56f-2034-4c3f-95a0-598b43df47cdn@googlegroups.com> (raw)
In-Reply-To: <20201005165307.14668-4-Vijaikumar_Kanagarajan@mentor.com>


[-- Attachment #1.1: Type: text/plain, Size: 3078 bytes --]



On Monday, October 5, 2020 at 10:23:52 PM UTC+5:30 
vijaikumar_...@mentor.com wrote:

> 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. 
>
> In case of stretch, bmaptool is based on python2. In case of buster 
> and beyond it is python3. Grep the first line of bmaptool to find out 
> which version of python is used and symlink the appropriate binary 
> to /usr/bin/python3-native/python3. 
>
> Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com> 
> --- 
> meta/classes/wic-img.bbclass | 16 +++++++++++++--- 
> 1 file changed, 13 insertions(+), 3 deletions(-) 
>
> diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass 
> index 0ec9575..29956e5 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) 
> @@ -158,22 +159,31 @@ EOSUDO 
> IMAGE_FULLNAME="$7" 
> IMAGE_BASENAME="$8" 
> shift 8 
> - 
> + # 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="$BITBAKEDIR/bin:$PATH" 
> "$SCRIPTSDIR"/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 "${BITBAKEDIR}" "${SCRIPTSDIR}" "${WKS_FULL_PATH}" 
> "${STAGING_DIR}" \ 
> "${MACHINE}" "${WICTMP}" "${IMAGE_FULLNAME}" "${IMAGE_BASENAME}" \ 
> ${WIC_CREATE_EXTRA_ARGS} 
> - sudo chown -R $(stat -c "%U" ${LAYERDIR_core}) ${LAYERDIR_core} 
> ${LAYERDIR_isar} ${SCRIPTSDIR} || true 
> + 
> + sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta 
> ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true 
>

This is the issue. Atleast one. ISARROOT is no more. Rebase gone wrong. 
Will send a new version.

Thanks,
Vijai Kumar K 

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 
>
>

[-- Attachment #1.2: Type: text/html, Size: 3935 bytes --]

  reply	other threads:[~2020-10-14  8:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 16:52 [PATCH v5 0/8] WIC update Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 1/8] wic: Update to the latest wic from openembedded core Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 2/8] wic/plugins: Fix wic plugins to work with the latest wic Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 3/8] wic-img: Satisfy the quirks of " Vijai Kumar K
2020-10-14  8:59   ` vijaikumar....@gmail.com [this message]
2020-10-05 16:53 ` [PATCH v5 4/8] wic_fakeroot: Handle standalone pseudo invocations Vijai Kumar K
2020-10-05 16:55   ` [PATCH v5 5/8] meta-isar/conf: Add provision to debug WIC Vijai Kumar K
2020-10-05 16:55     ` [PATCH v5 6/8] debian-common: Add tar as a dependency for wic Vijai Kumar K
2020-10-05 16:55     ` [PATCH v5 7/8] Fix legacy bios boot partition Vijai Kumar K
2020-10-05 16:55     ` [PATCH v5 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint Vijai Kumar K
2020-10-05 16:59 ` [PATCH v5 0/8] WIC update vijaikumar....@gmail.com
2020-10-06  4:55   ` vijaikumar....@gmail.com
2020-10-06  9:13     ` Baurzhan Ismagulov
2020-10-07 10:49       ` vijaikumar....@gmail.com
2020-10-13 18:22         ` Jan Kiszka
2020-10-13 18:30           ` Jan Kiszka
2020-10-14  5:56             ` vijaikumar....@gmail.com
2020-10-14 13:23             ` vijaikumar....@gmail.com
2020-10-14  5:54           ` vijaikumar....@gmail.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23c1d56f-2034-4c3f-95a0-598b43df47cdn@googlegroups.com \
    --to=vijaikumar.kanagarajan@gmail.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox