A Dash of Splash

As Dabba is an embedded product it would be good to put a "humane" face to the user as soon as possible when powered on rather than shower them with linux booting messages or worse a blank and a dark screen.  No display monitor is  connected to Dabba, instead the TV-out on the PVR350 card is used for output. So the ivtv framebuffer setup needs to be done as early as possible during the booting step. And this is the job cut out for the initramfs.

The Linux initrd is a temporary root file system that is mounted during system bootup to support complicated/exotic root file systems like RAID, encrypted file system, LVM etc,. The initrd contains the necessary drivers, modules and setup code to bring up the real file system. However in the Dabba's case the ivtv framebuffer and  a splash setup using this framebuffer is created using this method.


mkinitcpio ::

After a brief research on the methods for building initrd (mkinitrd/YAIRD/mkinitramfs/mkinitcpio) decided to use the mkinitcpio from the ArchLinux, as this looked  more modular and more importantly it is supported by the splashutils. This is a variation on the older mkinitramfs.  Only the init scripting and the way the ramfs is constructued seems to be unique to this. This has the build-time and run-time parts ("hooks"). The only hitch here is that the mkinitcpio is expected to be installed and executed natively, but in my case I will be putting it into the OE framework and execute it in a roundabout way.

In the Dabba case, all the files needed for the initrd creation are first laid out in the 'initrd' directory in the OE staging area. 'mkinitcpio' and splasn_gen_initramfs are used to create the  initrd file and install it in the OE rootfs directory.

The plumbing done  in the course of the splash setup are:

mkinitcpio:
Added the recipe and a couple of patches to run it in the OE framework.
klibc :  
Just bumped the version..
klibc-udev :
Borrowed it from archlinux and added a recipe for this.
splashutils:
Added the --prefix option to splash_geninitramfs .
dsplash-themes:
This recipe just  installs the needed themes to the staging area
dsplash:
- copy the kernel modules from the OE staging area to the initrd staging
- copy the config files from CVS repo to the initrd staging ($rdstg)
  - udev/udev.conf , modprobe.conf, fstab , mkinitcpio.conf

- run depmod in the $rdstg
- now run mkinitcpio to generate the file.list and .img file
- then run splash_geninitramsf to append the splash info to the .img file
- install the .img file to the workdir/boot



DABBA2

As with Dabba1 the splash functionality will be built using the mkinitcpio from ArchLinux and splashutils from gentoo.

Framebuffer Testing setup::

fb21



When I started implementing the splash for Dabba2 I noticed one problem: the Atom Board's VGA-out was not useful as the splash is targetting the ivtv framebuffer connected to the TV-out AND there was no TV nearby. It is here that an old piece of hw came very useful. Couple of years ago I had requested one of my neighbour to purchase the WinTV PVR350 Card on his Singapore visit. In his infinite wisdom he brought me the KWorld USB2800D, this  inspite of me giving him the hardcopy printouts of the PVR350 brochure/specs etc,. Anyway it entered my "hw attic" until now.

I realised that the PVR 350 composite out can be connected to the RCAin of the USB encoder which is then plugged to my devel gentoo host. Very soon I had the ivtv framebuffer being "played" by mplayer !

modprobe em28xx card=8 video_debug=1 tuner=7
 mplayer tv:// -aspect 4:3 -tv \    device=/dev/video0:width=640:height=480:input=1

mplayer_shot


Catching up with splashutils...

A minor version up to 1.5.4.3:  so added the new recipe file,  removed the klibc dependency.


This time around did a manual testing of the splashutils. 

Following simple steps will do:


Start the splash daemon:

fbset -depth 16 -xres 720 -yres 576

/sbin/fbsplashd.static --theme=livecd-2006.1 --pidfile=/lib/splash/cache/daemon.pid

Note that the daemon creates the FIFO in /lib/splash/cache/.splash.
Init the splash daemon:

echo "set effects fadein" >  /lib/splash/cache/.splash   
echo "set mode silent" >  /lib/splash/cache/.splash
echo "repaint" >  /lib/splash/cache/.splash

Now send the commands for testing the splash to the daemon..

Set the progress marker

echo "progress 40000" >  /lib/splash/cache/.splash    

Set the new state of a service


echo "update_svc  alsasound  svc_started" >  /lib/splash/cache/.splash
sleep 5
echo "update_svc  alsasound  svc_stop" >  /lib/splash/cache/.splash

Repaint the screen

echo "repaint" >  /lib/splash/cache/.splash



Catching up with the mkinitcpio...

As of now mkinitcpio is version 0.6.7 and quite a bit of changes have happened, mainly removing klibc and using glibc and busybox. All the details are in the developer's blog and the ArchLinux bugzilla entry.

For the new 0.6.7 recipe removed the klibc dependency and added new ones for udev, busybox, util-linux-ng.
Re-applied my patches for BASEDIR fix.