A new enhanced bootsplash
Testing this bootsplash
1. build kernel
2. install the kernel
3. add a theme for testing
4. replace /etc/rc
5. replace /boot/defaults/loader.conf
5. run bsplash-fix-grub-cfg (only for GRUB users)
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
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.
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
- Implementation of a new bootsplash mechanism in the kernel
- scripts for creating bootsplash themes
- Example themes
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
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
#2
make buildinstall on a real machine.
- boot it
- check output and dmesg