一,怎么更改bootloader里的logo图片:
1 首先得拿到图片,格式要求是png, 色深8bit, 且不带alpha(透明色)通道的
2 将 png文件转换成raw文件
convert Android.png -depth 8 rgb:android.raw
3 对于某些屏(只支持RGB565才需要此步骤),将raw文件转换成565格式的raw文件, Android 自带了一个这样的工具,在out/host/linux-x86/bin
./rgb2565 android.raw android.raw565
4 将android.raw或android.raw565转换成原始数组
xxd -i android.raw565 > android_logo.h
xxd -i android.raw > android_logo.h
复制android_
logo.h
中的数组,替换
bootable\bootloader\lk\platform\msm_shared\include\Splash.h
中相应的
imageBuffer_rgb888[]
数组;
注意: splash.h 文件中,有 imageBuffer[] 和 imageBuffer_rgb888[] 两个数组。利用一个预编译进行判断
注意: splash.h 文件中,有 imageBuffer[] 和 imageBuffer_rgb888[] 两个数组。利用一个预编译进行判断
根据自己的实际情况修改对应的数组
修改宏的值:
修改宏的值:
SPLASH_IMAGE_WIDTH
对应logo.png的高度
SPLASH_IMAGE_HEIGHT 对应logo.png的宽度
SPLASH_IMAGE_HEIGHT 对应logo.png的宽度
编译lk烧写验证。
二,企鹅界面对应splash.img的生成
device\qcom\common\display\logo\logo_gen.py,生成splash.img的步骤:
(1) sudo apt-get install Python-imaging
(2) python ./logo_gen.py snapdragon.png
这样就可在当前目录下生成splash.img,图片要求png格式,且且色深为8-bit的RGB或者RGBA格式。