[Splashy-devel] charset changes of tty fonts and directfb apps clash

Luis lemsx1 at gmail.com
Tue Dec 5 10:02:36 CET 2006


Hello all,

After months and months of debugging an app that starts early at boot
(even from initramfs) using a framebuffer on various versions of
Linux, I came to the conclusion that what gives me the most problem is
/usr/bin/charset (and the family of console-tools apps like
unicode_start/unicode_stop on TTYs).

Is this a known issue? What can I do to prevent charset from
interfering with a directfb-based application?

This is the relevant code:

# Per-VC ACMs
    VCS="`set | grep '^APP_CHARSET_MAP_vc[0-9]*=' | sed -e
's/^APP_CHARSET_MAP_vc//' -e 's/=.*//'`"
    if [ "${VCS}" ]
        then
        [ "$VERBOSE" != "no" ] && log_action_begin_msg "Setting up
per-VC ACM\'s"
        for vc in ${VCS}
          do
            # extract FONTNAME info from variable setting
          eval acm=\$APP_CHARSET_MAP_vc$vc
          ${CHARSET} --tty="${DEVICE_PREFIX}$vc" G0 "$acm"
        done
        [ "$VERBOSE" != "no" ] && log_action_end_msg 0
    fi

${CHARSET} --tty="${DEVICE_PREFIX}$vc" G0 "$acm"

According to the man page for charset, the Linux kernel driver has a
limitation and it doesn't allow charset (command) to determine whether
a character has already been set for G0 or G1 slots of a given TTY. So
this initrc script (used mainly on Debian-based systems) attempts to
set the charset for e/a TTY on slot G0 regardless of whether there is
something running on it or not.

Is there an option to directfb to prevent it from initializing a
charset for a TTY? I'm not sure if that's the problem, but it seems to
be that my directfb application blocks access to the TTY and it
prevents charset from doing it's job. Resulting in a stalemate during
boot.

The work-around of course, is to simply tell scripts calling
charset/unicode_start/unicode_stop to wait until my app has finished.

Any help will be greatly appreciated.

-- 
----)(-----
Luis Mondesi
*NIX Guru

"Feliz el hombre que ha hallado sabiduria y el hombre que consigue
discernimiento, porque el tenerla como ganancia es mejor que tener la
plata como ganancia; y el tenerla como producto, [mejor] que el oro
mismo" (Prov 3:13-14).



More information about the Splashy-devel mailing list