i.MX6ULL Integration woes

nxp
rocko
#1

Hi All,

I am trying to integrate an i.MX6ULL build with mender and I’m running in to some issues that hopefully the community can help with.

My build setup is as follows:

Build, done using ubuntu 14.04.05 on server using ubuntu-14.04.5-desktop-amd64.iso:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev

sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc

sudo apt-get install u-boot-tools

mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH

mkdir ~/imx-yocto-bsp
cd ~/imx-yocto-bsp/

repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-rocko -m imx-4.9.88-2.0.0_ga.xml
repo sync

DISTRO=fsl-imx-fb MACHINE=imx6ull14x14evk source fsl-setup-release.sh -b build-evk
bitbake core-image-minimal

This creates a working build.

I have then followed the Yocto integration guide to add Mender to the build. I won’t post all of the modifications here (yet) but I am stuck with the following issue:

WARNING: mender-1.7.0-r0 do_package_qa: QA Issue: mender rdepends on u-boot-fw-utils, but it isn’t a build dependency, missing u-boot-fw-utils in DEPENDS or PACKAGECONFIG? [build-deps]
ERROR: core-image-minimal-1.0-r0 do_image_sdimg: Function failed: do_image_sdimg (log file is located at /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdimg.11956)
ERROR: Logfile of failure stored in: /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdimg.11956
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.3.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/meta/wic-tools.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-extended/parted/parted_3.2.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/rpm/rpm_git.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot’]
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: [‘makedevs-native’, ‘opkg-utils-native’, ‘pbzip2-native’, ‘prelink-native’, ‘ldconfig-native’, ‘mklibs-native’, ‘opkg-native’, ‘bmap-tools-native’, ‘dosfstools-native’, ‘gptfdisk-native’, ‘wic-tools’, ‘depmodwrapper-cross’, ‘parted-native’, ‘mtools-native’, ‘rpm-native’, ‘rsync-native’, ‘dnf-native’, ‘createrepo-c-native’, ‘update-rc.d-native’, ‘pseudo-native’, ‘qemuwrapper-cross’, ‘quilt-native’, ‘systemd-systemctl-native’, ‘automake-native’, ‘autoconf-native’, ‘gettext-minimal-native’, ‘libtool-native’, ‘xz-native’, ‘gnu-config-native’, ‘libarchive-native’, ‘pkgconfig-native’, ‘libsolv-native’, ‘kmod-native’, ‘bzip2-native’, ‘elfutils-native’, ‘python3-native’, ‘file-native’, ‘db-native’, ‘popt-native’, ‘nss-native’, ‘dbus-native’, ‘acl-native’, ‘attr-native’, ‘libcomps-native’, ‘cmake-native’, ‘libdnf-native’, ‘librepo-native’, ‘python3-iniparse-native’, ‘openssl-native’, ‘debianutils-native’, ‘binutils-native’, ‘python3-setuptools-native’, ‘ncurses-native’, ‘util-linux-native’, ‘qemu-native’, ‘shadow-native’, ‘readline-native’, ‘texinfo-dummy-native’, ‘sqlite3-native’, ‘curl-native’, ‘glib-2.0-native’, ‘libxml2-native’, ‘zlib-native’, ‘expat-native’, ‘m4-native’, ‘e2fsprogs-native’, ‘lzo-native’, ‘gtk-doc-native’, ‘nspr-native’, ‘libcheck-native’, ‘gobject-introspection-native’, ‘gpgme-native’, ‘python3-six-native’, ‘cryptodev-linux-native’, ‘makedepend-native’, ‘flex-native’, ‘bison-native’, ‘unzip-native’, ‘libsdl-native’, ‘alsa-lib-native’, ‘pixman-native’, ‘dtc-native’, ‘libpcre-native’, ‘libffi-native’, ‘gettext-native’, ‘pigz-native’, ‘libassuan-native’, ‘libgpg-error-native’, ‘swig-native’, ‘util-macros-native’, ‘xproto-native’, ‘libxrender-native’, ‘libx11-native’, ‘libxrandr-native’, ‘libxext-native’, ‘libpng-native’, ‘renderproto-native’, ‘inputproto-native’, ‘kbproto-native’, ‘libxcb-native’, ‘xextproto-native’, ‘xtrans-native’, ‘randrproto-native’, ‘libxau-native’, ‘libxdmcp-native’, ‘xcb-proto-native’, ‘libpthread-stubs-native’]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_sdimg
| + mkdir -p /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0
| + rm -rf /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data
| + mkdir -p /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data
| + [ -n ]
| + [ -f /home/brian/imx-yocto-bsp/build-evk/tmp/deploy/images/imx6ull14x14evk/data.tar ]
| + cd /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0
| + tar xf /home/brian/imx-yocto-bsp/build-evk/tmp/deploy/images/imx6ull14x14evk/data.tar
| + mkdir -p /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data/mender
| + echo device_type=imx6ull14x14evk
| + chmod 0444 /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data/mender/device_type
| + dd if=/dev/zero of=/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data.ext4 count=0 bs=1M seek=128
| 0+0 records in
| 0+0 records out
| 0 bytes (0 B) copied, 0.000118401 s, 0.0 kB/s
| + mkfs.ext4 -F /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data.ext4 -d /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data -L data
| mke2fs 1.43.5 (04-Aug-2017)
| Discarding device blocks: done
| Creating filesystem with 131072 1k blocks and 32768 inodes
| Filesystem UUID: 4824eeea-b7d4-4b46-836b-a8b5a912d9a6
| Superblock backups stored on blocks:
| 8193, 24577, 40961, 57345, 73729
|
| Allocating group tables: done
| Writing inode tables: done
| Creating journal (4096 blocks): done
| Copying files into the device: done
| Writing superblocks and filesystem accounting information: done
|
| + install -m 0644 /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data.ext4 /home/brian/imx-yocto-bsp/build-evk/tmp/deploy/images/imx6ull14x14evk/
| + true
| + install -m 0644 /home/brian/imx-yocto-bsp/build-evk/tmp/deploy/images/imx6ull14x14evk/uboot.env /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/
| + basename /dev/mmcblk0
| + ondisk_dev=mmcblk0
| + wks=/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/mender-sdimg.wks
| + rm -f /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/mender-sdimg.wks
| + [ -n ]
| + true
| + [ -n 8388608 ]
| + expr 8388608 / 1024
| + boot_env_align_kb=8192
| + cat
| + [ 16 -ne 0 ]
| + cat
| + cat
| + echo ### Contents of wks file ###
| ### Contents of wks file ###
| + cat /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/mender-sdimg.wks
| part --source rawcopy --sourceparams=“file=/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/uboot.env” --ondisk “mmcblk0” --align 8192 --no-table
| part --source bootimg-partition --ondisk “mmcblk0” --fstype=vfat --label boot --align 8192 --active --fixed-size 16
| part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label primary --align 8192 --fixed-size 212992k
| part --source rootfs --ondisk “mmcblk0” --fstype=ext4 --label secondary --align 8192 --fixed-size 212992k
| part --source rawcopy --sourceparams=file="/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/data.ext4" --ondisk “mmcblk0” --fstype=ext4 --label data --align 8192 --fixed-size 128
| bootloader --ptable msdos
| + echo ### End of contents of wks file ###
| ### End of contents of wks file ###
| + outimgname=/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx6ull14x14evk-20190502151130.sdimg
| + wicout=/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx6ull14x14evk-20190502151130-sdimg
| + BUILDDIR=/home/brian/imx-yocto-bsp/build-evk wic create /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/mender-sdimg.wks --vars /home/brian/imx-yocto-bsp/build-evk/tmp/sysroots/imx6ull14x14evk/imgdata/ -e core-image-minimal -o /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx6ull14x14evk-20190502151130-sdimg/
| INFO: Creating image(s)…
|
| ERROR: No boot files defined, IMAGE_BOOT_FILES unset for entry #2
|
| + bb_exit_handler
| + ret=1
| + echo WARNING: exit code 1 from a shell command.
| WARNING: exit code 1 from a shell command.
| + exit 1
| ERROR: Function failed: do_image_sdimg (log file is located at /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdimg.11956)
ERROR: Task (/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdimg) failed with exit code ‘1’
ERROR: core-image-minimal-1.0-r0 do_image_sdcard: Function failed: do_image_sdcard (log file is located at /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12020)
ERROR: Logfile of failure stored in: /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12020
Log data follows:
| DEBUG: Executing python function set_image_size
| DEBUG: Python function set_image_size finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-support/lzop/lzop_1.03.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/coreutils/coreutils_8.27.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-connectivity/openssl/openssl_1.0.2n.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/prelink/prelink_git.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/binutils/binutils-cross_2.29.1.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/mklibs/mklibs-native_0.1.43.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_4.9.88.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/opkg/opkg_0.3.5.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-cross_7.3.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/dosfstools/dosfstools_4.1.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/python/python_2.7.13.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/glibc/glibc_2.26.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-extended/parted/parted_3.2.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/rpm/rpm_git.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/python/python-native_2.7.13.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/dnf/dnf_2.6.3.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-kernel/dtc/dtc_1.4.4.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot’, ‘/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-extended/bc/bc_1.06.bb:do_populate_sysroot’, ‘virtual:native:/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.43.5.bb:do_populate_sysroot’]
| NOTE: linux-imx exists in sysroot, but is stale (linux-imx.cdca0093452d9c547240ed58ec2cedc7 vs. linux-imx.5c36ce09f23f07de01d585e9d2965c77), removing.
| DEBUG: Removing manifest: /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot/sysroot-providers/linux-imx
| DEBUG: Removing manifest: /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot/sysroot-providers/virtual_kernel
| DEBUG: Removing manifest: /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/recipe-sysroot/sysroot-providers/
| NOTE: Installed into sysroot: [‘coreutils-native’, ‘linux-imx’]
| NOTE: Skipping as already exists in sysroot: [‘makedevs-native’, ‘lzop-native’, ‘opkg-utils-native’, ‘pbzip2-native’, ‘openssl-native’, ‘prelink-native’, ‘binutils-cross-arm’, ‘ldconfig-native’, ‘mklibs-native’, ‘opkg-native’, ‘gcc-cross-arm’, ‘bmap-tools-native’, ‘quilt-native’, ‘dosfstools-native’, ‘kmod-native’, ‘python’, ‘gcc-runtime’, ‘depmodwrapper-cross’, ‘glibc’, ‘parted-native’, ‘mtools-native’, ‘rpm-native’, ‘python-native’, ‘dnf-native’, ‘dtc-native’, ‘createrepo-c-native’, ‘update-rc.d-native’, ‘pseudo-native’, ‘qemuwrapper-cross’, ‘bc-native’, ‘e2fsprogs-native’, ‘systemd-systemctl-native’, ‘flex-native’, ‘autoconf-native’, ‘zlib-native’, ‘bison-native’, ‘gnu-config-native’, ‘texinfo-dummy-native’, ‘automake-native’, ‘gettext-minimal-native’, ‘libtool-native’, ‘xz-native’, ‘libarchive-native’, ‘pkgconfig-native’, ‘libsolv-native’, ‘gtk-doc-native’, ‘readline’, ‘bzip2’, ‘gdbm’, ‘sqlite3’, ‘db’, ‘zlib’, ‘libffi’, ‘openssl’, ‘bzip2-native’, ‘elfutils-native’, ‘python3-native’, ‘file-native’, ‘db-native’, ‘popt-native’, ‘nss-native’, ‘dbus-native’, ‘readline-native’, ‘sqlite3-native’, ‘expat-native’, ‘libcomps-native’, ‘cmake-native’, ‘libdnf-native’, ‘librepo-native’, ‘python3-iniparse-native’, ‘debianutils-native’, ‘lzo-native’, ‘attr-native’, ‘cryptodev-linux-native’, ‘makedepend-native’, ‘binutils-native’, ‘mpfr-native’, ‘linux-libc-headers’, ‘libmpc-native’, ‘gmp-native’, ‘python3-setuptools-native’, ‘qemu-native’, ‘shadow-native’, ‘libgcc’, ‘util-linux-native’, ‘ncurses-native’, ‘curl-native’, ‘glib-2.0-native’, ‘libxml2-native’, ‘m4-native’, ‘ncurses’, ‘opkg-utils’, ‘cryptodev-linux’, ‘nspr-native’, ‘pigz-native’, ‘libcheck-native’, ‘gobject-introspection-native’, ‘gpgme-native’, ‘python3-six-native’, ‘util-macros-native’, ‘xproto-native’, ‘unzip-native’, ‘libsdl-native’, ‘alsa-lib-native’, ‘pixman-native’, ‘libpcre-native’, ‘libffi-native’, ‘gettext-native’, ‘libassuan-native’, ‘libgpg-error-native’, ‘swig-native’, ‘libxrender-native’, ‘libx11-native’, ‘libxrandr-native’, ‘libxext-native’, ‘libpng-native’, ‘renderproto-native’, ‘inputproto-native’, ‘kbproto-native’, ‘libxcb-native’, ‘xextproto-native’, ‘xtrans-native’, ‘randrproto-native’, ‘libxau-native’, ‘libxdmcp-native’, ‘xcb-proto-native’, ‘libpthread-stubs-native’]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_sdcard
| 0+0 records in
| 0+0 records out
| 0 bytes copied, 2.8724e-05 s, 0.0 kB/s
| Model: (file)
| Disk /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.sdcard: 235MB
| Sector size (logical/physical): 512B/512B
| Partition Table: msdos
| Disk Flags:
|
| Number Start End Size Type File system Flags
| 1 4194kB 12.6MB 8389kB primary lba
| 2 12.6MB 231MB 218MB primary
|
| 1030+0 records in
| 1030+0 records out
| 527360 bytes (527 kB, 515 KiB) copied, 0.00231514 s, 228 MB/s
| mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
| mkfs.fat 4.1 (2017-01-24)
| 2+0 records in
| 2+0 records out
| 8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0111471 s, 753 MB/s
| dd: failed to open ‘/home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.ext4’: No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_sdcard (log file is located at /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_image_sdcard.12020)
ERROR: Task (/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdcard) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 2645 tasks of which 2600 didn’t need to be rerun and 2 failed.

Summary: 2 tasks failed:
/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdimg
/home/brian/imx-yocto-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdcard
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

So it seems that it is missing a rootfs.ext4 file.

The folder does contain the following files:

core-image-minimal-imx6ull14x14evk-20190502151130.ext4
core-image-minimal-imx6ull14x14evk-20190502151130.mender
core-image-minimal-imx6ull14x14evk-20190502151130.mender.bmap
core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.manifest
core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.sdcard
core-image-minimal-imx6ull14x14evk-20190502151130-sdimg
core-image-minimal-imx6ull14x14evk-20190502151130.tar.bz2
core-image-minimal-imx6ull14x14evk.ext4
core-image-minimal-imx6ull14x14evk.manifest
core-image-minimal-imx6ull14x14evk.mender
core-image-minimal-imx6ull14x14evk.mender.bmap
core-image-minimal-imx6ull14x14evk.tar.bz2

Does this error make sense to anyone? I can post my full modifications if necessary. Is the do_image_sdcard task needed? I though that maybe only ext4 and sdimg are needed but it still runs sdcard when I try to limit it using IMAGE_FSTYPES = “ext4 sdimg” in local.conf

Thanks!

Brian.

#2

Might be this error that is causing the rest of them, even if you do not need anything to be in the boot part you need to set something to the IMAGE_BOOT_FILES variable.

I know that we have fixed so that you can disable the boot part of not necessary on recent branches but I do not believe this is the case on older ones.

#3

Hi,

Thanks for the fast response.

I added the following in to my local.conf:

IMAGE_BOOT_FILES = “u-boot.imx”

Not sure if this is correct at this point, but it wouldn’t build with an empty string.

It still fails looking for a non-existant rootfs.ext4 file. Any other things to try?

Thanks,

Brian.

#4

What is the content of /home/brian/imx-yocto-bsp/build-evk/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/core-image-minimal/1.0-r0/deploy-core-image-minimal-image-complete/

Edit: ooh you already posted this right?

#5

Aah now I see it, it is the sdcard image that is failing, you can drop this as meta-mender will create a sdimgwhich is the equivalent and contains all the required partitions.

So,

IMAGE_FSTYPES_remove = "sdcard"
#6

But to otherwise clarify the issue, ,

is that when building with mender the images are created without the .rootfs suffix,

core-image-minimal-imx6ull14x14evk-20190502151130.ext4

vs what the sdcard class is looking for,

core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.ext4

due to this change,

#7

I’ve added this to the local.conf, but it still tries to build the sdcard image (and fails). I’ll need to dig deeper to find out why - this is stretching my limited yocto skills quite far!

Thanks for your help, this is a “tomorrow job” so I’ll post my findings then.

#8

So if I understand correctly, the

core-image-minimal-imx6ull14x14evk-20190502151130.ext4

and

core-image-minimal-imx6ull14x14evk-20190502151130.rootfs.ext4

are the same file?

If so, maybe I can trick the sdcard image to use these instead? (in case I can’t stop it from running).

Thanks,

Brian.

#9

This is where the “bug” is imo,

The “rootfs” is hard-coded instead of using ${IMAGE_NAME_SUFFIX}

Edit:

That is, it should say:

SDCARD_ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ext4
#10

Thanks! That has cured this problem and now it is complaining about a missing .sdcard file. I’ll have a go at understanding that myself before posting the results here.

#11

There is a similar issue in the file image_types_fsl.bbclass

I don’t know how to link the file like you have, but it should be:

SDCARD = “{IMGDEPLOYDIR}/{IMAGE_NAME}${IMAGE_NAME_SUFFIX}.sdcard”

I can now build successfully!

Now to try to boot tomorrow…

#12

Nice!

Just in case you want to debug why you are not able to remove these images I would try running:

bitbake -e core-image-base | grep ^IMAGE_FSTYPES

To see what is in there, it might be that the sdcard is added as sdcard.bz2 or something like that. And the remove string should match what is in IMAGE_FSTYPES variable

#13

Great! I’ll give that a try tomorrow. This would be preferable since I would otherwise have to get these fixes in to my layer.

I’ll see if I can submit the fixes to NXP somehow too to close the loop on the problems.

Thanks again!

#14

OK, so you were correct again. The following entry in local.conf will stop the generation of the sdcard for me:

IMAGE_FSTYPES_remove += "sdcard.bz2"
#15

Hi mirzak,

Thanks for your help so far.

I am now trying to debug the board boot. Currently I dd the .sdimg file and get nothing on the board, not even a u-boot intro.

I notice that there are variables such as MENDER_IMAGE_BOOTLOADER_FILE and MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET and lots more.

My question is: Given that I can boot an SD card from a stock Yocto build for my board, what is the best strategy to debug the mender created image and find out which of these variables is wrong?

#16

My question is: Given that I can boot an SD card from a stock Yocto build for my board, what is the best strategy to debug the mender created image and find out which of these variables is wrong?

What type of image are using in a “stock Yocto build”, as this is typically where you would extract the necessary information to add to MENDER_IMAGE_BOOTLOADER_FILE/MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET.

NOTE, on rocko these variables are named IMAGE_BOOTLOADER_FILE/IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET

#17

OK, I am making some progress I think.

I am now able to get in to u-boot, but it would seem that there is a u-boot variable not set that I need kernel_add_r.

If I do:

setenv kernel_addr_r 0x80800000
boot

Then my image boots.

What is the best way to patch in this variable? Turn off the auto-patching, generate the patches and do it manually? Keep the auto-patching and add in another patch via a .bbappend? Or something else?

Thanks!

#18

This is bit strange, this variable is probably used but not set because of some consequences. As workaround you can set it in uEnv.txt file (in boot partition) and u-boot will read this file and apply. I’ll check in meantime why it’s not set by default.

#19

You could supply an patch using a .bbappend to make sure kernel_addr_r is set, make sure that this patch is applied before “auto-patching”.

When using auto-patching it is assumed that the “board” has setup kernel_addr_r, is kernel_addr_r present on a “stock image” ?

Historically in U-boot either kernel_addr_r or loadaddr have been used for the same purpose and it might be the case for your board that by default it uses loadaddr

You could also as you mention, disable auto-patching, extract patches and apply manually with necessary modifications.

#20

@brianPTL do you have u-boot output when variable is not set? Checking include/configs/mx6ul_14x14_evk.h and such variable doesn’t exists + mmcboot using: bootz ${loadaddr} - ${fdt_addr} Thanks.