Very very nice! Yes, this is a discussion we had with Dennis (from DirectFB). He told me to essentially do what you said, reopen the device if it gets zero lenght. The temporary fix was to just yield the CPU for 2 seconds (which we patch and submitted the patch upstream).
I´m on vacation now but as soon as I can I'll apply your patches and submit them upstream. Getting access to write to the Splashy git repo is really simple. All you need to do is ask ;-) On Thu, Apr 3, 2008 at 10:49 AM, John Hughes <[EMAIL PROTECTED]> wrote: > Ok, so working on my theory that the problems were caused by init > interfering with splashy's use of the console I tried patching directfb > to close and reopen the console if it gets a zero length read. > > This works in testing, but when I tried it on a real boot things failed > again, strace showed: > > 549 nanosleep({0, 10}, <unfinished ...> > 292 <... read resumed> "", 64) = 0 > 292 close(1) = 0 > 292 open("/dev/tty8", O_RDWR|O_NOCTTY) = -1 ENOENT (No such file or > directory) > 292 open("/dev/vc/8", O_RDWR|O_NOCTTY) = -1 ENOENT (No such file or > directory) > 292 _exit(0) > > I.E. the keyboard reading thread couldn't find the console virtual > terminal, so it's giving up in disgust. > > Ponder, ponder, EUREKA! > > splashy is started from the initramfs, by the time init zaps the console > the initramfs has been cleaned out, so splashy should be trying to open > the console on the root filesystem. > > splashy needs a function to tell it to chroot into the root filesystem > when it has been mounted. I implemented a splashy_update "chroot dir" > command, and run it from /scripts/init-bottom. > > AND IT WORKS! > > Summary of changes needed: > > 1. /etc/init.d/splashy needs to do > > stty -icanon -clocal > > if splashy is already running. > > 2. directfb needs to be patched to close & reopen the console if it gets > a zero-length read. > > 3. splashy needs a "chroot" command. > > 4. the scripts/init-bottom/splashy script needs to tell splashy to do > the chroot. > > Patches attached. > > > > #!/bin/sh -e > > PREREQS="" > > prereqs() { echo "$PREREQS"; } > > case "$1" in > prereqs) > prereqs > exit 0 > ;; > esac > > pidof splashy >/dev/null && /sbin/splashy_update "chroot $rootmnt" > > > _______________________________________________ > Splashy-devel mailing list > [EMAIL PROTECTED] > http://lists.alioth.debian.org/mailman/listinfo/splashy-devel > -- ----)(----- Luis Mondesi Maestro Debiano ----- START ENCRYPTED BLOCK (Triple-ROT13) ------ Gur Hohagh [Yvahk] qvfgevohgvba oevatf gur fcvevg bs Hohagh gb gur fbsgjner jbeyq. ----- END ENCRYPTED BLOCK (Triple-ROT13) ------