Yocto Build Parse Error

1,893 views
Skip to first unread message

WinSys

unread,
Jun 27, 2012, 3:50:14 PM6/27/12
to meta-f...@googlegroups.com
Tryting to build embedded Linux using Yocto. bblayers.conf includes the following:
BBLAYERS ?= " \
  /home/pauld/yocto/poky-denzil-7.0/meta \
  /home/pauld/yocto/poky-denzil-7.0/meta-yocto \
  /home/pauld/yocto/poky-denzil-7.0/meta-openembedded/meta-oe \
  /home/pauld/yocto/poky-denzil-7.0/meta-fsl-arm \
  "
Get the following build error. Any ideas?
ERROR: Unable to parse /home/pauld/yocto/poky-denzil-7.0/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb

Chris Hallinan

unread,
Jun 27, 2012, 4:46:28 PM6/27/12
to meta-f...@googlegroups.com
Hi Paul, nice meeting you at FTF last week.

You're likely to have more success with your questions if you provide a little more context.  I've had success building BSPs from meta-fsl-arm against Poky only (though you have to work around a couple minor integration issues.)  What machine are you building for (ie MACHINE = <what>) in your local.conf?

What target are you building (bitbake <what>)

Is there any more context around the error message, ie other descriptive text?  For example, did you get this message right away, or after making some kind of change and then running again?  Go ahead and paste the entire console session from the invocation of '$ bitbake <target>.  That early summary info can be useful in debugging issues like this.

It's usually better to add more context as opposed to just cut/paste only the offending line.

If the console output is really large and relevant, pastebin it and provide a link.

Regards,

Chris 

--
Life is like Linux - it never stands still.


WinSys

unread,
Jun 27, 2012, 5:35:41 PM6/27/12
to meta-f...@googlegroups.com
A brief hsitory of what I have doen so far.
 
I am attempting to build a Linux O/S for the i.MX53 QSB. I am building it on a VMWare virtual machine running Ubunto 11.10 64-bit. I used the command bitbake core-image-minimal.
 
My first attempt at the build did not include the meat-oe entry in the bblayers.conf. I failed quickly due to two missing recipes, udev_173 and udev-extra-rules. Do not know why they are missing or where to get them.
 
I then copied the missin recipes from the open embedded recipes to the corresponding directory in the meta-fsl-arm package. This build completed 1366 tasks before failing on the udev_173 recipe. I guess the copied versions of the recipe are no compatible?
 
I the added the meta-oe line to the bblayers.conf and got the current referenced error. Is the meta-oe entry needed? You did not have it in your example form FTF.
 
Build summary here:
 
pauld@ubuntu:~/yocto/poky-denzil-7.0/build$ bitbake core-image-minimal
Loading cache: 100% |############################################| ETA:  00:00:00
Loaded 1502 entries from dependency cache.

ERROR: Unable to parse /home/pauld/yocto/poky-denzil-7.0/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb
Traceback (most recent call last):
  File "/home/pauld/yocto/poky-denzil-7.0/bitbake/lib/bb/parse/ast.py", line 323, in finalize(fn='/home/pauld/yocto/poky-denzil-7.0/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb', d=<bb.data_smart.DataSmart object at 0x3879610>, variant=None):
             code.append("%s(d)" % funcname)
    >    bb.utils.simple_exec("\n".join(code), {"d": d})
         bb.data.update_data(d)
  File "/home/pauld/yocto/poky-denzil-7.0/bitbake/lib/bb/utils.py", line 394, in simple_exec(code='__anon_119__home_pauld_yocto_poky_denzil_7_0_meta_classes_staging_bbclass(d)\n__anon_524__home_pauld_yocto_poky_denzil_7_0_meta_classes_base_bbclass(d)\n__anon_183__home_pauld_yocto_poky_denzil_7_0_meta_classes_package_bbclass(d)\n__anon_1116__home_pauld_yocto_poky_denzil_7_0_meta_classes_package_rpm_bbclass(d)\n__anon_732__home_pauld_yocto_poky_denzil_7_0_meta_classes_insane_bbclass(d)\n__anon_20__home_pauld_yocto_poky_denzil_7_0_meta_classes_debian_bbclass(d)\n__anon_52__home_pauld_yocto_poky_denzil_7_0_meta_classes_sstate_bbclass(d)\n__anon_95__home_pauld_yocto_poky_denzil_7_0_meta_classes_update_alternatives_bbclass(d)', context={'d': <bb.data_smart.DataSmart object at 0x3879610>}):
     def simple_exec(code, context):
    >    exec(code, _context, context)
    
  File "<string>", line 8, in <module>
  File "__anon_95__home_pauld_yocto_poky_denzil_7_0_meta_classes_update_alternatives_bbclass", line 2, in __anon_95__home_pauld_yocto_poky_denzil_7_0_meta_classes_update_alternatives_bbclass(d=<bb.data_smart.DataSmart object at 0x3879610>)
  File "update-alternatives.bbclass", line 12, in update_alternatives_after_parse(d=<bb.data_smart.DataSmart object at 0x3879610>)
FuncFailed: Function failed: /home/pauld/yocto/poky-denzil-7.0/meta-openembedded/meta-oe/recipes-connectivity/rfkill/rfkill_0.4.bb inherits update-alternatives but doesn't set ALTERNATIVE_NAME

ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Thanks for the help!

Adrian Alonso

unread,
Jun 28, 2012, 11:38:27 AM6/28/12
to meta-f...@googlegroups.com
Hi,

Freescale ARM BSP layer currently are based on Yocto's "Denzil" release
you can follow the instructions on fsl-community-bsp-platform repo to proper
setup your environment

https://github.com/Freescale/fsl-community-bsp-platform

Regards
> --
> --
> OpenEmbedded/Yocto Freescale ARM BSP - meta-f...@googlegroups.com
>
> Source code of the BSP: http://github.com/Freescale/meta-fsl-arm
>
> To cancel your subscription in this group send an e-mail to
> meta-fsl-arm...@googlegroups.com
> For more options go to http://groups.google.com/group/meta-fsl-arm



--
Saludos
Adrian Alonso
http://aalonso.wordpress.com

WinSys

unread,
Jul 2, 2012, 3:50:39 PM7/2/12
to meta-f...@googlegroups.com
Using the fsl-community-bsp-platform appears to be working - on task 600 of 2312.
 
 
Question:
This download did not include sources/meta-fsl-arm/recipes-core/udev_173.bb or sources/meta-fsl-arm/recipes-core/udev-extra-rules.bb. The build proceeded past the recipe scan.
 
The earlier atmept I made did not include these recipes either, but the build failed bacuse they were missing.
 
What is the difference? Is their a file that I can change to specify the desired recipes to build?
 

WinSys

unread,
Jul 3, 2012, 12:36:32 PM7/3/12
to meta-f...@googlegroups.com
OK the build completed successfully using the fsl-community-bsp download. 2312 of 2312 tasks completed without errors.
 
So where are the build images?
 

Adrian Alonso

unread,
Jul 3, 2012, 12:48:53 PM7/3/12
to meta-f...@googlegroups.com
They are under the directory build/tmp/deploy/images

Regards

Fabio Estevam

unread,
Jul 3, 2012, 12:50:30 PM7/3/12
to meta-f...@googlegroups.com
The final binaries are at tmp/deploy/images.

WinSys

unread,
Jul 5, 2012, 5:28:16 PM7/5/12
to meta-f...@googlegroups.com
Trying to build an SD card with the built images on it. How do I do this? Where is the u-boot.img file?
 
I tried to dd the u-boot-imx53qsb.imx file and the uImage-imx53qsb.bin to the SD card and then tar the core-image-minimal-imx53qsb.sdcard file into a formatted partition on the SD card, but it did not boot on the QSB.
 
Sorry for the basic questions but I am new at this and not having much luck.
 
Here are the contents of my image directory:
pauld@ubuntu:~/fsl-community-bsp/build/tmp/deploy/images$ ls
core-image-minimal-imx53qsb-20120705183525.rootfs.ext3
core-image-minimal-imx53qsb-20120705183525.rootfs.sdcard
core-image-minimal-imx53qsb-20120705183525.rootfs.tar.bz2
core-image-minimal-imx53qsb.ext3
core-image-minimal-imx53qsb.sdcard
core-image-minimal-imx53qsb.tar.bz2
modules-2.6.35.3-r29-imx53qsb.tgz
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
sh
u-boot-imx53qsb.imx
u-boot-imx53qsb-v2012.04.01-r3.imx
uImage-2.6.35.3-r29-imx53qsb-20120702170352.bin
uImage-imx53qsb.bin

Chris Hallinan

unread,
Jul 5, 2012, 7:40:02 PM7/5/12
to meta-f...@googlegroups.com, pdemet...@hotmail.com
Hmm, you didn't include the dd commands that you used, nor any information on how you partitioned the SD card, so it's hard to diagnose what you might have done wrong.  Details help!

You have to copy the bootloader (u-boot) to block offset 0x400 and the kernel image to block offset 0x800 on the SD card.  You must create your partition image 8MB up from the start of the device in order to leave room to do this. Frankly, I feel your pain because I had to figure all this out on my own...I was never able to find that info in the SDK.  I'm sure it's there, but I never found it.

Copy/Paste from my notes follows:

Kernel Image
The Linux kernel image is stored on the raw SD card starting at block 0x800 (this is raw offset 0x100000).  A block is 512 bytes. U-Boot loads the kernel image as follows:
> mmc read 0 ${loadaddr} 0x800 0x1800;

This loads the kernel at $loadaddr, and assumes it is 0x1800 (6144) blocks long. Adjust accordingly.
A block in this context is 512 bytes.

To put your new Linux kernel image onto the SD card, do this:
$ sudo dd if=kernel-uImage of=/dev/sdb seek=2048 bs=512

U-Boot
The U-Boot binary image is loaded to SD card at block 2 (raw offset 0x400).
To put your new u-boot image onto the SD card, do this:
$ sudo dd if=u-boot.bin of=/dev/sdb seek=2 bs=512

My partition info looked like this:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              16        6914     3145728   83  Linux

Hope that helps.

Regards,

Chris

Otavio Salvador

unread,
Jul 6, 2012, 9:36:35 AM7/6/12
to meta-f...@googlegroups.com
On Thu, Jul 5, 2012 at 8:40 PM, Chris Hallinan <chal...@gmail.com> wrote:
...
>> core-image-minimal-imx53qsb.sdcard
...

It is much easier to just dd the above file onto a sdcard and be done
with it ;-)

--
Otavio Salvador O.S. Systems
E-mail: ota...@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

Chris Hallinan

unread,
Jul 6, 2012, 9:59:24 AM7/6/12
to meta-f...@googlegroups.com
On Fri, Jul 6, 2012 at 9:36 AM, Otavio Salvador <ota...@ossystems.com.br> wrote:
On Thu, Jul 5, 2012 at 8:40 PM, Chris Hallinan <chal...@gmail.com> wrote:
...
>> core-image-minimal-imx53qsb.sdcard
...

It is much easier to just dd the above file onto a sdcard and be done
with it ;-)

I cannot build sdcard images, so I tend to forget about them!  Just haven't had time to research the problem. The error report indicates that one or more of the tools (dd, etc) cannot handle large files. I don't recall the exact error message, but it says something like "large file support not enabled".  When I exercise the tools manually, they work.  But somehow, in the bitbake environment, they don't.

Perhaps I'll find time today to reproduce that issue and post it, maybe someone has found a solution.

Regards,

Chris

WinSys

unread,
Jul 6, 2012, 10:49:21 AM7/6/12
to meta-f...@googlegroups.com
Unfortunately there is no u-boot.bin file found in the images directory.
 
I tried the following:
sudo dd if=core-image-minimal-imx53qsb.sdcard of=/dev/sdb
 
This took a while so I did it before I left for home. Came in this morning with no expectations, but this worked and the SD card booted on the QSB!
 
Reply all
Reply to author
Forward
0 new messages