errors with Build core minimal image

Moderator: nferre

morgan_2956
Posts: 3
Joined: Sun Nov 29, 2015 7:38 pm

errors with Build core minimal image

Sun Nov 29, 2015 8:14 pm

Hello All,
I'm electronic engineer, I'm currently code in embedded C or C#. I'm completely new in Linux, Yocto, and SAMA5D3.
I follow the tutorial to build Yocto/poky for Sama5D3 Xplained, I'm stuck to Build core minimal image. I have some errors below.

Code: Select all

ERROR: Command execution failed: Traceback (most recent call last):
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/command.py", line 303, in buildTargets
    command.cooker.buildTargets(pkgs_to_build, task)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/cooker.py", line 1355, in buildTargets
    rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/runqueue.py", line 852, in __init__
    self.dm = monitordisk.diskMonitor(cfgData)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/monitordisk.py", line 184, in __init__
    self.devDict = getDiskData(BBDirs, configuration)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/monitordisk.py", line 129, in getDiskData
    bb.utils.mkdirhier(path)
  File "/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/bitbake/lib/bb/utils.py", line 695, in mkdirhier
    raise e
OSError: [Errno 13] Permission denied: '/downloads'
I have tried to figure out the permission error, but without success. how to do that?

here is the local.conf:

Code: Select all

MACHINE ??= "sama5d3-xplained"
DL_DIR ?= "/downloads/"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_ipk"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K" 
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
DISTRO = "poky-atmel"
and the bblayer.conf

Code: Select all

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"


BBPATH = "${TOPDIR}"
BBFILES ?= ""

BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../../..')}"
#BSPDIR=/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/


BBLAYERS ?= " \
  ${BSPDIR}/meta-atmel \
  ${BSPDIR}/meta-qt5 \
  ${BSPDIR}/poky/meta \
  ${BSPDIR}/poky/meta-yocto \
  ${BSPDIR}/poky/meta-yocto-bsp \
  ${BSPDIR}/meta-openembedded/meta-oe \
  ${BSPDIR}/meta-openembedded/meta-networking \
  ${BSPDIR}/meta-openembedded/meta-python \
  ${BSPDIR}/meta-openembedded/meta-multimedia \
  "
BBLAYERS_NON_REMOVABLE ?= " \
  ${BSPDIR}/poky/meta \
  ${BSPDIR}/poky/meta-yocto \
  "
What I'm doing wrong?
Thanks.
blue_z
Location: USA
Posts: 1978
Joined: Thu Apr 19, 2007 10:15 pm

Re: errors with Build core minimal image

Mon Nov 30, 2015 3:39 am

morgan_2956 wrote:I have tried to figure out the permission error, but without success. how to do that?
So what did you try?
Did you try a google search for the error message itself, such as "Permission denied linux"?

The typical first action to such an error message is to display the permissions of the file/directory, e.g.

Code: Select all

ls -la /downloads
and/or the permissions of the parent directory, e.g.

Code: Select all

ls -la /
Note that it is highly unusual to put a user directory at the top level of the filesystem, and so the specification in the local.conf file is probably in error/misguided:

Code: Select all

DL_DIR ?= "/downloads/"
If it's your system, then you can do whatever, but it's not good practice.
That directory should at least be under /home or /opt or /usr/local if not under your home directory, e.g.

Code: Select all

DL_DIR ?= "~/downloads/"
morgan_2956 wrote:What I'm doing wrong?
The first part (the ls command and file permissions) is basic Linux stuff that you absolutely need to learn.
The second part is system administrative and also rather basic if not common sense.

BTW nice first post. Wish every new poster knew how to format their post appropriately.

Regards
morgan_2956
Posts: 3
Joined: Sun Nov 29, 2015 7:38 pm

Re: errors with Build core minimal image

Mon Nov 30, 2015 11:38 am

Thanks Blue_Z,
I know the ls command, also the minimum Linux command as cd, chmod, dmesg, ...
I know the basic command to work on linux.

I thought that the DL_DIR ?= "/downloads/" was under my yocto directory ! i was stupid, I have tried to figure out with chown and chmod command without success, of course !

I have change the path of the download directory, and now it's working.

I can start to learn yocto and build an image, I have to be patient, it is very long !!!
morgan_2956
Posts: 3
Joined: Sun Nov 29, 2015 7:38 pm

Re: errors with Build core minimal image

Mon Nov 30, 2015 3:24 pm

Aaarrrggg,
The compilation stop at task 209 of 1627 with this error:

Code: Select all

ERROR: Function failed: do_compile (log file is located at /media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/temp/log.do_compile.56133)
ERROR: Logfile of failure stored in: /media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/temp/log.do_compile.56133
Log data follows:
| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']
| DEBUG: Executing shell function do_compile
| NOTE: make -j 1 all-host configure-target-libgcc
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libiberty'
| make[2]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libiberty/testsuite'
| make[2]: Nothing to be done for `all'.
| make[2]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libiberty/testsuite'
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libiberty'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/fixincludes'
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/fixincludes'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/lto-plugin'
| make  all-am
| make[2]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/lto-plugin'
| make[2]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/lto-plugin'
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/lto-plugin'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/intl'
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/intl'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/libiberty'
| make[2]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/libiberty/testsuite'
| make[2]: Nothing to be done for `all'.
| make[2]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/libiberty/testsuite'
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/libiberty'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/fixincludes'
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/build-x86_64-linux/fixincludes'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libbacktrace'
| make  all-am
| make[2]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libbacktrace'
| true  DO=all multi-do # make
| make[2]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libbacktrace'
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libbacktrace'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libcpp'
| test -f config.h || (rm -f stamp-h1 && make stamp-h1)
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libcpp'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libdecnumber'
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/libdecnumber'
| make[1]: Entering directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/gcc'
| build/genattrtab /media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work-shared/gcc-4.9.2-r0/gcc-4.9.2/gcc/config/arm/arm.md insn-conditions.md \
| 		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
| make[1]: *** [s-attrtab] Killed
| make[1]: Leaving directory `/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/gcc-4.9.2/build.x86_64-linux.arm-poky-linux-gnueabi/gcc'
| make: *** [all-gcc] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/build-atmel/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-arm/4.9.2-r0/temp/log.do_compile.56133)
ERROR: Task 430 (/media/mguillou/toshiba/linux/Yocto_Poky_rootfs/poky/meta/recipes-devtools/gcc/gcc-cross_4.9.bb, do_compile) failed with exit code '1'

I read on the net that this error can come from a lake of memory, I'm using ubuntu through a virtual machine.
So I increased the amount of memory, but I still have this error, any idea ?

Thanks in advance.
blue_z
Location: USA
Posts: 1978
Joined: Thu Apr 19, 2007 10:15 pm

Re: errors with Build core minimal image

Tue Dec 01, 2015 2:13 am

Sorry but I do not use Yocto nor can I glean any correctable action from looking at that output. You may have to wait for someone else to help.
Alternately, since it looks like you're trying to build a compiler, you could download a prebuilt (ARM with hardware floating-point) toolchain from Linaro or CodeSourcery (I don't recall their new name).

If your goal is what's in your title, then you might just want to switch to Buildroot (instead of Yocto), which I find easier to use and less fussy about the host environment.

Regards
masoudh
Posts: 4
Joined: Sun Oct 11, 2015 8:18 am

Re: errors with Build core minimal image

Tue Dec 01, 2015 10:37 am

Hi,
Change thease parts:

in local.conf:
DL_DIR ?= "${TOPDIR}/downloads"
PACKAGE_CLASSES ?= "package_ipk"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

LICENSE_FLAGS_WHITELIST += "commercial"
SYSVINIT_ENABLED_GETTYS = ""

and for bblayers

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../../..')}"

BBLAYERS ?= " \
${BSPDIR}/meta-atmel \
${BSPDIR}/meta-qt5 \
${BSPDIR}/poky/meta \
${BSPDIR}/poky/meta-yocto \
${BSPDIR}/poky/meta-yocto-bsp \
${BSPDIR}/meta-openembedded/meta-oe \
${BSPDIR}/meta-openembedded/meta-networking \
${BSPDIR}/meta-openembedded/meta-python \
${BSPDIR}/meta-openembedded/meta-ruby \
${BSPDIR}/meta-openembedded/meta-multimedia \
"
BBLAYERS_NON_REMOVABLE ?= " \
/(your path)/poky/meta \
/(your path)/poky/meta-yocto \
"

Return to “SAMA5-based”

Who is online

Users browsing this forum: No registered users and 2 guests