Monitor Boot Process Via UART of CM4

What is required to monitor the boot process of a CM4 over the UART on pins 14 and 15 of a development image? I have added enable_uart=1 to the config.txt but I’m not seeing any Information except a login prompt.

It seems like BalenaOS 2.94.4+rev1 doesn’t show U-Boot details just the prompt. How can I enable U-Boot details to print to the serial UART console on boot?

Thanks,

Hi there,

Unfortunately, images from OS version 2.85 + you won’t be able to get the boot logs over serial without building a custom image.

In OS version 2.85, we unified production and development images into a single image that can be toggled between the 2 modes. For the old development image, we patched uboot to output logs over serial, however now we have a unified dev/prod image, we no longer do this.

If you still want to get the logs over serial on boot, (this may be useful if you are doing some form of OS or BSP development), you can build a custom image with the OS_DEVELOPMENTvariable set, as described here: meta-balena/README.md at master · balena-os/meta-balena · GitHub

Otherwise, you can retrieve the boot logs from the device after its booted, by SSH’ing into the host OS and using journalctl utility.

Hopefully this helps, if you need further information please let me know!

@rcooke-warwick

Thank you for the info that’s very helpful. I did follow some of the GitHub posts that discussed unifying the production and development images and I had a hunch that this was the reason for the lack of boot details.

The reason I was looking for these details was to try and troubleshoot this issue which I discovered last week. In your opinion what’s the best way to troubleshoot the linked issue? Should I rebuild BalenaOS with OS_DEVELOPMENT variable set?

Thanks,

I would suggest that yes, and please let us know your findings. I will also forward this issue to our devices team to see if there is a known issue, or to see if anyone on our side can reproduce. They might also be able to provide us with more troubleshooting steps

Hi, just following up on this. Were you able to build an OS_DEVELOPMENT enabled image to help you in your development?

Hi @alexgg no, I didn’t end building a OS_DEVELOPMENT image. It turned out my original issue was due to the RPI boot loader and NVMe detection.