Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-10-2014, 07:35 AM   #1
LQ Newbie
Registered: Apr 2013
Posts: 12

Rep: Reputation: Disabled
Unhappy trying to open a virtual console on LCD using USB keyboard (embedded)

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..

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 fuction, it prints events that seem normal and corresponding to my acion(type of key, press or release..)

I have a feeling that it's a configuration problem. In init/main.c, there is
(In my case, ramdisk_execute_command = "/sbin/init")

And this immediately calls
kernel_execve(init_filename, argv_init, envp_init);
// above, init_filename and argv_init are "/sbin/init" same.

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.

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.)

#### arch/sparc/boot/ourprocessor/prom_stage.c : #####
// "console=ttyS,mmio,0xff003000,115200n8 " <== serial port case
"console=tty " <= frame buffer console case (below line too)
"fbcon=font:SUN8x16,map:0000 " <= Is this boot argment correct?..

#### sbin/init: #####
#!/bin/busybox sh
export LD_LIBRARY_PATH=/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nand/lib

exec /bin/busybox init
### rcS #####
mknod /dev/tty0 c 4 0 <== Do I need to explicitly make tty0 and tty1 like this?
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4

### .config #####
CONFIG_FRAMEBUFFER_CONSOLE=y <= LCD/framebuffer console case. Otherwise none.

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
(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..

Any hint would be deeply appreciated.

Thank you!


Last edited by flyxtop; 02-12-2014 at 06:28 AM. Reason: add some info


busybox, framebuffer, tty, virtual console

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Strange keyboard console problems on virtual Slackware fbmd Slackware 2 12-06-2012 03:29 PM
How to use USB keyboard on embedded Linux? lqu Linux - Embedded & Single-board computer 3 12-11-2010 01:09 AM
HP L1506 LCD Monitor- GUI Display gets corrupted while switching from virtual console Mr. ameya sathe Linux - Enterprise 4 06-30-2009 05:43 AM
How to switch keyboard layout in virtual console in Ubuntu 8.04? swingnjazz Linux - Newbie 1 08-03-2008 09:57 AM
usb keyboard as input for console driver prettysmurfed Linux - General 0 11-27-2007 08:02 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration