Hi,
I’m attempting to create a simple custom image (based off of console-tdx-image) for a custom machine (using the colibri-imx6ull machine as a starting point), but it does not appear that the image is being deployed. The custom image I’m attempting to build has one kernel patch that enables spidev in the device tree. This has been already been confirmed to work.
I have verified that I can build console-tdx-image for the colibri-imx6ull out of the box and that it gets deployed successfully. After following the steps in Webinar On-Demand: Part 2 (Advanced) - Building Embedded Linux Images with the Yocto Project and consulting other forum posts (such as Adapt deployment scripts for custom machine), I am still unable to get an image from my custom configuration. It seems that the structure of the Toradex layers has changed since the video was released.
My custom machine is called colibri-imx6ull-test
and my custom image is called test-image
.
The structure of the layer that I created is given below. Note that meta-test/recipes-images/images/files/colibri-imx6ull-test
was copied from the meta-toradex-demos
layer, appending “test” to the end of colibri-imx6ull
.
meta-test
├── conf
│ ├── layer.conf
│ └── machine
│ └── colibri-imx6ull-test.conf
├── recipes-images
│ └── images
│ ├── files
│ │ └── colibri-imx6ull-test
│ │ ├── colibri-imx6ull-test_bin
│ │ │ ├── flash_blk.scr
│ │ │ ├── flash_eth.scr
│ │ │ ├── fwd_blk.scr -> ../../library/fwd_blk.scr
│ │ │ ├── fwd_eth.scr -> ../../library/fwd_eth.scr
│ │ │ └── mk-u-boot-scripts.sh -> ../../library/mk-u-boot-scripts.sh
│ │ └── update.sh
│ └── test-image.bb
└── recipes-kernel
└── linux
├── linux-toradex-4.9-1.0.x
│ ├── 0001-dts-Enable-spidev.patch
│ └── colibri-imx6ull-test
│ └── defconfig
└── linux-toradex_4.9-1.0.x.bbappend
Here are the contents of the files I modified.
meta-test/conf/layer.conf
:
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-test"
BBFILE_PATTERN_meta-test = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-test = "92"
meta-test/conf/machine/colibri-imx6ull-test.conf
:
#@TYPE: Machine
#@NAME: Toradex Colibri iMX6ULL
#@SOC: i.MX6ULL
#@DESCRIPTION: Machine configuration for Toradex Colibri iMX6 ULL SOM on test board
#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com>
MACHINEOVERRIDES =. "mx6:mx6ul:mx6ull:"
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa7.inc
PREFERRED_PROVIDER_virtual/kernel ?= "linux-toradex"
KERNEL_DEVICETREE += "imx6ull-colibri-eval-v3.dtb imx6ull-colibri-wifi-eval-v3.dtb"
KERNEL_IMAGETYPE = "zImage"
# The kernel lives in its own ubi volume.
RDEPENDS_kernel-base = ""
PREFERRED_PROVIDER_u-boot ?= "u-boot-toradex"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-toradex"
UBOOT_BINARY = "u-boot-nand.imx"
UBOOT_MAKE_TARGET = "u-boot-nand.imx"
UBOOT_MACHINE ?= "colibri-imx6ull_defconfig"
IMAGE_FSTYPES = "wic.gz tar.xz"
# wic support
WKS_FILE = "sdimage-bootpart.wks"
WIC_CREATE_EXTRA_ARGS_append = " --no-fstab-update"
SERIAL_CONSOLE ?= "115200 ttymxc0"
MACHINE_FEATURES += "screen usbgadget usbhost vfat ext2 alsa touchscreen wifi bluetooth 3g"
MACHINE_FIRMWARE_remove = "firmware-imx-epdc"
meta-test/recipes-images/images/test-image.bb
:
SUMMARY = "Toradex Embedded Linux Console Demo"
SUMMARY_append_apalis-tk1-mainline = " (Mainline)"
LICENSE = "MIT"
#start of the resulting deployable tarball name
export IMAGE_BASENAME = "Console-Image"
IMAGE_NAME_apalis-imx6 = "Apalis-iMX6_${IMAGE_BASENAME}"
IMAGE_NAME_apalis-t30 = "Apalis-T30_${IMAGE_BASENAME}"
IMAGE_NAME_apalis-tk1 = "Apalis-TK1_${IMAGE_BASENAME}"
IMAGE_NAME_apalis-tk1-mainline = "Apalis-TK1-Mainline_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-imx6 = "Colibri-iMX6_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-imx6ull = "Colibri-iMX6ULL_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-imx7 = "Colibri-iMX7_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-imx7-emmc = "Colibri-iMX7-eMMC_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-pxa = "Colibri-PXA_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-t20 = "Colibri-T20_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-t30 = "Colibri-T30_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-vf = "Colibri-VF_${IMAGE_BASENAME}"
IMAGE_NAME_colibri-imx6ull-test = "Test_Image_${IMAGE_BASENAME}"
IMAGE_NAME = "${MACHINE}_${IMAGE_BASENAME}"
SYSTEMD_DEFAULT_TARGET = "graphical.target"
#create the deployment directory-tree
require recipes-images/images/tdx-image-fstype.inc
IMAGE_LINGUAS = "en-us"
#IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in"
#ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; '
DISTRO_UPDATE_ALTERNATIVES ??= ""
ROOTFS_PKGMANAGE_PKGS ?= '${@oe.utils.conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "${ROOTFS_PKGMANAGE} ${DISTRO_UPDATE_ALTERNATIVES}", d)}'
CONMANPKGS ?= "connman connman-plugin-loopback connman-plugin-ethernet connman-plugin-wifi connman-client"
#don't install some id databases
#BAD_RECOMMENDATIONS_append_colibri-vf += " udev-hwdb cpufrequtils "
#deploy the X server for the tegras
#this adds a few MB to the image, but all graphical HW acceleration is
#available only on top of X, this is not required for nouveau based build.
IMAGE_INSTALL_append_tegra = " ${XSERVER} xterm xclock"
IMAGE_INSTALL_append_tegra124 = " ${XSERVER} xterm xclock"
IMAGE_INSTALL += " \
angstrom-packagegroup-boot \
packagegroup-basic \
udev-extra-rules \
${CONMANPKGS} \
${ROOTFS_PKGMANAGE_PKGS} \
timestamp-service \
packagegroup-base-extended \
valgrind \
"
require recipes-images/images/tdx-extra.inc
IMAGE_DEV_MANAGER = "udev"
IMAGE_INIT_MANAGER = "systemd"
IMAGE_INITSCRIPTS = " "
IMAGE_LOGIN_MANAGER = "busybox shadow"
inherit extrausers
EXTRA_USERS_PARAMS = "\
usermod -P testpwd root; \
"
inherit image
meta-test/recipes-kernel/linux/linux-toradex_4.9-1.0.x.bbappend
:
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-toradex-4.9-1.0.x:"
SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules"
SRC_URI += "file://0001-dts-Enable-spidev.patch"
COMPATIBLE_MACHINE = "(colibri-imx6ull-test)"
meta-test/recipes-kernel/linux/linux-toradex_4.9-1.0.x/0001-dts-Enable-spidev.patch
:
diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
index 75ba991..99ac2ba 100644
--- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
@@ -99,14 +99,14 @@
interrupt-parent = <&gpio2>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <10000000>;
- status = "okay";
+ status = "disabled";
};
spidev0: spidev@0 {
compatible = "toradex,evalspi";
reg = <0>;
spi-max-frequency = <23000000>;
- status = "disabled";
+ status = "okay";
};
};
Finally, here’s the build output. Here I ran it on a custom image based off of the angstrom-lxde-image. I receive the same error as the image based off of the console-tdx-image.
ERROR: test-lxde-image-2.8b3-r0 do_imagedeploy: Function failed: do_imagedeploy (log file is located at /home/iss/yocto/build/tmp-glibc/work/colibri_imx6ull_test-angstrom-linux-gnueabi/test-lxde-image/2.8b3-r0/temp/log.do_imagedeploy.15416)
ERROR: Logfile of failure stored in: /home/iss/yocto/build/tmp-glibc/work/colibri_imx6ull_test-angstrom-linux-gnueabi/test-lxde-image/2.8b3-r0/temp/log.do_imagedeploy.15416
Log data follows:
| DEBUG: Executing shell function do_imagedeploy
| Image Name: Flash Apalis/Colibri module
| Created: Wed Aug 29 19:32:06 2018
| Image Type: PowerPC Linux Script (uncompressed)
| Data Size: 1323 Bytes = 1.29 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point: 00000000
| Contents:
| Image 0: 1315 Bytes = 1.28 KiB = 0.00 MiB
| Image Name: Flash Apalis/Colibri module
| Created: Wed Aug 29 19:32:06 2018
| Image Type: PowerPC Linux Script (uncompressed)
| Data Size: 1259 Bytes = 1.23 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point: 00000000
| Contents:
| Image 0: 1251 Bytes = 1.22 KiB = 0.00 MiB
| Image Name: Flash Apalis/Colibri module
| Created: Wed Aug 29 19:32:06 2018
| Image Type: PowerPC Linux Script (uncompressed)
| Data Size: 646 Bytes = 0.63 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point: 00000000
| Contents:
| Image 0: 638 Bytes = 0.62 KiB = 0.00 MiB
| Image Name: Flash Apalis/Colibri module
| Created: Wed Aug 29 19:32:06 2018
| Image Type: PowerPC Linux Script (uncompressed)
| Data Size: 380 Bytes = 0.37 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point: 00000000
| Contents:
| Image 0: 372 Bytes = 0.36 KiB = 0.00 MiB
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/imx6ull-colibri-eval-v3.dtb
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/imx6ull-colibri-wifi-eval-v3.dtb
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/zImage--4.9-1.0.x+git0+07d40f6ffc-r0-imx6ull-colibri-eval-v3-20180829161520.dtb
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/zImage--4.9-1.0.x+git0+07d40f6ffc-r0-imx6ull-colibri-wifi-eval-v3-20180829161520.dtb
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/zImage-imx6ull-colibri-eval-v3.dtb
| /home/iss/yocto/build/../deploy/images/colibri-imx6ull-test/zImage-imx6ull-colibri-wifi-eval-v3.dtb
| mv: cannot stat '/home/iss/yocto/build/tmp-glibc/work/colibri_imx6ull_test-angstrom-linux-gnueabi/test-lxde-image/2.8b3-r0/Test_LXDE_LXDE-Image_2.8.3/rootfs/../colibri-imx6ull-test_bin/u-boot-colibri-imx6ull-test.img': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_imagedeploy (log file is located at /home/iss/yocto/build/tmp-glibc/work/colibri_imx6ull_test-angstrom-linux-gnueabi/test-lxde-image/2.8b3-r0/temp/log.do_imagedeploy.15416)
ERROR: Task (/home/iss/yocto/build/../layers/meta-test/recipes-images/images/test-lxde-image.bb:do_imagedeploy) failed with exit code '1'
I apologize for the information dump, but hopefully you can glean some information from this. Are there any specific changes needed for this image to actually get deployed?
Thanks,
Jeff