Kontron SMARC-sAMX6i meta-layer for Yocto

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

Kontron SMARC-sAMX6i meta-layer for Yocto

Jump to solution
3,301 Views
bjørnarsyversta
Contributor II

Hello,

I am trying to make a layer for Kontron SMARC-sAMX6i module in Yocto:

http://us.kontron.com/products/computeronmodules/smarc/smarcsamx6i.html

Does there exist any meta-layer for Kontron SMARC-sAMX6i for Yocto?

The linux kernel is based on 3.0.35 + freescale patches + kontron patches.

This linux kernel is now in my own git repo.

Kontron delivers a precompiled u-boot.

I have created my own meta-samx6 layer:

meta-samx6

     conf

          machine

               samx6-quad.conf

          layer.conf

     recipes-kernel

          linux

               linux-samx6

                    defconfig

               linux-samx6-3.0.35.bb

Also changed sources/base/conf/bblayers.conf  /  build/conf/bblayers.conf

LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" BBFILES ?= "" BBLAYERS = " \   ${BSPDIR}/sources/poky/meta \   ${BSPDIR}/sources/poky/meta-yocto \   \   ${BSPDIR}/sources/meta-openembedded/meta-oe \   \   ${BSPDIR}/sources/meta-fsl-arm \   ${BSPDIR}/sources/meta-fsl-arm-extra \   ${BSPDIR}/sources/meta-fsl-demos \   ${BSPDIR}/sources/meta-samx6 \ " LCONF_VERSION = "6"

conf/layer.conf

# We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" # We have a packages directory, add to BBFILES BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \             ${LAYERDIR}/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "samx6" BBFILE_PATTERN_samx6 := "^${LAYERDIR}/" BBFILE_PRIORITY_samx6 = "10"

conf/machine/samx6-quad.conf

#@TYPE: Machine #@NAME: samx6i #@SOC: i.MX6Q #@DESCRIPTION: Machine configuration for i.MX6 samx6i include conf/machine/include/imx-base.inc include conf/machine/include/tune-cortexa9.inc SOC_FAMILY = "mx6:mx6q:samx6" PREFERRED_PROVIDER_virtual/kernel ?= "linux-samx6" SERIAL_CONSOLE = "115200 ttymxc0" UBOOT_MACHINE = "wandboard_quad_config" KERNEL_DEVICETREE = "imx6q-wandboard.dtb"

recipes-kernel/linux/linux-samx6-3.0.35.bb

# Adapted from linux-imx.inc, copyright (C) 2012, 2013 O.S. Systems Software LTDA # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Linux kernel for Wandboard" LICENSE = "GPLv2" require recipes-kernel/linux/linux-imx.inc # Put a local version until we have a true SRCREV to point to LOCALVERSION ?= "+yocto" SCMVERSION ?= "y" # SRC_URI for samx6i kernel SRC_URI = "git://git@fr.nxtech.no:linux-samx6-3.0.35 \            file://defconfig \ " # Wandboard branch - based on 4.0.0 from Freescale git SRCREV = "48edb85b2f6686de832603b4568f7310f100894a" LOCALVERSION = "-4.0.0-samx6" COMPATIBLE_MACHINE = "(samx6)"

Setup of everything:

#!/bin/bash repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dora repo sync git clone git@fr.nxtech.no:meta-samx6 sources/meta-samx6 cp yocto-samx6/bblayers.conf sources/base/conf/bblayers.conf export MACHINE=samx6-quad . ./setup-environment build

bitbake core-image-minimal

I want to disable building for u-boot, since Kontron delivers precompiled u-boot.

How does I do this? When not set UBOOT_MACHINE and KERNEL_DEVICETREE,

building of core-image-minimal fails!

The linux kernel is booting okey when build with ltib.

The linux kernel stop booting when building with Yocto.

Any see any error bellow?

Output for booting linux kernel with Yocto:

Booting from net ...

Using FEC device

TFTP from server 10.10.1.112; our IP address is 10.10.1.240

Filename 'uImage'.

Load address: 0x10800000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         ##################################

done

Bytes transferred = 4165872 (3f90f0 hex)

## Booting kernel from Legacy Image at 10800000 ...

   Image Name:   Linux-3.0.68-smx6_03-4.0.0-samx6

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    4165808 Bytes = 4 MiB

   Load Address: 10008000

   Entry Point:  10008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

Using machid 0x10e9 from environment

Starting kernel ...

Linux version 3.0.68-smx6_03-4.0.0-samx6+g48edb85 (bjornar@pluto) (gcc version 4.8.1 (GCC) ) #1 SMP Fri Jan 17 09:17:26 CET 2014

CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Kontron ULP-COM-sAMX6 Board

Memory policy: ECC disabled, Data cache writealloc

CPU identified as i.MX6Q, silicon rev 1.2

PERCPU: Embedded 7 pages/cpu @8c006000 s5632 r8192 d14848 u32768

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 227328

Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=10.10.1.112:/home/bjornar/source/fsl-community-bsp/build/tmp/deploy/images/samx6-quad/rootfs,v3,tcp

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 640MB 256MB = 896MB total

Memory: 899900k/899900k available, 148676k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)

    vmalloc : 0xc0800000 - 0xf2000000   ( 792 MB)

    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

    modules : 0x7f000000 - 0x7fe00000   (  14 MB)

      .init : 0x80008000 - 0x80042000   ( 232 kB)

      .text : 0x80042000 - 0x807aca6c   (7595 kB)

      .data : 0x807ae000 - 0x8080da78   ( 383 kB)

       .bss : 0x8080da9c - 0x80845dbc   ( 225 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Hierarchical RCU implementation.

NR_IRQS:624

MXC GPIO hardware

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

arm_max_freq=1

MXC_Early serial console at MMIO 0x2020000 (options '115200')

bootconsole [ttymxc0] enabled

Console: colour dummy device 80x30

Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available

CPU1: Booted secondary processor

CPU2: Booted secondary processor

CPU3: Booted secondary processor

Brought up 4 CPUs

SMP: Total of 4 processors activated (6324.22 BogoMIPS).

print_constraints: dummy:

NET: Registered protocol family 16

print_constraints: vddpu: 725 <--> 1300 mV at 1150 mV fast normal

print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal

print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal

print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal

print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal

print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal

Detected PCB layout version 1

Using configuration for iMX6q

hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.

hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.

hw-breakpoint: maximum watchpoint size is 4 bytes.

L310 cache controller enabled

l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x02070000, Cache size: 1048576 B

bio: create slab <bio-0> at 0

print_constraints: vmmc_perm: 3300 mV

print_constraints: vmmc_sd3: 3300 mV

vgaarb: loaded

SCSI subsystem initialized

spi_imx imx6q-ecspi.1: probed

spi_imx imx6q-ecspi.3: probed

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

Freescale USB OTG Driver loaded, $Revision: 1.55 $

mc_pfuze 5-0008: ID: 0,Full lay: 1 ,Metal lay: 1

mc_pfuze 5-0008: FAB: 0 ,FIN: 0

print_constraints: PFUZE100_SW1A: 300 <--> 1875 mV at 1300 mV

print_constraints: PFUZE100_SW1B: 300 <--> 1875 mV at 300 mV

print_constraints: PFUZE100_SW1C: 300 <--> 1875 mV at 1300 mV

i2c-gpio i2c-gpio.5: using pins 28 (SDA) and 30 (SCL)

i2c-gpio i2c-gpio.2: using pins 106 (SDA) and 6 (SCL)

i2c-gpio i2c-gpio.4: using pins 21 (SDA) and 19 (SCL)

imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

Advanced Linux Sound Architecture Driver Version 1.0.24.

Switching to clocksource mxc_timer1

cfg80211: Calling CRDA to update world regulatory domain

Unable to handle kernel NULL pointer dereference at virtual address 00000001

pgd = 80004000

[00000001] *pgd=00000000

Internal error: Oops: 5 [#1] SMP

Modules linked in:

CPU: 3    Not tainted  (3.0.68-smx6_03-4.0.0-samx6+g48edb85 #1)

PC is at kmem_cache_alloc+0xa8/0x100

LR is at con_insert_unipair+0xb8/0x104

pc : [<800f9b48>]    lr : [<802ae1c4>]    psr: 60000093

sp : bc049ed8  ip : 807c3d58  fp : 00000000

r10: 00000001  r9 : 807c3d58  r8 : 00000060

r7 : 000000d0  r6 : bc048000  r5 : bc002300  r4 : 00000001

r3 : 80043660  r2 : 802ae1c4  r1 : 0bfde000  r0 : 20000013

Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 10c53c7d  Table: 1000404a  DAC: 00000015

Process swapper (pid: 1, stack limit = 0xbc0482f0)

Stack: (0xbc049ed8 to 0xbc04a000)

9ec0:                                                       80826fec 00002665

9ee0: bc39b0c0 00000003 bc2012e4 807e2c78 807e2c76 00000003 00000001 802ae1c4

9f00: 807e2ed0 00000000 00000001 bc39b0c0 00000003 802aedf4 80834640 807e2ed0

9f20: 80834818 bc004000 00000000 00000001 00000014 80834a3c 00000002 00000004

9f40: 00000000 80020c2c 00000000 80020154 00000000 80834918 00000001 80020644

9f60: 80707240 8014e784 80834438 00000000 80049308 00000013 8080daa0 8001fa98

9f80: 806cd550 00000013 80035c48 80035c48 800360b8 800425d0 800b6f64 80821b00

9fa0: 807bf080 bc048018 000001df 00000013 00000000 3734702c 00000039 00000000

9fc0: 00000270 80035c48 800360b8 80049308 00000013 00000000 00000000 00000000

9fe0: 00000000 80008a30 00000000 00000000 8000896c 80049308 40000010 00000000

[<800f9b48>] (kmem_cache_alloc+0xa8/0x100) from [<802ae1c4>] (con_insert_unipair+0xb8/0x104)

[<802ae1c4>] (con_insert_unipair+0xb8/0x104) from [<802aedf4>] (con_set_default_unimap+0xe4/0x16c)

[<802aedf4>] (con_set_default_unimap+0xe4/0x16c) from [<80020154>] (console_map_init+0x44/0x50)

[<80020154>] (console_map_init+0x44/0x50) from [<80020644>] (vty_init+0x188/0x19c)

[<80020644>] (vty_init+0x188/0x19c) from [<8001fa98>] (tty_init+0x12c/0x144)

[<8001fa98>] (tty_init+0x12c/0x144) from [<800425d0>] (do_one_initcall+0x11c/0x174)

[<800425d0>] (do_one_initcall+0x11c/0x174) from [<80008a30>] (kernel_init+0xc4/0x148)

[<80008a30>] (kernel_init+0xc4/0x148) from [<80049308>] (kernel_thread_exit+0x0/0x8)

Code: 1afffff3 e595b014 e2888001 e3a0a001 (e794b00b)

---[ end trace d81ada5ff3691890 ]---

Kernel panic - not syncing: Attempted to kill init!

[<8004fa18>] (unwind_backtrace+0x0/0x134) from [<805b2f90>] (panic+0x6c/0x188)

[<805b2f90>] (panic+0x6c/0x188) from [<8007fe9c>] (complete_and_exit+0x0/0x1c)

[<8007fe9c>] (complete_and_exit+0x0/0x1c) from [<bc049cb8>] (0xbc049cb8)

CPU0: stopping

[<8004fa18>] (unwind_backtrace+0x0/0x134) from [<80042338>] (do_IPI+0x144/0x164)

[<80042338>] (do_IPI+0x144/0x164) from [<800482f8>] (__irq_svc+0x38/0xc0)

Exception stack(0x807aff68 to 0x807affb0)

ff60:                   80820d80 20000093 00000005 00000000 807ae000 8080db44

ff80: 807c788c 805bcd0c 807ae000 807ae000 00000000 00000000 00000000 807affb0

ffa0: 80057c58 800493e8 80000013 ffffffff

[<800482f8>] (__irq_svc+0x38/0xc0) from [<800493e8>] (default_idle+0x24/0x28)

[<800493e8>] (default_idle+0x24/0x28) from [<80049544>] (cpu_idle+0xa0/0xe4)

[<80049544>] (cpu_idle+0xa0/0xe4) from [<80008960>] (start_kernel+0x2ec/0x2f8)

[<80008960>] (start_kernel+0x2ec/0x2f8) from [<10008040>] (0x10008040)

CPU2: stopping

[<8004fa18>] (unwind_backtrace+0x0/0x134) from [<80042338>] (do_IPI+0x144/0x164)

[<80042338>] (do_IPI+0x144/0x164) from [<800482f8>] (__irq_svc+0x38/0xc0)

Exception stack(0xbc071f88 to 0xbc071fd0)

1f80:                   80820d80 20000093 00000005 00000000 bc070000 8080db44

1fa0: 807c788c 805bcd0c bc070000 bc070000 00000000 00000000 00000000 bc071fd0

1fc0: 80057c58 800493e8 80000013 ffffffff

[<800482f8>] (__irq_svc+0x38/0xc0) from [<800493e8>] (default_idle+0x24/0x28)

[<800493e8>] (default_idle+0x24/0x28) from [<80049544>] (cpu_idle+0xa0/0xe4)

[<80049544>] (cpu_idle+0xa0/0xe4) from [<105af534>] (0x105af534)

CPU1: stopping

[<8004fa18>] (unwind_backtrace+0x0/0x134) from [<80042338>] (do_IPI+0x144/0x164)

[<80042338>] (do_IPI+0x144/0x164) from [<800482f8>] (__irq_svc+0x38/0xc0)

Exception stack(0xbc067f88 to 0xbc067fd0)

7f80:                   80820d80 20000093 00000005 00000000 bc066000 8080db44

7fa0: 807c788c 805bcd0c bc066000 bc066000 00000000 00000000 00000000 bc067fd0

7fc0: 80057c58 800493e8 80000013 ffffffff

[<800482f8>] (__irq_svc+0x38/0xc0) from [<800493e8>] (default_idle+0x24/0x28)

[<800493e8>] (default_idle+0x24/0x28) from [<80049544>] (cpu_idle+0xa0/0xe4)

[<80049544>] (cpu_idle+0xa0/0xe4) from [<105af534>] (0x105af534)

Labels (4)
0 Kudos
1 Solution
1,069 Views
OtavioSalvador
Senior Contributor II

Hello,

This is a problem due use of newer toolchain with Yocto; we fixed this in past and those patches can be found in Freescale GIT.

I think those are:

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.1.0&id=7a723d6e13...

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.1.0&id=c1cc659815...

Good luck...

View solution in original post

0 Kudos
2 Replies
1,070 Views
OtavioSalvador
Senior Contributor II

Hello,

This is a problem due use of newer toolchain with Yocto; we fixed this in past and those patches can be found in Freescale GIT.

I think those are:

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.1.0&id=7a723d6e13...

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_3.0.35_4.1.0&id=c1cc659815...

Good luck...

0 Kudos
1,069 Views
daiane_angolini
NXP Employee
NXP Employee

I´m not aware of any SMARC-sAMX6i meta layer, but consider to merge your work on meta-fsl-arm-extra. It´s the meta layer for boards using imx chips and not freescale boards.

I already replied to your question on u-boot failing. It´s due to sdcard class.

It´s weird you don´t have u-boot source code. But, you could create a recipe that only provides the u-boot binary and create the sdcard file....

Anyway. It would be good if you enter meta-freescale. You can find more people working on board "bringup" on yocto there. I don´t remember if Leo has already sent you the link, so https://lists.yoctoproject.org/listinfo/meta-freescale

0 Kudos