On Wednesday 13 June 2007 07:59, Levend Sayar wrote:
> Hi, all and Denis,
>
> At last I found a chance to turn back to my porting project. I was trying to
> port linux on my 386 based embedded board. I stopped since I could not get a
> working shell.
>
> kernel:2.4.32
> busybox:1.5.1
> gcc: 3.3.3
>
> Lastly I tried this in the kernel code init/main.c
>
> if (open("/dev/console", O_RDWR, 0) < 0)
> printk("Warning: unable to open an initial console.\n");
>
> (void) dup(0);
> (void) dup(0);
>
> {
> while (1) {
> char buffer[64];
> int n = read(0,buffer,sizeof(buffer));
> if (n > 0)
> write(1,buffer,n);
> }
> }
>
> It simply echoes what I write in the console after enter pressed. This code
> does NOT work. But if I change the code as
>
> if (open("/dev/console", O_RDWR | O_NONBLOCK, 0) < 0)
>
> it does work. If we come back to busybox,
Wait a second. So it doesn't work totally right even on kernel level,
before userspace is started.
I think you have to report it to kernel list. With details -
.config, full dmesg, what error code is returned by open and/or read,
etc...
--
cda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox