You could append in local.conf to the
KERNEL_DEVICETREE variable which gets
set in the machine configuration file.
KERNEL_DEVICETREE_append_colibri-imx6 = " imx6dl-your_version.dtb "
This should make sure that you have
your device tree in deploy/images.
This works. I wonder if there is a way to append this to a *.conf within my custom BSP layer instead of local.conf which is not under version control. Appending to meta-pe-bsp/conf/machine/colibri-imx6.conf
had no effect.
There is no easy way to change
update.sh with a patch. You could add
something like the following to add
your device tree to the list of device
tree files that the legacy update
procedure deploys during ‘run update’:
imagedeploytools_append_colibri-imx6 () {
sed -i 's/\(KERNEL_DEVICETREE\=\"\)/\1imx6dl-your_version.dtb /' ${IMAGE_DIR}/update.sh
}
This works if put into meta-pe-software/recipes-images/images/pe-angstrom-lxde-image.bb
Note that you additionally need to set
the fdt_file U-Boot environment
variable to actually use your new
device tree.
For the record here is how I did it:
I added meta-pe-bsp/recipes-bsp/u-boot/files/colibri-imx6/colibri_imx6.h-FDT_FILE_imx6dl-colibri-pe641t-1.dtb.patch
:
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index f1fd5b422e..21f4723199 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -228,7 +228,7 @@
"usbdtbload=setenv dtbparam; load usb 0:1 ${fdt_addr_r} " \
"${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
-#define FDT_FILE "imx6dl-colibri-eval-v3.dtb"
+#define FDT_FILE "imx6dl-colibri-pe641t-1.dtb"
#define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
"bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
and meta-pe-bsp/recipes-bsp/u-boot/u-boot-toradex_2016.11.bbappend
:
# the _mx6 suffix restricts the validity to iMX6 modules
# see ELPUYPC p.105
SRC_URI_append_mx6 = " file://colibri_imx6.h-FDT_FILE_imx6dl-colibri-pe641t-1.dtb.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/colibri-imx6/:"
This the layer structure:
meta-pe-bsp/
├── conf
│ ├── layer.conf
│ └── machine
│ ├── colibri-imx6.conf
│ └── colibri-t30-pe.conf
├── recipes-bsp
│ └── u-boot
│ ├── files
│ │ └── colibri-imx6
│ │ └── colibri_imx6.h-FDT_FILE_imx6dl-colibri-pe641t-1.dtb.patch
│ └── u-boot-toradex_2016.11.bbappend
└── recipes-kernel
└── linux
├...
:
.
After flashing the new environment variables can be loaded with:
env default -a
saveenv