Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X: Splash screen in U-boot

Other Parts Discussed in Thread: AM3354, AM3517

May I know how to add a splash logo in u-boot on AM335x evm?

  • You've to add an LCD driver, and a small BMP parser, if required to display your BMP logo image. 

  • Hi Lu,

    You mean to change the Tux logo?!

    You may do it recompiling the kernel.

    Mauricio

  • I mean display a logo before Tux logo, that means to add logo code in Uboot.

    My board AM335x EVM won't display anything for 20 seconds before Tux logo shows up. That is not good for our product.

  • looking to do the some....  researching that right now....   been looking at the earlier beaglebone uboot (2009?)   so far not getting there.   looking at the starterware bare metal sdk to see if there is some guidance there...

  • Hi,

    Splash screen need an address of the picture, but EVM has no NOR supported. So I think maybe we can't use splashscreen directly. Perhaps we can copy the logo from Nand to a RAM address before the LCD driver tacks effect.

    I'm working on the u-boot logo now. Have you accomplished your logo? Could you please give me some tips?

  • I was able to sucessfully add a splash screen in u-boot by follwoing what was done in the am335x Starter Ware. 

    The code that sets up the display is under examples/evmAM335x/raster/rasterDisplay.c.

    The also have a utility under tools/ that converts a bitmap to raster format that the LCD controller understands.

  • Jared,

    Where did you place the files moved from Starterware into the u-boot code?

    I've tried this and the image .h file is too large for the .sram memory map section.

    Dave

  • image.h will not fit in the MLO so I only as to build it as a part of the secondary u-boot.  To do that used the CONFIG_SPL_BUILD define to determine which bootloader.

    My image.h looks like this:

    #ifndef CONFIG_SPL_BUILD
    unsigned int const image1[] __attribute__((aligned(4)))= { 0x4000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,
    . . . 
    0x00222222, 0x00222222, 0x00222222, 0x00212121, 0x00212121, 0x00212121, 0x00212121, 0x00222222, 0x00202020, 0x00212121,
     };
    #endif //CONFIG_SPL_BUILD
     

    I placed my initialization code in  board/ti/am335x/evm.c in the board_init(void) function. I also defined this ony to build in the secondary u-boot via another

    #ifndef CONFIG_SPL_BUILD
     ... 
    #endif

     I placed the image.h file in the board/ti/am335x folder and included it in the evm.c file

     

  • Thanks Jared.

    I've got the code compiling. Now let's see if I can set the parameters correctly to display the image.

    Appreciate your help.

    Dave

  • Hi,

    I would like to get the splash screen working in uboot too.  Please could you post some of your code to the forum....    :-)   :-)

    Cheers,

        John.

  • LCDs vary with initialization and timing requirements.  The starter pack reference Jared posted is pretty much all you need, plus any extra stuff that your LCD requires.

  • To help people follow the process pass to pass:

    1. Download the StaterWare from TI site from here: http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/02_00_00_07/index_FDS.html

    2. Install it;

    2. Go to instalation directory and find /tools/bmpToRaster;

    3. Go to the header file BitmapReader.h and comment out #define COMPRESS.

    4. To get the binary do make command;

    5. Prepare the image with exactly size of display, in my case the image is horizontal with 480x800 pixels and 24bpp. The file name is image.bmp;

    6. Put the image file on /tools;

    7. give the command: ./a.out 800 480 ./imagem.bmp ./image.h 24 RGB;

    8. The file image.h will be created;

    9. Edit this file with this:

    #ifndef CONFIG_SPL_BUILD
    unsigned int const image1[] __attribute__((aligned(4)))= {

    ....

    #endif

    10. Copy /lcd directory to /u-boot/drivers 4578.lcd.tar.gz

    11. In /u-boot/Makefile add the red line:

    LIBS  = post/libpost.o
    LIBS  = drivers/lcd/liblcd.o

    ifeq ($(SOC),ti81xx)
    LIBS  = $(CPUDIR)/omap-common/libomap-common.o
    endif

    12. At /uboot/include/configs/am335x_evm.h add the lines bellow just before the file end:

    /* LCD Support */
    #define CONFIG_LCD_TCM  

    13. At /u-boot/board/ti/am335x/evm.c add the red line inside board_init(void):

    ...

    #ifndef CONFIG_SPL_BUILD
        board_evm_init();

        Lcd_Init(); // Initialize
    #endif

    ....

        gpmc_init();

    Recompile uboot and save the MLO and u-boot.img files at SDcard using the correct tools and boot the system. The image will appear until Android get the lcd control.

  • Hi Leonardo:

    I have done it follow your steps.  The screen can display the logo, but the color is not normal.

    The color of my logo is dark yellow, but the screen is light blue.

    Can you give me some advice?  TKS 

    Best regards!

    Alex Wang

  • Hi Alex, is your display data line correctly connected to processor? In my case the connection is almost the same of EVM board and I have no problems.

    In Android the display shows the image correctly?

     

    Leonardo

     

  • Hi Leonardo:

    TKS for your reply. My processor is AM3354. the display data line is corrently connected to the processor.

    Image is displayed on the screen is correct, but just wrong color.

    It looks just display 8 BPP format images.

    Best regards

    Alex Wang

  • Hi leonardo:

    The picture should be like this,  and it can be loaded   correct in the kernel.

    But in the Uboot, The picture color is not correct.

    TKS,  Best regards

    Alex Wang

  • Hi Leonardo

    Now, I know the reason of the problem.But I  still haven't resolve it.

    The lcd device files are configured for 24bpp(RGB888). My board is using 16bpp(5:6:5).

    Picture color is not correct also now, I think some registers' configuration still are not correct.

    On the internet,  some people suggested that reference documentation http://www.ti.com/lit/er/sprz360c/sprz360c.pdf, but the link is not available now.

    Can you give me some advice  about how to configure 16bpp module?  TKS

    Best regards

    Alex

  • Alex,

    I don't have a quick solution to the 24bpp vs. 16bpp question, but the document you are attempting to reference can be found here. This is the silicon errata which is linked to from the AM335x product folder.

  • To help people follow the process pass to pass:

    1. Download the StaterWare from TI site from here: http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/02_00_00_07/index_FDS.html

    2. Install it;

    2. Go to instalation directory and find /tools/bmpToRaster;

    3. Go to the header file BitmapReader.h and comment out #define COMPRESS.

    4. To get the binary do make command;

    5. Prepare the image with exactly size of display, in my case the image is horizontal with 480x800 pixels and 24bpp. The file name is image.bmp;

    6. Put the image file on /tools;

    7. give the command: ./a.out 800 480 ./imagem.bmp ./image.h 24 RGB;

    8. The file image.h will be created;

    9. Edit this file with this:

    #ifndef CONFIG_SPL_BUILD
    unsigned int const image1[] __attribute__((aligned(4)))= {

    ....

    #endif

    10. Copy /lcd directory to /u-boot/drivers 4578.lcd.tar.gz

    11. In /u-boot/Makefile add the red line:

    LIBS  = post/libpost.o
    LIBS  = drivers/lcd/liblcd.o

    ifeq ($(SOC),ti81xx)
    LIBS  = $(CPUDIR)/omap-common/libomap-common.o
    endif

    12. At /uboot/include/configs/am335x_evm.h add the lines bellow just before the file end:

    /* LCD Support */
    #define CONFIG_LCD_TCM  

    13. At /u-boot/board/ti/am335x/evm.c add the red line inside board_init(void):

    ...

    #ifndef CONFIG_SPL_BUILD
        board_evm_init();

        Lcd_Init(); // Initialize
    #endif

    ....

        gpmc_init();

    Hello Leonardo and TI support,

    Is the above process works for AM335x starter kit also?

    Please reply back as early as possible.

    I have done all the things mentioned above. I got nothing on LCD.

    Thanks in advance.

    Regards,

    Sivaprasad Pala.

  • hi,

        we do step like that, but is doesn't display anything. and we found that function LCDIsr() doesn't execute, 

         it seem like that interrupt register doesn't efficient,

         we are using u-boot-2012.10-psp05.06.00.00

         can anybody help us?

  • Hi,


    I have followed steps 10 to 13 mentioned above. I am getting default logo at the time of u-boot loading. But the lcd backlight is off during this time and logo is displayed with very low (or no) brightness. What should I do to enable LCD backlight during u-boot loading. I tried with LCDBackLightEnable in evm.c file during init step but that code is commented out in lcd.c of LCD driver. I am working on am335x evm. Waiting for your favourable response.


    Thanks,

    Monark

  • hi all

    I have use am3517 and lcd 800*600(lvds interface) @24bit

    how I can change uboot logo for support my lcd ,and how I can changed kernel to do this

    the method above can apply for am3517

  • Hello Leonardo,

                    I am using a Beaglebone black board and latest u-boot source (U-Boot 2014.01-rc1). I followed steps 1-10 as per your post. But in U-Boot 2014 doesn't have the evm.c im am335x directory. So I tried by changing the board.c but I didn't get success. Please guide me to get my U-boot splashscreen.

    Thanking you.

    Regards,

    Kishor

  • Hello Leonardo,

                  I got success bring U-boot splash-screen by tweaking in board.c file. But this screen appears for very less time (1-2 seconds). If I want to keep this screen upto startup of my application , Is it possible?? And if possible how to proceed for that??  Thanking you.

    Regards,

    kishor

  • In my application LCD image is loaded only once at u-boot and doesn't dissapear until android take LCD control. I followed the steps that I have put and it worked for me.

  • Hello Leonardo,

                       Thank you for reply. Can you please share your evm.c file, so from that I can get some idea.

    Regards,

    Kishor

  • The function Lcd_Init()  is typed correctly? I can't find the function.

    Firstly, I can't find the file 'evm.c' in the directory 'uboot/board/ti/am335x/' , and  the version of my uboot is u-boot-2013.01.01.  I got the uboot in the TI SDK 'ti-sdk-am335x-evm-06.00.00.00' . Secondly, I add the function Lcd_Init() in the u-boot/board/ti/am335x/board.c. When I compiled the u-boot, an undefined reference of 'Lcd_Init()' error happened. 

    Can you give me some advice? Or can you gime me the evm.c.

    TKS! My email:learningendless@gmail.com  or 651830529@qq.com

  • can you please tell me how to integrate starterware raster application in u-boot................

    thanks in advance
  • hi alex,
    I found the solution below, and the picture will be displayed normal.
    ./a.out 800 480 ./imagem.bmp ./image.h 24 RGB;
    ==change to ==>
    ./a.out 800 480 ./imagem.bmp ./image.h 24 BGR;
  • HI ,
    i am trying to bringup lcd in u-boot to display some image on my display in u-boot level i have fallowed the above procedure to enable the framebuffer in u-boot level but i am not getting any thing in my display. please give me some suggestions.
  • Hi,
    Please check this post: e2e.ti.com/.../1372697

    This is for AM335x Starter Kit.may help you.

    Regards,
    Pragnesh
  • Hello Kishor,

    What were the tweaks that you did to manage u-boot splash screen ?

    I have followed all the steps but no success.


    regards

    Ankur

  • Following is the lcd driver for AM335x EVM u-boot-2014.7 (yocto daisy arago) with which u-boot splash screen works. All other instructions stills applies.

    This lcd driver fixes following:

    - backlight enable problem

    - screen dimension problem

    - LCDC clock module problem

    - pixel clock issue

    cheers

    6114.lcd.zip

  • Hi all.

    I use TISDK_01.00.00.03 in BBB.
    My U-boot Version is u-boot-2014.07+gitAUTOINC+fb6ab76dad-gfb6ab76.
    I use 240 X 320 16bit TFT LCD drive of ILI9341V Chip.

    I want u-boot splash logo display too.
    So, I used 6114.lcd.zip source code.

    I identified backlight turn-on and SPI data transfer for LCD init.
    Also, I identified LCD VSync, HSync, PCLK, DE control signal output.

    But, My LCD is nothing display.

    I modified lcd.c file.

    unsigned int LCDPinMuxSetup(void)
    {
    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(0)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(1)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(2)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(3)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(4)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(5)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(6)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(7)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(8)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(9)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(10)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(11)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(12)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(13)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(14)) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_DATA(15)) = 0;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(15) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(14) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(13) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(12) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(11) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(10) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(9) ) = 1;

    //HWREG(SOC_CONTROL_REGS + CONTROL_CONF_GPMC_AD(8) ) = 1;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_VSYNC) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_HSYNC) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_PCLK) = 0;

    HWREG(SOC_CONTROL_REGS + CONTROL_CONF_LCD_AC_BIAS_EN) = 0;

    return TRUE;
    }

    void LCDBackLightEnable(void)
    {

    int ret = 0;
    ret = gpio_request(46, "LCD_BCL");

    if (ret < 0) {
    // printf("%s: gpio %d request failed %d\n", __func__,
    // 7, ret);
    return;
    }

    /* Pull the GPIO HIGH to enable LCD backlight */
    gpio_direction_output(46, 1);
    }

    I modified rasterDisplay.c file.

    static void SetUpLCD(void)
    {
    /* Enable clock for LCD Module */
    LCDModuleClkConfig();

    LCDPinMuxSetup();

    /*
    **Clock for DMA,LIDD and for Core(which encompasses
    ** Raster Active Matrix and Passive Matrix logic)
    ** enabled.
    */
    RasterClocksEnable(SOC_LCDC_0_REGS);

    /* Disable raster */
    RasterDisable(SOC_LCDC_0_REGS);

    /* Configure the pclk */
    //RasterClkConfig(SOC_LCDC_0_REGS, 32000000, 192000000);
    RasterClkConfig(SOC_LCDC_0_REGS, 6428800, 192000000);

    /* Configuring DMA of LCD controller */
    RasterDMAConfig(SOC_LCDC_0_REGS, RASTER_DOUBLE_FRAME_BUFFER,
    RASTER_BURST_SIZE_16, RASTER_FIFO_THRESHOLD_8,
    RASTER_BIG_ENDIAN_DISABLE);

    /* Configuring modes(ex:tft or stn,color or monochrome etc) for raster controller */
    RasterModeConfig(SOC_LCDC_0_REGS, RASTER_DISPLAY_MODE_TFT_UNPACKED,
    RASTER_PALETTE_DATA, RASTER_COLOR, RASTER_RIGHT_ALIGNED);


    /* Configuring the polarity of timing parameters of raster controller */
    //RasterTiming2Configure(SOC_LCDC_0_REGS, RASTER_FRAME_CLOCK_LOW |
    // RASTER_LINE_CLOCK_LOW |
    // RASTER_PIXEL_CLOCK_HIGH|
    // RASTER_SYNC_EDGE_RISING|
    // RASTER_SYNC_CTRL_ACTIVE|
    // RASTER_AC_BIAS_HIGH , 0, 255);
    RasterTiming2Configure(SOC_LCDC_0_REGS, RASTER_FRAME_CLOCK_LOW |
    RASTER_LINE_CLOCK_LOW |
    RASTER_PIXEL_CLOCK_HIGH|
    RASTER_SYNC_EDGE_FALLING|
    RASTER_SYNC_CTRL_ACTIVE|
    RASTER_AC_BIAS_HIGH, 0, 255);

    /* Configuring horizontal timing parameter */
    //RasterHparamConfig(SOC_LCDC_0_REGS, 800, 47, 39, 39);
    RasterHparamConfig(SOC_LCDC_0_REGS, 240, 10, 10, 20);
    /* Configuring vertical timing parameters */
    //RasterVparamConfig(SOC_LCDC_0_REGS, 480, 2, 13, 29);
    RasterVparamConfig(SOC_LCDC_0_REGS, 320, 2, 4, 2);

    RasterFIFODMADelayConfig(SOC_LCDC_0_REGS, 128);
    }

    I modified image.h file.

    #ifndef CONFIG_SPL_BUILD
    unsigned int const image1[] __attribute__((aligned(4)))= {
    0x01004000u, 0x07000001u,

    .

    .

    #endif

    I modified board.c file.

    int board_init(void)
    {
    #if defined(CONFIG_HW_WATCHDOG)
    hw_watchdog_init();
    #endif

    #ifndef CONFIG_SPL_BUILD
    Lcd_Init ( ) ;
    #endif

    gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
    #if defined(CONFIG_NOR) || defined(CONFIG_NAND)
    gpmc_init();
    #endif

    return 0;
    }

    Let me know if you need to modify the where.

    Help !

  • hello,

    I have make the logo picture success in my u-boot,

    but the logo picture disappear when the machine enter linux. it take about 10s. and the backlight work well.

    and the lcd show success in the android system.

    can u tell me why the logo picture disappear when the machine enter linux system.

    how can deal with it.

    I want the logo picture display until the machine enter the android system.

    thank u for your help..

  • When Linux boots up, it re-initialises the LCD controller.  So the screen will go blank for a short time.  I made the short time very short (about 1 second of black) by booting a small initrd which runs fbsplash to show an image.  Then once the new image is shown, you can continue to mount the file-systems (which is the slowest part of Linux booting up if you don't have an initrd).

  • I use the linux bootup logo
    config such as:
    Device Drivers -->Graphics support-->Bootup logo-->Standard 224-color Linux logo
    Device Drivers -->Graphics support-->Console display driver support->Framebuffer Console support

    and the black time about 2s.
    but when I boot success android. there is a cursor and it Always flashing.

    how to delet this cursor.

    thank u.
  • use this in your init script to disable cursor blinking

    echo 0 > /sys/class/graphics/fbcon/cursor_blink

    cheers

  • Hi,
    I am working on beagle bone black AM335x board. I need to configure LCD and Splash screen on Beagle Bone Black board. I need to get U-boot Console Messages on LCD as well.

    Could you Please share detailed configuration for the same.

    I downloaded "AM335X_StarterWare_02_00_00_07_Setup.bin" from this software-dl.ti.com/.../index_FDS.html link. But unable to run /extract it.

    I am stuck.

    Please share your suggestion / feedback on the same.
    Your inputs are highly appreciated.

    Thanks,
    Mrudula
  • Starterware is supported on e2e.ti.com/.../790.aspx Please ask there.
  • Hi,

    I followed above steps. On Compiling U-boot code I am getting compilation errors :

    drivers/lcd/Makefile:5: /config.mk: No such file or directory
    drivers/lcd/Makefile:23: /rules.mk: No such file or directory
    drivers/lcd/Makefile:25: drivers/lcd.depend: No such file or directory
    make[2]: *** No rule to make target 'drivers/lcd.depend'. Stop.
    scripts/Makefile.build:425: recipe for target 'drivers/lcd' failed
    make[1]: *** [drivers/lcd] Error 2
    Makefile:1232: recipe for target 'drivers' failed

    Any Idea how to include this lcd driver?
    Your suggestion will be helpful.

    Thanks,
    Mrudula
  • Hi,

    Please explain the detailed steps for adding lcd driver code to u-boot source code.
    I am having compilation error on copying lcd code from startware to /uboot/drivers folder.

    Thanks,
    Mrudula
  • i have a same job.... do you finished? if yess could you tell me how it works? please ... :)
  • Did you tried steps mentioned in my response on Aug 17, 2015 2:18 PM ?
    I am currently using that working implementation.
  • can you share your response again please...
    because i dont se your response in this post on Aug 17, 2015 2:18 PM...
  • can you tell me step by step what must i do for this lcd folder?
  • please read this thread from beginning, all the information that you are asking is already there.
  • what version of u-boot that u use?
  • how u tweaking in board.c? i have a same problem too