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
--- Begin Message ---
Hi,
I'm not sure if this is a bug with procd's implementation of inittab or
if I'm just doing something wrong in my inittab. However, we have a
board that has multiple serial console ports, one of which relies on a
kernel module and procd refuses to start a console on the second port.
What seems to be happening is that procd loads inittab before the kernel
modules are loaded, therefore the tty device doesn't exist yet and the
check for dev_exist() fails and procd never forks a worker for that console.
I was able to fix it for my board with the following patch, but I'm not
sure if this is would be the entire fix for the problem since it seems
like fork_worker() should be a little more graceful in handling tty
devices that don't exist yet.
Any thoughts or suggestions on better ways to fix this?
Thanks,
Owen
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;
}
--
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
--- End Message ---
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel