Delete all of do_install, then run the unpack task and check WORKDIR for
where the extracted content went (unpack will do this for everything in
SRC_URI). Then write a do_install that installs pieces of the unpacked
content into ${D}.

You don't need to perform a separate unpack operation, and IMAGE_ROOTFS
only exists in the context of an image recipe.

Alex

On Mon, 21 Oct 2024 at 18:30, umeshyv via lists.yoctoproject.org <umeshyv=
gmail....@lists.yoctoproject.org> wrote:

> Hi, I have requirement where recipe file reads set of .tgz files and it
> should store in a location in rootfs and untar them(on freescale board).
> Can you please show some pointers.
>
> SUMMARY = " Tools"
> LICENSE = "CLOSED"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
>
> SRCREV = "${AUTOREV}"
>
> SRC_URI = "file://tool1.tgz
> file://tool2.tgz
> file://tool3.tgz
> file://tool4.tgz"
>
> do_install () {
> install -d ${IMAGE_ROOTFS}/usr/share/sigma-tools
>
> for file in ${WORKDIR}/.tgz;do
>
> tar -xvzf $file -C ${IMAGE_ROOTFS}/usr/share/<folder>
>
> done
>
> Alternatively instead of for loop tried below
>
> tar -xvzf file://tool1.tgz -C ${IMAGE_ROOTFS}/usr/share/<folder>
> tar -xvzf file://tool2.tgz -C ${IMAGE_ROOTFS}/usr/share/<folder>
> tar -xvzf file://tool3.tgz -C ${IMAGE_ROOTFS}/usr/share/<folder>
> tar -xvzf file://tool4.tgz -C ${IMAGE_ROOTFS}/usr/share/<folder>
>
> But when I build following is the error
>
> DEBUG: Python function extend_recipe_sysroot finished
> DEBUG: Executing shell function do_install
> tar (child): Cannot connect to file: resolve failed
> gzip: stdin: unexpected end of file
> tar: Child returned status 128
> tar: Error is not recoverable: exiting now
>
> Can you please suggest to resolve errors and provide solutions
>
> Thanks
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64071): https://lists.yoctoproject.org/g/yocto/message/64071
Mute This Topic: https://lists.yoctoproject.org/mt/109136100/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to