I am using Ka-ro qs8m-mq00 qsbase2 board. Also I am learning Yocto. I am not an Yocto specialist, I’m just learning this topic, so I have some beginner’s troubles.
I faced troubles with SPI and I2C customizing like changes some pins etc. As far as I understand, I need to create my own .dts file that includes existing .dts (in my case imx8mm-qs8m-mq00.dts ?).
Unfortunatelly, I can not find some clear tutorial with this process description. There are some pieces of information about patch files creations, some .bbappend examples etc. But I have not found some step-by-step explanation. It looks like I am near the correct solution, but I can not obtaing image with this customized device tree.
Could you help with this? Could you provide some steps description? Or, probably, there is some clear instruction that I have not found?
Thanks in advance!
So, I created some spitest
recipe that will produce image for bitbake spitest-image
image generation. This is some “hello, world” C++ application with CMake usage.
Directory structure is as follows:
├── COPYING.MIT
├── README
├── conf
│ └── layer.conf
├── readme.md
└── recipes-spitest
├── images
│ └── spitest-image.bb
└── spitest
├── files
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── spitest.dts
└── spitest_1.0.bb
conf/layer.conf:
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "spitest"
BBFILE_PATTERN_spitest = "^${LAYERDIR}/"
BBFILE_PRIORITY_spitest = "6"
LAYERDEPENDS_spitest = "core"
LAYERSERIES_COMPAT_spitest = "mickledore"
recipes-spitest/images/spitest-image.bb:
SUMMARY = "spitest image"
require ../../meta-karo-distro/recipes-core/images/karo-image-minimal.bb
IMAGE_INSTALL:append = " spitest"
recipes-spitest/spitest/files/spitest.dts
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
* Copyright (C) 2019 Lothar Waßmann <[email protected]>
*
*/
/dts-v1/;
#include "imx8mm-qs8m-mq00.dts"
/ {
model = "Ka-Ro electronics QS8M-MQ00 (NXP i.MX8MM) module on QSBASE2 baseboard";
// Some changes
};
recipes-spitest/spitest/spitest_1.0.bb
SUMMARY = "bitbake-layers recipe"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
DESCRIPTION = "This is spitest image."
SRC_URI = "
file://CMakeLists.txt
file://main.cpp
file://spitest.dts
"
S = "${WORKDIR}"
KERNEL_DEVICETREE:append = " spitest.dtb"
inherit pkgconfig cmake
do_install() {
install -d ${D}${bindir}
install -m 0755 ${B}/spitest ${D}${bindir}/spitest
}
I tried to make some error in spitest.dts
, but bitbake didn’t generate any error message. So, spitest.dts
is not compiled and not spitest.dtb
generated.
Is it possible neither use patches nor change source dts files?