Stormtrooper
Posts: 3
Joined: Fri Mar 24, 2017 7:30 am

(fixed) Error while building rpi image with yocto

Fri Mar 24, 2017 8:24 am

Hi.
Trying to build an image for a rp3 with yocto.
While running bitbake I got several error messages which I can't correct or even understand. I assume that I've got some trouble with the .bb files regarding to the printed messages. I did the configuration like it is written in the README file within the meta-raspberrypi which i got from yoctoproject.org.. I've also read that the kernel recipe *4.9.bb is maybe invalid. But the bitbake errors report issues with all of the recipes within the kernel recipes.
Maybe someone already had some kind of these problems or got any solution? Thank you in advance.

ERROR: /home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 19, function: <module>
0015:__anon_18__home_test_poky_meta_recipes_kernel_linux_linux_yocto_inc(d)
0016:__anon_364__home_test_poky_meta_classes_kernel_yocto_bbclass(d)
0017:__anon_6__home_test_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
0018:__anon_148__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)
*** 0019:__anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d)
File: '/home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 37, function: __anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
0033:# Set programmatically some variables during recipe parsing
0034:# See http://www.yoctoproject.org/docs/curren ... -functions
0035:python __anonymous () {
0036: kerneltype = d.getVar('KERNEL_IMAGETYPE')
*** 0037: kerneldt = get_dts(d, d.getVar('LINUX_VERSION'))
0038: d.setVar("KERNEL_DEVICETREE", kerneldt)
0039:}
0040:
0041:do_kernel_configme_prepend() {
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'

ERROR: /home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 19, function: <module>
0015:__anon_18__home_test_poky_meta_recipes_kernel_linux_linux_yocto_inc(d)
0016:__anon_364__home_test_poky_meta_classes_kernel_yocto_bbclass(d)
0017:__anon_6__home_test_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
0018:__anon_148__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)
*** 0019:__anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d)
File: '/home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 37, function: __anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
0033:# Set programmatically some variables during recipe parsing
0034:# See http://www.yoctoproject.org/docs/curren ... -functions
0035:python __anonymous () {
0036: kerneltype = d.getVar('KERNEL_IMAGETYPE')
*** 0037: kerneldt = get_dts(d, d.getVar('LINUX_VERSION'))
0038: d.setVar("KERNEL_DEVICETREE", kerneldt)
0039:}
0040:
0041:do_kernel_configme_prepend() {
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'

ERROR: Failed to parse recipe: /home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
ERROR: /home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_dev.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 19, function: <module>
0015:__anon_18__home_test_poky_meta_recipes_kernel_linux_linux_yocto_inc(d)
0016:__anon_364__home_test_poky_meta_classes_kernel_yocto_bbclass(d)
0017:__anon_6__home_test_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
0018:__anon_148__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)
*** 0019:__anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d)
File: '/home/test/poky/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 37, function: __anon_39__home_test_poky_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
0033:# Set programmatically some variables during recipe parsing
0034:# See http://www.yoctoproject.org/docs/curren ... -functions
0035:python __anonymous () {
0036: kerneltype = d.getVar('KERNEL_IMAGETYPE')
*** 0037: kerneldt = get_dts(d, d.getVar('LINUX_VERSION'))
0038: d.setVar("KERNEL_DEVICETREE", kerneldt)
0039:}
0040:
0041:do_kernel_configme_prepend() {
Exception: TypeError: getVar() missing 1 required positional argument: 'expand'
Last edited by Stormtrooper on Tue Mar 28, 2017 10:08 am, edited 1 time in total.

KnarfB
Posts: 198
Joined: Wed Dec 14, 2016 10:47 am
Location: Germany

Re: Error while building rpi image with yocto

Fri Mar 24, 2017 10:35 am

Hi,
pls. supply more info like the bitbake output which should look like:

Code: Select all

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "raspberrypi3"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2.1"
TUNE_FEATURES     = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU        = "hard"
meta              
meta-poky         
meta-yocto-bsp    = "HEAD:e292e935b077a95ae093d4b425c7e95b177b030b"
meta-raspberrypi  = "HEAD:cce6292e41493158c26f5b1b7fded97faacf10d7"
Then, I could try to reproduce your error.

You are using http://git.yoctoproject.org/cgit.cgi/me ... e/?h=morty and following the instructions in README, right?
Frank

KnarfB
Posts: 198
Joined: Wed Dec 14, 2016 10:47 am
Location: Germany

Re: Error while building rpi image with yocto

Fri Mar 24, 2017 11:28 am

I could reproduce your error when using master branch of meta-raspberrypi.

The following works for me:

Code: Select all

git clone -b morty git://git.yoctoproject.org/poky
git clone -b morty git://git.openembedded.org/meta-openembedded
git clone -b morty git://git.yoctoproject.org/meta-raspberrypi

add meta-raspberrypi layer to bblayers.conf

source sources/poky/oe-init-build-env rpi-build

bitbake core-image-minimal
Frank

Stormtrooper
Posts: 3
Joined: Fri Mar 24, 2017 7:30 am

Re: Error while building rpi image with yocto

Fri Mar 24, 2017 11:55 am

Hi.

Thank you for your support.

Yes. I'm used to configure my system like it's given in the instrctions from http://git.yoctoproject.org/cgit.cgi/me ... e/?h=morty.

Unfortunatly ther is no Build Configuration after the startup. Therefore I'm not not able the post it. It starts with the Error messages right after the bitbake command.

I'v got another config from an different project wich works fine. So bb_Version and stuff shoulb be the same. May you find some further Information in this print:

Build Configuration:
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal-4.9"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "qemuarm"
DISTRO = "poky"
DISTRO_VERSION = "2.2.1"
TUNE_FEATURES = "arm armv5 thumb dsp"
TARGET_FPU = "soft"
meta
meta-poky
meta-yocto-bsp = "morty:e292e935b077a95ae093d4b425c7e95b177b030b"



I'll give your version a try and will share my results within this topic later!

KnarfB
Posts: 198
Joined: Wed Dec 14, 2016 10:47 am
Location: Germany

Re: Error while building rpi image with yocto

Fri Mar 24, 2017 12:50 pm


Stormtrooper
Posts: 3
Joined: Fri Mar 24, 2017 7:30 am

Re: Error while building rpi image with yocto

Mon Mar 27, 2017 7:44 am

Hi.

I can't find the failure within my first attempt to build the image like it's shown on yocto*.org.

So in this case I tried the use the link you have given in your answer, which works fine!

Thank you a lot!

Return to “Python”