imx6 linux启动代码,psplash 使用例程 操作方法(linux 开机logo)
目前在使用freescaleimx6 yocto环境,默认的文件系统中有一个开机进度条的画面。刚好我们需要这样一个开机画面,这里整理记录一下。首先在yocto中找到了源码。一般流程如下:1,./autogen.sh2,./configure –prefix=/work/psplash/install_dir3,修改Makefilea,CC=/opt/fsl-imx-fb/3.14.52-1.1.0
目前在使用freescale
imx6 yocto环境,默认的文件系统中有一个开机进度条的画面。刚好我们需要这样一个开机画面,这里整理记录一下。
首先在yocto中找到了源码。一般流程如下:
1,./autogen.sh
2,./configure –prefix=/work/psplash/install_dir
3,修改Makefile
a,CC=/opt/fsl-imx-fb/3.14.52-1.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
-march=armv7-a
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/fsl-imx-fb/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi
b,DEFAULT_INCLUDES=-I/opt/fsl-imx-fb/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include
4,配置环境变量
export LIBRARY_PATH=/opt/fsl-imx-fb/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib
5,make
6,make install
一,更换开机图片
做好图片,png格式。利用自带脚本转换成头文件。
./make-image-header.sh my-logo.png POKY
my-logo-img.h直接修改成psplash-poky-img.h
重新编译就OK了。
二,去掉进度条
不需要进度条,只要那张图片。去掉进度条步骤如下:
1,将psplash.c文件中的psplash_draw_progress函数定义及其调用通通注释掉
2,将psplash.c文件中以下代码屏蔽
/* Draw progress bar border */
psplash_fb_draw_image (fb,
(fb->width
- BAR_IMG_WIDTH)/2,
SPLIT_LINE_POS(fb),
BAR_IMG_WIDTH,
BAR_IMG_HEIGHT,
BAR_IMG_BYTES_PER_PIXEL,
BAR_IMG_ROWSTRIDE,
BAR_IMG_RLE_PIXEL_DATA);
三,修改背景色
将进度条的背景颜色改为纯黑色。修改如下:
psplash-colors.h 中关于背景的宏定义,RGB方式的。
/* This is the overall background color */
//#define PSPLASH_BACKGROUND_COLOR
0xec,0xec,0xe1
#define PSPLASH_BACKGROUND_COLOR
0x00,0x00,0x00
四,安装文件
1,psplash , psplash-write放在文件系统/usr/bin/
2,psplash.sh放在/etc/init.d/
点击(此处)折叠或打开
#!/bin/sh
### BEGIN INIT INFO
# Provides: psplash
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
read CMDLINE < /proc/cmdline
for x in $CMDLINE; do
case $x in
psplash=false)
echo "Boot splashscreen disabled"
exit 0;
;;
esac
done
export TMPDIR=/mnt/.psplash
mount tmpfs -t tmpfs $TMPDIR -o,size=40k
rotation=0
if [ -e /etc/rotation ]; then
read rotation < /etc/rotation
fi
/usr/bin/psplash --angle $rotation &
Note
./make-image-header.sh LOGO-1.png POKY
./make-image-header.sh: 7:
./make-image-header.sh: gdk-pixbuf-csource: not found
解决方法:
sudo apt-get install libgdk-pixbuf2.0-dev
参考链接:
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)