Adapt deployment scripts for custom machine

Hey there,

i created a custom machine configuration. (Followed the “Webinar On-Demand: Part 2 (Advanced) - Building Embedded Linux Images with the Yocto Project” Webinar on youtube)

Edit1: The new machine configuration is named colibri-vf-ohp.

Bitbaking the “virtual/kernel” recipe is working, bitbaking the “core-image-minimal” is working too.

But when I try to bitbake the “consol-trdx-image” the build fails, complaining about a missing path in the meta-toradex/recipes/files directory.

ERROR: Function failed: do_imagedeploy (log file is located at /home/sebastian/toradex/build/out-glibc/work/colibri_vf_ohp-angstrom-linux-gnueabi/console-trdx-image/V2.6-r0/temp/log.do_imagedeploy.16617)
ERROR: Logfile of failure stored in: /home/sebastian/toradex/build/out-glibc/work/colibri_vf_ohp-angstrom-linux-gnueabi/console-trdx-image/V2.6-r0/temp/log.do_imagedeploy.16617
Log data follows:
| DEBUG: Executing shell function do_imagedeploy
| cp: cannot stat '/home/sebastian/toradex/build/../stuff/meta-toradex/recipes/images/files/colibri-vf-ohp/colibri-vf-ohp/colibri-vf_bin/fwd_blk.scr': No such file or directory
| cp: cannot stat '/home/sebastian/toradex/build/../stuff/meta-toradex/recipes/images/files/colibri-vf-ohp/colibri-vf-ohp/colibri-vf_bin/fwd_eth.scr': No such file or directory
| cp: cannot stat '/home/sebastian/toradex/build/../stuff/meta-toradex/recipes/images/files/colibri-vf-ohp/colibri-vf-ohp/colibri-vf_bin/fwd_mmc.scr': No such file or directory
| cp: cannot stat '/home/sebastian/toradex/build/../stuff/meta-toradex/recipes/images/files/colibri-vf-ohp/colibri-vf-ohp/colibri-vf_bin/mk-u-boot-scripts.sh': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_imagedeploy (log file is located at /home/sebastian/toradex/build/out-glibc/work/colibri_vf_ohp-angstrom-linux-gnueabi/console-trdx-image/V2.6-r0/temp/log.do_imagedeploy.16617)
ERROR: Task 8 (/home/sebastian/toradex/build/../stuff/meta-toradex/recipes/images/console-trdx-image.bb, do_imagedeploy) failed with exit code '1'

I also tried to create the missing colibri-vf-ohp directory by copying over the the colibri-vf directory, but this just give me another error.

Can somebody give me a hint how to adapt the exisiting deployment script in the openembedded build system for colibri-vf based machines?
Is there some documentation about adapting the toradex deploy scripts for an custom machine configuration?

Thanks in advance and kind regards,

Sebastian

Edit2:
colibri-vf-ohp.conf:

#@TYPE: Machine
#@NAME: Toradex Colibri VF50/VF61
#@SOC: VF500/VF610
#@DESCRIPTION: Machine configuration for Toradex Colibri VF50/VF61 powered by Freescale Vybrid SoC
#@MAINTAINER: Stefan Agner <stefan.agner@toradex.com>

include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa5.inc

SOC_FAMILY = "vf:vf50:vf60"

PREFERRED_PROVIDER_virtual/kernel ?= "linux-toradex"
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE += "vf500-colibri-ohp.dtb"
#KERNEL_DEVICETREE += "vf500-colibri-eval-v3.dtb vf610-colibri-eval-v3.dtb"

# U-Boot of our newer release read the Kernel and device tree from static UBI volumes,
# hence no need to deploy the kernel binary in the image itself
RDEPENDS_kernel-base = ""

PREFERRED_PROVIDER_u-boot = "u-boot-toradex"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex"
PREFERRED_PROVIDER_virtual/kernel-module-mcc = "kernel-module-mcc-toradex"
PREFERRED_PROVIDER_virtual/kernel-module-mcc-dev = "kernel-module-mcc-toradex"
PREFERRED_VERSION_mqxboot = "1.%"

# U-Boot NAND binary includes 0x400 padding required for NAND boot
UBOOT_BINARY = "u-boot-nand.imx"
UBOOT_MAKE_TARGET = "u-boot-nand.imx"
UBOOT_MACHINE = "colibri_vf_defconfig"

IMAGE_FSTYPES = "tar.bz2 ubifs ubi"

# Enable free --space-fixup (-F) by default, this allows DFU updates
MKUBIFS_ARGS = " -c 8112 -e 124KiB -m 2KiB -F"
UBINIZE_ARGS = " -p 128KiB -m 2048 -s 2048"
UBI_VOLNAME = "rootfs"

SERIAL_CONSOLE = "115200 ttyLP0"

MACHINE_FEATURES = "apm usbgadget usbhost vfat alsa touchscreen"

Patchfile for Kernel:

From 88e327a689d332a212b86e62ecac407c83a38634 Mon Sep 17 00:00:00 2001
From: sebastian <sebastian@localhost.localdomain>
Date: Tue, 20 Sep 2016 14:06:47 +0200
Subject: [PATCH] =?UTF-8?q?Neuen=20Devictree=20f=C3=BCr=20OHP=20Ger=C3=A4t?=
 =?UTF-8?q?=20erstellt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 arch/arm/boot/dts/Makefile              |  1 +
 arch/arm/boot/dts/vf500-colibri-ohp.dts | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/vf500-colibri-ohp.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index dd806e1..479466d 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -355,6 +355,7 @@ dtb-$(CONFIG_SOC_LS1021A) += \
 	ls1021a-qds.dtb \
 	ls1021a-twr.dtb
 dtb-$(CONFIG_SOC_VF610) += \
+	vf500-colibri-ohp.dtb \
 	vf500-colibri-eval-v3.dtb \
 	vf610-colibri-eval-v3.dtb \
 	vf610m4-colibri.dtb \
diff --git a/arch/arm/boot/dts/vf500-colibri-ohp.dts b/arch/arm/boot/dts/vf500-colibri-ohp.dts
new file mode 100644
index 0000000..c3173fc
--- /dev/null
+++ b/arch/arm/boot/dts/vf500-colibri-ohp.dts
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2014 Toradex AG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+/dts-v1/;
+#include "vf500-colibri.dtsi"
+#include "vf-colibri-eval-v3.dtsi"
+
+/ {
+	model = "Toradex Colibri VF50 on Colibri Evaluation Board";
+	compatible = "toradex,vf500-colibri_vf50-on-eval", "toradex,vf500-colibri_vf50", "fsl,vf500";
+};
+
+&touchscreen {
+	vf50-ts-min-pressure = <200>;
+	status = "okay";
+};
-- 
2.1.4

Hi

Copying ‘…/meta-toradex/recipes/images/files/colibri-vf’ to ‘…/meta-toradex/recipes/images/files/colibri-vf-ohp’ should be enough to get the deployment working.

However from your error message I guess that you now have an additonal colibri-vf-ohp directory, i.e. you copied the content of ‘files/colibri-vf’ into ‘files/colibri-vf-ohp/colibri-vf-ohp’.

Max

Thanks for your response.

Your tip showed me the right direction.

After fixing the copy mistake and renaming the “colibri-vf_bin” within the ./meta-toradex/recipes/images/files/colibri-vf-ohp to “colibri-vf-ohp_bin” its now working!

Regards,

Sebastian