Yocto on Nitrogen6x board ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto on Nitrogen6x board ?

Jump to solution
6,242 Views
jcpep
Contributor III

Hi,

I am currently working on a Boundary Devices Nitrogen6x board, on which I would like to use a Yocto-based image since it's the only adequate image I could build for my BD-SL iMX6Q board.

I followed this guide to build an image for my Nitrogen6x board, but when I turn it on it doesn't seem to be working: nothing appears on the HDMI monitor connected to it, and I don't get anything on my serial console. The boot switches are on the "Fuses" position.

Is this the proper way to build a Yocto image for the Nitrogen6x board? If not, how should I build one?

Any help would be greatly appreciated.

Labels (3)
0 Kudos
1 Solution
3,160 Views
EricNelson
Senior Contributor II

Which Yocto branch are you using?

Poring through the logs, I can see that:

  • You're running a recent U-Boot (February 2013)
  • Your kernel command-line looks good
  • The kernel is seeing two partitions on the SD card:
    mmcblk0: mmc0:b368       3.73 GiB 
     mmcblk0: p1 p2
  • Your kernel looks quite old:
    Linux version 3.0.35-2026-geaaf30e-12.09.01+yocto+g0596856
    
  • Your kernel is also a straight Freescale release from 12.09:
    ~/linux-imx6$ git show eaaf30e | head
    commit eaaf30efdc8dfeb03418bde1499a76c9903bd211
    Author: Chen Liangjun Date:   Thu Sep 13 21:28:11 2012 +0800
    
        ENGR00224245 HDMI AUDIO: stop/start PCM while unplug,blank/plug, unblank
    
  • Your CPU is Silicon Revision 1.2:
    CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
    

It's very likely that the crash you're experiencing is because the 12.09 kernel release didn't fully support TO 1.2.

Can you try using the latest (dylan) Yocto branch?

If so, you'll also want to switch to the nitrogen6x machine type (even on SABRE Lite).

There's a demo image on-line here:

     http://boundarydevices.com/qt4-demo-image/

View solution in original post

0 Kudos
26 Replies
2,713 Views
controlhorus
Contributor III

Hello

Looking for another problem, I found this comment about Linux being old. I don´t understand it.

I have compiled yocto dylan just now and my Linux is:

Linux version 3.0.35-1.1.0+g2dc5560 (dgg@dgg-PC) (gcc version 4.7.2 (GCC) ) #4 SMP PREEMPT Mon Sep 16 12:33:02 CEST 2013

This is also 3.0.35. Is it old too?

Thanks

0 Kudos
2,712 Views
EricNelson
Senior Contributor II

Yes. This version (1.1.0) is also quite old (~February 2013).

It is a fairly stable version though, and you may want to stick with it if you aren't having trouble. There are a couple of major areas addressed in more recent releases (GPU fixes, fixes to gstreamer plugins), but there isn't another stable release yet.

The "Dora" version is coming soon, and will contain updates to the 4.1.0 branch of the kernel (still 3.0.35).

0 Kudos
2,713 Views
Joerg-SH
Contributor III

It is usefull to add a &&sync when You make the sdcard

$ dd if=tmp/deploy/images/fsl-image-gui-nitrogen6x.sdcard of=/dev/<SD device> bs=4M &&sync


so you be sure every thing is written to card

0 Kudos
2,713 Views
jcpep
Contributor III

I tried both with and without &&sync, the result is the same each time.

0 Kudos
2,714 Views
Joerg-SH
Contributor III

Did the Board run with a other image?

0 Kudos
2,714 Views
jcpep
Contributor III

Hello joergboge,

I tried running an ArchLinux image for Nitrogen6X found here which worked wonderfully on my BD-SL iMX6Q board. But I can't boot from it with my Nitrogen6X board. But this time a get a stack trace, starting with the following lines:

[   0.431335] reg-fixed-voltage reg-fixed-voltage.2: Failed to register regulator: -22

[   1.365736] _regulator_get: get() with no identifier

[   1.655354] Can't recover from RESET HBA!

[   2.936909] tsc2004_prepare_for_reading: write_cmd -5

[   2.937253] egalax_ts 2-0004: egalax_ts: failed to read firmware version

[   2.937584] ft5x06-ts 2-0038: ft5x06: Could not detect touch screen.

[   2.962099] sgt15000 0-000a: Failed to get supply 'VDDD': -19

[   3.076862] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Maybe the problem comes from my board and not the images I am using?


0 Kudos
2,714 Views
Joerg-SH
Contributor III

You should try a Image of Boundery Devices first.

like this: http://boundarydevices.com/freescale-ubuntu-image-with-4-0-0-kernel/

You should have a look to the Blog http://boundarydevices.com/community/

0 Kudos
2,714 Views
jcpep
Contributor III

With this image I first have a screen saying:

U-Boot 2013.01-00058-g5957f6d (Feb 11 2013 - 08:42:43)

6x_bootscript not found

serial console at 115200, 8N1

details at http://boundarydevices.com/6q_bootscript

After renaming the 6q_bootscript at the root of my image to 6x_bootscript, I have the same result as with the ArchLinux image: a stack trace, this time starting with:

1f01          1792 mtdblock1  (driver?)

b300      15793152 mmcblk0  driver: mmcblk

  b301       3145728 mmcblk0p1 00000000-0000-0000-0000-000000000000mmcblk0p1

<0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

[<800411b4>] (unwind_backtrace+0x0/0xfc) from [<804c0a40>] (panic+0x74/0x19C)

With this image (the no-x one), I have the same message concerning the 6x_bootscript missing. After checking, I do have a 6x_bootscript file at the root of the image.

0 Kudos
2,714 Views
EricNelson
Senior Contributor II

Hi jcpep,

It sounds like you may have something funny in your U-Boot environment. Can you run the  print and version commands under U-Boot to show the current content?

Each of the LTIB images contain 6x_bootscript

You can also verify that by using the mmc and ext2ls commands:

mmc dev 0
mmc0 is current device
U-Boot > ext2ls mmc 0
     2235   6x_bootscript 
     1811   6x_upgrade 
...
0 Kudos
2,714 Views
jcpep
Contributor III

Hi Eric,

Here is the output of the print command:

baudrate=115200

bootcmd=for dtype in sata mmc ; do for disk in 0 1 ; do ${dtype} dev ${disk} ;for fs in fat ext2 ; do ${fs}load ${dtype} ${disk}:1 10008000 /6x_bootscript&& source 10008000 ; done ; done ; done; setenv stl

bootdelay=1

clearenv=if sf probe || sf probe || sf probe 1 ; then sf erase 0xc0000 0x2000 && echo restored environment to factory default ; fi

console=ttymxc1

ethact=FEC

ethaddr=00:19:b8:01:14:e6

ethprime=FEC

loadaddr=0x12000000

stdout=serial

upgradeu=for dtype in sata mmc sata mmc ; do for disk in 0 1 ; do ${dtype} dev ${disk} ;for fs in fat ext2 ; do ${fs}load ${dtype} ${disk}:1 10008000 /6x_upgrade && source 10008000 ; done ; done ; done

Environment size: 875/8188 bytes

Here is the output of the version command:

U-Boot 2013.01-00058-g5957f6d (Feb 11 2013 - 08:42:43)

arm-none-linux-gnueabi-gcc (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 4.6.2 20110630 (prerelease)

GNU ld (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) 2.21.52.20110702

Here is the output of the ext2ls mmc 0 command:

<DIR>       4096 .
<DIR>       4096 ..
<DIR>     16384 lost+found
                 1653 6x_bootscript
                 1581 6x_bootscript.txt
                 1747 6x_upgrade
                 1672 6x_upgrade.txt
<DIR>       4096 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<DIR>       4096 include
<DIR>       4096 lib
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 proc
<DIR>       4096 root
<DIR>       4096 sbin
<DIR>       4096 share
<DIR>       4096 sys
<DIR>       4096 tmp
              337788 u-boot.imx
<DIR>       4096 unit_tests
<DIR>       4096 usr
<DIR>       4096 var

0 Kudos
2,714 Views
EricNelson
Senior Contributor II

Hi jcpep,

This all looks good, but this is not a Yocto-generated image. Yocto is currently configured to set up a two-partition SD card, with just the boot scripts and kernel in the first partition and the rootfs in the second.

Which kind of error are you getting with this image? It seems that this thread has branched into questions about LTIB and Arch along with Yocto.

0 Kudos
2,714 Views
jcpep
Contributor III

Hi Eric,

The ext2ls mmc 0 command was run on a microSD card containing this image (the no-x one). The problem with this image is that it doesn't boot, saying that there is no 6x_bootscript, when there is obviously a 6x_bootscript.

The print and version commands were run with no microSD card.

The thread went from Yocto to ArchLinux to LTIB (this precompiled image) because I tried other images from my Yocto one to grab as much information as possible to identify what the problem is with my board.

0 Kudos
2,714 Views
EricNelson
Senior Contributor II

Can you run the commands by hand so we can see the output?

The following is essentially the inner loop of bootcmd:

U-Boot > mmc dev 0;
U-Boot > ext2load mmc 0 10008000 6x_bootscript 
U-Boot > dtype=mmc; disk=0; fs=ext2; source 10008000
0 Kudos
2,714 Views
jcpep
Contributor III

Hi Eric,

Here is the output of the asked commands:

U-Boot > mmc dev 0;
mmc0 is current device
U-Boot > ext2load mmc 0 10008000 6x_bootscript
1653 bytes read in 32 ms (49.8 KiB/s)
U-Boot > dtype=mmc; disk=0; fs=ext2; source 10008000
## Executing script at 10008000
Setting bus to 2
Valid chip addresses:
------ no Freescale display
Valid chip addresses:
------ no 1024x600 display
Valid chip addresses:
------ no 800x480 display
** No partition table - mmc 0 **
Error loading kernel image

After this I tried formatting and re-preparing my SD with this image (the no-x one), and it successfully booted automatically.

So, I tried running other images (the Ubuntu Oneiric and ArchLinux ones), but both of them gave me the same kind of output as before, which are nothing significant on the serial consoles, and stack traces on my HDMI monitor similar to this one:

[   0.431335] reg-fixed-voltage reg-fixed-voltage.2: Failed to register regulator: -22

[   1.365736] _regulator_get: get() with no identifier

[   1.655354] Can't recover from RESET HBA!

[   2.936909] tsc2004_prepare_for_reading: write_cmd -5

[   2.937253] egalax_ts 2-0004: egalax_ts: failed to read firmware version

[   2.937584] ft5x06-ts 2-0038: ft5x06: Could not detect touch screen.

[   2.962099] sgt15000 0-000a: Failed to get supply 'VDDD': -19

[   3.076862] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)


I then tried my Yocto image, which gave me this output on the serial console:

VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 200K
INIT: version 2.88 booting
Starting udev
ov5642_read_reg:write reg error:reg=300a
ov5642_probe:cannot find camera
Starting Bootlog daemon: bootlogd.
Unable to handle kernel paging request at virtual address 12424000
pgd = 80004000
[12424000] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT SMP
Modules linked in: ov5642_camera camera_sensor_clock
CPU: 0    Not tainted  (3.0.35-2026-geaaf30e-12.09.01+yocto+g0596856 #1)
PC is at 0x12424000
LR is at clk_get_rate+0x34/0x44
pc : [<12424000>]    lr : [<8005d600>]    psr: 200f0093
sp : ba06fed0  ip : 00000080  fp : 8070f3f4
r10: 600f0013  r9 : 8070f3f4  r8 : 8070f620
r7 : 8070d3fc  r6 : 8074b9d4  r5 : 3b5dc100  r4 : 8070d3fc
r3 : 12424002  r2 : 00000000  r1 : 8070d3fc  r0 : 8003fe80
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 4a69004a  DAC: 00000015
Process kinteractiveup (pid: 1390, stack limit = 0xba06e2f0)
Stack: (0xba06fed0 to 0xba070000)
fec0:                                     80053224 8005d600 00000000 80055150
fee0: 80055088 8070f620 3b5dc100 001312d0 8074bc30 001312d0 001312d0 179a7b00
ff00: 8074bc30 8005d6fc ffffffff 3b5dc100 00000000 800601f4 80038000 ba06ff50
ff20: 3b5dc100 00000004 80707ac4 000f32a0 805321ac 80060508 ba06ff4c 80707cc0
ff40: 805321a8 80073b8c 8c020dd0 00000000 00000003 00060ae0 000f32a0 02263d01
ff60: 00000003 80707abc 8076a5c0 80707b00 80707cc0 805321a8 80707abc 000f32a0
ff80: 00000000 8037e604 ba06e000 80382f84 8c008d90 80038d90 80038d90 00000000
ffa0: 00000013 bff8bf34 00000000 80382e14 00000013 00000000 00000000 00000000
ffc0: 00000000 80088d74 80040bfc 00000000 00000000 00000000 00000000 00000000
ffe0: ba06ffe0 ba06ffe0 bff8bf34 80088cf4 80040bfc 80040bfc ff7fffff ffffdbff
Code: bad PC value
---[ end trace de60b2605f2ad050 ]---
note: kinteractiveup[1390] exited with preempt_count 1
ehci_fsl_bus_suspend begins, Host 1
Caching udev devnodes
Populating dev cache
ALSA: Restoring mixer settings...
No state is present for card sgtl5000audio
Found hardware: "sgtl5000-audio" "" "" "" ""
Hardware is initialized using a generic method
Configuring network interfaces...

and stops there.

In case my method for preparing my microSD card is the key of this issue, here's what I do:

  1. I empty my microSD card, using the dd command:

    $ sudo dd if=/dev/zero of=/dev/mmcblk0 bs=4M

  2. I create an empty ext3 partition using gparted.
  3. If I have a precompiled image in an archive file (such as the images found on the Boundary Devices blog, or the ArchLinux image), I extract it to my microSD card.
    With my Yocto image, I dd it onto my microSD card.
  4. I then sync and umount my microSD card.

With this method, I didn't have any issue using such images on my BD-SL board.

0 Kudos
2,714 Views
Joerg-SH
Contributor III

Try this :

U-Boot > env default -f -a

    U-Boot > saveenv && boot

thats bring my U-bot to the right way :smileygrin:


0 Kudos
2,714 Views
jcpep
Contributor III

Unfortunately, that didn't change a thing in my U-Boot environment (the output of the printenv command is the same before and after the env default -f -a command).

The attached file contains the output on the serial console upon Yocto boot.

Do these stack traces come from a problem with my method for preparing my microSD cards? Or is there a problem with my board?

0 Kudos
2,715 Views
EricNelson
Senior Contributor II

Can you post the entire boot log (from power-on reset)?

Your log shows a kernel stack dump, but nothing preceding it.

0 Kudos
2,715 Views
jcpep
Contributor III

Sure :smileyhappy:

Just in case, here is the layout of my microSD card, as I can see it with gparted:

Type
LabelSize
unallocated4.00 Mio
fat16Boot nitrog8.00 Mio
ext3disk2.35 Gio
unallocated1.37 Gio
0 Kudos
3,161 Views
EricNelson
Senior Contributor II

Which Yocto branch are you using?

Poring through the logs, I can see that:

  • You're running a recent U-Boot (February 2013)
  • Your kernel command-line looks good
  • The kernel is seeing two partitions on the SD card:
    mmcblk0: mmc0:b368       3.73 GiB 
     mmcblk0: p1 p2
  • Your kernel looks quite old:
    Linux version 3.0.35-2026-geaaf30e-12.09.01+yocto+g0596856
    
  • Your kernel is also a straight Freescale release from 12.09:
    ~/linux-imx6$ git show eaaf30e | head
    commit eaaf30efdc8dfeb03418bde1499a76c9903bd211
    Author: Chen Liangjun Date:   Thu Sep 13 21:28:11 2012 +0800
    
        ENGR00224245 HDMI AUDIO: stop/start PCM while unplug,blank/plug, unblank
    
  • Your CPU is Silicon Revision 1.2:
    CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
    

It's very likely that the crash you're experiencing is because the 12.09 kernel release didn't fully support TO 1.2.

Can you try using the latest (dylan) Yocto branch?

If so, you'll also want to switch to the nitrogen6x machine type (even on SABRE Lite).

There's a demo image on-line here:

     http://boundarydevices.com/qt4-demo-image/

0 Kudos
2,713 Views
jcpep
Contributor III

I'm currently on danny branch.

I'll try the image you're suggesting and switching to dylan branch as soon as possible.

EDIT:

Thank you very much Eric: I am now able to boot on my board using a brand new image built from dylan branch :smileyhappy:

Since you advised me to use nitrogen6x as the machine type for my build even for my SABRE Lite board, I assumed the same image could be used on the SABRE Lite board. It does indeed boot, but I don't have anything displayed on my HDMI monitor, which is a problem for me.

Here are the output of the print command and the logs from the boot on SABRE Lite.

The U-Boot variables shown (bootargs_mmc_imx6 and bootcmd_mmc_imx6) are the ones I used on an older SABRE Lite board on which they work just fine.

What would be the proper way to tell U-Boot to display video on HDMI?

0 Kudos