<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>P {MARGIN-TOP: 0mm; MARGIN-BOTTOM: 0mm}</style>
</head>
<body>
<div style="FONT-FAMILY: 굴림; FONT-SIZE: 10pt" id="ezFormProc_div">
<div id="msgbody">
<div>
<div style="LINE-HEIGHT: 15pt"><br>
Hi, folks!</div>
<div style="LINE-HEIGHT: 15pt">Nice to get to know this email list. I hope I finally arrived to the right group.
</div>
<div style="LINE-HEIGHT: 15pt">( I posted my question on stackoverflow 2 weeks ago but there's no reply. I'm analyzing the console-related code, it's too complex..)<br>
</div>
<div style="LINE-HEIGHT: 15pt" id="MailSign"></div>
<div style="LINE-HEIGHT: 15pt">
<p>I'm trying to bring up virtual terminal on our embedded system's LCD usnig USB keyboard which is also connected to the system. I have UART connection to my PC so I've been using UART for console till now but I want to switch to framebuffer console on LCD
during the boot at some point..</p>
<p>The USB host controller seems to work fine because I've seen USB memory is attached, read and written ok. And when I connect a keyboard and print the events at keyboard_event function, it prints events that seem normal and corresponding to my action(type
of key, press or release..). </p>
<p>The problem is that when I configure the framebuffer console in, I cannot see the prints from the busybox code. Maybe our system could have a problem in framebuffer driver (but we can run a application using the framebuffer /dev/fb0) with it not fully supporting
framebuffer console.</p>
<p> </p>
<p>But I have another feeling that it might be just a configuration problem. (So I want to know the right configuration at least to concentrate further..)</p>
<p>As you can see, in init/main.c, near the end in init_post function, there is (I'm using linux3.3 by the way)<br>
run_init_process(ramdisk_execute_command);<br>
(In my case, ramdisk_execute_command = "/sbin/init")</p>
<p>And this immediately calls<br>
kernel_execve(init_filename, argv_init, envp_init);<br>
// above, init_filename and argv_init are "/sbin/init" same. </p>
<p>I expect busybox to run after this.. (ramdisk had been installed before by a bootloader-like part) but I cannot see any prints on the LCD after this point. But I can see printks on the LCD until just before calling kernel_execve above. I'm using linux 3.3.</p>
<p>I understand I have to open a frame buffer console on LCD and connect it to a tty but I don't know how. Below are printed the current releavant settings. (In serial UART connection case, linux boots ok up to the final busybox shell prompt printing things
in busybox initialization after kernel_execve call. and #cat /proc/fb0 returns 0 for your info. Only LCD/framebuffer console mode stops after kernel_execve.)</p>
<p> </p>
<p>in kernel source directory,</p>
<p>#### arch/sparc/boot/ourprocessor/prom_stage.c : #####<br>
// "console=ttyS,mmio,0xff003000,115200n8 " <== serial port case<br>
"console=tty0 " <= frame buffer console case (below line too)<br>
"fbcon=font:SUN8x16,map:0 " <= Is this boot argment correct?..</p>
<p> </p>
<p>in ramdisk image,</p>
<p>#### /sbin/init: #####<br>
#!/bin/busybox sh<br>
export LD_LIBRARY_PATH=/lib<br>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nand/lib</p>
<p>exec /bin/busybox init<br>
### /etc/init.d/rcS #####<br>
mknod /dev/tty0 c 4 0 <== Do I need to explicitly make tty0 and tty1 like this?<br>
mknod /dev/tty1 c 4 1<br>
mknod /dev/tty2 c 4 2<br>
mknod /dev/tty3 c 4 3<br>
mknod /dev/tty4 c 4 4</p>
<p>### .config #####<br>
CONFIG_FRAMEBUFFER_CONSOLE=y <= LCD/framebuffer console case. Otherwise none.<br>
CONFIG_FONT_SUN8x16=y<br>
CONFIG_LOGO=y</p>
<p><br>
By the way, I'm not using /etc/inittab.(so use default init). The busybox init/init.c code says if there isn't the inittab file and console is not the serial port, it runs<br>
tty2::askfirst:/bin/sh<br>
tty3::askfirst:/bin/sh<br>
tty4::askfirst:/bin/sh<br>
(starting shell on tty 2, 3 and 4) then How do make tty2's shell appear on the LCD/framebuffer/framebuffer console? It's confusing and books are not so kind..
</p>
<p>Any hint would be deeply appreciated.</p>
<p><br>
Thank you in advance.</p>
<p>Chan</p>
<p> </p>
</div>
</div>
</div>
</div>
</body>
</html>