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 UBoot SPL restore flash, where has it gone ?

Hi,

I'd like to flash my SPI flash on a custom am335x based board. I read the following instructions on the wiki :

 SDK AM335x-EVM 8.

Also I tried to make my own configuration adding RESTORE_FLASH, but a lot of code is missing in the u-boot sources.

Should I go back to an older SDK ? Or is there an alternative that is actually not documented on the wiki ?

Also if anyone has a functional configuration to make such a restore bootloader, he would be welcome to share his configuration.

Thanks

  • Seems something went wrong at posting, some precision :

    I want to use u-boot to make a firmware recovery through bootp/tftp.

    Instructions say to use the "_restore_flash" board configurations but those doesn't exist anymore in SDK AM335x-EVM 8.
  • Hi,

    I will forward this to the SW team. By the way, the U-boot guide for the latest SDK is here: http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide

  • Hi,

    Not sure why this functionality has been removed from SDK8.0 & SDK1.0. It is present in SDK6.0.

    So, yes, you can use u-boot from that SDK, just make sure you align load addresses of kernel & fdt with the requirements of SDK8.0.

    Another idea is to try and use latest mainline u-boot, RESTORE_FLASH should be present there.

    Best Regards,
    Yordan
  • This wiki page also provides some information about flasher image creation.

  • Thanks all for your answers.

    After a week off I managed to get u-boot to boot correctly.

    Process is : ROM --> tftp u-boot-pl bin --> run spl --> tftp u-boot --> run u-boot --> load debrick script --> ...

    I used the u-boot official git master branch (git://git.denx.de/u-boot.git) at c6265f7f3410b5e5763181cdd123a3f6fcd9fd58 (was the last when I cloned, not a precise choice).

    My config looks like this :

    CONFIG_ARM=y
    CONFIG_TARGET_AM335X_EVM_CUSTOM=y
    CONFIG_SPL=y
    CONFIG_SPL_NET_SUPPORT=y
    CONFIG_SPL_STACK_R=y
    CONFIG_SPL_STACK_R_ADDR=0x82000000
    CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_NOWHERE,SPL_ETH_SUPPORT,FLASHLOADER,OMAP3_SPI_D0_D1_SWAPPED,SPI_FLASH_SPANSION"
    CONFIG_CMD_NET=y

    Please not that I added SPI_FLASH_SPANSION because I use a Spansion flash and OMAP3_SPI_D0_D1_SWAPPED because my lines are physically swapped.

    I made a copy of em335x_evm.h for my configuration. I had to add the following :

    #define CONFIG_SPL_NET_SUPPORT
    #define CONFIG_SPL_ENV_SUPPORT
    #define CONFIG_SPL_LIBGENERIC_SUPPORT
    #define CONFIG_SPL_LIBCOMMON_SUPPORT
    #define CONFIG_SPL_NET_VCI_STRING	"AM335x U-Boot SPL"

    I know that this is already in the config file under :

    #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)

    but I didn't manage to get this to work as I get multiple errors when compiling with CONFIG_SPL_USBETH_SUPPORT and CONFIG_SPL_BUILD seems to be never defined, despite u-boot being compiled in SPL.