koen, fathi, riku,
i am having issues with auto-serial-console that was initially done by marcin.
https://git.linaro.org/gitweb?p=openembedded/meta-linaro.git%3Ba=tree%3Bf=me...
the main issue is that it conflicts with BSP layer that uses SERIAL_CONSOLE variable. It is very much expected for a BSP layer to set SERIAL_CONSOLE variable. In which case OE will automatically start a serial console
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/sysvin...
So when using auto-serial-console with a 'proper' BSP layer that set SERIAL_CONSOLE(S) we end up with starting the console twice, one added by OE, one by auto-serial-console. So far, all our OE builds are not using a proper BSP layer, so that's why you don't see the problem, but for our builds we use proper BSP layer...
right now, auto-serial-console does 3 things:
1- figure out the serial console port from /proc/cmdline 2- start a console on #1 3- automatically login as root
I believe that we should 'do something' to split them into several packages so that we get more granularity. At least #3 needs to be separated out, as #3 is a 'policy'.
I would almost expect that 'being able to automatically login as root on the console' is a feature that could (should?) be added to oe-core somehow. What do you think koen? I looked into that, but there isn't any obvious (and trivial) way to do that, but it's certainly doable inside an IMAGE_FEATURE for example.
this email is just to start the discussion and get some advices, e.g. i am not asking you to do it ;-) i can work on it, but want to make sure i do it right, with an 'upstream' path if possible.
thx
nico
Op 17 okt. 2013, om 10:03 heeft Nicolas Dechesne nicolas.dechesne@linaro.org het volgende geschreven:
koen, fathi, riku,
i am having issues with auto-serial-console that was initially done by marcin.
https://git.linaro.org/gitweb?p=openembedded/meta-linaro.git%3Ba=tree%3Bf=me...
the main issue is that it conflicts with BSP layer that uses SERIAL_CONSOLE variable. It is very much expected for a BSP layer to set SERIAL_CONSOLE variable. In which case OE will automatically start a serial console
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/sysvin...
So when using auto-serial-console with a 'proper' BSP layer that set SERIAL_CONSOLE(S) we end up with starting the console twice, one added by OE, one by auto-serial-console. So far, all our OE builds are not using a proper BSP layer, so that's why you don't see the problem, but for our builds we use proper BSP layer...
right now, auto-serial-console does 3 things:
1- figure out the serial console port from /proc/cmdline 2- start a console on #1 3- automatically login as root
I believe that we should 'do something' to split them into several packages so that we get more granularity. At least #3 needs to be separated out, as #3 is a 'policy'.
The recipe itself is already a policy thing, so we should look into a way to have different images for proper builds (using BSPs) and hwpack based deployments. This will also make non-linaro users of our layers happy.
I would almost expect that 'being able to automatically login as root on the console' is a feature that could (should?) be added to oe-core somehow. What do you think koen?
I agree
I looked into that, but there isn't any obvious (and trivial) way to do that, but it's certainly doable inside an IMAGE_FEATURE for example.
Right. But keep in mind that sysv is not the only init system supported in oe-core. FWIW, systemd already autospawns a getty on every entry listed in the console= kernel cmdline.
regards,
Koen Kooi Builds and Baselines | Release Manager Linaro.org | Open source software for ARM SoCs
this email is just to start the discussion and get some advices, e.g. i am not asking you to do it ;-) i can work on it, but want to make sure i do it right, with an 'upstream' path if possible.
thx
nico
On Thu, Oct 17, 2013 at 10:20 AM, Koen Kooi koen.kooi@linaro.org wrote:
right now, auto-serial-console does 3 things:
1- figure out the serial console port from /proc/cmdline 2- start a console on #1 3- automatically login as root
I believe that we should 'do something' to split them into several packages so that we get more granularity. At least #3 needs to be separated out, as #3 is a 'policy'.
The recipe itself is already a policy thing, so we should look into a way to have different images for proper builds (using BSPs) and hwpack based deployments. This will also make non-linaro users of our layers happy.
well, i am a non happy, linaro user ;-)
I would almost expect that 'being able to automatically login as root on the console' is a feature that could (should?) be added to oe-core somehow. What do you think koen?
I agree
I looked into that, but there isn't any obvious (and trivial) way to do that, but it's certainly doable inside an IMAGE_FEATURE for example.
Right. But keep in mind that sysv is not the only init system supported in oe-core. FWIW, systemd already autospawns a getty on every entry listed in the console= kernel cmdline.
ok. so why then do we have this:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/system...
it's 'just in case' the kernel does not have console=xxx but SERIAL_CONSOLE is defined? what's the use case?
if systemd-getty-generator finds a console=xxx and if SERIAL_CONSOLE is defined, i assume we don't get 2 getty, but one. is systemd-getty-generator taking care of such situations?
Koen Kooi Builds and Baselines | Release Manager Linaro.org | Open source software for ARM SoCs
Op 17 okt. 2013, om 11:02 heeft Nicolas Dechesne nicolas.dechesne@linaro.org het volgende geschreven:
On Thu, Oct 17, 2013 at 10:20 AM, Koen Kooi koen.kooi@linaro.org wrote:
right now, auto-serial-console does 3 things:
1- figure out the serial console port from /proc/cmdline 2- start a console on #1 3- automatically login as root
I believe that we should 'do something' to split them into several packages so that we get more granularity. At least #3 needs to be separated out, as #3 is a 'policy'.
The recipe itself is already a policy thing, so we should look into a way to have different images for proper builds (using BSPs) and hwpack based deployments. This will also make non-linaro users of our layers happy.
well, i am a non happy, linaro user ;-)
I would almost expect that 'being able to automatically login as root on the console' is a feature that could (should?) be added to oe-core somehow. What do you think koen?
I agree
I looked into that, but there isn't any obvious (and trivial) way to do that, but it's certainly doable inside an IMAGE_FEATURE for example.
Right. But keep in mind that sysv is not the only init system supported in oe-core. FWIW, systemd already autospawns a getty on every entry listed in the console= kernel cmdline.
ok. so why then do we have this:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/system...
it's 'just in case' the kernel does not have console=xxx but SERIAL_CONSOLE is defined? what's the use case?
It's as you say, to spawn a serial console regardless of console= parameters. It's analogous to having a getty in inittab.
if systemd-getty-generator finds a console=xxx and if SERIAL_CONSOLE is defined, i assume we don't get 2 getty, but one. is systemd-getty-generator taking care of such situations?
So far it seems to work, so I guess the clash of 2 rules trying to run a getty on the same port is somehow resolved internally in systemd. Since it "just works" for me I haven't looked into it :)
regards,
Koen
On Thu, Oct 17, 2013 at 10:03:07AM +0200, Nicolas Dechesne wrote:
koen, fathi, riku,
i am having issues with auto-serial-console that was initially done by marcin.
https://git.linaro.org/gitweb?p=openembedded/meta-linaro.git%3Ba=tree%3Bf=me...
the main issue is that it conflicts with BSP layer that uses SERIAL_CONSOLE variable. It is very much expected for a BSP layer to set SERIAL_CONSOLE variable. In which case OE will automatically start a serial console
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/sysvin...
So when using auto-serial-console with a 'proper' BSP layer that set SERIAL_CONSOLE(S) we end up with starting the console twice, one added by OE, one by auto-serial-console. So far, all our OE builds are not using a proper BSP layer, so that's why you don't see the problem, but for our builds we use proper BSP layer...
right now, auto-serial-console does 3 things:
1- figure out the serial console port from /proc/cmdline 2- start a console on #1 3- automatically login as root
I believe that we should 'do something' to split them into several packages so that we get more granularity. At least #3 needs to be separated out, as #3 is a 'policy'.
I would almost expect that 'being able to automatically login as root on the console' is a feature that could (should?) be added to oe-core somehow. What do you think koen? I looked into that, but there isn't any obvious (and trivial) way to do that, but it's certainly doable inside an IMAGE_FEATURE for example.
this email is just to start the discussion and get some advices, e.g. i am not asking you to do it ;-) i can work on it, but want to make sure i do it right, with an 'upstream' path if possible.
thx
nico
I think the auto-serial-console is certainly a feature of image and not machine as it currently is in linaro layers. I have been commenting it out of all the machines for ages now as it clashes horribly with systemd.
I assume it was originally designed for LAVA, I would go as far as to say its a really special case which should have its own range of images devoted to it?
Graeme
On Thu, Oct 17, 2013 at 10:29 AM, Graeme Gregory graeme.gregory@linaro.org wrote:
I think the auto-serial-console is certainly a feature of image and not machine as it currently is in linaro layers. I have been commenting it out of all the machines for ages now as it clashes horribly with systemd.
i was just looking into systemd recipes after reading koen's email, and definitely confirms that it will crash with it ;-)
I assume it was originally designed for LAVA, I would go as far as to say its a really special case which should have its own range of images devoted to it?
well, historically, it's been done as an helper for ubuntu ARM images to start the console on the 'right' port. then it was pulled into OE/meta-linaro. it's mostly required by LAVA, you're right. Though Tyler mentioned that they will eventually support non autologin image in LAVA too.
more generally, i think it is still a decent feature to have, but we need to split it into 2 pieces. serial console 'config' which can be done when SERIAL_CONSOLE(S) is not defined, and auto login of root.