1. About timing
In the JB version, the interface Disp_drv_get_lcm_driver implements the Compare ID and gets the actions of the LCM driver and LCM param, and for DSI, the timing is reset based on the settings in the LCM driver each time the ID is attempted. So worrying about the timing of different unreadable IDs is superfluous.
2. About the boot logo
Our default practice, in the PROJECTCONFIG.MK will define the macro Boot_logo convenient in the directory \mediatek\custom\common\lk\logo read the corresponding resources, as the boot logo display.
The boot logo here is divided into two types, U-boot logo and kernel logo, respectively. We discuss the display principle of these two kinds of logos separately
· U-boot logo (and Battery logo)
U-boot logo is the first interface after the boot, U-boot logo and battery logo will be unified packaging for logo.bin. For the JB version, the main workflow is as follows
1. Little kernel will first acquire the LCM params in the platform_early_init phase, whose workflow is to find the currently inserted LCM by reading the ID, request a frame buffer of the corresponding size based on the LCM resolution and determine the frame Buffer Start Address
2. Reserve 4M Ram for Logo.bin
3. Then in the platform_init phase, load the Logo.bin directly into 4M RAM
4, after completion of loading, in Platform_init Mt_disp_show_boot_logo (); call Show_logo (0); Complete the first logo display. Where the index=0 represents the first picture compressed in Logo.bin, logo.bin in the image compression sequence can view the file Mediatek\custom\common\lk\logo\rules.mk, as follows
Resource_obj_list: = \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _uboot.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _battery.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _low_battery.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _charger_ov.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_0.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_1.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_2.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_3.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_4.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_5.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_6.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_7.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_8.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_9.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _num_percent.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_01.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_02.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_03.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_04.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_05.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_06.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_07.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_08.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_09.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_animation_10.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_01.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_02.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_03.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_04.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_05.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_06.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_07.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_08.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_09.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_10_10.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_bg.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_img.raw \
$ (Boot_logo_dir)/$ (Boot_logo)/$ (Boot_logo) _bat_100.raw \
· Kernel logo
Kernel logo works in the same way as the U-boot logo, is through the init.rc registered Boot_logo_updater service completed reading raw data files, painting, so in Kernel Logo only after the conversion of BMP to Raw, in the directory mediatek\custom\common\lk\logo\ generated raw data file Boot_logo. The Boot_logo file is then moved through the script file to Out\target\product\xxxx\system\media\images, packaged as system.img,download to the phone, and stored in/system/ The Media/images directory.
For the U-boot logo, you only need to compress images of different resolutions into Logo.bin, and display the corresponding images according to different indexes when reading.
For the kernel logo, we need to boot_logo raw data files of different resolutions to generate and copy to the phone, boot_logo_updater according to different resolutions to identify, read the corresponding logo file.
Take qHD and hd720 two kinds of resolution mutual compatibility as an example, the scheme is roughly as follows, note that the logo of the corresponding needs of your own completion
Compare ID interface implemented in LCM driver
U-boot logo compression, in mediatek\custom\common\lk\logo\rules.mk, modify the Resource_obj_list list, using the desired resolution instead of the Boot_logo variable, (The definition of Boot_logo in makefile will not be valid)
Resource_obj_list: = \
$ (BOOT_LOGO_DIR)/$QHD/$QHD _uboot.raw \
...
...
$ (boot_logo_dir)/$hd 720/$HD 720_uboot.raw \
...
...
Record the number of raw data inserted at each set of resolutions
Mt_disp_show_boot_logo (); function to read the Uboot logo of the corresponding ID according to the resolution of the LCM; For IPO quick boot, in the catalogue mediatek\external\ipod\ Bootlogo.cpp in Mt65xx_disp_show_boot_logo (); Make the same changes
5. This step differs from the files that are modified on different SW versions. On JB, modify mediatek\custom\common\lk\logo\rules.mk to modify the following:
#########################################################
IFNEQ ($ (Strip $ (mtk_platform)),)
Include $ (clear_vars)
Local_module: =boot_logo_qhd
Local_module_tags: =user
Local_module_class: = DATA
Local_module_path: = $ (target_out)/media/images
Local_generate_custom_folder: = Custom:lk/logo
Local_src_files: = custom/$ (Local_module)
Include $ (build_prebuilt)
endif
#########################################################
IFNEQ ($ (Strip $ (mtk_platform)),)
Include $ (clear_vars)
Local_module: =boot_logo_hd720
Local_module_tags: =user
Local_module_class: = DATA
Local_module_path: = $ (target_out)/media/images
Local_generate_custom_folder: = Custom:lk/logo
Local_src_files: = custom/$ (Local_module)
Include $ (build_prebuilt)
endif
On JB2, add the above content in the file mediatek\external\boot_logo_updater\android.mk, and be careful not to add statements
Local_module_tags: =user, otherwise the compilation does not pass.
6. This step differs from the method of modification on different SW versions. On JB, \build\core\user_tags.mk Grandfathered_user_modules increased Boot_logo_qhd & boot_logo_hd720; JB2 on \build\ Target\product\ $Project. Mk product_packages Add Boot_logo_qhd & boot_logo_hd720
7. In Boot_logo_updater, first define the path of the two raw data, and then read the corresponding raw data file in the main function according to the LCM resolution
Compatible with LCM with different resolutions of Android