# Raspberry pi4 with custom hat

**URL:** <https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533>\
**Category:** Debian family\
**Tags:** raspberry-pi-4\
**Created:** [February 8, 2025, 8:54pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533 "2025-02-08T20:54:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davrex](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davrex/32/2412_2.png) [@davrex](https://hub.mender.io/u/davrex)\
**Post date:** [February 8, 2025, 8:54pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/1 "2025-02-08T20:54:28Z")

</div>

I need some help understanding how to get mender to work with a raspberry pi 4 and a hat that uses uart, which I guess is the problem. I get everything to work with mender-converter as long as I don’t have my card plugged in, if it is plugged in I just get a black screen and it doesn’t seem to load anything. If I unplug it it boots up as it should. And after some troubleshooting I interpret it as something with the fact that I have a chip that is connected to uart on BCM pin 14/15 that might be causing it and that you have to do something extra with u-boot. However, I can’t find anything that says what to do and how. Does anyone have any description of what to do or have an idea?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [February 11, 2025, 11:40am UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/2 "2025-02-11T11:40:35Z")

</div>

Hi @davrex,

Some time ago I also had a similar situation. In the specific case, patching `u-boot` to be “silent” helped. The reasoning is that if such a hat generates some input or spurious character on the UART, `u-boot` will stop booting and wait forever. During my testing, I used this state of `u-boot`: [GitHub - TheYoctoJester/uboot-mender at mender-rpi-2024.04-silent](https://github.com/TheYoctoJester/uboot-mender/tree/mender-rpi-2024.04-silent). Unfortunately I’m not certain if it is fit for general usage, or if the silencing patch might have any unintended side effects. As custom binaries can be injected through the `assets` directory, do you feel comfortable with giving it a spin or do you need additional details?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![davrex](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davrex/32/2412_2.png) [@davrex](https://hub.mender.io/u/davrex)\
**Post date:** [February 11, 2025, 12:04pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/3 "2025-02-11T12:04:18Z")

</div>

Hi, if you have some extra details it won’t hurt. As I not that expreined in thus types of Linux customizations

---

<div class="post-metadata">

**Author:** ![davrex](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davrex/32/2412_2.png) [@davrex](https://hub.mender.io/u/davrex)\
**Post date:** [February 11, 2025, 4:40pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/4 "2025-02-11T16:40:47Z")

</div>

Hi, this is what i have tried.

```auto
make CROSS_COMPILE=aarch64-linux-gnu- rpi_4_defconfig
make CROSS_COMPILE=aarch64-linux-gnu-

```

copied the u-boot.bin to kernal7l.img on the boot disk.

Is there anything more i need to do?

---

<div class="post-metadata">

**Author:** ![davrex](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davrex/32/2412_2.png) [@davrex](https://hub.mender.io/u/davrex)\
**Post date:** [February 16, 2025, 7:10pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/5 "2025-02-16T19:10:30Z")

</div>

Idid realise that i should hav uses arm-linux-gnueabihf- insteed now i get some text on the screen atleast that say

```auto
Hit any key to stop autoboot: 0
U-Boot> th0: etoBot h:eoBot h:eoBot h:eoBot h:eoBot h:eoBot h:eoBot h:eoBot .... and aolot more the same

```

Anybody have a clue that this means ?

---

<div class="post-metadata">

**Author:** ![davrex](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/davrex/32/2412_2.png) [@davrex](https://hub.mender.io/u/davrex)\
**Post date:** [February 17, 2025, 6:51pm UTC](https://hub.mender.io/t/raspberry-pi4-with-custom-hat/7533/6 "2025-02-17T18:51:50Z")

</div>

Problem is that i dont understand how to build U-boot it seams as when i boot whiout uart conneced and run sudo fw\_printenv bootdelay is return =2 and when i set sudo fw\_setenv bootdelay – -2 then i can boot.

What i did was add your config to configs/rpi\_4\_32b\_defconfig (CONFIG\_BOOTDELAY=-2 and more)  
make rpi\_4\_32b\_defconfig  
make  
with crosscompiler arm-linux-gnueabihf- but why doesent bootdelay be come -2
