Hi,
In the order :
1) I'm using the last stable version of Busybox (1.9.1), but I've tried
with a 1.8.1 and the problem is the same
2) The error message was : "getty: /dev/uartE: TCGETS: Inappropriate
ioctl for device"
But adding a ioctl function in my driver solved this problem
3) Yes, looking into the getty code is the next step, but I wanted to
know first if anyone had a solution before taking time into it.
But I'm not sure that the problem comes from it, because a simple shell
doesn't want to run correctly.
Regards,
Hervé Spitz
Denys Vlasenko a écrit :
On Thursday 28 February 2008 09:56, Herve Spitz wrote:
I'm porting Linux on a PowerPC 750FX target board, and I'd like to use a
Busybox on it on its serial port but I've some problems.
Which version of busybox?
This serial port is specific, and I had to develop my own driver. This
driver is a classic char driver with read, write, open and release
functions.
On my first try with this driver and the Busybox getty, I get an error
message telling me that the device doesn't have any appropriate ioctl.
What it says exactly?
So I've added a "fake" ioctl function which alway returns 0, and I've
managed to get a login prompt like here :
-------------- Start of Linux boot trace --------------
zImage starting: loaded at 0x00400000 (sp: 0x00630ee4)
Allocating 0x357698 bytes for kernel ...
gunzipping (0x00000000 <- 0x0040b000:0x0062f27a)...done 0x312020 bytes
Linux/PowerPC load: console=uartE,9600n8 root=/dev/ram0
Finalizing device tree... flat tree at 0x409bc8
id mach(): done
MMU:enter
MMU:hw init
hash:enter
hash:find piece
hash:patch
hash:done
MMU:mapin
MMU:setio
MMU:exit
setup_arch: bootmem
smd88ng_setup_arch():set_bridge
arch: exit
(none) login: root
-------------- End of Linux boot trace --------------
I can type my login, press enter, the cursor get on a new line and
then... nothing !
Here are my inittab, rcs, passwd and group files :
/etc/inittab:
::sysinit:/etc/rcs
::respawn:/sbin/getty -L uartE 9600 vt100
/etc/rcs:
#!/bin/sh
echo "Processing /etc/rcS... "
echo "Mounting Proc"
/bin/mount -t proc proc /proc
/sbin/syslogd
/sbin/klogd
/bin/sh
/etc/passwd:
root::0:0:Super User:/:/bin/sh
/etc/group:
root:x:0:
If I change my inittab to get directly a shell, I get this trace :
-------------- Start of Linux boot trace --------------
zImage starting: loaded at 0x00400000 (sp: 0x00630ee4)
Allocating 0x357698 bytes for kernel ...
gunzipping (0x00000000 <- 0x0040b000:0x0062f11a)...done 0x312020 bytes
Linux/PowerPC load: console=uartE,9600n8 root=/dev/ram0
Finalizing device tree... flat tree at 0x409bc8
id mach(): done
MMU:enter
MMU:hw init
hash:enter
hash:find piece
hash:patch
hash:done
MMU:mapin
MMU:setio
MMU:exit
setup_arch: bootmem
smd88ng_setup_arch():set_bridge
arch: exit
Please press Enter to activate this console.
init: can't log to /dev/tty5
starting pid 72, tty '/dev/uartE': '/bin/sh'
-------------- End of Linux boot trace --------------
As before, I never get the shell prompt...
The content of the inittab is :
::sysinit:/etc/rcs
uartE::askfirst:-/bin/sh
I really do not know what to do to deal with this problem. Any idea?
First step would be to find out why getty doesn't work.
Busybox's getty code is in loginutils/getty.c
You seem to be able to write fairly complicated C code
if you code serial drivers in Linux kernel. It should not be hard
for you to modify getty.c (basically adding bb_error_msg("debug message")
here and there) and find out where is it stuck.
Does Busybox need a driver using the tty layer provided by Linux ?
I did not understand this question.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox