2

I am building my own cross-linux-from-scratch (CLFS) system for Raspberry Pi. I already build whole system, I prepared SD card and now I try to boot. I am redirecting all kernel output to serial console (UART on Raspberry PI gpio) so I can see what's happening. My cmdline.txt contains this line:

dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

And inittab file contains this line:

::respawn:/sbin/getty -L ttyAMA0 115200 vt100

So all stdout and stderr from kernel and init script should go to UART. But when I power up my Raspberry, I can see output just from the kernel, not from init script. What am I doing wrong? How can I redirect all output to Raspberry's UART?

  • Cross-compiling and LFS are very impressive feats, glad to see that we have people who are really investing time and effort into the Raspberry Pi! Hope this is resolved! – RPiAwesomeness Mar 14 '14 at 18:38
2

I found the problem as soon as I started writing my question. The solution is simple -- there was a mistake in my cmdline.txt file. The original content was:

dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

I added second console=tty1. Thus, all output from init script was redirected to tty1 console, not to ttyAMA0 (where UART is connected). So fixed cmdline.txt should look like this:

dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

All output goes to UART now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.