Building U-Boot 2014.10 in Poky Thud 2.6 do_compile failing tools/mkimage #uboot #yocto

Jeff Schuler


I've recently started porting my recipes from Poky Jethro 2.0 to Poky Thud 2.6, and am having an issue building U-Boot. I've read through each stage of the migration guide and made several changes, but can't seem to figure this one out. 

do_compile is failing target tools, something to do with dtc-native is my theory. Command I'm running: bitbake -fc compile virtual/bootloader

Here's a snippet of the failure:

| In file included from /home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git/tools/fdt_host.h:11:0,
|                  from /home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git/tools/mkimage.h:22,
|                  from /home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git/tools/mkimage.c:11:
| /home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git/tools/../include/libfdt.h:1442:19: note: previous definition of 'fdt_appendprop_cell' was here
|  static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
|                    ^~~~~~~~~~~~~~~~~~~
| scripts/ recipe for target 'tools/mkimage.o' failed
| make[2]: *** [tools/mkimage.o] Error 1
| /home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git/Makefile:1038: recipe for target 'tools' failed
| make[1]: *** [tools] Error 2
| Makefile:134: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/jschuler/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board_sensor_chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0/git'
| ERROR: oe_runmake failed
Does anyone know what the problem may be here? Please let me know if I should include complete recipes or logs, happy to do so!

U-Boot recipe:  recipes-bsp/u-boot/

SRC_URI = " \
    git://;tag=rel_socfpga_v2014.10_arria10_bringup_20.07.02_pr;nobranch=1 \
SRC_URI_append_board-sensor-chevy = " \
      file://board-sensor-chevy/0001-chevy-sensor-support-files-2021.patch \
      file://board-sensor-chevy/0002-Add-environment-overrride-for-F2H-SDRAM2-bridge-init.patch \
S = "${WORKDIR}/git"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=c7383a594871c03da76b3707929d2919"
COMPATIBLE_MACHINE = "(board-sensor-chevy)"
The .inc file that recipe includes has this in it:

# Leverage Yocto's existing U-Boot support
require recipes-bsp/u-boot/
# Apply patches with Git to make it easier to make updates from within a
# devshell and bring them back into this recipe as properly-formatted patches
DEPENDS += "dtc-native"
PROVIDES += "u-boot"
COMPATIBLE_MACHINE ?= "(board-sensor-chevy)"
Plus a couple do_compile_append() and do_deploy_append() operations.

Here is a snippet from the meta that the recipe is leveraging via include:

SUMMARY = "Universal Boot Loader for embedded devices"
PROVIDES = "virtual/bootloader"
B = "${WORKDIR}/build"
inherit uboot-config uboot-extlinux-config uboot-sign deploy
DEPENDS += "swig-native python-native"

Build info:

Poky Thud Commit: e52122a3e6912575ff401a4af6ac1bf3070092bc
Target OS: 32b ARM Arria 10 SoC
Build Host OS: Ubuntu 18.04.4 x86

Build Host OS python versions present:
jschuler@kuro2:~/yocto/poky-thud-2.6$ python --version
Python 2.7.17
jschuler@kuro2:~/yocto/poky-thud-2.6$ python3 --version
Python 3.6.9
jschuler@kuro2:~/yocto/poky-thud-2.6$ python3.8 --version
Python 3.8.0
I've tried every combination of messing with the DEPENDS += values and feel like this has something to do with dtc-native?

xxxxxx:~/yocto/poky-thud-2.6/builds/board-sensor-chevy/tmp/work/board-sensor-chevy-poky-linux-gnueabi/u-boot-custom-socfpga/2014.10.20-r0$ l
board-sensor-chevy/  build/  configure.sstate  git/  recipe-sysroot/  recipe-sysroot-native/  temp/
The two directories shown above recipe-sysroot and recipe-sysroot-native seem to be present in this build's workdir but were not present when I was building this in Jethro, so perhaps there's something there. 

Does anyone know what might be causing my bitbake tools to be referencing two different fdt tool header files?

Thank you very much for your thoughts.