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 Frame buffer support in U-boot

Hi ,

I like add LCD support to u-boot for AM335x -- we are using U-Boot SPL 2015.04-rc1-dirty. 

#1: I tried to add the frame buffer to u-boot --  Video drivers are not added for building

      i.  so i added the macros in defconfig and am335x_evm.h related to LCD ,LCD_LOGO and AM335x_LCD   and the /video in all necessary makefiles and kconfigs and added related to AM335x_fb in kconfig in /driver/video/kconfig 

     ii. i moved am335x-fb.h to include folder 

   Then i am getting an error :

drivers/video/built-in.o: In function `am335xfb_init':
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:112: multiple definition of `am335xfb_init'
drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:112: first defined here
drivers/video/built-in.o: In function `lcd_get_size':
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:106: multiple definition of `lcd_get_size'
drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:106: first defined here
common/built-in.o: In function `lcd_clear':
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:225: undefined reference to `lcd_setcolreg'
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:226: undefined reference to `lcd_setcolreg'
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:227: undefined reference to `lcd_setcolreg'
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:228: undefined reference to `lcd_setcolreg'
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:229: undefined reference to `lcd_setcolreg'
common/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:230: more undefined references to `lcd_setcolreg' follow
common/built-in.o: In function `lcd_clear':
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:273: undefined reference to `panel_info'
common/built-in.o: In function `lcd_init':
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:296: undefined reference to `lcd_ctrl_init'
/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../common/lcd.c:312: undefined reference to `lcd_enable'
drivers/built-in.o: In function `lcd_get_size':
:(.text.lcd_get_size+0x34): undefined reference to `panel_info'
arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 2.23.1 assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 2.23.1 assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
arm-linux-gnueabihf-ld.bfd: BFD (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 2.23.1 assertion fail /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/binutils-2.23.1/bfd/elf32-arm.c:7677
arm-linux-gnueabihf-ld.bfd: error: required section '.rel.plt' not found in the linker script
arm-linux-gnueabihf-ld.bfd: final link failed: Invalid operation
make[2]: *** [u-boot] Error 1
make[1]: *** [__build_one_by_one] Error 2
make[1]: Leaving directory `/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm'
make: *** [sub-make] Error 2
vk29835@vk29835-HP-Compaq-6000-Pro-MT-PC:~/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot$

Please help in this... i went to starterware -- there they implemented completely with own functions and necessary configuration ---

problem is -- we need to give raster C header file to display -- there tool bmptoheader is not generating required resolution header file.

regards,

Viswanath K

  • unable to do pin mux for lcd in u-boot. /board/ti/am335x/mux.c - unable to find , but is defined.

    where to get the "lcd_datax " definition in u-boot.

    static struct module_pin_mux uart5_pin_mux[] = {
    {OFFSET(lcd_data9), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* UART5_RXD */
    {OFFSET(lcd_data8), (MODE(4) | PULLUDEN)}, /* UART5_TXD */
    {-1},
    };

    regards,
    Viswanath K
  • The above two are solved : #1 post is related undefined -- that i defined
    #2 just continued the same notation for pinmux as the same.

    added these in include/configs/am335x_evm.h

    # define CONFIG_AM335X_LCD
    #define CONFIG_LCD
    #define CONFIG_LCD_LOGO

    so added the necessary function required for the common/lcd.c -- those are defined in driver/video/am335x-fb.c

    then i am getting this error: we defined only am335x-fb.c

    drivers/video/built-in.o: In function `am335xfb_init':
    /home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:120: multiple definition of `am335xfb_init'
    drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:120: first defined here
    drivers/video/built-in.o: In function `lcd_setcolreg':
    /home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:183: multiple definition of `lcd_setcolreg'
    drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:183: first defined here
    drivers/video/built-in.o: In function `lcd_ctrl_init':
    /home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:194: multiple definition of `lcd_ctrl_init'
    drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:194: first defined here
    drivers/video/built-in.o: In function `lcd_ctrl_init':
    /home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:107: multiple definition of `lcd_enable'
    drivers/built-in.o:/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm/../drivers/video/am335x-fb.c:107: first defined here
    make[2]: *** [u-boot] Error 1
    make[1]: *** [__build_one_by_one] Error 2
    make[1]: Leaving directory `/home/vk29835/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot/am335x_evm'
    make: *** [sub-make] Error 2
    vk29835@vk29835-HP-Compaq-6000-Pro-MT-PC:~/IMMTV/Bootup-screen/U-boot-Lcd/ti-u-boot$
  • Hi,

    Here is a post describing how to add LCD functionality in U-boot: e2e.ti.com/.../849350
  • Thnx for the reply. I like to close this thread. we followed the link and we done with LCD support in U-Boot.

    regards,
    Viswanath K.