Changing UBoot serial port

  • The serial debug port is used in NBoot, U-Boot and the Kernel. So changing it in U-Boot may not be enough. By default, U-Boot takes the serial port that is used in NBoot. But you can override it by calling

    1. setenv stdout ttySAC2
    2. setenv stdin ttySAC2
    3. saveenv

    However it is not as simple as that. Because after typing the first line, the output is already redirected to the other serial line. And after typing the second line, the input is redirected to the new serial line. So to change this, you have to connect both serial lines to the PC, e.g. by using two windows with a terminal program. Or you can try to enter all three commands in one line, separated by ';' semicolons.

    Also remember to set the variable "sercon" to this port. This variable is used to construct the bootargs variable, especially the console value used in Linux for debug messages. So you may have to call "run bootubi" or "run bootnfs" again after changing this (and of course saveenv).

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thanks for your answer, but this is not working.
    I have connected one PC serial port to ttySAC0 and another PC port to ttySAC2.
    After entering the setenv stdout ... command (on standart port - ttySAC0) neither console output nor input is working. Only a hard reset will make it running again.

    Now I have tried to redirect the console to ttySAC2 after startup.
    In buildroot ->"System configuration->Port to run a getty" I changed from ttySAC0 to ttySAC2. Then I got the login prompt on ttySAC2 but no input is possible. It seems that stdin/out is not on ttySAC2. Can I redirect stdin/out to ttySAC2?