Openembedded drives me crazy

Hi folks,

I build a custom image with openembeded and eyerything was fine. Then I changed my machine-configuration to build a realtime-kernel like described here. Since that do_imagedeploy failes to rename a not existing file:

ERROR: grimme-minimal-0.1-r0 do_imagedeploy: Function failed: do_imagedeploy (log file is located at /home/dietmar/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/grimme-minimal/0.1-r0/temp/log.do_imagedeploy.27071)
ERROR: Logfile of failure stored in: /home/dietmar/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/grimme-minimal/0.1-r0/temp/log.do_imagedeploy.27071
Log data follows:
| DEBUG: Executing shell function do_imagedeploy
| Image Name:   Flash Apalis/Colibri module
| Created:      Mon Dec  3 10:17:08 2018
| Image Type:   PowerPC Linux Script (uncompressed)
| Data Size:    4193 Bytes = 4.09 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point:  00000000
| Contents:
|    Image 0: 4185 Bytes = 4.09 KiB = 0.00 MiB
| Image Name:   Flash Apalis/Colibri module
| Created:      Mon Dec  3 10:17:08 2018
| Image Type:   PowerPC Linux Script (uncompressed)
| Data Size:    3953 Bytes = 3.86 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point:  00000000
| Contents:
|    Image 0: 3945 Bytes = 3.85 KiB = 0.00 MiB
| Image Name:   Flash Apalis/Colibri module
| Created:      Mon Dec  3 10:17:08 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:      Mon Dec  3 10:17:08 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
| Image Name:   Flash Apalis/Colibri module
| Created:      Mon Dec  3 10:17:08 2018
| Image Type:   PowerPC Linux Script (uncompressed)
| Data Size:    243 Bytes = 0.24 KiB = 0.00 MiB
| Load Address: 00000000
| Entry Point:  00000000
| Contents:
|    Image 0: 235 Bytes = 0.23 KiB = 0.00 MiB
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/imx6dl-colibri-aster.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/imx6dl-colibri-cam-eval-v3.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/imx6dl-colibri-eval-v3.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage--4.9-1.0.x+git0+3bb6e3284a-r0-imx6dl-colibri-aster-20181203095544.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage--4.9-1.0.x+git0+3bb6e3284a-r0-imx6dl-colibri-cam-eval-v3-20181203095544.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage--4.9-1.0.x+git0+3bb6e3284a-r0-imx6dl-colibri-eval-v3-20181203095544.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage-imx6dl-colibri-aster.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage-imx6dl-colibri-cam-eval-v3.dtb
| /home/dietmar/oe-core/build/../deploy/images/colibri-imx6/uImage-imx6dl-colibri-eval-v3.dtb
| mv: cannot stat ‘/home/dietmar/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/grimme-minimal/0.1-r0/grimme-minimal_0.1.0/rootfs/../colibri-imx6_bin/u-boot-colibri-imx6.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/dietmar/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/grimme-minimal/0.1-r0/temp/log.do_imagedeploy.27071)
ERROR: Task (/home/dietmar/oe-core/build/../layers/meta-grimme/recipes/grimme-minimal.bb:do_imagedeploy) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2543 tasks of which 2493 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /home/dietmar/oe-core/build/../layers/meta-grimme/recipes/grimme-minimal.bb:do_imagedeploy
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I reverted my changes but still got the same error.

After I changed the U-Boot-extension like here I was able to build the image but now the update.sh failes because it depends on the old filename:

$ ./update.sh -o /media/dietmar/DC31-C3EB/ -m 2
Colibri iMX6 rootfs specified
colibri-imx6_bin/u-boot.img does not exist

What is wrong?

Why is u-boot-colibri-imx6.img not built anymore?

Is there a way to get rid of that without removing and rebuilding the deploy- and build-trees what will take half the night?

Thanks,
Grimme

What exact Linux distribution and flavour thereof are you running on your build machine? Are you running a regular bash shell? Any other exotic configuration?

Hi Marcel,

I’m running 32-Bit Ubuntu 14.04 in VMware 11.1.0.
Im using a regular bash (version 4.3.8) and nothing exotic.

Wow, I thought 64-bit build machines are long since mandatory for OpenEmbedded builds. At least more complex builds involving Qt and such are definitely no longer possible on 32-bit. Nothing against VMware but I guess that also does not increase on the beefiness of a build machine.

Anyway, did you also update from an older BSP version to a later one? As we did change the U-Boot configuration at some point. You may find this documented here.

Hi Marcel,

because of company politics I’m doomed to work with Windows and run Linux in a virtual machine…

However that should have no influence to u-boot-colibri-imx6.img being build or not.

I fetched Openembedded just a couple of weeks ago from the toradex git, so it should be the latest version.
This is my tdx_version.conf:

# These variables are used to set image, kernel and U-Boot versions
# increment TDX_VERMINOR in meta-toradex-demos/classes/toradex-mirrors.bbclass

TDX_VERMAJOR = "2"
TDX_VERMINOR = "8"
TDX_VERBETA = "b4"
TDX_VERPATCH = "4"
TDX_BUILDNB ?= ""
TDX_VERNIGHTLY ?= ""
TDX_VERDATE ?= "-${DATE}"
TDX_VERDATE[vardepsexclude] = "DATE"

TDX_VER_PACKAGE_MIN = "${TDX_VERMAJOR}.${TDX_VERMINOR}${TDX_VERBETA}${TDX_BUILDNB}${TDX_VERNIGHTLY}"
TDX_VER_PACKAGE = "${TDX_VER_PACKAGE_MIN}${TDX_VERDATE}"
TDX_VER_ITEM = "${TDX_VERMAJOR}.${TDX_VERMINOR}.${TDX_VERPATCH}"

Are there any tasks to clean, fires/directories to remove to force u-boot-colibri-imx6.img being (re-)build?

Thanks,
Grimme

I had something like this happen to me before. Check you available recipes and layer setup:
bitbake-layers show-recipes
bitbake-layers show-layers

You want to make sure you select the right U-boot to go with mainline kernel. For me, I think I had to setup the PREFERRED_PROVIDER_u-boot = in the machine.conf. Mine looks like this, but you will need the right platform and layers setup to match your machine:

PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-mainline"
KERNEL_DEFCONFIG = "tegra-apollo_defconfig"
PREFERRED_PROVIDER_u-boot = "u-boot-apollo-toradex"
KERNEL_DEVICETREE += "tegra30-apalis-eval.dtb"

Hi

Note that u-boot.img would be new while u-boot.imx-spl would be older and u-boot.imx the oldest.

I believe that you copied some recipes/files into your own layer and then updated the other layers to something later which now causes this.

  • Delete all U-Boot output to start on a clean plate: bitbake -c cleansstate virtual/bootloader
  • Try to build an image for on of our regular machines to see if your installation can produce a working image.
    MACHINE=colibri-imx6 bitbake console-tdx-image
  • Assuming that works I would compare:
    the u-boot-toradex recipe to the one you are using in your layer, assuming you did actually provide your own u-boot recipe
    the colibri-imx6 machine configuration files to your custom machine configuration.
  • build your u-boot and check what files are actually deployed into oe-core/deploy/images//u-boot*

Max

P.S.:
I guess the following two commits changed the behaviour.
http://git.toradex.com/cgit/meta-toradex-nxp.git/commit/recipes-bsp/u-boot?h=rocko&id=56ae59dc5f34dc8fa07884a0d2cb0c3e795287cc
http://git.toradex.com/cgit/meta-toradex-demos.git/commit/?h=rocko-next&id=4aa93076a9afc193b7ede41e3e088c0355856d04

Hi Max,

I don’t have a u-boot recipe of my own, I only have a custom machine configuration

build/conf/machine/include/colibri-imx6.inc
to make a realtime-kernel be build:


PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-rt"

Meanwhile, after I got u-boot be build as u-boot.img but the the kernel as uImage instead of zImage, I got it using the following machine configuration:


    # machine configuration for colibri imx6
    #
    # file: build/conf/machine/include/colibri-imx6.inc
    
    #PREFERRED_PROVIDER_virtual/kernel = "linux-toradex"
    PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-rt"
    KERNEL_IMAGETYPE = "zImage"
    KERNEL_IMAGETYPE_colibri-imx6 = "zImage"
    
    PREFERRED_PROVIDER_u-boot = "u-boot-toradex"
    UBOOT_SUFFIX = "img"

But now there is another issue:

I get my kernel modules compiled and deployed (there is a tarball “modules-colibri-imx6.tgz” in deploy/images/colibri-imx6) but not integrated into the rootfs.

Thanks,

Grimme

Hi

They should be installed because of the this rrecommends.

Max

Hi Max,

I don’t believe 42 is the answer.
I added

MACHINE_EXTRA_RRECOMMENDS = “kernel-modules”
to my machine config: no effect

I included imx-base.inc in my machine config with the only effect to get a coulpe of warnings about duplicate inclusions.

In the contless configuration files I found nothing that deletes my MACHINE_EXTRA_RRECOMMENDS, there is only appended to it or set to empty as default.

That must be something else.

Grimme

Hi

Did you build your image recipe with the -e option and search the resulting file for kernel-modules.

bitbake theimage -e > theimage.txt

Max

Hi Max,

the -e option is a little bit scary because it creates about 2MB of output, but it helps.
I found this:


#
# $NO_RECOMMENDATIONS [2 operations]
#   set /home/dietmar/oe-core/build/../layers/openembedded-core/meta/conf/documentation.conf:291
#     [doc] "When set to '1', no recommended packages will be installed. Realize that some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
#   set? /home/dietmar/oe-core/build/../layers/openembedded-core/meta/conf/bitbake.conf:828
#     ""
# pre-expansion value:
#   ""
NO_RECOMMENDATIONS=""

I added


IMAGE_INSTALL += "kernel-modules"

to my recipe and now it works.
Thanks.
Now I move to the next construction area: kernel and device-tree.

Thanks, Grimme

Perfect, that it works. Thanks for your feedback.