A new enhanced bootsplash

Testing this bootsplash

1. build kernel

   1 $ cd /tmp
   2 $ svn co https://socsvn.freebsd.org/socsvn/soc2014/seiya/bootsplash bsplash
   3 $ cd bsplash/sys/amd64/conf
   4 $ cp GENERIC BSPLASH
   5 $ echo 'device bsplash' >> BSPLASH
   6 $ config -d /tmp/build BSPLASH
   7 
   8 $ cd /tmp/build
   9 $ MAKESYSPATH=/tmp/bsplash/share/mk make -j2 KERNCONF=BSPLASH

2. install the kernel

   1 # cd /boot
   2 # cp -r kernel kernel.old
   3 # cd /tmp/bsplash
   4 # MAKESYSPATH=/tmp/bsplash/share/mk make -j2 install

3. add a theme for testing

   1 # cd /tmp
   2 # pkg install ImageMagick python py27-pillow
   3 # git clone https://github.com/nuta/bsplash-utils.git utils
   4 # cd utils/test
   5 # make enable

4. replace /etc/rc

   1 # cp /etc/rc /etc/rc.old
   2 # cp /tmp/bsplash/etc/rc /etc/rc

5. replace /boot/defaults/loader.conf

   1 # cd /boot/defaults
   2 # cp loader.conf loader.conf.old
   3 # cp /tmp/bsplash/sys/boot/forth/loader.conf loader.conf

5. run bsplash-fix-grub-cfg (only for GRUB users)

   1 # cd /tmp/utils
   2 # bsplash-fix-grub-cfg /boot/loader.conf /boot/grub/grub.cfg > tmp
   3 # mv tmp /boot/grub/grub.cfg

6. reboot and enjoy bootsplash

Project description

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.

Approach to solving the problem

kernel

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

   1 bsplash_image_name="/boot/splash/foo/image.bmp"
   2 bsplash_image_load="YES"
   3 
   4 bsplash_background_y_origin="0"
   5 
   6 bsplash_progress_bar_y_origin="800"
   7 bsplash_progress_bar_height="30"
   8 bsplash_progress_bar_width="500"
   9 
  10 bsplash_animation_y_origin="1100"
  11 bsplash_animation_height="300"
  12 bsplash_animation_width="300"
  13 bsplash_animation_repeat="YES"

userland utilities

   1 #
   2 #  example: create a theme named "foobar" and then change bootsplash to this
   3 #
   4 
   5 $ cat /boot/loader.conf
   6 if_em_load="YES"
   7 autoboot_delay="1"
   8 ### bsplash start ###
   9 bsplash_image_name="/boot/splash/foo/image.bmp"
  10 bsplash_image_load="YES"
  11 # configuration continues...
  12 ### bsplash end ###
  13 $ ls background.bmp 
  14 background.bmp
  15 $ ls animation*.bmp
  16 animation0.bmp  animation10.bmp animation12.bmp animation14.bmp animation2.bmp  animation4.bmp  animation6.bmp  animation8.bmp
  17 animation1.bmp  animation11.bmp animation13.bmp animation3.bmp  animation5.bmp  animation7.bmp  animation9.bmp
  18 $ ls progressbar*.bmp                                                                                                                                                                                              
  19 progressbar0.bmp        progressbar20.bmp       progressbar40.bmp       progressbar60.bmp       progressbar80.bmp
  20 progressbar10.bmp       progressbar30.bmp       progressbar50.bmp       progressbar70.bmp       progressbar90.bmp
  21 
  22 # create
  23 $ bsplash-create --background=background.bmp \
  24                  --progress-bar='progressbar*.bmp' \
  25                  --animation='animation*.bmp' \
  26                  --repeat-animation \
  27                  image.bmp loader.conf
  28 # install
  29 $ sudo bsplash-install foobar image.bmp loader.conf
  30 # change to foobar
  31 $ sudo bsplash-change foobar
  32 $ cat /boot/loader.conf
  33 if_em_load="YES"
  34 autoboot_delay="1"
  35 ### bsplash start ###
  36 bsplash_image_name="/boot/splash/foobar/image.bmp"
  37 bsplash_image_load="YES"
  38 # configuration continues...
  39 ### bsplash end ###
  40 

Deliverables

Milestones

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

done

July 28 - 'pencils down' date

create themes and refactoring

done

August 18

End of coding (hard)

Test Plan

#1

#2

The Code

SummerOfCode2014/Bootsplash (last edited 2014-08-17T13:46:55+0000 by SeiyaNuta)