xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

Localize splash messages #641

Open anaconda opened 9 years ago

anaconda commented 9 years ago

Ideally based on the locale set in XBMC. This is just a reminder. I'll be working on it once https://github.com/xbianonpi/xbian/issues/624#issuecomment-59948030 is fixed.

anaconda commented 9 years ago

@mk01 can you please push the current xbian-package-splash.

I've modified my local /usr/bin/splash (shell script), but on Git (xbian-package-splash) it's a binary.

mk01 commented 9 years ago

@anaconda

recreated xbian-package-splash as $xbiangit repository. upstream source is CurlyMoo's splash V2 but with lot of changes. some I pushed back to curly some other not - after code cleanup should be sent most of them again back CurlyMoo.

two important points: old splash was using mmapped file for communication between daemon and client (or accepting control commands from client instance). this added need for extra handling of NS change during rootfs move (initramfs -> root) - daemon has to be signalled about NS change with its auto restart under new root.

plan was to use sockets instead of mmap with new version - curlymoo finally changed to net socks - probably to avoid the extra code on NS change. this saved few lines of code but created new 'stupid' problem. daemon can't be used without configured network (at least lo interface started and configured). this can be "fixed" by early lo configuration, but there are more consequences - like for instance halt and reboot init targets (simply old sysv and all the scripts and support tools) never expected network running until kernel goes stop.

also by change to threaded net socks, daemon can receive n- incoming connections but proper locking is missing (so crashes or daemon on shutdown but another client trying to configure FB), client commands out of order etc etc.

also the client commands have not been compatible between old and new splash (but XBian has quite many references to splash from various places or packages).

it would be nice to adapt Splash sources accordingly but it would mean something like mini-project. so network scripting was moved to upstart ahead of Debian/Wheezy, completely removed from sysv. lo interface is started in early initramfs to have splash before having /. lo interface is also excluded from net deconfiguring jobs.

for diff parameters problem and locking(and in order processing of client requests) there is wrapper script providing the old splash like interface (in the old target /usr/bin/splash). it is also handling starting and stopping the daemon itself (previous splash had just one binary which forked if it wasn't running yet).

it is running without issues for months now but for future reference - keep this info because it will come the day nobody will remember WHY and more important HOW. ;)

the mem buffer free on --blank should go back CurlyMoo, the special handling on --blank return I'm not so sure - mostly because can change with every update to EGL imx6 xbmc implementation. Also the FB ioctl calls doesn't behave the same way on RPI/imx6 in corner cases and it took me lot of time to elaborate fb_init() and fb_unblank(restore) calls order / combination to get same result. that means better not touch if absolutely needed.

repo is pushed now, actual sources on build server in 'working'. what is needed is to add install target to Makefile (to have standard $xbiangit scripts working). actual deb structure is in content-tpl as usual, I only removed binaries (replaced them with .placeholder for reference only until Makefile is patched).

can you please finish it up? also the fb.c code would NEED some cleanup (reformatting and space/tab consolidation).

mk01 commented 9 years ago

last info, there is only "rpi" platform config - also it is compiled against wheezy (raspbian) root. but AS compiled - the same .deb is used for cubox too. the base libs (libm, libjpeg, libfreetype and libz) match. arm is compiled as HF.