Bug 5106 - yocto-bsp: fails to create bsp with ${TOPDIR} in BBLAYERS
Summary: yocto-bsp: fails to create bsp with ${TOPDIR} in BBLAYERS
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-tools (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M5
Assignee: Tom Zanussi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-09-04 01:16 UTC by Jonathan Liu
Modified: 2013-10-09 14:13 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Liu 2013-09-04 01:16:22 UTC
$ yocto-bsp create test i386
Checking basic git connectivity...
Done.

Would you like to use the default (3.8) kernel? (y/n) [default: y] y
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y] n
Getting branches from remote repo None...
Traceback (most recent call last):
  File "/home/build/git/poky/scripts/yocto-bsp", line 150, in <module>
    ret = main()
  File "/home/build/git/poky/scripts/yocto-bsp", line 145, in main
    invoke_subcommand(args, parser, yocto_bsp_help_usage, subcommands)
  File "/home/build/git/poky/scripts/lib/bsp/help.py", line 73, in invoke_subcommand
    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
  File "/home/build/git/poky/scripts/yocto-bsp", line 89, in yocto_bsp_create_subcommand
    yocto_bsp_create(machine, karch, scripts_path, bsp_output_dir, options.codedump, options.properties_file)
  File "/home/build/git/poky/scripts/lib/bsp/engine.py", line 1450, in yocto_bsp_create
    yocto_common_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties)
SyntaxError: function specified for 'gen' property returned nothing : input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base"
Comment 1 Tom Zanussi 2013-09-04 17:36:36 UTC
Using poky/master commit f41b7a7d4d0463a0dfafe6621d01680b81798019

[trz@empanada build]$ yocto-bsp create test i386
Checking basic git connectivity...
Done.

Would you like to use the default (3.8) kernel? (y/n) [default: y] 
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y] 
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.8.git...
Please choose a machine branch to base this BSP on: [default: standard/base]
	1) standard/arm-versatile-926ejs
	2) standard/base
	3) standard/beagleboard
	4) standard/ck
	5) standard/common-pc/atom-pc
	6) standard/common-pc/base
	7) standard/crownbay
	8) standard/edf
	9) standard/emenlow
	10) standard/fri2
	11) standard/fsl-mpc8315e-rdb
	12) standard/minnow
	13) standard/mti-malta32
	14) standard/mti-malta64
	15) standard/qemuppc
	16) standard/routerstationpro
	17) standard/sys940x
Comment 2 Jonathan Liu 2013-09-05 01:02:10 UTC
It seems yocto-bsp doesn't like my use of ${TOPDIR} in bblayers.conf:
$ . oe-init-build-env
$ sed -i "s#$(dirname $PWD)#\${TOPDIR}/..#g" conf/bblayers.conf
$ cd ..
$ yocto-bsp create test i386
Comment 3 Tom Zanussi 2013-09-05 01:23:02 UTC
Can you please then change the bug title and change the importance - though it's something that should be fixed, I don't think it's Medium+.
Comment 4 Jonathan Liu 2013-09-05 01:40:19 UTC
I don't have permission to change the Medium+ importance.
Comment 5 Tom Zanussi 2013-09-05 02:01:42 UTC
Either do I, adding Darren.
Comment 6 Darren Hart 2013-09-05 03:37:10 UTC
Changed to Medium, Tom, please move to Accepted per comment 3.
Comment 7 Tom Zanussi 2013-10-01 15:38:34 UTC
Works fine here with TOPDIR:

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

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

BBLAYERS ?= " \                                                                               
  /home/trz/yocto/yocto-bsp-test/meta \                                                       
  /home/trz/yocto/yocto-bsp-test/meta-yocto \                                                 
  /home/trz/yocto/yocto-bsp-test/meta-yocto-bsp \                                             
...
Comment 8 Jonathan Liu 2013-10-01 22:49:22 UTC
(In reply to comment #7)
> Works fine here with TOPDIR:
> 
> # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf        
> 
> # changes incompatibly                                                      
> 
> LCONF_VERSION = "6"
> 
> BBPATH = "${TOPDIR}"
> BBFILES ?= ""
> 
> BBLAYERS ?= " \                                                             
> 
>   /home/trz/yocto/yocto-bsp-test/meta \                                     
> 
>   /home/trz/yocto/yocto-bsp-test/meta-yocto \                               
> 
>   /home/trz/yocto/yocto-bsp-test/meta-yocto-bsp \                           
> 
> ...

But you are not using ${TOPDIR} variable in BBLAYERS as indicated in the bug description.
Comment 10 Alexandru Georgescu 2013-10-09 14:13:03 UTC
verified.