Use of /sys/class/tty/console/active breaks OLPC splash
Daniel Drake
dsd at laptop.org
Mon Apr 9 09:40:30 PDT 2012
Hi,
Due to recent fixes in git and also packaged in Fedora, plymouth is
now reading from /sys/class/tty/console/active instead of using the
kernel command line.
This has broken splash for OLPC.
On OLPC, this file has contents: ttyS0 tty0
As described in the kernel documentation, the final one is the primary
tty, in our case tty0.
I can't get my head around plymouth's logic here.
If I'm reading add_consoles_from_file() correctly, if
/sys/class/tty/console/active has any contents at all, the graphical
splash will be disabled due to the following line:
state->should_force_details = true;
Also, there is a bug in the loop here:
console_length = strlen (console);
...
remaining_command_line += console_length;
As strlen doesn't include the null-byte, remaining_command_line is not
fast-forwarded enough, meaning that the "tty0" console above is never
read.
If I remove the should_force_details=true line, and increment
remaining_command_line by one, both displays get added as follows:
[main.c] initialize_environment:initializing
minimal work environment
[main.c] check_verbosity:checking if
tracing should be enabled
[main.c] check_verbosity:tracing
shouldn't be enabled!
[main.c] check_logging:checking if
console messages should be redirected and logged
[main.c] check_logging:logging will be enabled!
[main.c] initialize_environment:source built on
Apr 9 2012
[main.c] initialize_environment:checking if
'/dev/tty1' exists
[main.c] check_for_consoles:checking for consoles
[main.c] add_consoles_from_file:opening
/sys/class/tty/console/active
[main.c] add_consoles_from_file:reading file
[main.c] add_consoles_from_file:console /dev/ttyS0 found!
[main.c] add_consoles_from_file:console /dev/tty0 found!
[main.c] check_for_consoles:After
processing serial consoles there are now 0 text displays
[main.c] initialize_environment:Making sure
/var/run/plymouth exists
[ply-utils.c] ply_create_directory:directory
'/var/run/plymouth' already exists
[main.c] initialize_environment:initialized
minimal work environment
[main.c] get_cache_file_for_mode:returning cache
file '/var/lib/plymouth//boot-duration'
[main.c] main:entering event loop
[ply-boot-server.c]
print_connection_process_identity:connection is from pid 3157
(plymouth show-splash) with parent pid 1091 (-bash)
[ply-boot-server.c] ply_boot_connection_on_request:got
show splash request
[main.c] plymouth_should_ignore_show_splash_calls:checking if
plymouth should be running
[main.c] check_for_consoles:checking for
consoles and adding displays
[main.c] add_consoles_from_file:opening
/sys/class/tty/console/active
[main.c] add_consoles_from_file:reading file
[main.c] add_consoles_from_file:console /dev/ttyS0 found!
[main.c] add_consoles_from_file:console /dev/tty0 found!
[main.c] add_display_and_keyboard_for_console:adding display
and keyboard for console /dev/ttyS0
[main.c] set_keyboard:listening for keystrokes
[main.c] set_keyboard:listening for backspace
[main.c] set_keyboard:listening for enter
[main.c] add_display_and_keyboard_for_console:adding display
and keyboard for console /dev/tty1
[main.c] set_keyboard:listening for keystrokes
[main.c] set_keyboard:listening for backspace
[main.c] set_keyboard:listening for enter
[main.c] check_for_consoles:After
processing serial consoles there are now 2 text displays
However things are still not right - no graphical splash appears.
The fact that 2 text displays have been registered means that when we get here:
if (should_add_displays && ply_list_get_length (state->text_displays) == 0)
add_default_displays_and_keyboard (state);
since we have 2 text_displays we dont bother calling
add_default_displays_and_keyboard, which means that we never add any
pixel displays --> no splash.
Bit lost in the logic here; how is this supposed to work?
Thanks
Daniel
More information about the plymouth
mailing list