#support
Attempting to add pps to GPIO1 I007 SODIMM 55.
Software : kirkstone 6.x.y toaradex 6
hardware: col imx6dl 512mb board: colibri eval board v3
Code:
home/usr/oe-core/layers/meta-custom/recipes-kernel/linux-toradex/conf/machine
colibri-imx6-extra.conf
KERNEL_DEVICETREE:append = " custom-devicetree.dtb"
/home/usr/oe-core/layers/meta-custom/recipes-kernel/linux-toradex
custom-devicetree.dts
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "imx6dl.dtsi"
#include "imx6qdl-colibri.dtsi"
/ {
model = "Toradex Colibri iMX6DL/S on Colibri Iris Board";
compatible = "toradex,colibri_imx6dl-iris", \
"toradex,colibri_imx6dl", "fsl,imx6dl";
pps {
compatible = "pps-gpio";
gpios = <&gpio1 7 0>;
status = "okay";
};
};
/home/usr/oe-core/layers/meta-custom/recipes-kernel/linux-toradex
defconfig
....
CONFIG_PPS_CLIENT_LDISC=m
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PPS_CLIENT_KTIMER=m
....
/home/usr/oe-core/layers/meta-custom/recipes-kernel
linux-toradex.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/linux-toradex:"
# Prevent the use of in-tree defconfig
unset KBUILD_DEFCONFIG
CUSTOM_DEVICETREE = "custom-devicetree.dts"
SRC_URI += "\
file://${CUSTOM_DEVICETREE} \
file://defconfig \
"
do_configure:append() {
# For arm32 bit devices
cp ${WORKDIR}/${CUSTOM_DEVICETREE} ${S}/arch/arm/boot/dts
# For arm64 bit freescale/NXP devices
# cp ${WORKDIR}/${CUSTOM_DEVICETREE} ${S}/arch/arm64/boot/dts/freescale
}
/home/usr/oe-core/layers/meta-custom/recipes-bsp/u-boot
u-boot-toradex_%.bbappend
....
do_configure:append() {
# Remove exisiting fdtfile, if there is one
sed -i '/"fdtfile=.*\\0" \\/d' ${S}/include/configs/colibri_imx6.h
# Add new fdtfile, "custom-devicetree.dtb" should be replaced with your device tree binary file
sed -i 's/\("fdt_board=.*\\0" \\\)/\0\n "fdtfile=custom-devicetree.dtb\\0" \\/' ${S}/include/configs/colibri_imx6.h
}
...
local.conf
# This file does not need to exist, if it does it can be used to influence machine specific
# configurations without copying the machine file.
include conf/machine/include/${MACHINE}.inc
include conf/machine/include/colibri-imx6-extra.conf
# DO NOT SET THE MACHINE AFTER THE ABOVE INCLUDE
#
# Accepting any EULA
#
ACCEPT_FSL_EULA = "1"
#
# Switching to the the real-time kernel for for the Linux
#
PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-rt"
Issues:
If i run as is the bake completed but my device tree is not in the images.
I am thinking that is because bake doesn’t know where my conf lives.
If i add
KERNEL_DEVICETREE:append = " custom-devicetree.dtb"
to the machine inc directory i get :
| DTC arch/arm/boot/dts/imx6dl-colibri-cam-eval-v3.dtb
| Error: /home/usr/oe-core/build/tmp/work-shared/colibri-imx6/kernel-source/arch/arm/boot/dts/imx6dl-colibri-cam-eval-v3.dts:78.1-4 syntax error
| FATAL ERROR: Unable to parse input tree
| scripts/Makefile.lib:285: recipe for target 'arch/arm/boot/dts/imx6dl-colibri-cam-eval-v3.dtb' failed
| make[2]: *** [arch/arm/boot/dts/imx6dl-colibri-cam-eval-v3.dtb] Error 1
| /home/usr/oe-core/build/tmp/work-shared/colibri-imx6/kernel-source/Makefile:1270: recipe for target 'imx6dl-colibri-cam-eval-v3.dtb' failed
| make[1]: *** [imx6dl-colibri-cam-eval-v3.dtb] Error 2
| /home/usr/oe-core/build/tmp/work-shared/colibri-imx6/kernel-source/Makefile:179: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| ERROR: oe_runmake failed
I have also also build a working exteral kernel and device tree and they receive the same Unable to parse errors when i include the pps block. That is if i create my own dst or place the pps block in an existing dts.