近期有部分客戶詢問飛凌嵌入式i.MX8M系列開發(fā)板如何添加或更改開機動畫,下文以O(shè)KMX8MM-C為例整理出如下思路,可供客戶嘗試。
一、下載 psplash源碼
1.下載psplash:gitclone git://git.yoctoproject.org/psplash,會下載到當前目錄的psplash文件夾中-
forlinx@ubuntu:~$ git clone git://git.yoctoproject.org/psplash -
Cloning into 'psplash'... -
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 | 74.00 KiB/s, done. -
Resolving deltas: 100% (192/192), done.
注:代碼可左右滑動,下同
2.下載成功后會在當前目錄下生成一個psplash文件夾,進入psplash文件夾
-
forlinx@ubuntu:~$ cd psplash/ -
forlinx@ubuntu:~/psplash$ ls

-
forlinx@ubuntu:~/psplash$ sudo apt-get install libgdk-pixbuf2.0-dev -
[sudo] password for forlinx: -
Reading package lists... Done -
Building dependency tree -
Reading state information... Done -
The following package was automatically installed and is no longer required: -
Use 'sudo apt autoremove' to remove it. -
【…】 -
forlinx@ubuntu:~/psplash$ sudo apt-get install build-essential libncurses5-dev -
Reading package lists... Done -
Building dependency tree -
Reading state information... Done -
【…】
4.將想要替換的圖片復(fù)制到psplash文件夾中,此處用的是我們公司的logo,命名為logo-1024x600.png,外框照片命名為logo-bar.png。
進度條的外框logo-bar.png。
將這兩張圖片拷貝到psplash源碼目錄中,如下圖所示。
二、制作logo
1.在psplash源碼中執(zhí)行以下指令來生成logo-1024x600-img.h-
forlinx@ubuntu:~/psplash$ ./make-image-header.sh logo-1024x600.png POKY -
forlinx@ubuntu:~/psplash$ ls

POKY參數(shù)只是一個變量,它會傳入到logo-1024x600-img.h文件里面,可以打開查看。
-
forlinx@ubuntu:~/psplash$ vi logo-1024x600-img.h

-
forlinx@ubuntu:~/psplash$ ./make-image-header.sh logo-bar.png BAR -
forlinx@ubuntu:~/psplash$ ls

-
forlinx@ubuntu:~/psplash$ vi logo-bar-img.h

-
forlinx@ubuntu:~/psplash$ vi psplash.c

-
forlinx@ubuntu:~/psplash$ vi autogen.sh
內(nèi)容如下:
-
#!/bin/bash -
aclocal -
autoheader -
automake --add-missing -
autoconf
制作完腳本后,賦予它可執(zhí)行權(quán)限,再執(zhí)行這個腳本。
-
forlinx@ubuntu:~/psplash$ chmod 777 autogen.sh -
forlinx@ubuntu:~/psplash$ ./autogen.sh -
configure.ac:7: installing './compile' -
configure.ac:3: installing './install-sh' -
configure.ac:3: installing './missing' -
Makefile.am: installing './INSTALL' -
Makefile.am: installing './depcomp'
5.修改Makefile.am,將psplash-poky-img.h修改成logo-1024x600-img.h,將psplash-bar-img.h修改成logo-bar-img.h。
-
forlinx@ubuntu:~/psplash$ vi Makefile.am
修改完后的Makefile.am如下圖所示。

-
forlinx@ubuntu:~/psplash$ . /opt/fsl-imx-xwayland/4.14-sumo/environment-setup-aarch64-poky-linux
7.環(huán)境變量使能后,就可以執(zhí)行以下指令配置交叉編譯工具鏈。
-
forlinx@ubuntu:~/psplash$ ./configure --host=aarch64-poky-linux -
configure: loading site script /opt/fsl-imx-xwayland/4.14-sumo/site-config-aarch64-poky-linux -
checking for a BSD-compatible install... /usr/bin/install -c -
checking whether build environment is sane... yes -
checking for aarch64-poky-linux-strip... aarch64-poky-linux-strip -
checking for a thread-safe mkdir -p... /bin/mkdir -p -
checking for gawk... no -
checking for mawk... mawk -
checking whether make sets $(MAKE)... yes -
checking whether make supports nested variables... yes -
checking for style of include used by make... GNU -
【…】
8.執(zhí)行make指令進行編譯。
-
forlinx@ubuntu:~/psplash$ make -
cd . && /bin/bash /home/forlinx/psplash/missing automake-1.15 --gnu Makefile -
cd . && /bin/bash ./config.status Makefile depfiles -
config.status: creating Makefile -
config.status: executing depfiles commands -
./make-image-header.sh base-images/psplash-bar.png BAR -
make all-am -
make[1]: Entering directory '/home/forlinx/psplash' -
aarch64-poky-linux-gcc -
--sysroot=/opt/fsl-imx-xwayland/ -
4.14-sumo/sysroots/aarch64-poky-linux -DHAVE_CONFIG_H -I -
. -g -Wall -Wextra -
-D_GNU_SOURCE -DFONT_HEADER="radeon-font.h" -
-DFONT_DEF=radeon_font -O2 -pipe -g -
-feliminate-unused-debug-types -
-MT psplash-psplash.o -MD -MP -MF -
.deps/psplash-psplash.Tpo -c -o psplash-psplash.o -
`test -f 'psplash.c' || echo './'`psplash.c -
【…】
編譯完成后會在源碼目錄下生成psplash和psplash-write文件。

三、替換出廠系統(tǒng)logo
將編譯生成的psplash和psplash-write文件拷貝到開發(fā)板出廠文件系統(tǒng)/usr/bin目錄下。-
okmx8mm login:root -
Last login: Thu Jun 20 10:00:15 UTC 2019 on tty7 -
root@okmx8mm:~# cd /usr/bin/ -
root@okmx8mm:/usr/bin# ls psp* -
psplash psplash-default psplash-write -
root@okmx8mm:/usr/bin# rm psplash -
root@okmx8mm:/usr/bin# rm psplash-write -
root@okmx8mm:/usr/bin# cp /run/media/sda1/psplash ./ -
root@okmx8mm:/usr/bin# cp /run/media/sda1/psplash-write ./ -
root@okmx8mm:/usr/bin# sync

注意:目前我們的OKMX8MM-C做了開機連續(xù)顯示,所以默認沒有開機動畫,若客戶有需要可按上述方式進行添加。同時此方法在OKMX8MQ-C和OKMX8MP-C上也同樣適用。
-
嵌入式
+關(guān)注
關(guān)注
5198文章
20442瀏覽量
333979
發(fā)布評論請先 登錄
【ESP32-C61】WT9932C61-TINY開發(fā)板上手指南
【ESP32-C3】WT9932C3-TINY開發(fā)板上手指南
【ESP32-C5系列】WT9932C5-TINY開發(fā)板上手指南
【ESP32-C2系列】WT99C262-SG開發(fā)板上手指南
【ESP32-C2系列】WT9932C2-TINY開發(fā)板上手指南
【ESP32-C3】WT9932C3-TINY開發(fā)板規(guī)格書
【ESP32-C61】WT9932C61-TINY開發(fā)板規(guī)格書
【ESP32-C5系列】WT9932C5-TINY開發(fā)板規(guī)格書
探索FRDM - IMX8MPLUS開發(fā)板:開啟嵌入式開發(fā)新旅程
AM62x開發(fā)板的常見接口問題及排查思路(第2期)
?STM32 Nucleo-64開發(fā)板技術(shù)解析與應(yīng)用指南
ElfBoard技術(shù)貼|如何在【RK3588】ELF 2開發(fā)板中實現(xiàn)自定義開機動畫
ElfBoard技術(shù)貼|【RK3588】ELF 2開發(fā)板開機自啟動詳解
效率提升,飛凌AM62x開發(fā)板的常見接口問題及排查思路(第1期)
OKMX8MM-C開發(fā)板制作開機動畫的思路
評論