booting logo & booting animation

时间:2021-10-04 19:41:57

開機第一張圖片:

booting logo & booting animation

圖片位置:

linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo

因為 project 選用 FHD 屏幕所以

在linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/fhd

file name is :

fhd_uboot.bmp

code 位置:

第1圖是在 lk phase 顯示的。

linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/platform/mt6755/platform.c

  void platform_init(void)
{ ...
...
...
#endif
} else if (g_boot_mode != KERNEL_POWER_OFF_CHARGING_BOOT && g_boot_mode != LOW_POWER_OFF_CHARGING_BOOT) {
if (g_boot_mode != ALARM_BOOT && (g_boot_mode != FASTBOOT)) {
#ifndef MACH_FPGA_NO_DISPLAY
//
// here display
//
mt_disp_show_boot_logo();
#endif
}
}
#else
if (g_boot_mode != ALARM_BOOT && (g_boot_mode != FASTBOOT)) {
#ifndef MACH_FPGA_NO_DISPLAY
mt_disp_show_boot_logo();
#endif
}
#endif
#ifdef LK_PROFILING
time_backlight = get_timer();
#endif
...
...
...
}

linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/platform/mt6755/mt_logo.c

 void mt_disp_show_boot_logo(void)
{
int logo_index = ;
int x = ;
char* test = NULL; dprintf(INFO, "[lk logo: %s %d]\n",__FUNCTION__,__LINE__);
mt_logo_get_custom_if(); #if defined(MTK_CARRIEREXPRESS_PACK)
#if 0 // test
test = (char *)get_env("VAIBHAV");
if (test == NULL) {
dprintf(INFO, "[lk logo: SysEnv is not set]\n");
if (set_env("VAIBHAV","") == ) {
dprintf(INFO, "[lk logo: SysEnv set to 5 Succesfully]\n");
x = ;
} else {
dprintf(INFO, "[lk logo: SysEnv set fails!!!]\n");
return;
}
} else {
dprintf(INFO, "[lk logo: SysEnv already set to %d]\n",atoi(test));
}
#endif
logo_index = get_logo_index();
/*if(x == 1){
294 logo_index = 0;
295 dprintf(INFO, "[lk logo: First Boot So show OM logo]\n");
296 }*/
dprintf(INFO, "[lk logo: Final logo_index: %d]\n",logo_index);
#endif if (logo_cust_if->show_boot_logo) { logo_cust_if->show_boot_logo();
} else {
//
// here display logo
//
///show_logo(0);
init_fb_screen();
fill_animation_logo(logo_index, mt_get_fb_addr(), mt_get_tempfb_addr(), logo_addr, phical_screen);
mt_disp_update(, , CFG_DISPLAY_WIDTH, CFG_DISPLAY_HEIGHT);
} return;
}

第二張開機圖片

booting logo & booting animation

圖片位置:

linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo

因為 project 選用 FHD 屏幕所以

在linux_repo/vendor/mediatek/proprietary/bootable/bootloader/lk/dev/logo/fhd

file name is :

fhd_kernel.bmp


第2張圖是在 android init 時顯示的。

init process 呼叫,顯示第2張 開機圖片

linux_repo/device/mediatek/mt6755/init.mt6755.rc

 819 # Update the second boot logo
820 service bootlogoupdater /vendor/bin/boot_logo_updater
821 class core
822 oneshot

// 若第一張圖片和第二張圖片是一樣的,

// 則可以將 下列部份 display 圖片 的 code mark 掉,

// 可以減少約 0.1 second 的 開機時間。

linux_repo/vendor/mediatek/proprietary/external/boot_logo_updater/boot_logo_updater.c

183 int main(void)
{
SLOGD("[boot_logo_updater %s %d]boot_logo_updater,\n",__FUNCTION__,__LINE__);
int ret = update_boot_reason();
if (ret == ) {
SLOGE("[boot_logo_updater]skip the boot logo!\n");
set_int_value(LCD_BACKLIGHT_PATH, );
return ;
} else if (ret == ) {
SLOGD("[boot_logo_updater]schedule on\n");
}
// set parameter before init
set_draw_mode(DRAW_ANIM_MODE_FB);
anim_init();
//
// here display logo
//
show_kernel_logo();
anim_deinit(); return ;
}
linux_repo/vendor/mediatek/proprietary/external/libshowlogo/charging_animation.cpp

  /*
985 * Show kernel logo when phone boot up
986 *
987 */
void show_kernel_logo()
{
if (MTK_LOG_ENABLE == ) {
SLOGD("[libshowlogo: %s %d]show kernel logo, index = 38 \n",__FUNCTION__,__LINE__);
}
if (error_flag == ) {
#if defined(MTK_CARRIEREXPRESS_PACK)
anim_show_logo(get_logo_index(false));
#else
//
// here display logo
//
anim_show_logo(kernel_logo_position);
#endif
}
}

開機動畫

linux_repo/frameworks/base/core/res/assets/images/

file name :

android-logo-mask.png

booting logo & booting animation

android-logo-shine.png

booting logo & booting animation


未完待續