How to Customize Splash Logo

来源:互联网 发布:内蒙古广电网络登录 编辑:程序博客网 时间:2024/05/17 05:00
Solution Number 00029759 


Language Key Words LK splash image
Detail Information
Solution Title How to customize splash image
Solution Details
Introduction and Background:


For LK display (boot loader) logo, there are two methods:
    a)    Read the splash image data from splash.h file.
    b)    Get the splash image data from Splash Partition.


Solution Statement:


For a), please see the below source codes:


bootable/bootloader/lk/platform/msm_shared/include/splash.h
bootable/bootloader/lk/dev/fbcon/fbcon.c


When fbimg is NULL, LK display data gets from imageBuffer_rgb888 arrays. Please see the below snippet codes.


void display_image_on_screen()
{
    struct fbimage default_fbimg, *fbimg;
    bool flag = true;


    fbcon_clear();
    fbimg = fetch_image_from_partition(); // Splash image from partition


    if(!fbimg) {
        flag = false;
        fbimg = &default_fbimg;
        fbimg->header.width = SPLASH_IMAGE_HEIGHT;
        fbimg->header.height = SPLASH_IMAGE_WIDTH;
#if DISPLAY_TYPE_MIPI
        fbimg->image = (unsigned char *)imageBuffer_rgb888;
#else
        fbimg->image = (unsigned char *)imageBuffer;
#endif
    }


    fbcon_putImage(fbimg, flag);
}


For b), the steps to generate the splash.img:


1). Install the python on Linux desktop OS.
    sudo apt-get install python-imaging


2). Prepare the logo picture with the PNG format in "device/qcom/common/display/logo" folder, such as "test.png".
    python ./logo_gen.py test.png


3). Add splash partition on your partition.xml, such as 
    <partition label="splash" size_in_kb="10240" type="20117f86-E985-4357-B9EE-374BC1D8487D" bootable="false" readonly="false" filename=""/>


4). Check if have "splash.img", and then flash splash image to your device.
    fastboot flash splash splash.img


Reference CAF link:
https://www.codeaurora.org/cgit/quic/la/device/qcom/common/tree/display?h=jb_3.2_rb5.60


Applicable Products AMSS 8226, AMSS 8228, AMSS 8274, AMSS 8274AB, AMSS 8626, AMSS 8628, AMSS 8674, AMSS 8928, AMSS 8936, AMSS 8939, AMSS 8974, AMSS 8974AB, AMSS8626, AMSS8916, AMSS8926, AMSS8974AA, AMSS8974AC, AMSS8992, AMSS8994, AMSS8996
0 0
原创粉丝点击