Thanks gusarambula,
I have progressed a little. My layer is included in the layers seen by bitbake. The first thing I want to change is the device tree. Searching the internet yields many different suggestions.
When I try "bitbake core-image-minimal" it fail 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.
If the .dtb has to be in the list for the MXS: dtb-$(CONFIG_ARCH_MXS) += mtd4000.dtb, how do I do that in a layer? The Makefile is in
"tmp/work/mtd4000-poky-linux-gnueabi/linux-fslc/3.14+gitAUTOINC+00e472111a-r0/git/arch/arm/boot/dts/Makefile"
Can anyone untangle the mess below and explain where to put the .dts/.dtsi files?
Which path is correct: linux-fslc/3.14/git/... or linux-fslc/3.14/image/usr/... or some other path?
Also, I will need to get the "defconfig" right for this new machine. Where does it go and how to tell Yocto/bitbake ?
Colin Moloney
-----------
My build workspace is called "mdtata", my layer is "meta-mtdata" and my new machine is "mtd4000". My workspace is like:
.../help
.../mtdata
.../README
.../README.cm
.../.repo
.../setup-environment.../download
.../sources/base
.../sources/meta-fsl-arm
.../sources/meta-fsl-arm-extra
.../sources/meta-fsl-demos
.../sources/meta-openembedded
.../sources/poky
and my layer
.../sources/meta-mtdata
.../sources/meta-mtdata/recipes-kernel
.../sources/meta-mtdata/recipes-kernel/linux
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc.inc
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc_3.14.bbappend
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm/boot
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm/boot/dts
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm/boot/dts/mtd4000.dtsi
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm/boot/dts/mtd4000-pinfunc.h
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/git/arch/arm/boot/dts/mtd4000.dts
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm/boot
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm/boot/dts
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm/boot/dts/mtd4000.dtsi
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm/boot/dts/mtd4000-pinfunc.h
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/3.14/image/usr/src/kernel/arch/arm/boot/dts/mtd4000.dts
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/defconfig
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/mtd4000
.../sources/meta-mtdata/recipes-kernel/linux/linux-fslc/mtd4000/defconfig
.../sources/meta-mtdata/conf
.../sources/meta-mtdata/conf/machine
.../sources/meta-mtdata/conf/machine/mtd4000.conf
.../sources/meta-mtdata/conf/layer.conf
.../sources/meta-mtdata/README
and build directory:
.../mtdata/bitbake.lock
.../mtdata/cache
.../mtdata/state-cache
.../mtdata/conf
.../mtdata/conf/local.conf
.../mtdata/conf/templateconf.cfg
.../mtdata/conf/sanity_info
.../mtdata/conf/bblayers.conf
.../mtdata/tmp
My machine config mtd4000.conf has:
include conf/machine/include/mxs-base.inc
PREFERRED_PROVIDER_virtual/kernel = "linux-fslc"
PREFERRED_VERSION_linux-fslc = "3.14%"
IMXBOOTLETS_MACHINE = "MTD4000"
KERNEL_IMAGETYPE = "uImage"
and several attempts at the device tree:
#KERNEL_DEVICETREE = "imx28-evk.dtb" -- original freescale
KERNEL_DEVICETREE = "mtd4000.dtb"
KERNEL_DEVICETREE = "${S}/git/arch/arm/boot/dts/mtd4000.dtb"
KERNEL_DEVICETREE = "${WORKDIR}/mtd4000.dts"
KERNEL_DEVICETREE = "${WORKDIR}/mtd4000"
The local.conf has:
MACHINE ??= "mtd4000"
The layer "linux-fslc.inc" 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/linux-imx.inc
require recipes-kernel/linux/linux-dtb.inc
SRCBRANCH ?= ""
SRC_URI = "git://github.com/Freescale/linux-mainline.git;branch=${SRCBRANCH} \
file://defconfig"
LOCALVERSION = "-fslc"
The layer "linux-fslc_3.14.bbappend" is:
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"