?
?
一、下載psplash源碼
?
下載 psplash:git clone git://git.yoctoproject.org/psplash,會下載到當前目錄的psplash文件夾中
forlinx@ubuntu:~/imx8mq/OK8MQ-linux-sdk$ git clone git://git.yoctoproject.org/psplash
Cloning into 'psplash'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 306 (delta 2), reused 0 (delta 0), pack-reused 295
Receiving objects: 100% (306/306), 128.73 KiB | 4.44 MiB/s, done.
Resolving deltas: 100% (192/192), done.
下載成功后會在當前目錄下生成一個psplash文件夾,進入psplash文件夾
1、主圖片logo_bmw.png:
??

2、進度條圖片logo.png:

?


?

二、制作進度條和LOGO
1、制作進度條和LOGO
需要安裝以下庫:
sudo apt-get install libgdk-pixbuf2.0-dev
sudo apt-get install build-essential libncurses5-dev
制作logo
執行命令: ./make-image-header.sh logo_bmw.png POKY //logo_bmw.png是自己要啟動的圖片
執行上面的命令會生成一個logo_bmw-img.h文件

?

POKY 參數只是一個變量,它會傳入到 logo_bmw-img.h 文件里面,可以打開查看。
vi logo_bmw-img.h

?

2、制作進度條
執行命令:./make-image-header.sh logo.png BAR
執行上面的命令會生成一個logo-img.h文件

?

同樣我們打開 logo-img.h 這個文件。它必須是加 BAR 參數的,因為其他地方會
用到這樣的宏定義。
vi logo-img.h

?

找到psplash.c文件并打開注釋掉原來的頭文件添加引用你生成的頭文件

?

修改完成后保存退出 psplash.c,返回到源碼目錄下,制作 autogen.sh 腳本,用于生成 Makefile
3、制作 autogen.sh 腳本
制作 autogen.sh 腳本,用于生成 Makefile,如下
vim autogen.sh
腳本內容以下:
#!/bin/bash
aclocal
autoheader
automake --add-missing
autoconf
賦予可執行權限:chmod 777 autogen.sh
./autogen.sh

?

修改 Makefile.am,將 psplash-poky-img.h 修改成 logo_bmw-img.h,將 psplash-bar-img.h 修
改成 logo-img.h
vi Makefile.am
修改完后的 Makefile.am 如下圖所示。

?

修改完 Makefile.am 后保存退出,回到源碼目錄下。
4、配置交叉編譯器環境變量
. /opt/fsl-imx-xwayland/5.4-zeus/environment-setup-aarch64-poky-linux
環境變量使能后,就可以執行以下指令配置交叉編譯工具鏈。
./configure --host=aarch64-poky-linux

?

執行 make 指令進行編譯。
make

?

編譯完成后會在源碼目錄下生成 psplash 和 psplash-write 文件。

?

三、替換出廠系統進度條和 logo
將編譯生成的 psplash 和 psplash-write 文件拷貝到iMX8MQ開發板出廠文件系統/usr/bin 目錄下。
? 審核編輯:鄢孟繁
評論