cd /usr/src/linux
make mrproper
patch -Np1 -i ../bootsplash-3.0.7-2.4.23.diff
重新编译内核:
make menuconfig
选上如下的几个参数:
Code maturity level options --->
Prompt for development and/or incomplete code/drivers
Block devices ---> RAM disk support
Block devices ---> Initial RAM disk (initrd) support
Console drivers ---> Video mode selection support
Console drivers ---> Frame-buffer support --->
Support for frame buffer devices
VESA VGA graphics console
Use splash screen instead of boot logo
然后编译内核:
make dep && make bzImage
再把生成的内核拷贝到/boot下:
cp arch/i386/boot/bzImage /boot/linux-bootsplash
这样我们得到的新内核bzImage就是支持bootsplash的内核了,剩下的工作就是对bootsplash的定制了。
1.2 安装用户空间程序
下载bootsplash工具,解压安装:
tar –zxf bootsplash-3.0.7.tar.gz
cd bootsplash-3.0.7/Utilities
make
cp fbresolution fbmngplay fbtruetype splash /sbin/
# 初始化变量j
# j 为进度条的宽度
j=20
for i in /etc/rcS.d/S??*
do
[ ! −f "$i" ] &continue
# 进度条开始
#
# 保证进度条宽度不超出范围
if ((j <616))
then
# 此时调用progress程序,画比前一次宽一个单位
#(15个像素)的进度条
# x y dx dy color
/usr/local/bin/progress 204 667 $j 21 FCD123
let j=j+15
fi
# 结束进度条绘制
case "$i" in
*.sh)
#
danger_var=395
j=danger_var
for i in /etc/rc$runlevel.d/S*
do
[ ! −f $i ] &continue
if [ $previous != N ] &[ $previous != S ]
then
#
# Find start script in previous runlevel and
# stop script in this runlevel.
#
suffix=${i#/etc/rc$runlevel.d/S[0−9][0−9]}
stop=/etc/rc$runlevel.d/K[0−9][0−9]$suffix
previous_start=/etc/rc$previous.d/S[0−9][0−9]$suffix
#
# If there is a start script in the previous level
# and _no_ stop script in this level, we don"t
# have to re−start the service.
#
[ −f $previous_start ] &[ ! −f $stop ] &continue
fi
#继续进度条绘制
#保证进度条宽度不超出范围
if ((j <616))
then
/usr/local/bin/progress 204 666 $j 21 FCD123
let j=j+15
fi
#结束进度条绘制
case "$runlevel" in
0|6)
startup $i stop
;;
*)
startup $i start
;;
esac
done