how to change debug uart from uart5 to uart1 on ast2500 romulus?

Andrew Jeffery andrew at aj.id.au
Thu Sep 3 14:17:46 AEST 2020



On Fri, 24 Jul 2020, at 17:13, 不语 wrote:
> Dear openbmcer,
> 
>  Thank you for your quick reply.
> 
>  My code is based on openbmc meta-ibm/meta-romulus.I think it is 
> similar to ast2500.evb. I tried to change debug console uart5(ttl) to 
> uart1(rs232) on uboot and kernel linux.
> 
>  I read the ast2500 manual,find we can set Hardware Strap gpio or 
> Hardware Strap register bit29 to changedebug console between uart5 and 
> uart1 but not effective.
> 
>  I also tried these:
> 
>  (1) modify CONFIG_BOOTARGS to "console=ttyS0,115200n8 root=/dev/ram 
> rw" on uboot ast-g5.c
> 
>  (2) modify stdout-path = &uart1; bootargs = "console=ttyS0,115200 
> earlyprintk";  on kernel aspeed-bmc-opp-romulus.dts
> 
>  
> 
>  Any advice will be appreciated.

Just to be clear here, the "Debug UART" is not the same as the BMC serial port. 
The debug UART is a feature of the Aspeed BMC's that allow for emergency 
recovery in the event of flash corruption; it's a shell implemented in hardware 
that has a small command-set for doing MMIOs that has no dependency on valid 
firmware existing on the flash.

The strapping bit you mention affects which physical serial IO exposes the 
Debug UART functionality, not which IO is used for the BMC console.

The BMC console's UART is typically UART5 (ttyS4), though you could always 
arrange for Linux and u-boot to use UART1. UARTs 1-4 can be plumbed through to 
the host processor for its own purposes. Typically the BMC console (UART5) is 
not exposed outside the system enclosure, so for the purpose of BMC recovery 
the debug UART function can be switched to UART1 (which typically is exposed 
for the purpose of providing a physical host console).

It sounds like you're just trying to expose the BMC console on UART1, so the 
strapping bit is irrelevant. Changing bootargs as you have should be enough to 
get kernel boot messages, but you may need further changes to make 
userspace expose a getty on ttyS0.

Hope that helps.

Andrew


More information about the openbmc mailing list