# Unable to successfully boot Raspberry Pi 4 Yocto with Mender

**URL:** <https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-4\
**Created:** [November 4, 2021, 4:15pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281 "2021-11-04T16:15:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:15pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/1 "2021-11-04T16:15:45Z")

</div>

Hello,

I have followed the below guide to generate an Image using Yocto for the Raspberry Pi 4. After a couple of hours, the compilation finished with success. My host OS is Ubuntu 20.04.

> [@Raspberry Pi 4 Model B - Yocto 4.0 "kirkstone" and earlier](https://hub.mender.io/t/raspberry-pi-4-model-b/889):
>
> Board description The Raspberry Pi 4 Model B is the probably most popular board of the Raspberry Pi family. URL: [https://www.raspberrypi.org/products/raspberry-pi-4-model-b/](https://www.raspberrypi.org/products/raspberry-pi-4-model-b/) Wiki: [https://elinux.org/RPi\_Hub](https://elinux.org/RPi_Hub?target=_blank)Test results Raspberry Pi 4 is one of the official reference devices of Mender and is easy to get started with. This device is continuously tested as part of Mender testing pipelines which assures high quality of the integrati…

The branch was selected as “dunfell” with recipe as “core-image-base”

Below is my **local.conf** file for reference:

```sh
DISTRO ?= "poky"

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES ?= "debug-tweaks"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"

PACKAGECONFIG_append_pn-qemu-system-native = " sdl"

CONF_VERSION = "1"

INHERIT += "rm_work"

MENDER_ARTIFACT_NAME = "release-1"

INHERIT += "mender-full"

DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

MACHINE ?= "raspberrypi4"

RPI_USE_U_BOOT = "1"

MENDER_STORAGE_TOTAL_SIZE_MB = "1024"
MENDER_BOOT_PART_SIZE_MB = "40"
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"

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

KERNEL_DEVICETREE = "bcm2711-rpi-4-b.dtb"

ENABLE_UART = "1"

```

After burning the **.sdimg** to an SD card, I have inserted the SD card to the Raspberry Pi 4, connected the board to the PC via USB-serial cable and turned on the board.

Below is my log from serial for reference:

> **[Microsoft OneDrive](https://onedrive.live.com/?id=6D9FAA4A08B266E6%21211314&resid=6D9FAA4A08B266E6%21211314&e=iM3xQe&migratedtospo=true&redeem=aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBdVptc2doS3FwOXRqUEp5dWNEbVg3LUk2MHZweEE_ZT1pTTN4UWU&cid=6d9faa4a08b266e6)**

It boots all the way until “raspberrypi4 login:” and then shows loading some bluetooth drivers and at the end it gets stuck.

What’s more interesting is that, when I plug and unplug Ethernet, output shows like this:

```sh
Poky (Yocto Project Reference Distro) 3.0.4 raspberrypi4 ttyS0                  
                                                                                
raspberrypi4 login: [13.279168] Bluetooth: HCI UART driver ver 2.3           
[13.283732] Bluetooth: HCI UART protocol H4 registered                       
[13.289076] Bluetooth: HCI UART protocol Three-wire (H5) registered          
[13.297796] Bluetooth: HCI UART protocol Broadcom registered                 
[13.454604] Bluetooth: BNEP (Ethernet Emulation) ver 1.3                     
[13.460011] Bluetooth: BNEP filters: protocol multicast                      
[13.465394] Bluetooth: BNEP socket layer initialized                         
[13.492085] Bluetooth: RFCOMM TTY layer initialized                          
[13.497054] Bluetooth: RFCOMM socket layer initialized                       
[13.502479] Bluetooth: RFCOMM ver 1.11                                       
[910.482314] bcmgenet fd580000.genet eth0: Link is Down                       
[925.042407] bcmgenet fd580000.genet eth0: Link is Up - 1Gbps/Full - flow conx

```

So, it seems that it’s not stuck at loading Bluetooth.

I would really appreciate if anyone could help me in this issue.

Best Regards,  
Lakshantha

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 4, 2021, 4:34pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/2 "2021-11-04T16:34:49Z")

</div>

data written to stdout past the login screen is not unusual over serial. when you say stuck, do you mean its not responding to keyboard input over the serial connection?

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:35pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/3 "2021-11-04T16:35:28Z")

</div>

Thanks for the response.

I mean, I cannot login.

When I press ENTER, there is no response.

In normal scenario of a boot process, it should stop at login so that I can enter username. But it’s not the case here.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 4, 2021, 4:39pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/4 "2021-11-04T16:39:19Z")

</div>

from your log it looks like you into userspace with userspace services starting up.  
so i would first check your serial config settings in your terminal emulator to ensure they are correct for two-way comms.

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:40pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/5 "2021-11-04T16:40:11Z")

</div>

I am using minicom.

sudo minicom -D /dev/ttyUSB0 -b 115200

This is how I access.

This is how I normally access my RPi OS over serial and it has responded to keyboard inputs in the same configuration before.

Do I need to create a user in local.conf ?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 4, 2021, 4:45pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/6 "2021-11-04T16:45:46Z")

</div>

hmmm, not sure then. can you see it on the network, ping it etc

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:48pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/7 "2021-11-04T16:48:33Z")

</div>

Now I have Disabled “Hardware Flow Control” in minicom setup and when I press ENTER, it shows login and I can finally login now!

It’s weird. For RPi OS I dont need to do this

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 4, 2021, 4:51pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/8 "2021-11-04T16:51:07Z")

</div>

great. prob because you need to match how its configured on the back-end, and its configured differently depending on how the image is built

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:51pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/9 "2021-11-04T16:51:34Z")

</div>

You mean match with Mender config side?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 4, 2021, 4:52pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/10 "2021-11-04T16:52:35Z")

</div>

no, with the yocto build settings, there will be a machine config in your yocto build somewhere with the settings

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 4, 2021, 4:52pm UTC](https://hub.mender.io/t/unable-to-successfully-boot-raspberry-pi-4-yocto-with-mender/4281/11 "2021-11-04T16:52:47Z")

</div>

Oh I see. Got you.

Thank you very much for the guidance again. Really appreciate it!

You have been very helpful yesterday also with my X86 local Mender Server issue.

Now finally I can test local OTA updates from the X86 Mender Server to the RPi4 client!

Best Regards,  
Lakshantha
