Message ID | C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local |
---|---|
State | RFC |
Headers | show |
"Stam, Michel [FINT]" <M.Stam@fugro.nl> wrote: > This, to me, seems the most logical solution, as consoles should be > available to the init process early on during boot, and not hot-plugged > in afterwards. Do you agree? Well, I don't. What about a usb serial port? I'd like to plug in the usb cable, providing vbus to power up a cp210x, which then becomes a new /dev/ttyUSBxxx and I'd like inittab to offer me a console there. It's not there at boot though... Sincerely, Karl P
Am Freitag, 9. Januar 2015, 17:51:48 schrieb Karl Palsson: > > "Stam, Michel [FINT]" <M.Stam@fugro.nl> wrote: > > This, to me, seems the most logical solution, as consoles should be > > available to the init process early on during boot, and not hot-plugged > > in afterwards. Do you agree? > > > Well, I don't. What about a usb serial port? I'd like to plug in the > usb cable, providing vbus to power up a cp210x, which then becomes a new > /dev/ttyUSBxxx and I'd like inittab to offer me a console there. It's not there at boot though... +1
On 15-01-09 09:51 AM, Karl Palsson wrote: > "Stam, Michel [FINT]" <M.Stam@fugro.nl> wrote: >> This, to me, seems the most logical solution, as consoles should be >> available to the init process early on during boot, and not hot-plugged >> in afterwards. Do you agree? > > Well, I don't. What about a usb serial port? I'd like to plug in the > usb cable, providing vbus to power up a cp210x, which then becomes a new > /dev/ttyUSBxxx and I'd like inittab to offer me a console there. It's not there at boot though... > This is actually very close to what we're doing on this board, it has two console ports: one is a UART which the bootloader and kernel are using, and a second console port which is really just a USB device controller. The UART lines are a pain to get to without a soldering iron so under AA and BB we would just connect a laptop into the USB port and get a console on the router. However, it's not quite real hotplugging since /dev/ttyGS0 is present whenever the driver is loaded, just that it depends on the USB gadget drivers which get loaded a little too late for inittab to find it. Hotplugging does sound like a cool feature though. Cheers, Owen
Michel, Thanks for the suggestion, this particular driver was being loaded from /etc/modules.d, however even when I moved it into /etc/modules-boot.d it still doesn't create /dev/ttyGS0 in time for procd to start the console. I'll try fiddling around with the load order to see if I can get it working without my changes to procd Thanks, Owen On 15-01-09 04:33 AM, Stam, Michel [FINT] wrote: > Hello Owen, > > I was wondering, is the kernel driver for your console not placed in > /etc/modules-boot.d ? > > /sbin/init executes procd, but prior to doing this executes kmodloader > to load all modules in /etc/modules-boot.d. If your module is mentioned > in this directory, this should load your console driver, thus making it > available before procd checks /etc/inittab. > > This, to me, seems the most logical solution, as consoles should be > available to the init process early on during boot, and not hot-plugged > in afterwards. Do you agree? > > To put modules in /etc/modules-boot.d, make sure that their > KernelPackage definition contains: > AUTOLOAD:=$(call AutoLoad,<NUM>,<MODULE>,1) > > Where <NUM> is the load order and <MODULE> is the name of your kernel > module (or modules). The presence of the ,1 argument indicates whether > the module is placed in /etc/modules-boot.d or /etc/modules.d. > > Kind regards, > > Michel Stam > Embedded System Engineer
diff --git a/inittab.c b/inittab.c index 2efbf4d..7b12e10 100644 --- a/inittab.c +++ b/inittab.c @@ -161,7 +161,7 @@ static void askfirst(struct init_action *a) { int i; - if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) { + if (console && !strcmp(console, a->id)) { DEBUG(4, "Skipping %s\n", a->id); return; }