This is an old revision of the document!


A new enhanced bootsplash

I propose a new bootsplash mechanism. Currently, we can enable bootsplash by adding few options such as splash_bmp_load to /boot/loader.conf but it only displays an image file so I cannot reassure that the system works well. Therefore, I want to develop a new bootsplash mechanism which enables enhancements of attractiveness, such as progress bar. I think this will greatly improve user experience. I’m planning to implement this using src/sys/dev/fb, SYSINIT and kernel module system.

A bootsplash system follows configurations in /boot/splash/foo/loader.conf like this:

bsplash_image_name="/boot/splash/foo/image.bmp"
bsplash_image_load="YES"
 
bsplash_background_y_origin="0"
 
bsplash_progress_bar_y_origin="800"
bsplash_progress_bar_height="30"
bsplash_progress_bar_width="500"
 
bsplash_animation_y_origin="1100"
bsplash_animation_height="300"
bsplash_animation_width="300"
bsplash_animation_repeat="YES"
  • bsplash-create loads theme.conf and generates configuration for /boot/loader.conf and generates an image just like CSS sprites.
  • bsplash-install copies files generated by bsplash-create into /boot/splash.
  • bsplash-change overwrites bsplash configuration in /boot/loader.conf with /boot/splash/theme-name/loader.conf.
#
#  example: create a theme named "foobar" and then change bootsplash to this
#
 
$ cat /boot/loader.conf
if_em_load="YES"
autoboot_delay="1"
### bsplash start ###
bsplash_image_name="/boot/splash/foo/image.bmp"
bsplash_image_load="YES"
# configuration continues...
### bsplash end ###
$ ls background.bmp 
background.bmp
$ ls animation*.bmp
animation0.bmp  animation10.bmp animation12.bmp animation14.bmp animation2.bmp  animation4.bmp  animation6.bmp  animation8.bmp
animation1.bmp  animation11.bmp animation13.bmp animation3.bmp  animation5.bmp  animation7.bmp  animation9.bmp
$ ls progressbar*.bmp                                                                                                                                                                                              
progressbar0.bmp        progressbar20.bmp       progressbar40.bmp       progressbar60.bmp       progressbar80.bmp
progressbar10.bmp       progressbar30.bmp       progressbar50.bmp       progressbar70.bmp       progressbar90.bmp
 
# create
$ bsplash-create --background=background.bmp \
                 --progress-bar='progressbar*.bmp' \
                 --animation='animation*.bmp' \
                 --repeat-animation \
                 image.bmp loader.conf
# install
$ sudo bsplash-install foobar image.bmp loader.conf
# change to foobar
$ sudo bsplash-change foobar
$ cat /boot/loader.conf
if_em_load="YES"
autoboot_delay="1"
### bsplash start ###
bsplash_image_name="/boot/splash/foobar/image.bmp"
bsplash_image_load="YES"
# configuration continues...
### bsplash end ###
  • Implementation of a new bootsplash mechanism in the kernel
  • scripts for creating bootsplash themes
  • Example themes
period milestone status
May 19 - May 25 implement direct drawing done
May 26 - June 8 add changes to src/sys done
June 9 - June 15 write Makefile and scripts for creating themes done
June 16 - June 22 create and enjoy a flip book in bootsplash using direct drawing done
June 23 - June 29 work on unimplemented features (e.g. support RLE4) done
June 28 Mid-term evaluation deadline
June 30 - July 6 develop userland utilities done
July 7 - July 20 support drawing animation in a part of screen done
July 21 - July 27 support progress bar in progress
July 28 - 'pencils down' date create themes and refactoring
August 18 End of coding (hard)
  • Write code in VM on VirtualBox
  • make and copy generated kernel and modules to /boot
  • Launch .vdi of the VM with QEMU on host OS
  • Check output and dmesg
  • make buildinstall on a real machine.
  • boot it
  • check output and dmesg
  • summerofcode2014/bootsplash.1405145272.txt.gz
  • Last modified: 2014/07/12 06:07
  • by SeiyaNuta