Deconfig error

DECONFIG ERROR . UBOOT MACHINE ERROR

| make: *** No rule to make target ‘veethree-hybrid-flashloader_defconfig’. Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.

Hi @Akash

What is the context of this error? What are you trying to build? It looks like you don’t have a valid Yocto setup for this particular board. I suggest you get a working Yocto system before trying the Mender integration.

Drew

Hello @drewmoseley ,

I am trying to integrate meta-mender(rocko branch) layer with custom linux by using yocto , which have following specification:
KERNEL VER. : 4.9.153

Build Configuration:
BB_VERSION = “1.36.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “veethree-evb-mmc-boot-m3os-from-m3xl-1g”
DISTRO = “poky-st”
DISTRO_VERSION = “2.4.4”
TUNE_FEATURES = “arm armv7ve vfp thumb neon callconvention-hard cortexa7”
TARGET_FPU = “hard”
GCCVERSION = “7.%”
PREFERRED_PROVIDER_virtual/kernel = “linux-sta12xx”

I added meta-mender in my bblayer and start bitbake my whole machine, during bitbake it through error from do_compile fuction of mender recepie

do_compile () {

 oe_runmake ${UBOOT_MACHINE}

grep -q '^tools-all: *env\b' Makefile && ENV_TARGET=env
grep -q '^tools-all: *envtools\b' Makefile && ENV_TARGET=envtools
if [ -z "$ENV_TARGET" ]; then
    echo "Could not determine environment tools target."
    exit 1
fi

oe_runmake include/generated/timestamp_autogenerated.h include/generated/version_autogenerated.h || true
oe_runmake $ENV_TARGET

}
you can also see in attached image.

Thank you for your support.
it is very kind.
Feel free to contact me.( akash.kumar@veethree.com )

This does not look like a problem caused by the Mender code. Are you able to build this Yocto platform without the Mender layers?

Hello there,

Yes, i am able to bitbake(build) my whole code without adding meta layer of mender and also without error.

Can you tell me the cause of this error?

Thank you

The only thing I can imagine is that platform does not use U-Boot in the non-mender configuration. And there must not be a port of U-Boot for that platform since it is failing to find the appropriate defconfig.

Are these layers public?

Drew

1 Like

Hello Drewmoseley,

It compiled perfectly(with u-boot as a bootloader) without mender layer and also run smoothly in my hardware.
But when i add meta-mender-core (rocko branch) layer it through this error. If you want to look in my mender code, i am ready to share.

But please tell me the real cause of this error. So , i can understand the mender’s effect on my current code.

Thank You
Akash

Do your U-Boot sources have a veethree-hybrid-flashloader_defconfig file?

It seems that UBOOT_MACHINE is set to that value but for some reason when you build without Mender, that value is not used. I believe some platforms use UBOOT_CONFIG but I thought meta-mender handled that properly. It’s entirely possible that the rocko branch does not have the proper support for that. @kacf can you comment?

Drew

1 Like

Have you done these steps in the Yocto/U-Boot integration guide? I’m particularly interested in what was done in the “Forks of U-Boot” section, if anything.

1 Like

Hello there,

Thanks for your patience. veethree-hybrid-flashloader_defconfig file is present in my u-boot config folder that used as my uboot_machine.

Here you an see,

akash@akash:~/projects/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g$ bitbake -e u-boot | grep "UBOOT_MACHINE"
# [doc] "Configures the UBOOT_MACHINE and can also define IMAGE_FSTYPES for individual cases."
# $UBOOT_MACHINE [3 operations]
UBOOT_MACHINE=" veethree-hybrid-flashloader_defconfig veethree-mmc-xloader_defconfig"
** list = d.getVar(“UBOOT_MACHINE”, True).lstrip().split(’ ')**
** ubootmachine = d.getVar(“UBOOT_MACHINE”)**
** raise bb.parse.SkipPackage(“Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration.” % d.getVar(“MACHINE”))**
** raise bb.parse.SkipPackage(“You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.”)**
** d.appendVar(‘UBOOT_MACHINE’, ’ ’ + items[0])**

is anything in configuration (do_config)?
Any comment on this?

Hello @kacf ,

Thank you for your patience, I am interest to know about “Forks of U-Boot”.

what is it and what it does ?

Can you tell about this process? It will be very appreciating.

Best Regards,
Akash
Akash.kumar@veethree.com

Hi @Akash the details are in the docs link that @kacf provided but in essence this is a mechanism to use your own fork of U-Boot and tell the Mender bbclass files which recipe it should be using. My concern is that you are on an older Yocto and it’s possible that things are different there. I would suggest you review the older version of the documentation and make sure you are running all the steps there related to the “Forks of U-Boot”.
Drew

1 Like

hi @drewmoseley ,

I think board is not using a u-boot fork.
please see the attached image.

Thanks

hi @drewmoseley ,

Also when i following your [older version of the documentation ]. it shows something like this,

ERROR: mender-artifact-info-0.1-r0 do_compile: Need to define MENDER_ARTIFACT_NAME variable.
ERROR: mender-artifact-info-0.1-r0 do_compile: Function failed: do_compile (log file is located at /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/all-poky-linux/mender-artifact-info/0.1-r0/temp/log.do_compile.16393)
ERROR: Logfile of failure stored in: /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/all-poky-linux/mender-artifact-info/0.1-r0/temp/log.do_compile.16393
ERROR: Task (/home/akash/project/accordo5/meta-mender/meta-mender-core/recipes-mender/mender-artifact-info/mender-artifact-info.bb:do_compile) failed with exit code ‘1’

Thanks

Just set MENDER_ARTIFACT_NAME to a name of your choice. It is the name given to your generated artifact.

1 Like

hi @kacf ,

okay, but after it shows this,

Thanks

Can you post the entire output please? It’s probably easier to copy paste the text than to copy the image. Or you can pipe it to file by appending >& build.log to the command and then copy paste from there.

1 Like

hello @kacf ,

LOGS:

DEBUG: Executing shell function do_mender_uboot_auto_configure
WARNING: Found more than one machine specified in UBOOT_MACHINE. Only one should be specified. Choosing the last one.
arm-poky-linux-gnueabi-gcc -march=armv7ve -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/recipe-sysroot
If at any point you get an unexpanded variable, there is probably an argument
you haven't given.
+ SUB_X=-x
+ set -u
+ rm -rf /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/tmp-src
++ dirname /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/tmp-src
+ mkdir -p /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0
+ cp -r /home/akash/project/accordo5/sources/u-boot /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/tmp-src
+ cd /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/tmp-src
+ make 'HOSTCC=gcc  -DMENDER_AUTO_PROBING' 'CC=arm-poky-linux-gnueabi-gcc  -march=armv7ve -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/recipe-sysroot -DMENDER_AUTO_PROBING' veethree-mmc-xloader_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
+ grep -q '^tools-all: *env\b' Makefile
+ grep -q '^tools-all: *envtools\b' Makefile
+ ENV_TARGET=envtools
+ '[' -z envtools ']'
+ bash -x /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/uboot_auto_patch.sh --patch-config-file
+ '[' -z --patch-config-file ']'
+ '[' --patch-config-file = -h ']'
+ '[' --patch-config-file = --help ']'
+ set -e
+ '[' --patch-config-file = --patch-config-file ']'
+ '[' 1 -gt 1 ']'
+ sed -i -e 's/^ *# *define *CONFIG_FILE\b.*/#define CONFIG_FILE "fw_env.config"/' tools/env/fw_env.h tools/env/fw_env_private.h
+ exit 0
+ make 'HOSTCC=gcc  -DMENDER_AUTO_PROBING' 'CC=gcc  -DMENDER_AUTO_PROBING' envtools
scripts/kconfig/conf  --syncconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  CFG     u-boot.cfg
In file included from include/config.h:5:0,
                 from ./include/common.h:17:
include/configs/hybrid.h:18:10: fatal error: sta_mem_map.h: No such file or directory
 #include "sta_mem_map.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.autoconf:77: recipe for target 'u-boot.cfg' failed
make[1]: *** [u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
WARNING: exit code 2 from a shell command.
ERROR: Function failed: do_mender_uboot_auto_configure (log file is located at /home/akash/project/accordo5/build-pokyst-veethree-evb-mmc-boot-m3os-from-m3xl-1g/tmp/work/veethree_evb_mmc_boot_m3os_from_m3xl_1g-poky-linux-gnueabi/u-boot/1_2019.01-r0/temp/log.do_mender_uboot_auto_configure.5406)

Is it possible to arrange 10 min in person conversation, so i can explain you better?

Thanks
Akash

@drewmoseley: edited formatting

hello,

Tese are my local.conf variables:

MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"

MENDER_FEATURES_ENABLE_append = " mender-uboot"
 
#Akash
# The name of the disk image and Artifact that will be built.
# This is what the device will report that it is running, and different updates must have different names
# because Mender will skip installation of an Artifact if it is already installed.
MENDER_ARTIFACT_NAME = "release-1"

# The version of Mender to build. This needs to match an existing recipe in the meta-mender repository.
#
# Given your Yocto Project version, see which versions of Mender you can currently build here:
# https://docs.mender.io/architecture/compatibility#mender-client-and-yocto-project-version
#
# Given a Mender client version, see the corresponding version of the mender-artifact utility:
# https://docs.mender.io/architecture/compatibility#mender-clientserver-and-artifact-format
#
# Note that by default this will select the latest released version of the tools.
# If you need an earlier version, please uncomment the following and set to the
# required version.
#
# PREFERRED_VERSION_pn-mender = "2.3.3"
# PREFERRED_VERSION_pn-mender-artifact = "3.4.2"
# PREFERRED_VERSION_pn-mender-artifact-native = "3.4.2"

ARTIFACTIMG_FSTYPE = "ext4"

# Build for hosted Mender
#
# To get your tenant token:
#    - log in to https://hosted.mender.io
#    - click your email at the top right and then "My organization"
#    - press the "COPY TO CLIPBOARD"
#    - assign content of clipboard to MENDER_TENANT_TOKEN
#
#MENDER_SERVER_URL = "https://hosted.mender.io"
#MENDER_TENANT_TOKEN = ""

# Build for Mender demo server
#
# https://docs.mender.io/getting-started/on-premise-installation/create-a-test-environment
#
# Uncomment below and update IP address to match the machine running the
# Mender demo server
#MENDER_DEMO_HOST_IP_ADDRESS = "192.168.0.100"

# Build for Mender production setup (on-prem)
#
# https://docs.mender.io/artifacts/building-for-production
#
# Uncomment below and update the URL to match your configured domain
# name and provide the path to the generated server.crt file.
#
# Note that a custom server.crt file is only necessary if you are using
# self-signed certificates.
#
# NOTE! It is recommend that you provide below information in your custom
# Yocto layer and this is only for demo purposes. See linked documentation
# for additional information.
#MENDER_SERVER_URL = "https://docker.mender.io"
#FILESEXTRAPATHS_prepend_pn-mender := "<DIRECTORY-CONTAINING-server.crt>:"
#SRC_URI_append_pn-mender = " file://server.crt"

Thanks
Akash

@drewmoseley: edited formatting

I don’t see anything obvious in your config that is incorrect. Of course now you are getting a different build error than you were previously so I guess that need to be root caused.

You may need to disable MENDER_UBOOT_AUTO_CONFIGURE and do a manual integration.