Hello!
I need to change default uart for u-boot console from UART1 to UART2.
Whan i need to change in u-boot source?
What U-Boot version are you targeting?
Sorry for long time answer, version U-Boot 2015.04-00003-g5ffbe59-dirty
Hi
You need to change the pinmuxing to the pins you want to use for UART2. And you have to configure the driver to use UART2.
Have a look at this patch.
You likely will want UART2 in the Linux kernel as well. That one is chosen from the kernel cmdline.
This patch changes the U-Boot environment accordingly.
Systemd will automatically spawn a login console for UART2 because of the cmdline.
But it will also spawn an additional login console on UART1 because of the file ‘/etc/systemd/system/getty.target.wants/serial-getty@ttymxc0.service’. Delete that file from the rootfs or build your own rootfs with the SERIAL_CONSOLE assignment changed in the machine configuration file.
Max
PS.:
If one uses U-boot 2016.11-toradex one needs to change in addition to the above the platform data.
Hello!
Big thanks!
All worked.
not sure if related but what if i want to release both UART1 an UART2 from system usage.
Because i need to use them in my programs
thanks in advance
Could you please ask a new question rather than hijacking this one and exactly stating what exactly it is that you are trying to achieve? Thanks!