Pergunta

I have an inherited project/board based on the AT91SAM9261EK board that uses U-Boot and a BusyBox file system. I'm a newbie and trying to understand the relationship of these components to my application.

It appears thru experimentation that the setting of stdout as well as the serial port parameters are done in U-Boot and that this persists through to the application. Is this correct?

My base problems are: 1: The port setting is incorrect. The baud rate needs to be changed. 2. I would like to turn this port off (or at least make it transmit only) from my application.

How can I change the port parameters in U-Boot?
What component defines stdout: U-Boot, BusyBox, or my application?

Thanks

Foi útil?

Solução

Yes, U-Boot environment variables control these, both while U-Boot is running and after linux boots. There are plenty of basic references available. I recommend Embedded Linux Primer by Hallinan; your current questions would come under sec 5.3 and chap 7.

At U-boot prompt, do "printenv", you will find U-Boot has set these variables for itself: stderr=serial stdin=serial stdout=serial

As long as you do not do "saveenv", you can change stdin and stdout of U-Boot. Probably you will find those changes quite nonuseful. Reboot to get the previous settings back.

You can change baudrate very easily setenv baudrate 9600

Initial Linux console is set by an item within "bootargs" variable, e.g. ...console=ttyAMA0,115200n8... If you want different baudrate, try something like this at U-Boot coli: setenv bootargs console=ttyAMA0,9600n8 ... (copy what was previously there for other items) saveenv

After linux has come up, various other console options are possible but are somewhat advanced, good luck.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top