Getting error in baking Yocto project recipe OS - raspberry-pi

I'm trying to build a core-image-minimal recipe on Ubuntu 20.04 in VirtualBox for Raspberry Pi3 board (~2GB RAM, 100 GB storage allowed). But facing a new issue while baking the image. In the local.conf file I've removed "tar.xz ext3" from "IMAGE_FSTYPES = ""tar.xz ext3 rpi-sdimg"" then the image baked successfully without any error, but not supporting the I2C & UART. But when I reverted the above-mentioned change it's throwing errors.
ERROR:
core-image-minimal-1.0-r0 do_image_tar: Execution of '/home/pranav/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_image_tar.2549' failed with exit code 1
Logfile of failure stored in: /home/pranav/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_tar.2549
Please, let me know what is the solution.
Complete error :
pranav#Pranav:~$ cd poky
pranav#Pranav:~/poky$ source oe-init-build-env
### Shell environment set up for builds. ###
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
meta-ide-support
You can also run generated qemu images with a command like 'runqemu qemux86'
Other commonly useful commands are:
- 'devtool' and 'recipetool' handle common recipe tasks
- 'bitbake-layers' handles common layer tasks
- 'oe-pkgdata-util' handles common target package tasks
pranav#Pranav:~/poky/build$ bitbake core-image-minimal
Loading cache: 100% |###################################################################################################| Time: 0:00:02
Loaded 3295 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "raspberrypi3"
DISTRO = "poky"
DISTRO_VERSION = "3.1.14"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "dunfell:3d5dd4dd8d66650615a01cd210ff101daa60c0df"
meta-raspberrypi = "dunfell:934064a01903b2ba9a82be93b3f0efdb4543a0e8"
meta-oe
meta-multimedia
meta-networking
meta-python = "dunfell:ec978232732edbdd875ac367b5a9c04b881f2e19"
Initialising tasks: 100% |##############################################################################################| Time: 0:00:10
Sstate summary: Wanted 2 Found 0 Missed 2 Current 1135 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: core-image-minimal-1.0-r0 do_image_tar: Execution of '/home/pranav/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_image_tar.2549' failed with exit code 1
ERROR: Logfile of failure stored in: /home/pranav/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_tar.2549
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: 8013.200000 = 6164 * 1.300000
| DEBUG: 8192.000000 = max(8013.200000, 8192)[8192.000000] + 0
| DEBUG: 8192.000000 = int(8192.000000)
| DEBUG: 8192 = aligned(8192)
| DEBUG: returning 8192
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_tar
| xz: Memory usage limit is too low for the given filter setup.
| xz: 1,250 MiB of memory is required. The limit is 954 MiB.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/pranav/poky/build/tmp/work/raspberrypi3-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.do_image_tar.2549' failed with exit code 1
ERROR: Task (/home/pranav/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_tar) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3053 tasks of which 3051 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/pranav/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_tar
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Related

bitbake fails with permission denied errors

When I try to build any recipe, I am getting this error in a consistent way.
I have tried to build recipes from different layers and different sources and they all fail the same way. This tells me there is some fundamental setup issue.
What am I missing?
I am using External source code path to build and not using Git or tarballs.
Yocto version: Honister.
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 9 Local 0 Network 0 Missed 9 Current 133 (0% match, 93% complete)
NOTE: Executing Tasks
ERROR: test-1.0-r0 do_deploy_source_date_epoch: PermissionError(13, 'Permission denied')
ERROR: Logfile of failure stored in: /home/honister/build/tmp/work/cortexa72-cortexa53-poky-linux/test/1.0-r0/temp/log.do_deploy_source_date_epoch.674904
Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function create_source_date_epoch_stamp
| DEBUG: No tarball or git repo found to determine SOURCE_DATE_EPOCH
| DEBUG: Using SOURCE_DATE_EPOCH_FALLBACK
| DEBUG: SOURCE_DATE_EPOCH: 1302044400
| DEBUG: Python function create_source_date_epoch_stamp finished
ERROR: test-1.0-r0 do_populate_lic: PermissionError(13, 'Permission denied')
ERROR: Task (/home/honister/yocto/meta-test/recipes-apps/test.bb:do_deploy_source_date_epoch) failed with exit code '1'
ERROR: Logfile of failure stored in: /home/honister/build/tmp/work/cortexa72-cortexa53-poky-linux/test/1.0-r0/temp/log.do_populate_lic.674905
Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
ERROR: Task (/home/honister/yocto/meta-test/recipes-apps/test.bb:do_populate_lic) failed with exit code '1'

Extra commands in raspberry pi u-boot using yocto

I want to add a custom command in raspberry pi u-boot using yocto
I was able add custom in using make by following the answers provided here Implement custom u-boot command
Now I want add it using yocto in raspberry pi.
But first I want to just add the timer command in u-boot which is present in misc.c in u-boot source where we just have to add the CONFIG_CMD_TIMER=y in the defconfig file
I tried the following setup till now
cloned poky
cloned meta-raspberrypi
Enabled u-boot and uart in local.conf
created a custom layer (custom layer added in bblayers.conf) to add the command config
Details of the recipe in the custom layer
create the following directory structure
meta-custom-layer/recipes-bsp/u-boot/
created a .bbappend file containing the following content
$ cat meta-custom-layer/recipes-bsp/u-boot/u-boot_%.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}:"
SRC_URI += " file://rpi_3_defconfig.patch;patchdir=${S}/configs "
contents of the meta-custom-layer/recipes-bsp/u-boot/
$ ls -l meta-custom-layer/recipes-bsp/u-boot/
drwxr-xr-x 2 bhargav bhargav 4096 May 16 22:04 files
-rw-r--r-- 1 bhargav bhargav 107 May 16 22:04 u-boot_%.bbappend
$ cat meta-custom-layer/recipes-bsp/u-boot/files/rpi_3_defconfig.patch
CONFIG_CMD_TIMER=y
while build u-boot getting the following error
$ bitbake u-boot
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:00
Loaded 2875 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "raspberrypi3-64"
DISTRO = "poky"
DISTRO_VERSION = "3.1"
TUNE_FEATURES = "aarch64 cortexa53 crc"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "master:2e11d97b6c95e89aa1f9d3603a966c94c442469e"
meta-raspberrypi = "master:45ee64377bcc511380edf59191abc90c1ddb210e"
meta-shell = "master:81fd3448f603a56409389247443439cad4fdaa67"
meta-oe = "master:679bb4912613f3860e8527557602251e5e5f2c41"
meta-python2 = "master:2684086f91e7074324081196c8a5f9945d39650e"
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 16 Found 8 Missed 8 Current 135 (50% match, 94% complete)
NOTE: Executing Tasks
WARNING: u-boot-1_2020.04-r0 do_fetch: Failed to fetch URL file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs, attempting MIRRORS if available
ERROR: u-boot-1_2020.04-r0 do_fetch: Fetcher failure: Unable to find file file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs anywhere. The paths that were searched were:
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/poky
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/poky
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/raspberrypi3-64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/raspberrypi3-64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/raspberrypi3
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/raspberrypi3
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/aarch64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/rpi
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/rpi
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/aarch64
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/aarch64
/home/bhargav/RPI3/Build/meta-shell/recipes-bsp/u-boot/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot-2020.04/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot/
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/files/
/home/bhargav/RPI3/Build/poky/build/downloads
ERROR: u-boot-1_2020.04-r0 do_fetch: Fetcher failure for URL: 'file://rpi_3_defconfig.patch;patchdir=/home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/git/configs'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/bhargav/RPI3/Build/poky/build/tmp/work/raspberrypi3_64-poky-linux/u-boot/1_2020.04-r0/temp/log.do_fetch.13694
ERROR: Task (/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot_2020.04.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 592 tasks of which 591 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/bhargav/RPI3/Build/poky/meta/recipes-bsp/u-boot/u-boot_2020.04.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
So what am I missing here ? I'm using a raspberry pi 3B+ .
FILESEXTRAPATHS_append := "${THISDIR}/files"
After going through different rpi3 defconfig files found the correct file and created a patch for that file. The looks like this
rpi-timer.patch
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 9b281a4f15..053d36e244 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
## -45,3 +45,4 ## CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_CMD_TIMER=y
Now needed to apply the patch to the fetched source in yocto.
Here is the .bbappend file recipes-bsp/u-boot/u-boot_%.bbappend for applying the patch
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " file://rpi-timer.patch "

yocto bitbake core-image-sato

During building core-image-sato on Yocto ,I get an error:
| checking target system type... i686-pc-linux-gnu
| configure: error: internal configure error for the platform triplet, please file a bug report
| WARNING: exit code 1 from a shell command.
|
ERROR: Task
(virtual:native:/home/dzx/poky/meta/recipes-devtools/python/python3_3.7.4.bb:do_configure)
failed with exit code '1' NOTE: Tasks Summary: Attempted 352 tasks of
which 345 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
virtual:native:/home/dzx/poky/meta/recipes-devtools/python/python3_3.7.4.bb:do_configure
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
when I do step by step as "Yocto Project Quick Build" in ubuntu 16.04 ,above-mentioned errors appear
initial output from bitbake as follows:
Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "i686-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "qemux86-64"
DISTRO = "poky"
DISTRO_VERSION = "3.0"
TUNE_FEATURES = "m64 core2"
TARGET_FPU = ""
The error appear in yocto3.0 in ubuntu16.04LTS. When I git checkout yocto2.7.1 ,haha!!! no error again.
I got same issue with zeus. I pushed a bug report to the bugzilla data base.
http://bugzilla.yoctoproject.org/show_bug.cgi?id=13842

Trying to create sample linux mage with yocto prject but cause building error

I tried to create a Linux image based on "yocto project mega Manuel".But I got an error in building image step.
I followed the mega Manuel.
I'm using Ubuntu 18.04.1 LTS.
Error:
aju#aju-HP-15-Notebook-PC:~/poky/build$ bitbake core-image-sato
WARNING: Host distribution "Ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience
unexpected failures. It is recommended that you use a tested
distribution.
Parsing recipes: 100% |#########################################| Time: 00:00:49
Parsing of 899 .bb files complete (0 cached, 899 parsed). 1330 targets, 38 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration: BB_VERSION = "1.28.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-18.04" TARGET_SYS = "i586-poky-linux" MACHINE = "qemux86" DISTRO = "poky" DISTRO_VERSION = "2.0.3" TUNE_FEATURES = "m32 i586"
TARGET_FPU = "" meta meta-yocto
meta-yocto-bsp = "jethro:331275422b2c3f326f605c23ae89eedb4e222eb5"
NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE:
Executing RunQueue Tasks ERROR: oe_runmake failed ERROR: Function
failed: do_compile (log file is located at
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301)
ERROR: Logfile of failure stored in:
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301
Log data follows: | DEBUG: Executing shell function do_compile | NOTE:
make -j 4 | : && /bin/mkdir -p doc && {
PATH='/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/build/t/wrap:'$PATH
&& export PATH; } && /usr/bin/perl
/home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/automake-1.15/doc/help2man
--output=doc/automake-1.15.1 automake-1.15
| help2man: can't get --help' info from automake-1.15
| Try--no-discard-stderr' if option outputs to stderr
| Makefile:3687: recipe for target 'doc/automake-1.15.1' failed
| make: *** [doc/automake-1.15.1] Error 255
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/aju/poky/build/tmp/work/x86_64-linux/automake-native/1.15-r0/temp/log.do_compile.301)
ERROR: Task 403 (virtual:native:/home/aju/poky/meta/recipes-devtools/automake/automake_1.15.bb,
do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 73 tasks of which 53 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed: virtual:native:/home/aju/poky/meta/recipes-devtools/automake/automake_1.15.bb,
do_compile Summary: There was 1 WARNING message shown. Summary: There
were 2 ERROR messages shown, returning a non-zero exit code.
Is it the problem with this latest version or is it something else?
Why are you using such an old release of Yocto? 2.0.x was first released in 2015 and isn't supported on modern distributions. If you need to use 2.0.x then you can pick a patch from a recent release to fix autoconf, but I really do recommend using 2.5 (or 2.6, due to release any day now) instead.

poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb, do_unpack) failed with exit code '1'

I'm new in using yocto.
my environment is ubuntu 14.04,
Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS "x86_64-linux"
NATIVELSBSTRING "Ubuntu-14.04"
TARGET_SYS "aarch64-fsl-linux"
MACHINE "ls1043aqds"
DISTRO "fsl-qoriq"
DISTRO_VERSION "2.0"
TUNE_FEATURES "aarch64"
TARGET_FPU ""
I get the following error when running :
bitbake fsl-image-minimal
(on every call to bitbake build )
=====================
DEBUG: Running export SSH_AUTH_SOCK="/run/user/1001/keyring-an3Qaa/ssh"; export PATH="/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/scripts:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/x86_64-linux/usr/bin/aarch64-fsl-linux:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/ls1043aqds/usr/bin/crossscripts:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/x86_64-linux/usr/sbin:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/x86_64-linux/usr/bin:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/x86_64-linux/sbin:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043aqds/tmp/sysroots/x86_64-linux/bin:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/scripts:/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"; export HOME="/home/ymarko"; git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master
| DEBUG: Python function base_do_unpack finished
| DEBUG: Python function do_unpack finished
| ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
| fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.
|
ERROR: Task 854 (/opt/disk1/LS1043-Install/SDK/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb, do_unpack) failed with exit code '1'
NOTE: Tasks Summary: Attempted 306 tasks of which 298 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
================================
Can you help please?
Try upgrading your version of git to 2.7.3. I was having the same problem and this fixed it
You need this patch in order to fix it.
Pay attention, you can't simply add "-to" as a suffix. The order of arguments also reversed.
Example how to use:
curl https://patchwork.openembedded.org/patch/145072/raw/ | git apply -v