[Bug 195] New: init does not correctly detect console as a serial port on some platform

bugzilla at busybox.net bugzilla at busybox.net
Wed Mar 18 17:58:46 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=195

              Host: PC ubuntu 8.4
            Target: sh4-linux
           Summary: init does not correctly detect console as a serial port
                    on some platform
           Product: Busybox
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: frederic.germain at softathome.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 1.0


in console_init (init/init.c), the ioctl TIOCGSERIAL might always fails on some
platform.
This is because init.c has its own definition of struct serial_struct, and some
architecture (sh to give one) defines TIOCGSERIAL this way :
#define TIOCGSERIAL     _IOR('T', 30, struct serial_struct)
So TIOCGSERIAL depends of sizeof(struct serial_struct), which is different in
the kernel and init.c.

One solution would be to include the header #include <linux/serial.h> in
init.c, but i understand that this would create a build dependency of busybox
to the kernel headers.
Another one would be to use another serial port specific ioctl. Maybe
TIOCSERGWILD or TIOCSERCONFIG would do the trick ?
And one would be to change the kernel headers, but that's seems quite extreme
:-)




And one little remark, it is not possible to give a console= environment
variable from the kernel cmdline to busybox, as it is already a standard option
for the kernel. So it is only possible to use it from an initramfs.
Would it be possible to change the console= option in console_init() by a
init_console= ?...


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list