77范文网 - 专业文章范例文档资料分享平台

用Bootsplash 实现手机开关机动画

来源:网络收集 时间:2019-02-16 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

用Bootsplash 实现开机动画

用Bootsplash 实现手机开关机动画

现在手机的开关机过程比较慢长,为了不至于让用户等得不耐烦,为了避免用户在不耐烦时做些误操作,也为了美观,手机在开关机时显示动画已经成为惯例了。最近要做Linux手机开关机动画,花了点时间去研究Bootsplash,这里做个笔记。

1. 下载软件包。

http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2

ftp://ftp.bootsplash.org/pub/bootsplash/rpm-sources/bootsplash/bootsplash-3.1.tar.bz2

ftp://ftp.bootsplash.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.21.diff.gz http://www.bootsplash.de/files/themes/Theme-Fedora.tar.bz2 (主题文件可以根据需要下载) 2. 编译内核

tar jxf linux-2.6.21.tar.bz2

gzip -d bootsplash-3.1.6-2.6.21.diff.gz cd linux-2.6.21

patch -p1 <../bootsplash-3.1.6-2.6.21.diff make menuconfig 保证下列配置正常 Device Drivers

Graphics support

<*> Support for frame buffer devices

[*] VESA VGA graphics support Console display driver support

<*> Framebuffer Console support Bootsplash configuration

[*] Bootup splash screen

make; make modules_install;make install 3. 编译工具

tar jxvf bootsplash-3.1.tar.bz2 cd bootsplash-3.1/Utilities make

(编译mng.c时,会成现几个编译错误,手工修改过来) cp fbresolution fbmngplay fbtruetype splash splashpbm /sbin splash -s –f /etc/bootsplash/themes/Fedora/config/bootsplash-1024x768.cfg>/boot/bootsplash cd ../Scripts/ cp * /etc/rc.d

4. 生成主题数据文件

mkdir -p /etc/bootsplash/themes

tar jxvf Theme-Fedora.tar.bz2 -C /etc/bootsplash/themes/

5. 生成initrd

mkdir temp cd temp

cp /boot/initrd-2.6.21.img ../initrd.gz gzip -d ../initrd.gz cpio -i <../initrd

cp /boot/bootsplash .

find . | cpio -c -o > ../initrd-2.6.21-splash.img gzip ../initrd-2.6.21-splash.img

cp ../initrd-2.6.21-splash.img.gz /boot/initrd-2.6.21-splash.img 6. 增加grub menu配置文件

title Fedora Core (2.6.21) splash

root (hd0,6)

kernel /boot/vmlinuz-2.6.21 ro root=LABEL=/ vga=0x317 splash=silent initrd /boot/initrd-2.6.21-splash.img

7. 修改splash.sh

把THEME修改为实际的主题名。

THEME=\ à

THEME=\ 8. 修改/etc/rc.d/rc

l 先做个备份: cd /etc/rc.d/ cp rc rc.bak

(蓝色部分为新增脚本)

l 声明splash.sh中需要变量。 # check a file to be a correct runlevel script check_runlevel () { # Check if the file exists at all. [ -x \ is_ignored_file \ return 0 } export progress=0 export sscripts=0 export kscripts=0 for item in /etc/rc.d/rc3.d/S*;do sscripts=$(($sscripts + 1)) done for item in /etc/rc.d/rc3.d/K*;do kscripts=$(($sscripts + 1)) done l 设置关机进度条。

# First, run the KILL scripts. for i in /etc/rc$runlevel.d/K* ; do check_runlevel \ # Check if the subsystem is already up. subsys=${i#/etc/rc$runlevel.d/K??} [ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \\ || continue # Bring the subsystem down. if LC_ALL=C egrep -q \ $i stop else action $\ fi progress=$(($progress+ 1)) /etc/rc.d/splash.sh 2>/dev/nul done l 设置开机进度条。 # Now run the START scripts. for i in /etc/rc$runlevel.d/S* ; do check_runlevel \ # Check if the subsystem is already up. subsys=${i#/etc/rc$runlevel.d/S??} [ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \\ && continue # If we're in confirmation mode, get user confirmation if [ -f /var/run/confirm ]; then confirm $subsys test $? = 1 && continue fi update_boot_stage \ # Bring the subsystem up. if [ \ export LC_ALL=C exec $i start fi if LC_ALL=C egrep -q \ || [ \ $i start else action $\ fi progress=$(($progress+ 1)) /etc/rc.d/splash.sh 2>/dev/nul done 重新启动就OK了。

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库用Bootsplash 实现手机开关机动画在线全文阅读。

用Bootsplash 实现手机开关机动画.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/477588.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: