From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: chosen/stdout-path and userland (Re: Can't boot kernel v4.0-rc2 on Koelsch) Date: Wed, 11 Mar 2015 11:08:16 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-sh-owner@vger.kernel.org To: Laurent Pinchart , Grant Likely , Mark Rutland , Rob Herring Cc: Cao Minh Hiep , Nobuhiro Iwamatsu , Linux-SH , Kuninori Morimoto , Magnus Damm , Simon Horman , Sakato Ryusuke , Yoshihiro Shimoda , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org TL;DR After removing the "console=3D" parameter from chosen/bootargs, and rel= ying solely on chosen/stdout-path, Hiep-san's Linaro userland cannot find th= e console device anymore. On Wed, Mar 11, 2015 at 7:45 AM, Laurent Pinchart wrote: > On Tuesday 10 March 2015 12:32:59 Geert Uytterhoeven wrote: >> On Tue, Mar 10, 2015 at 10:03 AM, Cao Minh Hiep wrote: >> > On 2015=E5=B9=B403=E6=9C=8810=E6=97=A5 17:05, Nobuhiro Iwamatsu wr= ote: >> >> This is user land issue. >> >> Hiep, if you have not changed ttySCX in inittab, you will need to= change. >> >> Could you check your inittab? >> >> >> >> --- a/inittab 2015-03-10 15:01:58.986609389 +0900 >> >> +++ b/inittab 2015-03-10 15:00:32.132094877 +0900 >> >> @@ -28,7 +28,7 @@ >> >> >> >> l6:6:wait:/etc/init.d/rc 6 >> >> # Normally not reached, but fallthrough in case of emergency. >> >> z6:6:respawn:/sbin/sulogin >> >> >> >> -SC6:12345:respawn:/sbin/getty -L 38400 ttySC6 >> >> +SC0:12345:respawn:/sbin/getty -L 38400 ttySC0 >> >> >> >> # /sbin/getty invocations for the runlevels. >> >> # >> >> # The "id" field MUST be the same as the last >> > >> > There is no inittab file in Linaro userland that I am using. >> >> I'm not familiar with the Linaro userland. >> >> Is there any other configuration file that contains the string "ttyS= C6"? >> Or does the Linaro userland derive it from the kernel command line? >> If yes, perhaps there's a newer version that does look at stdout-pat= h >> instead? >> >> The goal of the stdout-path support was to have a better description= in DT >> and automate things. So I don't think reverting the change is the pr= oper way >> forward. >> >> If you can't get it to work, I think we should bring it up with the = DT >> people first, some of which work for Linaro. > > I quite agree with that, but how should userspace know which device n= ode in > /dev corresponds to the console specified in stdout-path ? root@koelsch:~# hd /sys/firmware/devicetree/base/chosen/stdout-path 00000000 2f 73 65 72 69 61 6c 40 65 36 65 36 30 30 30 30 |/serial@e6= e60000| 00000010 00 |.| 00000011 root@koelsch:~# ls -l /sys/devices/platform/e6e60000.serial/tty total 0 drwxr-xr-x 3 root root 0 Mar 11 10:50 ttySC0 root@koelsch:~# cat /sys/devices/platform/e6e60000.serial/tty/ttySC0/de= v 204:8 root@koelsch:~# ls -l /dev/ttySC0 crw------- 1 root tty 204, 8 Mar 11 10:46 /dev/ttySC0 Hence all pieces of the puzzle are available to userspace... Is there another way? BTW, we also had the "/dev/console" abstraction for quite a while. I've just replaced "ttySC0" by "console" in my /etc/inittab, and everyt= hing still works fine. That's Debian (without systemd) though, so it doesn't= help for the Linaro userland. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-= m68k.org In personal conversations with technical people, I call myself a hacker= =2E But when I'm talking to journalists I just say "programmer" or something li= ke that. -- Linus Torvalds