[BusyBox] init and native devFs

Glenn McGrath bug1 at optushome.com.au
Thu Sep 14 04:19:04 UTC 2000


Stuart Menefy wrote:
> 
> Glenn
> 
> I'd been wondering about doing something about this code as well,
> although for a different reason. The SuperH port uses /dev/ttySC0 etc.
> for it's on-chip serial ports, and BusyBox init doesn't recognise these
> either. We end up falling back to /dev/console, which usually works, but
> is not ideal.
> 
> The attached patch replaces all this code with a call to ttyname().
> Given that this is normally being linked in anyway (for tty) it should
> result in a net code size saving. However I must admit the only
> configuration I've tried this in is a serial console, where it works
> fine. Its possible that this code was there for a good reason on other
> systems.
> 
> What do you think?
> 
> Stuart
> 
> --- Forwarded mail from bug1 at optushome.com.au
> 
> From: bug1 at optushome.com.au
> Date: Tue, 12 Sep 2000 10:53:32 +1100
> Subject: [BusyBox] init and native devFs
> TO: busybox at busybox.net
> 
> The bb init address devices as per traditional linux device names, and
> from a quick look at the code doesnt know how to use devFs style device
> names.
> 
> /dev/tty0 should be /dev/tty/0 i think..
> 
> It shouldnt be too hard to fix, i will have a go it after i get a grip
> on gunzip, thought id mention it anyway.
> 
> Glenn
> 

Unfortunately this didnt help me with devfs, the way i see it is that
there are a group of defines in init.c

#define VT_PRIMARY  	/dev/tty0
#define VT_SECONDARY	/dev/tty1
#define VT_LOG		/dev/tty2
#define SERIAL_CON0	/dev/ttyS0
#define SERIAL_CON1	/dev/ttys1

These would have to be changed and busybox recompiled to use say
/dev/tty/0 as VT_PRIMARY.

I think a good solution would be if these values could be read from the
inittab file so they could be changed without recompiling. 

Im not sure exactly how this fixed your problem given the defines, but i
havent looked into in that much depth, i think i will leave this one for
a rainy day.


Glenn





More information about the busybox mailing list