MTK車載平台新增或更換開機啟動LOGO

2021-08-28 21:54:24 字數 3369 閱讀 9656

摘要:

嵌入式系統在開發過程中總是要用到更換logo的過程,該文件主要針對mt3561專案更換logo的過的講解

涉及修改的檔案:

device\atc\evb3561sv_w_no2\projectconfig.mk

vendor\mediatek\proprietary\bootable\bootloader\lk\project\evb3561sv_w_no2.mk

vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/cmcc_1024x600/cmcc_1024x600_uboot.bmp

vendor\mediatek\proprietary\custom\evb3561sv_w_no2\factory\res\images\default_bootlogo.bmp

vendor\mediatek\proprietary\bootable\bootloader\lk\dev\logo\rules.mk

frameworks\base\core\res\assets\images\android-logo-mask.png

frameworks\base\core\res\assets\images\android-logo-shine.png

1 專案全部配置

device\atc\evb3561sv_w_no2\projectconfig.mk

##boot_logo = cmcc_1280x720

boot_logo = cmcc_1024x600

2 boot logo的修改

因為目前我們使用的是mtk手機平台,lk和核心使用乙個bootlogo,所以只需要修改lk即可,核心不需要進行配置

2.1 lk階段專案配置

vendor\mediatek\proprietary\bootable\bootloader\lk\project\evb3561sv_w_no2.mk

#boot_logo := cmcc_1280x720

boot_logo := cmcc_1024x600

2.2 新增1024x600的logo檔案

vendor\mediatek\proprietary\custom\evb3561sv_w_no2\factory\res\images\default_bootlogo.bmp

直接將我們修改的1024x600解析度替換成

vendor\mediatek\proprietary\custom\evb3561sv_w_no2\factory\res\images\default_bootlogo.bmp即可,不需要在

vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/目錄中新增cmcc_1024x600目錄,並加新增到下面,同時命名為:

cmcc_1024x600_uboot.bmp

cmcc_1024x600_kernel.bmp

如果不將

vendor\mediatek\proprietary\custom\evb3561sv_w_no2\factory\res\images\default_bootlogo.bmp替換掉,修改將不啟作用,原因如下:

在vendor\mediatek\proprietary\bootable\bootloader\lk\dev\logo\rules.mk檔案中的

#rename it to $(boot_logo)_kernel.bmp and $(boot_logo)_uboot.bmp

$(shell cp -f $(rootdir)/$(mtk_path_custom)/factory/res/images/default_bootlogo.bmp $(boot_logo_dir)/$(boot_logo)/$(boot_logo)_kernel.bmp)

$(shell cp -f $(boot_logo_dir)/$(boot_logo)/$(boot_logo)_kernel.bmp $(boot_logo_dir)/$(boot_logo)/$(boot_logo)_uboot.bmp)

boot_logo_resource := $(builddir)/$(boot_logo_dir)/$(boot_logo).raw

logo_image := $(builddir)/logo.bin

如果不更換

vendor\mediatek\proprietary\custom\evb3561sv_w_no2\factory\res\images\default_bootlogo.bmp檔案,在

vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/cmcc_1024x600/cmcc_1024x600_uboot.bmp

vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/cmcc_1024x600/cmcc_1024x600_kernel.bmp新增,需要將

vendor\mediatek\proprietary\bootable\bootloader\lk\dev\logo\rules.mk檔案中的

#rename it to $(boot_logo)_kernel.bmp and $(boot_logo)_uboot.bmp

##$(shell cp -f $(rootdir)/$(mtk_path_custom)/factory/res/images/default_bootlogo.bmp ##$(boot_logo_dir)/$(boot_logo)/$(boot_logo)_kernel.bmp)

##$(shell cp -f $(boot_logo_dir)/$(boot_logo)/$(boot_logo)_kernel.bmp ##$(boot_logo_dir)/$(boot_logo)/$(boot_logo)_uboot.bmp)

boot_logo_resource := $(builddir)/$(boot_logo_dir)/$(boot_logo).raw

logo_image := $(builddir)/logo.bin

注釋掉即可.

3 架構層部分動態logo的修改

frameworks\base\core\res\assets\images\android-logo-mask.png

frameworks\base\core\res\assets\images\android-logo-shine.png

架構層部分的動態logo修改的原理見

frameworks\base\cmds\bootanimation\bootanimation.cpp檔案中針對動態logo的**說明

主要實現的原理就是將實體顯示的logo鏤空放到前面,後面用乙個顏色逐繼變化的logo在背面迴圈掃瞄,在人眼看到就是動態變化的logo

mtk平台新增selinux規則

修改device mediatek common sepolicy file contexts,新增對應的操作物件和型別 例如 data misc u object r misc data file s0 操作的物件是 data misc目錄裡的所有檔案,型別是misc data file 2,修改...

MTK 平台支援裝置樹的新增流程

in lk step 1 增加dtsi檔案 kernel include dt bindings lcm dtsi step 2 在專案的dts 檔案中包含dtsi檔案 include step 3 在bootable bootloader lk project mk 增加defines mtk l...

MTK手機平台新增資源和選單的方式

mtk手機平台新增資源和選單的方式 5 在.plutommi mmi setting settinginc 目錄下的settingprot.h中增加如下的函式宣告 void highlightmysetting void void highlightmysetting1 void void high...