close

利用psplash軟體輕鬆實現開機畫及進度條顯示.

1. 下載psplash: git clone https://github.com/g0hl1n/psplash

2. 將圖片轉換成程式碼檔案:./make-image-header.sh XXX.png POKY,生成圖片檔案XXX-img.h(其中POKY是XXX-img.h裡的標頭,對應於psplash.c所以延用比較省事. 圖片檔只能是png檔)

3.修改psplash.c的h檔, 將#include "psplash-poky-img.h"替換成#include "xxx-img.h"

4.製作autogen.sh指令碼,用於生成Makefile,如下
#!/bin/bash
aclocal
autoheader
automake --add-missing
autoconf
5.生成Makefile:./autogen.sh

6.配置交叉編譯庫:./configure --host=arm-linux CC=arm-linux-gnueabihf-gcc
7.執行make:生成psplash與psplash-writer 兩個檔案

8.將psplash與psplash-write拷貝到開發板的/usr/bin/目錄下。
9.製做一個S00psplash.sh腳本放在開發板的/etc/rcS.d/目錄下,如此,當kernel執行完後就會開始顯示進度條了.

ZYNQ-XXX.png

10.完成.缺點是只能在kernel完成後才會開始顯示.

arrow
arrow
    全站熱搜

    X3拔拔 發表在 痞客邦 留言(0) 人氣()