How to Test Yocto for i.MX6

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to Test Yocto for i.MX6

How to Test Yocto for i.MX6

Join FSL-community-bsp project: https://lists.yoctoproject.org/listinfo/meta-freescale

In order to test Yocto Project for i.MX6 or any other supported board please follow the instructions pointed by FSL Community BSP.

In order to download the source code, please follow this instructions FSL Community BSP.

With the downloaded source code, you can follow the steps from this training: Yocto Training - HOME

If you face a problem, please, send an email to https://lists.yoctoproject.org/listinfo/meta-freescale

This page made sense when there was not other tutorial to point people on how to download and build the very first image using Yocto Project tools for i.MX family boards. Today, FSL Community BSP has become a complete environment with its own landing page (FSL Community BSP) and a collaborative community around meta-freescale mailing list. I encourage you to register in meta-freescale mailing list.

I configured this document to be closed for new comments. In case of any issue or bug, please, send an email to meta-freescale.

コメント

nicklewis and HenrikJacobsen, these issues are better discussed and handled if you post them in the mailing list. So we can ask what and how to reproduce the issue and fix it.

Please subscribe there and send an e-mail with the description of the issue, the machine you're building for and how to reproduce it.

This worked for me:

$ cat meta-fsl-arm/recipes-kernel/perf/perf_3.4.bbappend
PRINC := "${@int(PRINC) + 1}"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append = "file://define-attribute-const.patch "
$ cat meta-fsl-arm/recipes-kernel/perf/files/define-attribute-const.patch
--- a/tools/perf/util/include/linux/compiler.h    2013-04-04 17:55:08.000000000 -0700
+++ b/tools/perf/util/include/linux/compiler.h    2013-04-10 07:16:36.711981928 -0700
@@ -5,7 +5,9 @@
#define __always_inline    inline
#endif
#define __user
+#ifndef __attribute_const__
#define __attribute_const__
+#endif

#define __used        __attribute__((__unused__))

$

The patch is waiting for test in Yocto's mailing list; once done it will be merged.    

It is ok for previous steps before bitbake.

With the bitbake command I have the folowwing errors :

WARNING: Host distribution "Linaro-12.03" 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.

ERROR: Unable to determine endianness for architecture 'armv7l'                                  | ETA:  00:06:03

ERROR: Please add your architecture to siteinfo.bbclass

ERROR: Unable to parse /home/linaro/rootfs_builder/sources/meta-openembedded/meta-oe/recipes-devtools/orc/orc_0.4.16.bb: Exited with "1"

ERROR: Unable to determine endianness for architecture 'armv7l'

ERROR: Please add your architecture to siteinfo.bbclass

ERROR: Unable to determine endianness for architecture 'armv7l'

ERROR: Please add your architecture to siteinfo.bbclass

ERROR: Unable to determine endianness for architecture 'armv7l'

ERROR: Please add your architecture to siteinfo.bbclass

ERROR: Command execution failed: Exited with 1


Any idea ?

Are you using Yocto inside of target?

Yes indeed. I wanted to try a build using yocto. I'm interested in how to update a driver with its sources (vivante in my case).

I dont have another Linux machine, I'm working on Windows only, the board is used for deployment.

This is not supported. Yocto is for use in host, not target.

You can use Yocto in a virtual machine. For in-target development you can build an sdk image.

Hello everyone,

I am attempting to build yocto as well.

./repo* stuff worked fine.

I get stuck on build errors during "bitbake fsl-image-test", namely with <yocto root>/build/tmp/work/x86_64-linux/cross-localedef-native-2.16-r1

glibc/locale/iso-639.def:502:1: warning: (near initialization for 'iso639') [enabled by default]

glibc/locale/iso-639.def:502:1: warning: excess elements in scalar initializer [enabled by default]

glibc/locale/iso-639.def:502:1: warning: (near initialization for 'iso639') [enabled by default]

glibc/locale/iso-639.def:502:1: warning: excess elements in scalar initializer [enabled by default]

glibc/locale/iso-639.def:502:1: warning: (near initialization for 'iso639') [enabled by default]

glibc/locale/programs/ld-address.c:73:3: error: expected specifier-qualifier-list before 'uint32_t'

glibc/locale/programs/ld-address.c:66:1: warning: empty declaration [enabled by default]

glibc/locale/programs/ld-address.c:86:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

glibc/locale/programs/ld-address.c:102:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

glibc/locale/programs/ld-address.c:349:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

glibc/locale/programs/ld-address.c:376:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token

/usr/include/stdio.h:54:1: error: old-style parameter declarations in prototyped function definition

/usr/include/stdio.h:54:1: error: parameter name omitted

glibc/locale/programs/ld-address.c:544:1: error: expected '{' at end of input

glibc/locale/programs/ld-address.c:544:1: warning: control reaches end of non-void function [-Wreturn-type]

make: *** [ld-address.o] Error 1

ERROR: oe_runmake failed

ERROR: Function failed: do_compile (see /opt/slackaloo_nfs/yocto/build/tmp/work/x86_64-linux/cross-localedef-native-2.16-r1/temp/log.do_compile.7844 for further information)

OS is Linux Mint 12 (64bit).

anyone came across it?

Please inform:

Branch you are using? (danny, dylan, master)

Which machine you are building for?

Image you are build?    

danny,

sabre lite

fsl-image-test

I think it'd be better if you join the mailing list https://lists.yoctoproject.org/listinfo/meta-freescale so we can help you and check the problem there. It makes it easy for more people to support your issue and report any similar problem.

Please join it and send an e-mail with the error information and all details you can.

Regards,

done,

thank you

I, too, will post here that I have successfully bitbaked the fsl-image-test on a linux mint 14 - 64 bits virtual machine. It took 30+ hours (its not a particularly fast pc), but the job was done. :smileyhappy:

EDIT: I also managed to btibake the fsl-image-gui and append -dbg -dev & -sdk options in my <yocto_root>/build/local.conf and redo the fsl-image-test bitbake.

EXTRA_IMAGE_FEATURES = "dbg-pkgs dev-pkgs tools-debug tools-profile tools-sdk debug-tweaks"

Great news.    

Hi there, I am trying to boot the image I created in several ways:

1) extracted the tar.bz2 image and did an nfs boot directly from the sabrelite board ! This succeeded.

2) copied the .sdcard image to an microSD card and tried to boot locally from the microSD. This fails as the uboot version on the board is the one that sabrelite shipped with , (2009.08 i think). How do I go about updating the uboot (.imx file) that has generated from bitbake process?

3) I started reading on yocto project and tried runqemu but it fails. Here is what I did:

        cd <yocto root>/sources/poky/

        . ./oe-init-build-env

        cd build #done automatically at exit from above script

        runqemu ../../../build/tmp/deply/images/uImage-blabla.bin ../../../build/tmp/deply/images/fsl-image-test-blabla.ext3 ext3

the qemu start running,

nass@starland ~/yocto/sources/poky/build $ runqemu images/uImage-imx6qsabrelite.bin images/fsl-image-test-imx6qsabrelite-20130515000446.rootfs.ext3 ext3

Set MACHINE to [uImage-imx6qsabrelite.bin] based on kernel [images/uImage-imx6qsabrelite.bin]

Continuing with the following parameters:

KERNEL: [images/uImage-imx6qsabrelite.bin]

ROOTFS: [images/fsl-image-test-imx6qsabrelite-20130515000446.rootfs.ext3]

FSTYPE: [ext3]

but halts after a while:

There was an error running bitbake to determine TMPDIR

Here is the output from 'bitbake -e':

<huuuuge dump of exported variables and python code following>

Am I using the command wrongly?

Thank you for your help on both matters

I don't know QEMU, but I don't think using uImage for imx6 will work on any emulator :smileywink:

what do you mean?

@Nass_sil Daiane is right. The kernel won't work for QEMU as it is for the specific board. So it is expected to fail.    

Hello there,

I would like to generate a toolchain that will run on the host pc - the same pc that i used to generate the rootfs images (so the sysroot folder is already generated)

I have read through the documentation extensively but I am still confused about what different options I have in order to create the toolchain. Namely:

in the documentation it states that I should source the oe-init-build-env <build_dir> file , which lies in <yocto-root>/sources/poky/

it is not clear however if the <build_dir> can be the same build directory that I used to create the rootfs images.

Additionally , when I source  the <yocto-root>/setup-environment file , I am greeted with bitbake examples. Among the examples I see meta-toolchain[-sdk]. I therefore wonder if I can just ignore the documentation and source this file instead and thus create the toolchain's resulting .tar file within the same build dir.

Finally, in the documentation it mentions that the toolchain contains a arch-corresponding environment-setup* file , which I should source in order to use the toolchain. Well, a sensible train of thought is that since I just finished compiling a whole rootfs image, a toolchain was necessary and that toolchain should be somewhere within the build dir. But I fail to find it when I search for it. Where is the error in my train of thought ?

Thank you for your help.

1) <yocto-root>/setup-environment is based on <yocto-root>/sources/poky/, however, we customized it to what we think it´s "clear" So, IMHO you may choose one or other, they will be both right.

2) When I do this my way I:

* source <yocto-root>/setup-environment (using exactly the same build dir I´ve been using)

* bitbake meta-toolchain

3) of course you have it done after a rootfs build. Look for the x86-* dir, it should be there. (toolchain is a x86 binary)

But, when you bitbake the meta-toolchain it exports whatever you will need in *any* host, including the environment setup script.

So, inside build/tmp/work/x86* you will find the *cross-gcc* binary, and if you want to use it you will need to figure out any other needed parameter.

Hello!

Followed the steps exactly, everything built fine for fsl-image-gui.
Then dd-ed the fsl-image-gui-imx6qsabrelite.sdcard file to /dev/sdb.
Board boots and complains that 6x_bootscript was not found...bummer.

Soooo...what's up doc? What I am missing?!?!?!

Thanks!

You seem to be using the SabreLITE with Boundary's U-Boot; for this to work please build for Nitrogen6x.

so i just change the target from MACHINE ??= 'imx6qsabrelite' to MACHINE ??= 'nitrogen6x'  in conf/local.conf???? (your reply wasn't very explicit in how to do this)

Yes; it should do the trick :-)    

Otavio, I think we must review the imx6qsabrelite.conf file. It´s not clear at all that we need to use nitrogen6x instead. Let´s discuss this topic in meta-freescale

It did just fine, much obliged, thank you!

Hi,

I am testing the fsl-image-test on my iMX6 Sabre Lite board. I am unable to ssh on it, I always get this error: "ssh: connect to host 192.168.0.9 port 22: Connection refused". There is no ssh command on the image and the ssh service doesn't seem to be running.

How can I get the ssh to work on this image?

Thanks.

Add to your conf/local.conf the following piece of code:

CORE_IMAGE_EXTRA_INSTALL += "dropbear"

Then rebuild your image.

Now it's working as expected :smileyhappy: Thanks for your help!

I have another question about Yocto: how can I add packages to my image (say the libsocketcan and canutils packages used there)? I read a few things about adding a new recipe, but I can't find a really clear guide that applies to my case.

I do know know libsocktcan. But I know canutils is already integrated (the package name is canutils)

You add the same way using CORE_IMAGE_EXTRA_INSTALL += "drobpbear canutils"

In order to know if one package is (or not) integrated, what I do is

$ cd sources

$ find -name package_name*

Then, if I find the recipe name, I know it´s covered.

If I was not able to find. I google it (keywords: pachage_name yocto metaoe) it may be covered by other meta layers.

Please, let me know if you was able to include those.

If you prefer, create a document in order to registrer what you´ve been using to get flexcan working using meta-fsl-arm. If you create, please share with me. I would like to keep in touch regarding this topic.

(do you know you need to change kernel config?

Both libsocketcan and canutils are in sources, so I could add them to my build. Many thanks for your help on this :smileyhappy:

I try to make it work now for a couple of days. U-Boot will not run Yocto

I try it with Maschine as sabrelite and nitrogen6x without succes.

This are the U-Boot Message:


U-Boot 2009.08-dirty (Jan 17 2013 - 06:55:57)

CPU: Freescale i.MX6 family TO1.2 at 792 MHz
Temperature:   29 C, calibration data 0x5894ee7d
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock     : 66000000Hz
ipg per clock : 66000000Hz
uart clock    : 80000000Hz
cspi clock    : 60000000Hz
ahb clock     : 132000000Hz
axi clock   : 264000000Hz
emi_slow clock: 29333333Hz
ddr clock     : 528000000Hz
usdhc1 clock  : 198000000Hz
usdhc2 clock  : 198000000Hz
usdhc3 clock  : 198000000Hz
usdhc4 clock  : 198000000Hz
nfc clock     : 24000000Hz
Board: MX6Q-SABRELITE:[ POR]
Boot Device: I2C
I2C:   ready
DRAM:   1 GB
MMC:   FSL_USDHC: 0,FSL_USDHC: 1
JEDEC ID: 0xbf:0x25:0x41
Reading SPI NOR flash 0xc0000 [0x2000 bytes] -> ram 0x276009b8
SUCCESS

In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from IIM: 11:23:33:47:55:67
FEC0 [PRIME]
Warning: FEC0 MAC addresses don't match:
Address in SROM is         11:23:33:47:55:67
Address in environment is  00:01:02:03:04:05

Hit any key to stop autoboot:  0
mmc1 is current device
Loading file "/boot/uImage" from mmc device 1
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 1:0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX6Q SABRELITE U-Boot >

Thanks

Joerg

Hi,

when you flashed the SD card, did you sync after it? I mean 'dd if=.. of=.. && sync'. With the sync command you make sure nothing is left on OS buffers and all image data is all flushed into the SD.

Leo

It seems I am unable to fetch (or browse to) URL: 'http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.0.3.tar.bz2'. Unable to fetch URL from any source! On other PC as well.


After issuing

bitbake fsl-image-gui

Got

  

ERROR: Fetcher failure: Fetch command failed with exit code 4, output:

wget: unable to resolve host address `dl.lm-sensors.org'

ERROR: Function failed: Fetcher failure for URL: 'http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.0.3.tar.bz2'. Unable to fetch URL from any source.


Sabrelite does not boot from sdcard "usually"

And, from your log, your board are booting from NOR.

Boards/MX6QSabreLite - Linaro Wiki

for any fetch issue, please:

* double check your connectivity

* double check your local proxy configuration

* double check your wide proxy configuration

* try to use http_proxy instead of ftp_proxy

* double check if you can get the file using wget/curl

* if source is down, and there is no mirror available: wait until it get fixed.

I'm trying to figure out how to add kernel patches, but I'm getting errors with yocto-kernel. Any ideas?

~/rootfs_builder$ source setup-environment build

~/rootfs_builder/build$ yocto-kernel patch list meta-fsl-arm

Traceback (most recent call last):

  File "/home/travis/rootfs_builder/sources/poky/scripts/yocto-kernel", line 227, in <module>

    ret = main()

  File "/home/travis/rootfs_builder/sources/poky/scripts/yocto-kernel", line 222, in main

    invoke_subcommand(args, parser, yocto_kernel_help_usage, subcommands)

  File "/home/travis/rootfs_builder/sources/poky/scripts/lib/bsp/help.py", line 73, in invoke_subcommand

    subcommands.get(args[0], subcommand_error)[0](args[1:], usage)

  File "/home/travis/rootfs_builder/sources/poky/scripts/yocto-kernel", line 123, in yocto_kernel_patch_list_subcommand

    yocto_kernel_patch_list(scripts_path, args[0])

  File "/home/travis/rootfs_builder/sources/poky/scripts/lib/bsp/kernel.py", line 422, in yocto_kernel_patch_list

    (start_line, end_line, src_uri) = find_bsp_kernel_src_uri(scripts_path, machine)

IOError: [Errno 2] No such file or directory: '${BSPDIR}/sources/meta-fsl-arm/conf/machine/meta-fsl-arm.conf'

That don't work for my Board :smileysad:  I tried that several times.

Now nothing runs anymore.  Not even the Demo delivered with the Board when I copy with the MFG tool.

Since I tried the http://www.eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite#i.MX6xSABRELite-Initialboot:UpgradeBootlo...

Maybe I accidentally moved some fuses?


regards

Joerg

In fact, meta-fsl-arm does not use yocto-kernel.

Yocto-kernel points to kernel mainline (kernel.org) and today imx boards have more support on Freescale kernel (from git.freescale.com) yocto-kernel is on 3.8 or 3.9 (sorry, I don't remember) and FSL kernel is on 3.0.35

How are you working? I mean, do you have your own meta layer? in this case, you will need to create a .bbappend file.

Would you might to create a new discussion, something like "how to patch my kernel with yocto"? we can discuss there how you can get it.

this behavior is absolutely normal in sabre lite :smileysilly:

Try again with mfgtools until you got some console on serial.

When using linaro binary that will allow you to boot from sdcard, I missed the configuration several times until I got it working. And this is scary. hehehe

But, keep trying, the process will not brick your hardware.

Remember that, if the linaro binary is well installed, if you turn your board on you will NOT see any console, unless you have u-boot on sdcard in the right slot

(if you use sd3 binary from linaro, you should boot from sd3. The same for sd4)

Hi Daiane,

AFAIK, mfgtools is not supported on SABRE Lite or Nitrogen6x because we're shipping with main-line U-Boot, and USB slave is not yet present.

Thanks a lot, Eric.

Could you, please, share your doc on how to unbrick sabrelite?

Sure. The blog post is here:

     http://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/

The sources for imx_usb are here:

     boundarydevices/imx_usb_loader · GitHub

This program is useful with any i.MX6 board, not just those that we build, and provides a really nice interface when building and testing U-Boot images.


It also has the nice feature of being runnable on Linux machines (including i.MX boards).

Daiane,

how to figure out that Flexcan Support is enabled. I want to Use it too.

regards

Joerg

Thats also very useful !

http://boundarydevices.com/u-boot-on-i-mx6/

Thanks again Eric

I'm not sure if I understood what you mean.

Flexcan should be selected by default on kernel defconfig. I think. So, take a look on defconfig for your board and double check it's selected.

Hi Joerg,

You can verify that CAN is enabled by running "ifconfig -a". If CAN is enabled in the kernel, you'll see an interface for "can0".

Hi :smileyhappy:

I try to boot the Gui Image from SataSSD.

I extract the rootfs to a ext3 partition and  coyed the 6x_bootscript i have to root dir.

Everything boot fine, can see desktop, can move mouse, but nothing works on mouse click.

To build the SSD with  sudo dd if=tmp/deploy/images/core-image-sato-nitrogen6x.sdcard of=/dev/sdb bs=4M &&sync  didn't work.

I use the Boundary U-Boot in Nor Flash and I don want to change that :smileywink:

regards

Joerg

Hi,

Thanks for responding. I made a new discussion here:

https://community.freescale.com/thread/308824

Hi,

I would like to change the image/screen displayed at boot and at log out on the HDMI monitor connected to my iMX6 Sabrelite board (currently: the Yocto Login). I read a few websites talking about psplash but I don't really know what I should add/copy to get my own image on boot and on log out.

Thanks.

評価なし
バージョン履歴
最終更新日:
‎11-28-2012 10:40 AM
更新者: