# U-Boot error - Did not find a dtb specified in KERNEL\_DEVICETREE

**URL:** <https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053>\
**Category:** General Discussions\
**Created:** [June 16, 2020, 4:31pm UTC](https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053 "2020-06-16T16:31:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [June 16, 2020, 4:31pm UTC](https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053/1 "2020-06-16T16:31:23Z")

</div>

Hi,  
I’m trying to integrate mender into our U-Boot but can’t work out how to get around the following error:

```
ERROR: u-boot-1_2019.07-r0 do_provide_mender_defines: Did not find a dtb specified in KERNEL_DEVICETREE
ERROR: u-boot-1_2019.07-r0 do_provide_mender_defines: Execution of '/ws/rufilla/octopus/yocto/build-release/tmp/work/octopuck_mt7688an-poky-linux/u-boot/1_2019.07-r0/temp/run.do_provide_mender_defines.20022' failed

```

I’ve set  
`MENDER_UBOOT_AUTO_CONFIGURE = "0"`  
in my U-Boot bbappend

the kernel recipe does have KERNEL\_DEVICETREE actually set so I’m not sure why it’s now working. If I run

`bitbake virtual/bootloader -e | grep KERNEL_DEVICETREE`  
I get nothing so I’m guessing that the U-Boot recipe can’t see this variable.

I’m using the zeus-next branch.

Thanks in advance,  
Martin.

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [June 16, 2020, 7:11pm UTC](https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053/2 "2020-06-16T19:11:50Z")

</div>

I set KERNEL\_DEVICETREE in my machine configuration file and U-Boot now builds.

Not entirely sure where this variable should exist the manual says

> The `meta/recipes-kernel/linux/linux-dtb.inc` file has been removed. This file was previously deprecated in favor of setting [`KERNEL_DEVICETREE`](https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-KERNEL_DEVICETREE) in any kernel recipe and only produced a warning. Remove any `include` or `require` statements pointing to this file.

Which kind of infers the recipe but in the recipe you end up using

KERNEL\_DEVICETREE\_machine = “xxx”

so it also makes sense to put it in the machine configuration file.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [June 16, 2020, 7:29pm UTC](https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053/3 "2020-06-16T19:29:45Z")

</div>

Glad you where able to solve this.

Please note that there is proper [zeus](https://github.com/mendersoftware/meta-mender/tree/zeus) branch now.

> Which kind of infers the recipe but in the recipe you end up using  
> KERNEL\_DEVICETREE\_machine = “xxx”  
> so it also makes sense to put it in the machine configuration file.

Yeah, hard to interpret the manual. Based on experience it seems to be more common to have it in the machine configuration and looking in `poky` sources there is a mix and the `beaglebone-yocto.conf` has this entry in the machine configuration as well.

[https://www.yoctoproject.org/docs/3.0/bsp-guide/bsp-guide.html#bsp-machine-configuration-example](https://www.yoctoproject.org/docs/3.0/bsp-guide/bsp-guide.html#bsp-machine-configuration-example)

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://hub.mender.io/u/martin)\
**Post date:** [June 16, 2020, 8:16pm UTC](https://hub.mender.io/t/u-boot-error-did-not-find-a-dtb-specified-in-kernel-devicetree/2053/4 "2020-06-16T20:16:59Z")

</div>

I’ll switch to the zeus branch 🙂

KERNEL\_DEVICETREE feels like it logically belongs in the machine configuration as it’s particular to that machine so I’m happy to keep it there.
