How to Customize Splash Logo

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值