Hello,
I'm working on an embedded kernel for PowerPC 460 (board like amcc canyonland). I'm compiling for ARCH=powerpc and I'm using the DTS methode (not the kernel wrapper, uboot is in powerpc with lib_of)
My serial terminal is connected to ttyS2
Under uboot, no problem; ttyS2 work, I have my uboot console.
my kernel command line have console=ttyS2,115200 and my DTS chosen { linux,stdout-path = "/plb/opb/serial@ef600500"; }; which serial@ef600500 is the TTYS2 name
When my kernel start, before serial driver init, all is working After, this is the same: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 20) is a 16550A serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 21) is a 16550A serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A console [ttyS2] enabled, bootconsole disabled console [ttyS2] enabled, bootconsole disabled serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 22) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 20) is a 16550 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 21) is a 16550 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 22) is a 16550The latest line I see is: Freeing unused kernel memory: 148k init
I boot a nfs filesystem, if I add traces (printk) under nfs driver, I can see my kernel run init (busybox or an openembedded angstrom) is running, udev is start, login also... all is working well BUT, I can't see anything on the serial console...
I wrote a small C program int main(int argc, char *argv[], char *envp[]){ int i ; struct stat stdin_stats, stdout_stats, stderr_stats ; printf("Toto\n"); FILE* f = fopen("wtest.txt","w"); fwrite("toto\n",strlen("toto\n"),1,f); fclose(f); return 0; } I start it by add to kernel command line "init=/myprog"
I can see on my nfs filesystem the file wtest.txt with "toto" inside, so, my program is runing, but nothing from the printf on my console...
All printk works (kernel space) but no printf work (userspace).
Anybody have an idea about my problem ? Or a way to debug this type of problem... Where I must search ?
Thanks, Fabien