Hi all! I’ve seen a few posts on this topic, but none of them provided quite what I want, so here’s a new post.
Background: I have a device connected to the Pi4’s UART pins (14, 15). When the Pi boots, uBoot messages/Linux login console show up on the UART bus. This floods the UART buffer in my connected device and locks it up. I’m using a development image of BalenaOS, and I need a fix to work on development and production images.
I need a way to completely disable any boot messages on the UART at pins 14/15 port OR I need to move the boot/console to a different UART port, but I still need access to that UART (pins 14/15) from my software. I would also really like this solution to not require booting into linux if possible. I want to be able to just add some configuration to cmdline.txt/config.txt/uEnv.txt so I can just edit a built image and distribute it pre-configured.
Is this possible?
Hey @bblankenship, I’m working to reproduce internally and will let you know what we find!
In the meantime, have you tried a production image? I don’t think you should be seeing the login prompt with production images, only development.
Hey! Yeah I just tried a production image and that worked perfectly.
I’m going the route of just building my own dev image with Yocto; I think I found the areas that I want to mess with, but I’ll let you know if I have issues/what I did if it does work.
I’d like it if there could be something like a cmdline.txt or config.txt entry that could do this without requiring recompiling the image. Granted, I’m pretty new to Yocto and I have a very loose grasp on Linux, so this may not even be possible. But if you have any ideas on how this could be done I’ll take a stab at it!
Hey Bailey,
I actually worked on a similar issue earlier today, only we were trying to get the text console working through serial on a production image.
If you mount your root as read/write with mount -o remount,rw /
, you should be able to disable the text console with systemctl disable serial-getty@ttyS0
. This does vary depending on the device, so if it doesn’t work, you can figure out the correct unit with something like:systemctl | grep getty
Then you’ll want to stop and disable the one that starts with serial-getty
.
Additionally, if you’re building your own image, you can override the SERIAL_CONSOLES
variable in your machine conf to disable this.
I hope this helps!