Limited 8250 Serial ports on Ubuntu 24.04 Raspberry Pi

Ubuntu Version: 24.04 LTS Server on Raspberry Pi 5

Hello! New to the forum but long time Ubuntu user.

I am working with a PCIE rs485 serial board using the linux driver serial_exar. It normally creates 4 serial ports at /dev/ttyS[1-4] but the driver was reporting an error message and unable to setup the ports.
Couldn't register serial ... error -28
After a lot of searching I figured out this was due to a kernel compile time config CONFIG_SERIAL_8250_NR_UARTS being set to 1. This limited the number of ports able to be created to just 1 which is used the the Broadcom BCM7271 UART.
There is also a runtime flag that can be set with 8250.nr_uarts in the cmdline.txt but this still cannot go over the configure limit.

SO… I recompiled the kernel with the a higher CONFIG_SERIAL_8250_NR_UARTS and yay it worked.

It was quite time consuming to do and I don’t fancy doing it again.
Is there a good reason that the NR_UARTS is set to only 1 in the Ubuntu 24.04 LTS Raspberry Pi release?
If not, what is the process of changing it so others don’t run into the same issue I have?

Raspberry Pi OS kernels value is:

CONFIG_SERIAL_8250_NR_UARTS=5

It looks a bug to me. You should file a bug here to have it fixed:
https://bugs.launchpad.net/ubuntu/+source/linux-raspi

Thanks for pointing me in the right direction!
I filed a bug report: Bug #2096796 “kernal compiled with different CONFIG_SERIAL_8250_...” : Bugs : linux-raspi package : Ubuntu

1 Like