* problem w/ kernel init (rootfs vs initial console / init process)
@ 2017-09-10 9:09 mtx
2017-09-10 15:02 ` unable to open initial console (ENODEV) (WAS: problem w/ kernel init (rootfs vs initial console / init process)) mtx
0 siblings, 1 reply; 2+ messages in thread
From: mtx @ 2017-09-10 9:09 UTC (permalink / raw)
To: linux-kernel
Hi folks,
I've got a very strange problem w/ v4.13 (on imx6):
it tries to open the initial console, before even attempt to mount the
root fs, which obviously is doomed to fail. (directly passing root=
via cmdline - no initrd etc)
What puzzles me most: prepare_namespace() is only called from
kernel_init_freeable() - after it tried to open console (only when no
ramdisk_execute_command found).
Anyone have an idea what could be wrong here ?
--mtx
^ permalink raw reply [flat|nested] 2+ messages in thread
* unable to open initial console (ENODEV) (WAS: problem w/ kernel init (rootfs vs initial console / init process))
2017-09-10 9:09 problem w/ kernel init (rootfs vs initial console / init process) mtx
@ 2017-09-10 15:02 ` mtx
0 siblings, 0 replies; 2+ messages in thread
From: mtx @ 2017-09-10 15:02 UTC (permalink / raw)
To: linux-kernel
On 10.09.2017 11:09, mtx wrote:
> it tries to open the initial console, before even attempt to mount the > root fs, which obviously is doomed to fail. (directly passing root=>
via cmdline - no initrd etc)
Solved it. For the record: the uart2 node was still disabled, so the
kernel did allocate a console for the port, but no tty_driver assigned.
tty_lookup_driver() (tty_io.c) is called on opening tty devices (such as
/dev/console). it asks console_device() (in printk.c), which scans the
consoles list for one with a tty_driver.
As my DT left the console's uart port disabled, the corresponding device
wasn't initialized, thus leaving the console w/o assigned tty_driver.
BTW: maybe we should think about some logic which spits out a warning,
or maybe implement an own special tty_driver for /dev/console, which
goes to the active console(s), just like printk() does.
--mtx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-10 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-10 9:09 problem w/ kernel init (rootfs vs initial console / init process) mtx
2017-09-10 15:02 ` unable to open initial console (ENODEV) (WAS: problem w/ kernel init (rootfs vs initial console / init process)) mtx
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®