Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

linux - console

Hello,

I would like to enable uart for the default console. I modified the kernel configuration in Nios IDE to enable UART console and by reprogramming the kernel into the flash, the kernel messages are sent through the uart port. But I don't see anything after booting the kernel. I don't see the login prompt.

I open nios2-terminal and the login prompt is displayed there. How do I do to change it?

Thank you in advance

Christian

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm assuming that you're using init and agetty to start up your console. In that case, it sounds like you need to modify the filesystem project a little bit to reflect your new kernel.

    In your filesystem project, the file

    /etc/inittab

    must be modified as specified below

    Comment out the following line...

    ttyJ0:vt100:/bin/agetty 115200 ttyJ0

    Uncomment the following line...

    ttyS0:vt100:/bin/agetty 115200 ttyS0

    Once the changes have been made, build and upload your filesystem to your target board.

    Hope it helps.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    It helps a lot. Thank you. An other point, do you know how to enable function to see previous commands typed in shell prompt. I press UP arrow to see previous command and I am not able to see them. It's just easier to entry command and come back to previous one.

    So, I can test my own applications by sending them into NFS directory.

    Regards

    Christian
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by spy1@Aug 17 2004, 03:41 PM

    hello,

    it helps a lot. thank you. an other point, do you know how to enable function to see previous commands typed in shell prompt. i press up arrow to see previous command and i am not able to see them. it's just easier to entry command and come back to previous one.

    so, i can test my own applications by sending them into nfs directory.

    regards

    christian

    --- Quote End ---

    Check whether the default busybox enables a more complex console, something like bash or ash - if not configure it to use it. A better console is definately available, you'll probably want to create a symlink in your filing system to the busy box application and then change your configuration so that it becomes the default console. I've done this because the default sh console is really annoying with the cursor keys!

    Adrian
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks guys!

    The serial uart is ,in my opinion, a much better terminal (why is it not the default?). By using the serial uart you free up the SDK shell to do other things in, and more importantly Ctrl+C doesn’t kill HyperTeminal http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif but stops the current process ( try stopping ping or yes from the nios2-terminal http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif