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.

Selecting the Proper DTB

Can someone please elaborate on this section of the wiki:

http://processors.wiki.ti.com/index.php?title=Processor_SDK_Linux_Automotive_Software_Developers_Guide#Choosing_the_correct_device_tree

I don't understand the last sentence:

"Bootloader tries to detect the platform (J6/J6eco) and assume But this can be overwritten via uenv.txt used by u-boot."

It's like part of the sentence was deleted, i.e. what does it assume?!  Is the bootloader supposed to be able to figure out what screen is attached to my board and load the proper dtb accordingly, or does it always assume NO screen unless I explicitly tell it otherwise?

Furthermore, I've seen other forum posts suggest specifying something along these lines in uenv.txt:

fdtfile=dra7-evm-lcd-lg.dtb

However, nowhere in the entire article does it ever mention "fdtfile", so that's rather difficult to guess.  Is that the recommended method of doing this, or is it preferred to change the dra7-evm.dtb soft link (in <rootfs>/boot) to point to the desired file?

Finally, pertaining to the two different 10" LCD's, is there a way to tell them apart by looking at them?  I had to just guess and check to determine what was on my board.  If you know of an easy way to identify which LCD is on your board, it would be useful to note it in this section.

Brad

  • Hi, Brad,

    I've forwarded your query to uboot expert and LCD expert.

    Regards,
    Mariya
  • Brad

    The correct DTB file is selected dynamically based on the board name and revision(J6/J6eco/J6eco-rev).

    The u-boot executes findfdt, which finds the right dtb based on the platform and revision and set the fdtfile environment variable to right dtb file name.

    But this can be overridden by the uenv.txt, if unev.txt has an entry fdtfile = <board-dtb-file>. 

    Regards

    Ravi

  • Thanks for the great hint!  I see what you're talking about inside include/configs/ti_omap5_common.h:

    "findfdt="\
    		"if test $board_name = omap5_uevm; then " \
    				"setenv fdtfile omap5-uevm.dtb; fi; " \
    		"if test $board_name = dra7xx; then " \
    				"setenv fdtfile dra7-evm.dtb; fi;" \
    		"if test $board_name = dra72x-revc; then " \
    				"setenv fdtfile dra72-evm-revc.dtb; fi;" \
    		"if test $board_name = dra72x; then " \
    				"setenv fdtfile dra72-evm.dtb; fi;" \
    		"if test $board_name = dra71x; then " \
    				"setenv fdtfile dra71-evm.dtb; fi;" \
    		"if test $board_name = beagle_x15; then " \
    				"setenv fdtfile am57xx-beagle-x15.dtb; fi;" \
    		"if test $board_name = beagle_x15_revb1; then " \
    				"setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
    		"if test $board_name = am57xx_evm; then " \
    				"setenv fdtfile am57xx-evm.dtb; fi;" \
    		"if test $board_name = am57xx_evm_reva3; then " \
    				"setenv fdtfile am57xx-evm-reva3.dtb; fi;" \
    		"if test $board_name = am572x_idk && test $idk_lcd = no; then " \
    				"setenv fdtfile am572x-idk.dtb; fi;" \
    		"if test $board_name = am572x_idk && test $idk_lcd = osd101t2045; then " \
    				"setenv fdtfile am572x-idk-lcd-osd.dtb; fi;" \
    		"if test $board_name = am572x_idk && test $idk_lcd = osd101t2587; then " \
    				"setenv fdtfile am572x-idk-lcd-osd101t2587.dtb; fi;" \
    		"if test $board_name = am571x_idk && test $idk_lcd = no; then " \
    				"setenv fdtfile am571x-idk.dtb; fi;" \
    		"if test $board_name = am571x_idk && test $idk_lcd = osd101t2045; then " \
    				"setenv fdtfile am571x-idk-lcd-osd.dtb; fi;" \
    		"if test $board_name = am571x_idk && test $idk_lcd = osd101t2587; then " \
    				"setenv fdtfile am571x-idk-lcd-osd101t2587.dtb; fi;" \
    		"if test $fdtfile = undefined; then " \
    				"echo WARNING: Could not determine device tree to use; fi; \0" \
    

    I have attempted to clarify this in the wiki page.  A quick review would be appreciated:

    http://processors.wiki.ti.com/index.php?title=Processor_SDK_Linux_Automotive_Software_Developers_Guide#Choosing_the_correct_device_tree

    Hopefully now it will be clear to everyone.

    Brad