# RaspberryPi CM4 not booting with PCIe device (VL805)

**URL:** <https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002>\
**Category:** Product support\
**Created:** [May 24, 2023, 10:07am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002 "2023-05-24T10:07:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![NiBr](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@NiBr](https://forums.balena.io/u/NiBr)\
**Post date:** [May 24, 2023, 10:07am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/1 "2023-05-24T10:07:49Z")

</div>

Hi,

I’m currently evaluating balena as a solution for fleet management of our industrial IoT devices. I was able to run our software in a container on the CM4 + IO board. Moving the same CM4 to our custom board caused the CM4 to not boot (activity led is on constantly but no signal on HDMI). Our design is really close to the official IO board in terms of the I/O and peripheral layout except that it includes a VL805 PCIe to 4x USB3 chip onboard.  
Plugging a PCIe to USB card with the VL805 chip into the PCIe slot of the official IO board also causes the CM4 to not boot.  
Does someone have an idea why connecting the VL805, that is also used on RaspberryPi 4B and that works fine with RaspberryPiOS, causes balenaOS to fail to boot? I’ve tried to get some output from the serial interface, but was unsuccessful to read anything except for some new-line characters.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [May 24, 2023, 11:07am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/2 "2023-05-24T11:07:12Z")

</div>

Hello @NiBr welcome to the balena community!

It looks like your board is not completely compatible with the CM4 device type balenaOS. I will ping the balena devices team to see how we can help you more.

In the meantime, please let us know what are you testing. Thanks

---

<div class="post-metadata">

**Author:** ![NiBr](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@NiBr](https://forums.balena.io/u/NiBr)\
**Post date:** [May 24, 2023, 11:28am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/4 "2023-05-24T11:28:37Z")

</div>

Hi @mpous, thanks for the reply.  
even if we let our custom board aside, the CM4 flashed with the image from the dashboard for my “RaspberryPi CM4 IO Board”-fleet will not boot even on the standard IO board, as soon as I plug in the PCIe VL805 card. The same card works fine with standard RaspberryPiOS and the same chipset is also used on the RaspberryPi 4B.  
What kind of additional information can I provide? I was trying to provision my test device with balena and setting up our custom application to be run on my test fleet (currently consisting of a single device).

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [May 24, 2023, 11:39am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/5 "2023-05-24T11:39:51Z")

</div>

What Raspberry Pi OS version are you using @NiBr ?

---

<div class="post-metadata">

**Author:** ![NiBr](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@NiBr](https://forums.balena.io/u/NiBr)\
**Post date:** [May 24, 2023, 11:42am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/6 "2023-05-24T11:42:04Z")

</div>

We are currently using RaspberryPiOS lite ARM64 from 2022-04-04, though 32bit was working fine as well.

---

<div class="post-metadata">

**Author:** ![rosswesleyporter](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rosswesleyporter](https://forums.balena.io/u/rosswesleyporter)\
**Post date:** [May 25, 2023, 9:09pm UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/8 "2023-05-25T21:09:54Z")

</div>

Hello @NiBr,

Have you tried with NVMe before eMMC in BOOT\_ORDER? The short story is that there are some complexities with PCIe initialization, and putting NVMe before your eMMC forces PCIe initialization. This might resolve your issue. Your device will still boot from eMMC.

A few related threads:

- [Kernel panic when booting with BOOT\_ORDER=0xf25641 , using u-boot and having a NVME drive on PCIe](https://github.com/raspberrypi/firmware/issues/1800)
- [BalenaOS 2.94.4 on RPI CM4 does not boot when NVMe drive is plugged in the PCIe slot](https://forums.balena.io/t/balenaos-2-94-4-on-rpi-cm4-does-not-boot-when-nvme-drive-is-plugged-in-the-pcie-slot/366738)

If you haven’t set BOOT\_ORDER before on a CM4, there are instructions online e.g.

- [How to update CM4 EEPROM](https://wiki.seeedstudio.com/Raspberry_pi_CM4_update_eeprom/#how-to-update-cm4-eeprom).
- [CM4 NVMe boot using Windows](https://notenoughtech.com/raspberry-pi/it-took-me-2-months-to-boot-cm4-from-nvme/#windows)

The above links are the best source of instructions. But in case it helps, here are the steps that I use on my Mac. I haven’t done this in a while, so the steps may be somewhat out of date:

1. Build rpiboot on Mac to update the bootloader in eeprom on the CM4

- `git clone --depth=1 https://github.com/raspberrypi/usbboot`
- `cd usbboot`
- Check BOOT\_ORDER in `recovery/boot.conf`, edit as needed  
`BOOT_UART=1`  
`# First try NVMe(6), then SD/eMMC(1), USB PCIe(4), USB SoC XHC(5), net(2)`  
`BOOT_ORDER=0xf25416`
- `cd recovery`
- `./update-pieeprom.sh`
- `cd ..`
- `make`

1. Power off Pi

2. Fit jumper on CM4 IO Board J2 to disable eMMC boot

3. Connect micro-USB cable to CM4 IO Board

4. Update eeprom  
\*Run rpiboot on the host, wait for a connection:  
`./rpiboot`

- Power the CM4 - your Mac should see the CM4
- Flash the new bootloader information to the Pi (you may need to power off and power on your Pi):  
`sudo ./rpiboot -d recovery`

You should get output such as:

```auto
RPIBOOT: build-date Feb 26 2022 version 20220208~181027 042cd145
Loading: recovery/bootcode4.bin
Waiting for BCM2835/6/7/2711…
Loading: recovery/bootcode4.bin
Sending bootcode.bin
Successful read 4 bytes 
Waiting for BCM2835/6/7/2711…
Loading: recovery/bootcode4.bin
Second stage boot server
Loading: recovery/config.txt
File read: config.txt
Loading: recovery/pieeprom.bin
Loading: recovery/pieeprom.bin
Loading: recovery/pieeprom.sig
File read: pieeprom.sig
Loading: recovery/pieeprom.bin
File read: pieeprom.bin
Unknown message

```

1. Remove the jumper

2. Power off Pi

---

<div class="post-metadata">

**Author:** ![rosswesleyporter](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rosswesleyporter](https://forums.balena.io/u/rosswesleyporter)\
**Post date:** [May 25, 2023, 9:13pm UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/9 "2023-05-25T21:13:27Z")

</div>

If you do try this, please let us know how it goes.

---

<div class="post-metadata">

**Author:** ![NiBr](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@NiBr](https://forums.balena.io/u/NiBr)\
**Post date:** [May 26, 2023, 10:43am UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/11 "2023-05-26T10:43:07Z")

</div>

Hi @rosswesleyporter,

thanks for the detailed reply. I’ve got the CM4 to boot using `BOOT_ORDER=0xf25416`.

Best regards!

---

<div class="post-metadata">

**Author:** ![rosswesleyporter](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rosswesleyporter](https://forums.balena.io/u/rosswesleyporter)\
**Post date:** [May 26, 2023, 6:53pm UTC](https://forums.balena.io/t/raspberrypi-cm4-not-booting-with-pcie-device-vl805/368002/13 "2023-05-26T18:53:44Z")

</div>

Hello @NiBr,

Thanks for letting us know that it worked for you.
