How to add a new board to imx28 yocto build?

Showing results for 
Search instead for 
Did you mean: 

How to add a new board to imx28 yocto build?

Contributor III

Hi,   (re-posted from wrong group)

  We have our own hardware based on the imx28evk.  I have built systems for it using LTIB but we want to upgrade to Yocto and to a recent kernel.

I have installed Yocto and built a successfully target for the imx28evk using Yocto.

Now I want to understand how to build for our target hardware.

I have made a little progress, I have added a layer and it is included in the layers seen by bitbake.

  The next thing I want to change is the device tree.  Searching the internet yields many different suggestions.

I have set KERNEL_DEVICETREE = "mtd4000.dtb" in the machine conf file but when I try "bitbake core-image-minimal" it fails trying to build mtd4000.dtb: No rule to build target.

I can't work out where I'm supposed to put the dts files and how to tell the system where they are.

Referring to my workspace below,

1) Can anyone explain where to put the .dts/.dtsi files?

Which path is correct:


or  .../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/...

or some other path?

2) How do I tell Yocto/bitbake about the new .dts file(s)? 

3) If the .dtb has to have an entry in a makefile in the list for the MXS, eg:  "dtb-$(CONFIG_ARCH_MXS) += mtd4000.dtb", how do I do that using my layer?

There is a Makefile in "tmp/work/mtd4000-poky-linux-gnueabi/linux-fslc/3.14+gitAUTOINC+00e472111a-r0/git/arch/arm/boot/dts/Makefile" but

it is replaced when I clean and re-build the target (As I would expect: stuff under 'tmp/...' is transient)

4) Also, I will need to get the "defconfig" right for this new machine.  Where does it go and how to tell Yocto/bitbake ?


or  .../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/mtd4000/defconfig

There is a SRC_URI in that refers to "file://defconfig" but I don't know which directory this implies?

[ 5) Later I'll need to change the DDR RAM settings and then build u-boot too ]

Thanks in advance,

Colin Moloney


My build workspace is called "mdtata", my layer is "meta-mtdata" and my new machine is "mtd4000".  My workspace is like:













and my layer



























and build directory:










My machine config mtd4000.conf has:

    include conf/machine/include/

    PREFERRED_PROVIDER_virtual/kernel = "linux-fslc"

    PREFERRED_VERSION_linux-fslc = "3.14%"



and several attempts at the device tree:

    #KERNEL_DEVICETREE = "imx28-evk.dtb"   -- original freescale

none of these worked:

    KERNEL_DEVICETREE = "mtd4000.dtb"

    KERNEL_DEVICETREE = "${S}/git/arch/arm/boot/dts/mtd4000.dtb"

    KERNEL_DEVICETREE = "${WORKDIR}/mtd4000.dts"


The local.conf has:

    MACHINE ??= "mtd4000"

The layer "" is:

    LICENSE = "GPLv2"

    LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"

    DEPENDS += "lzop-native bc-native"

    PROVIDES = "virtual/kernel linux-mainline"

    inherit kernel

    require recipes-kernel/linux/

    require recipes-kernel/linux/

    SRCBRANCH ?= ""

    SRC_URI = "git://;branch=${SRCBRANCH} \


    LOCALVERSION = "-fslc"

The layer "linux-fslc_3.14.bbappend" is:

  # Which of these to supply a path to the .dts (and/or the defconfig)?

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

    FILESEXTRAPATHS_prepend := "${THISDIR}:${THISDIR}/mxs:"

    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${THISDIR}/mxs:${THISDIR}/${PN}/${PV}/git/arch/arm/boot/dts:"

    COMPATIBLE_MACHINE_mtd4000 = "mtd4000"      # Should this be appended or assigned ?

    KMACHINE_mtd4000 = "mtd4000"

Labels (2)
Tags (3)
2 Replies

NXP Employee
NXP Employee

I would recommend:

1. Add support for your board to U-boot

2. Add a dts for your board

Make sure you can boot the kernel.

Then you add it into Yocto.

NXP TechSupport
NXP TechSupport

I would suggest looking at other machines available as part of the community bsp for reference.

There is a set of slides that may be of help here (please note that you may need to login to download it), the kernel tree information is on slide 28.

Besides that you must also include your .dtb file in the Makefile in the dts source folder, in the CONFIG_ARCH_MXC section. This was once addressed in some discussion list but was not added to the slides.

I hope this information helps!

0 Kudos