Hello everyone!
I am new on yocto currently making build for analog devices board. Actually i am encountring an error rn. in my opt folder i want the extracted files but tar.xz folders are included i tried every way but all in vain. I am curious if anyone can help me in this regard.
Regards
Uroosa Iftikhar
Providing you the recipe file that is this:
SUMMARY = “Install multiple tar files into /opt”
LICENSE = “CLOSED”
FILESEXTRAPATHS:prepend := “${THISDIR}/files:”
Prevent Yocto from decompressing the files
SRC_URI = “file://minecraft-pi.tar.xz;unpack=0
file://pigpio.tar.xz;unpack=0
file://plustone.tar.xz;unpack=0
file://vc.tar.xz;unpack=0”
do_install() {
# Create the /opt directory in the final image
install -d ${D}/opt
# Install each tar file into the /opt directory with appropriate permissions
install -m 0777 ${WORKDIR}/minecraft-pi.tar.xz ${D}/opt/
install -m 0777 ${WORKDIR}/pigpio.tar.xz ${D}/opt/
install -m 0777 ${WORKDIR}/plustone.tar.xz ${D}/opt/
install -m 0777 ${WORKDIR}/vc.tar.xz ${D}/opt/
tar -zxvf minecraft-pi.tar.xz -C /opt/
}
Include all the /opt contents in the package
FILES:${PN} = “/opt/*”
and the error is this:
NOTE: Executing Tasks
ERROR: opt-1.0-r0 do_install: ExecutionError(‘/home/uroosa/yocto/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/opt/1.0/temp/run.do_install.684652’, 2, None, None)
ERROR: Logfile of failure stored in: /home/uroosa/yocto/build/tmp/work/cortexa9t2hf-neon-poky-linux-gnueabi/opt/1.0/temp/log.do_install.684652
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [‘/home/uroosa/yocto/sources/poky/meta/recipes-core/glibc/glibc_2.39.bb:do_populate_sysroot’, ‘/home/uroosa/yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_13.3.bb:do_populate_sysroot’, ‘/home/uroosa/yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_13.3.bb:do_populate_sysroot’, ‘/home/uroosa/yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot’, ‘virtual:native:/home/uroosa/yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot’, ‘virtual:native:/home/uroosa/yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot’, ‘virtual:native:/home/uroosa/yocto/sources/poky/meta/recipes-extended/xz/xz_5.4.6.bb:do_populate_sysroot’]
| NOTE: Installed into sysroot:
| NOTE: Skipping as already exists in sysroot: [‘gettext-minimal-native’, ‘glibc’, ‘binutils-cross-arm’, ‘gcc-cross-arm’, ‘gcc-runtime’, ‘libgcc’, ‘libtool-native’, ‘m4-native’, ‘quilt-native’, ‘texinfo-dummy-native’, ‘linux-libc-headers’, ‘zlib-native’, ‘flex-native’, ‘gnu-config-native’, ‘patch-native’, ‘pseudo-native’, ‘xz-native’, ‘zstd-native’, ‘attr-native’, ‘gmp-native’, ‘libmpc-native’, ‘mpfr-native’, ‘sqlite3-native’]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| tar (child): minecraft-pi.tar.xz: Cannot open: No such file or directory
| tar (child): Error is not recoverable: exiting now
| tar: Child returned status 2
| tar: Error is not recoverable: exiting now
| WARNING: exit code 2 from a shell command.
ERROR: Task (/home/uroosa/yocto/sources/meta-custom/recipes-support/opt/opt.bb:do_install) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 835 tasks of which 834 didn’t need to be rerun and 1 failed.
Summary: 1 task failed:
/home/uroosa/yocto/sources/meta-custom/recipes-support/opt/opt.bb:do_install
Summary: There was 1 WARNING message.
Summary: There was 1 ERROR message, returning a non-zero exit code.
uroosa@uroosa27:~/yocto/build$
i tried many ways but same issues i am encountring.