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.

Linux/AM3351: Image display in U-boot

Part Number: AM3351


Tool/software: Linux

Hi, i am using ti-processor-sdk-linux-am335x-evm-03.00.00.04 sdk,

i am trying to add splash screen at u-boot time, please suggest me to where i need to enable this settings,

  • The software team have been notified. They will respond here.
  • Hello khageswararao,

    The Image display in U-boot is explained in these two treads:
    e2e.ti.com/.../606154
    e2e.ti.com/.../217383

    Best regards,
    Kemal
  • #endif l, Biser thanks for your great support,

    based on your suggestion, i am added lcd driver in drivers/lcd
    Makefile:
    libs-y += drivers/lcd/
    include/configs/am335x_evm.h:
    /* LCD Support */
    #define CONFIG_LCD_TCM
    board/ti/am335x/board.c:
    #ifndef CONFIG_SPL_BUILD
    Lcd_Init();
    #endif

    when i am compiling it is giving below warning
    CC board/ti/am335x/board.o
    board/ti/am335x/board.c: In function 'board_init':
    board/ti/am335x/board.c:750:2: warning: implicit declaration of function 'Lcd_Init' [-Wimplicit-function-declaration]
    Lcd_Init();
  • Please, switch to the latest Processor SDK, you will not get this error on it.

  • Hi Kemal, present i am working on "ti-processor-sdk-linux-am335x-evm-03.00.00.04", please help me to where i need to modify it, right now switching into new sdk is difficult.
  • Suppress it. It is only an informative warning.
  • thanks Kemal. Now i got white colour screen with small black colour dots,
    //////i configured LCD in kernel dts file like below it is working://////////
    panel {
    compatible = "ti,tilcdc,panel";
    status = "okay";
    pinctrl-names = "default", "off";
    pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
    pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
    panel-info {
    ac-bias = <255>;
    ac-bias-intrpt = <0>;
    dma-burst-sz = <16>;
    bpp = <24>;
    fdd = <0x80>;
    sync-edge = <0>;
    sync-ctrl = <1>;
    raster-order = <0>;
    fifo-th = <0>;
    };

    display-timings {
    1280x800p62 {
    clock-frequency = <71100000>;
    hsync-len = <40>;
    hactive = <1280>;
    hfront-porch = <50>;
    hback-porch = <70>;
    hsync-active = <1>;
    vsync-len = <5>;
    vactive = <800>;
    vback-porch = <5>;
    vfront-porch = <18>;
    vsync-active = <1>;
    };
    };
    };

    //////in u-boot drivers/lcd/rasterDisplay.c///////////
    /*
    ** Configures raster to display image
    */
    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, 71000000, 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);

    /* Configuring horizontal timing parameter */
    RasterHparamConfig(SOC_LCDC_0_REGS, 1280, 40, 50, 70);

    /* Configuring vertical timing parameters */
    RasterVparamConfig(SOC_LCDC_0_REGS, 800, 5, 18, 5);

    RasterFIFODMADelayConfig(SOC_LCDC_0_REGS, 128);

    }

    Please guide me anything needs to modify.
  • Please, read the README. Comment out the #define COMPRESS in BitmapReader.h file then regenerate the image.h and recompile the U-Boot with it.

  • i am using default image.h file it contains below data

    #ifndef CONFIG_SPL_BUILD

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

    0x4000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u,

    0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff,

    0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff,

    -              -             -     -

    0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff,

    };

    #endif

    now i am getting below screen when u-boot loads but i think it should show ti logo, please let me know what is the issue.

  • Probably the resolution is 800x480 or 480x272. You need to generate image for your 1280x800 resolution. Please download and install the StarterWare go to tools/bmpToRaster and generate new image.h file.

  • thanks kemal,
    i generated data file file using "./a.out 1280 800 ./image.bmp ./image.h 24 RGB" for new 1280x800 image
    now image.h size 12 Mb

    root@:/opt/sdk_03_00/tools/bmpToRaster# ll image.h
    -rw-r--r-- 1 root root 12390567 Dec 11 21:51 image.h

    /////////but u-boot is not loading please verify below log//////////


    U-Boot SPL 2016.05-00230-g120a8a3-dirty (Dec 11 2017 - 21:52:28)
    SDRAM Testing...
    SDRAM OK...

    boot_params = 4030cdcc NON_SECURE_SRAM_START = 402f0400 NON_SECURE_SRAM_END =40310000
    omap_boot_params->boot_device=8
    gd->arch.omap_boot_device=8
    gd->arch.omap_boot_mode=2
    gd->arch.omap_boot_device=8
    Trying to boot from boot_name_table[i].name =MMC1
    SPL: spl_load_image
    CONFIG_SPL_MMC_SUPPORT
    gd->arch.omap_boot_device=8
    spl: mmc boot mode: fs
    reading args
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    FIT header read: destination = 0x807ff800, size = 7c0
    reading u-boot.img
    data_offset=0, data_size=44f74c
    Temp u-boot.bin read from fit: dst = 0x80800000, file offset = 0x7c0, size = 0x44f74c
    reading u-boot.img
  • thanks kemal,
    using " ./a.out 1280 800 ./image.bmp ./image.h 24 RGB" command i created image.h file and modified with
    #ifndef CONFIG_SPL_BUILD
    unsigned int const image1[] __attribute__((aligned(4)))= {

    now image.h file size is 12MB
    root@s:/opt/sdk_03_00/tools/bmpToRaster# ll image.h
    -rw-r--r-- 1 root root 12390567 Dec 11 21:51 image.h

    /////but booting is failed and restarted in u-boot with below message////

    U-Boot SPL 2016.05-00230-g120a8a3-dirty (Dec 11 2017 - 22:38:05)
    SDRAM Testing...
    SDRAM OK...

    boot_params = 4030cdcc NON_SECURE_SRAM_START = 402f0400 NON_SECURE_SRAM_END =40310000
    omap_boot_params->boot_device=8
    gd->arch.omap_boot_device=8
    gd->arch.omap_boot_mode=2
    gd->arch.omap_boot_device=8
    Trying to boot from boot_name_table[i].name =MMC1
    SPL: spl_load_image
    CONFIG_SPL_MMC_SUPPORT
    gd->arch.omap_boot_device=8
    spl: mmc boot mode: fs
    reading args
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    FIT header read: destination = 0x807ff800, size = 7c0
    reading u-boot.img
    data_offset=0, data_size=abc94
    Temp u-boot.bin read from fit: dst = 0x80800000, file offset = 0x7c0, size = 0xabc94
    reading u-boot.img
    u-boot.bin load: dst = 0x80800000, size = 0xabc94
    Fit file name: am335x-evm
    Selecting config 'am335x-evm', fdt 'fdt@1'
    FIT: Selected 'am335x-evm'
    Temp fdt read from fit: dst = 0x808abcc0, file offset = 0xac440, size = 703636
    reading u-boot.img
    fdt load: dst = 0x808abc94, size = 0xabc94
  •  hi kemal using bmptotaster tool i generated new image file for 1280x800 resolution,

    but using this file, u-boot is not booting, so i copied starting 30,000 line from image.h file

    now its displaying like below, please let me know if anything need to modify.

  • Part Number: AM3351

    Tool/software: Linux

    Hi, i m trying to display an image  in u-boot.

    using bmptoraster tool i created image.h file but it is not showing properly

    please use this link for more details.

    e2e.ti.com/.../647701

  • it was fixed by setting clock in SetUpLCD() function in rasterDisplay.c

    /* Configure the pclk */
    //RasterClkConfig(SOC_LCDC_0_REGS, 71100000, 192000000);
    RasterClkConfig(SOC_LCDC_0_REGS, 40000000, 192000000);

    thanks Kemal for your great support.