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.

Using U-Boot to make self-designed board able to boot up alone with self-designed code.

Hi,

Our target is to design our own board (with different components than EVM8148) and our own code for specific purpose. To achieve this, we need to modify U-Boot-MIN for our board and replace the second stage U-Boot by our own code. I have two questions about this process:

1. Is there any detail description on how to modify the U-Boot-Min for specific board? For example, if our own board is with different DDR2 or SPI flash than EVM8148 test board, how could I modify the source of U-Boot-MIN for correct DDR and flash setting to make a workable image for our board?

2. The second stage of U-Boot shall finally be replaced by our code. If I build a .out file in CCS, how could I make our board able to boot up alone with our code?

 

Regards,

    Eric

 

  • Generally speaking, the answer is that you would start with the original board port (for example board/ti/ti8148) and copy it (board/yourcompany/boardname) and then modify the functions for memory, etc.  You'll need to look at the toplevel Makefile and include/configs/ti8148_evm.h.  It can be helpful during the first few steps to just directly modify the starting board port so you don't have to identify every area of the code that needs to know about your board being just like the other board.

  • Hi Tom,

       First I just directly modified the code of ti8148 part to prevent any uncertainty. We used different SPI flash and DDR2 chips than EVM board. I would like to confirm which files shall I modify.

        For SPI flash, I modified ../drivers/spi/Omap3_spi.h for spi configuration values which would set in spi_claim_bus function in Omap3_spi.c.

        For DDR2, I modified ../arch/arm/include/asm/arch-ti81xx/ddr_defs.h for DDR parameters.

     

        After I rebuild the u-boot and boot from uart. I got "Failed to initialize SPI flash at 0:0" when executing command "sf probe 0:0" at 2nd stage prompt (TI_EVM#). I wonder is there any file I missed to modify or any further step(s) I should do? Thanks.

     

    Regards,

        Eric

  • Did you also change include/configs/ti8148_evm.h to have the right flash chip, or are you using a Winbond as well (look for CONFIG_SPI_FLASH_WINBOND in the file) ?

  • Hi Tom,

        Although we also use Winbond flash chip, the spec. is different from the original definitions. I added a set of definition for our chip in structure "winbond_spi_flash_table" in Winbond.c. The U-boot code works on our board.

        Thank for your help.

     

    Regards,

        Eric

  • Sorry that the next step is a little vague but, the problem would appear to be a difference between your custom board and the eval board that's not accounted for in the changes you've made.  Aside from the files I've listed above, I would grep around for CONFIG_TI814X in the u-boot tree for other locations where board specific values were placed and then audit arch/arm/include/asm/arch-ti81xx/.