[BusyBox] cannot use console in init.c of busybox 1.00
Levin Du
zsdjw at 21cn.com
Sat Jul 2 09:33:10 UTC 2005
I happened to add a open("/dev/tty4", O_RDWR) before console_init() and solved
the problem. When I went deeper, I found that the console variable will be
"/dev/null" before device_open().
After a tough time I found out the reason: the CURRENT_VC is "/dev/tty0" and
my initrd didn't have such a device file.
I created the /dev/tty0 and the newt screen appeared, but was out of control.
When I hit the enter key, the cursor just went down and the screen got ugly.
Later I tried to modify this line:
safe_strncpy(console, (tried == 0 ? _PATH_CONSOLE : CURRENT_VC),
to
safe_strncpy(console, (tried == 0 ? _PATH_CONSOLE : VC_1), /* CURRENT_VC */
to make newt happy.
Just write it down to help others maybe.
Best regards,
Levin Du
More information about the busybox
mailing list