# Raspberry Pi 4 Model B - Yocto 4.0 "kirkstone" and earlier

**URL:** <https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889>\
**Category:** Yocto Project\
**Tags:** yocto, raspberry, warrior, raspberry-pi-4, zeus, dunfell, kirkstone\
**Created:** [August 6, 2019, 6:53pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889 "2019-08-06T18:53:21Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [May 3, 2021, 4:44pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/21 "2021-05-03T16:44:29Z")

</div>

OK. I suggest you get a console cable and post the output from the console logs. It’s pretty much shooting blindly without that information.

Drew

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [May 3, 2021, 5:10pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/22 "2021-05-03T17:10:24Z")

</div>

> [@drewmoseley](#):
>
> console cable

You mean something like a ADAFRUIT Industries 954 USB-to-TTL Serial Cable, Raspberry PI ? Ok, i’ll get one and see how to output what it says. Thx

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [May 3, 2021, 5:23pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/23 "2021-05-03T17:23:33Z")

</div>

Yes. Those are good devices to have for troubleshooting when working with the RpI platforms.

Drew

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [May 6, 2021, 10:09pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/24 "2021-05-06T22:09:12Z")

</div>

I get a blank screen on windows and mac. Side note is that I see that you changed the process and it seems broken in the sense that before when I switched branches it would re-build a lot of the recipes and re-create the image. I did a git pull and notice patches and linux-firmware update but when I did a bitbake image, it said nothing was needed to update and switching branches seemed to cause no changes in the image. I ran repo sync but that didn’t do anything.

Maybe related to the boot issue, I got this warning message:

`WARNING: u-boot-1_2020.01-r0 do_provide_mender_defines: Found more than one dtb specified in KERNEL_DEVICETREE ( bcm2708-rpi-zero-w.dtb bcm2708-rpi-b.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2711-rpi-4-b.dtb bcm2708-rpi-cm.dtb bcm2710-rpi-cm3.dtb overlays/at86rf233.dtbo overlays/disable-bt.dtbo overlays/dwc2.dtbo overlays/gpio-key.dtbo overlays/hifiberry-amp.dtbo overlays/hifiberry-dac.dtbo overlays/hifiberry-dacplus.dtbo overlays/hifiberry-digi.dtbo overlays/i2c-rtc.dtbo overlays/iqaudio-dac.dtbo overlays/iqaudio-dacplus.dtbo overlays/miniuart-bt.dtbo overlays/mcp2515-can0.dtbo overlays/mcp2515-can1.dtbo overlays/pitft22.dtbo overlays/pitft28-resistive.dtbo overlays/pitft28-capacitive.dtbo overlays/pitft35-resistive.dtbo overlays/pps-gpio.dtbo overlays/rpi-ft5406.dtbo overlays/rpi-poe.dtbo overlays/vc4-kms-v3d.dtbo overlays/vc4-fkms-v3d.dtbo overlays/w1-gpio-pullup.dtbo overlays/w1-gpio.dtbo overlays/gpio-ir.dtbo overlays/gpio-ir-tx.dtbo ). Only one should be specified. Choosing the last one: bcm2710-rpi-cm3.dtb. Set KERNEL_DEVICETREE to the desired dtb file to silence this warning.`

I will try setting the u-boot KERNEL\_DEVICETREE to bcm2711-rpi-4-b.dtb and seeing if it fixes anything.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [May 7, 2021, 5:49pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/25 "2021-05-07T17:49:22Z")

</div>

You should be getting UBoot output at the least. If not, then changing the device tree entry won’t make a difference as the issue is somewhere else.

I don’t follow your issue about the building of packages. Bitbake is pretty good about _not_ rebuilding things it doesn’t need to do, and that’s pretty much independent of Mender. I can’t comment in your specific case since I don’t know exactly what is done.

One question I have though, you mention both changing branches and running repo sync. I’m wondering if you have a mismatch of branches? I’ve never tried changing branches within a repo checkout. I normally just keep a directory for each branch that I want to work with to avoid any chance of that.

Can you start fresh and record all the steps you are taking so I can try and replicate your issue?

Drew

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [May 8, 2021, 8:49pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/26 "2021-05-08T20:49:11Z")

</div>

So, I started a new build using the normal yocto build process and I was able to get the Warrior branch to bootup, which is better than nothing. I tried both the master branch and and dunfell branch but the board is still not booting up on the raspberry pi 4. I tried the build on the raspberry pi 3 and it seemed to work, so the issue seems isolated to raspberry pi 4. Not sure if the version of raspberry pi 4 hardware matters, but it’s the original hardware and no the updated version.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [May 9, 2021, 6:56pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/27 "2021-05-09T18:56:31Z")

</div>

Thanks for the details. @lluiscampos do you have any thoughts on this?

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 11, 2021, 1:06pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/28 "2021-05-11T13:06:26Z")

</div>

Sorry @ikkysleepy but I don’t know what the issue might be neither. Tomorrow I am going to the office so I’ll give it a try with a freshly build image, but at this point is really hard to guess what can be wrong with your setup (if anything is wrong).

---

<div class="post-metadata">

**Author:** ![mikeb](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mikeb](https://hub.mender.io/u/mikeb)\
**Post date:** [May 12, 2021, 1:57pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/29 "2021-05-12T13:57:57Z")

</div>

@lluiscampos It looks like I’m hitting a similar problem to the one @ikkysleepy described.To my knowledge, I followed the procedure on this page, specifying BRANCH as ‘dunfell’. I’m using a Raspberry PI 4b with 8 GB of RAM. I verified I can flash a Raspbian OS image, and that boots, with serial output, so I believe there’s an issue with this Mender Yocto image that I’ve built.

I’m following up see if you were able to reproduce the problem on your end?

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 12, 2021, 2:01pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/30 "2021-05-12T14:01:29Z")

</div>

@mikeb @ikkysleepy Actually, I have been able to reproduce it today in the office and I am investigating further as we speak… Thanks for reporting! I’ll keep you posted.

---

<div class="post-metadata">

**Author:** ![mikeb](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mikeb](https://hub.mender.io/u/mikeb)\
**Post date:** [May 12, 2021, 2:04pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/31 "2021-05-12T14:04:25Z")

</div>

@lluiscampos Thank you. Out of curiosity, does your raspberry pi 4b have 8 GB of RAM? I know that the Raspbian based bootloader required an update to handle the newer model with more memory. But if yours has less, then of course, that would suggest this is a different issue.

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 12, 2021, 4:24pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/32 "2021-05-12T16:24:54Z")

</div>

Hi again,

Just as a heads-up: I was not able to figure it out today and I will be offline for 5 days now. I hope to have time to look into this more next week.

---

<div class="post-metadata">

**Author:** ![mikeb](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mikeb](https://hub.mender.io/u/mikeb)\
**Post date:** [May 12, 2021, 4:25pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/33 "2021-05-12T16:25:55Z")

</div>

@lluiscampos Thank you for the update. FWIW, I just built a stock raspberry pi 4 image with dunfell, following this procedure:

> **[Build your own Linux Image for the Raspberry Pi](https://medium.com/nerd-for-tech/build-your-own-linux-image-for-the-raspberry-pi-f61adb799652)**
>
> Ever wanted to say, that you’ve built your own Linux? After this article, you’ll be able to say so and have your own Image for your Pi.

This came right up on my board. So just as a datapoint, I think the mender specific layer may have something stale, or perhaps a regression.

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 18, 2021, 12:09pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/34 "2021-05-18T12:09:08Z")

</div>

@mikeb @ikkysleepy Hi again. Sorry I have been offline for few days.

So after some closer debugging, the problem was quite obvious after all: we are missing setting `ENABLE_UART` in `local.conf`.

See layer documentation here: [meta-raspberrypi/extra-build-config.md at master · agherzan/meta-raspberrypi · GitHub](https://github.com/agherzan/meta-raspberrypi/blob/master/docs/extra-build-config.md#enable-uart)

I did submit a PR to `meta-mender-community` adding such setting (see [here](https://github.com/mendersoftware/meta-mender-community/pull/229)), but you should be able to see the serial output by just adding to your `local.conf` the following:

```auto
ENABLE_UART = "1"

```

Why this works in warrior is a mystery to me…

---

<div class="post-metadata">

**Author:** ![mikeb](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@mikeb](https://hub.mender.io/u/mikeb)\
**Post date:** [May 21, 2021, 4:50pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/35 "2021-05-21T16:50:37Z")

</div>

@lluiscampos Thank you for following up! I’m curious, does this imply that this BSP is expected to not output on HDMI, and only on the UART? For ex. the stock raspberry pi 4 yocto BSP I built outputted to HDMI by default.

---

<div class="post-metadata">

**Author:** ![lluiscampos](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lluiscampos/32/112_2.png) [@lluiscampos](https://hub.mender.io/u/lluiscampos)\
**Post date:** [May 25, 2021, 9:36am UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/36 "2021-05-25T09:36:04Z")

</div>

@mikeb I am not sure, to be honest. This is a detail that I couldn’t figure out the reason for.

---

<div class="post-metadata">

**Author:** ![koolkhel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/koolkhel/32/1216_2.png) [@koolkhel](https://hub.mender.io/u/koolkhel)\
**Post date:** [June 2, 2021, 11:20am UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/38 "2021-06-02T11:20:19Z")

</div>

My final step to make the image bootable was to set KERNEL\_IMAGETYPE to “uImage” as U-Boot scripts get confused if it’s anything else.

---

<div class="post-metadata">

**Author:** ![EasyIP2023](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/easyip2023/32/1038_2.png) [@EasyIP2023](https://hub.mender.io/u/EasyIP2023)\
**Post date:** [September 15, 2021, 10:54pm UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/39 "2021-09-15T22:54:45Z")

</div>

I’m also having u-boot issues on the pi 4. Not sure if the meta-raspberrypi layer is using this branch of u-boot or ( [GitHub - agherzan/u-boot at ag/rpi4](https://github.com/agherzan/u-boot/tree/ag/rpi4)) or upstream u-boot which doesn’t seem to have much support. There’s a issue tag open in the meta-raspberrypi layer [Rpi 4 doesn't boot with u-boot when enable\_uart=0 in config.txt · Issue #732 · agherzan/meta-raspberrypi · GitHub](https://github.com/agherzan/meta-raspberrypi/issues/732) around why u-boot isn’t loading. Added comment here [Rpi 4 doesn't boot with u-boot when enable\_uart=0 in config.txt · Issue #732 · agherzan/meta-raspberrypi · GitHub](https://github.com/agherzan/meta-raspberrypi/issues/732#issuecomment-920440125). Whenever I try to get u-boot going on the raspberrypi 4 I run into bellow

```auto
DRAM: 3.9 GiB
RPI 4 Model B (0xc03112)
mbox: Timeout waiting for response
bcm2835: Could not set module 3 power state
initcall sequence 000000003b3d28f8 failed at call 0000000000084344 (err=-5)
### ERROR ### Please RESET the board ###

```

Is anyone else seeing similar issues? Or already working on a solution to solve it?

**Update:** Nevermind upstream support for the raspberrypi 4 in u-boot does exists. Looks like my issue is here [arch/arm/mach-bcm283x/msg.c · master · U-Boot / U-Boot · GitLab](https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-bcm283x/msg.c#L50). Not sure why `bcm2835_mbox_call_prop` fails to set power state.

If you change the if statement which I don’t recommend. You can get as far as

```auto
U-Boot 2021.10-rc4-00005-g66448edb24-dirty (Sep 16 2021 - 12:42:29 -0500)

DRAM: 3.9 GiB
RPI 4 Model B (0xc03112)
mbox: Timeout waiting for response
MMC: mbox: Timeout waiting for response
mbox: Timeout waiting for response
bcm2835: Could not query eMMC clock rate
mbox: Timeout waiting for response
mbox: Timeout waiting for response
bcm2835: Could not query eMMC clock rate
mbox: Timeout waiting for response
mbox: Timeout waiting for response
bcm2835: Could not query eMMC clock rate
mmcnr@7e300000 - probe failed: -5
mbox: Timeout waiting for response
mbox: Timeout waiting for response
bcm2835: Could not query eMMC clock rate
emmc2@7e340000 - probe failed: -5
mbox: Timeout waiting for send space
mbox: Timeout waiting for send space
bcm2835: Could not query eMMC clock rate

Loading Environment from FAT... mbox: Timeout waiting for send space
mbox: Timeout waiting for send space
bcm2835: Could not query eMMC clock rate
In: serial
Out: serial
Err: serial
mbox: Timeout waiting for send space
bcm2835: Could not query MAC address
mbox: Timeout waiting for send space
bcm2835: Could not query board serial
Net: eth0: ethernet@7d580000
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0 
U-Boot> ls
ls - list files in a directory (default /)

Usage:
ls <interface> [<dev[:part]> [directory]]
    - List files in directory 'directory' of partition 'part' on
      device type 'interface' instance 'dev'.
U-Boot> 

```

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [October 9, 2021, 4:18am UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/40 "2021-10-09T04:18:00Z")

</div>

Not sure if this is related but now I am getting this error

```auto
ERROR: u-boot-1_2020.01-r0 do_configure: U-Boot configuration rpi_4_32b_config has setting:
CONFIG_ENV_OFFSET=0x800000
CONFIG_ENV_OFFSET_REDUND=0x1000000
but Mender expects:
CONFIG_ENV_OFFSET=0x400000
Please fix U-Boot's configuration file.

```

I see that this was maybe fixed here: [meta-mender/0001-configs-rpi-enable-mender-requirements.patch at master · mendersoftware/meta-mender · GitHub](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-raspberrypi/recipes-bsp/u-boot/patches/0001-configs-rpi-enable-mender-requirements.patch) but doesn’t seem like it’s working now.

This is related to having used too much storage I think:

```auto
ERROR: Actual rootfs size (28618 kB) is larger than allowed size 16384 kB

```

Update: this fixed the issue:

```auto
MENDER_STORAGE_TOTAL_SIZE_MB = "2824"
MENDER_BOOT_PART_SIZE_MB = "32"
CONFIG_ENV_OFFSET = "0x800000"
CONFIG_ENV_OFFSET_REDUND = "0x100000"

```

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [October 13, 2021, 8:28am UTC](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889/41 "2021-10-13T08:28:59Z")

</div>

Note that you don’t need to set those two `CONFIG_ENV` variables in `local.conf`, and in fact it’s better not to. They are tied to the patch contents, and therefore should be set by the meta-mender layer (it’s why the error happened in the first place).

[Previous page](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889.md?page=1)

[Next page](https://hub.mender.io/t/raspberry-pi-4-model-b-yocto-4-0-kirkstone-and-earlier/889.md?page=3)
