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/PROCESSOR-SDK-AM437X: Am437x cann't boot from NAND using u-boot-2018-01

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: TPS65218

Tool/software: Linux

Hi,

I'm working with a Am437x-gp-evm development board. It can boot from NAND with u-boot-2014-07. When I update it to u-boot-2018-01, It's cann't boot. The MLO and u-boot.img produce the same way as u-boot-2014-07 as following:

1)make CROSS_COMPILE=arm-linux-gnueabihf- distclean;

2)make CROSS_COMPILE=arm-linux-gnueabihf- am43xx_evm_defconfig;

3)make CROSS_COMPILE=arm-linux-gnueabhif-.

after above,I get the MLO and u-boot.img.

then,  I boot it (there is u-boot 2014-07 in the NAND). and stop it in u-boot, update it to u-boot-2018 as following:

1)u-boot#:nand erase.chip

2)u-boot#:tftp 0x81000000 MLO;

3)u-boot#:nand write 0x81000000 NAND.SPL

4)u-boot#:nand write 0x81000000 NAND.SPL.backup1;

5)u-boot#:nand write 0x81000000 NAND.SPL.backup2

6)u-boot#:nand write 0x81000000 NAND.SPL.backup3

7)u-boot#:tftp 0x81000000 u-boot.img

8)u-boot#:nand write 0x81000000 NAND.u-boot.

Then, restart the board,  there is nothing appear in the uart0 console.

what is wrong  in the above? the same way i get for u-boot-2014-07 is ok.  is there something need to be modifed in u-boot-2018-01? I update u-boot to 2018-01 for linux-4.14.67 which support Wifi and Bluetooth.  

  • Hello user3529609,

    Please, apply the patch from this post and booting from NAND will work.

    Best regards,
    Kemal

  • Hi,
    I get the patch and patch , compile the u-boot . then download the MLO and u-boot.img to NAND, It cann't run yet when power up. My problem is u-boot is not run after power up, there is no message in serial-terminal My SDK is Processor-SDK-linux-AM437x 05_01_00_11.

  • Did you successfully replace the u-boot.img and MLO images in both sides, the booted and the flashed ones? Can you try to flash your NAND by loading the images from SD card as shown in the first part of this post? Which was the previous Processor SDK version where you was able to boot from NAND? Which revision is your AM437x GP EVM board?  A or B? It is not possible to boot from NAND with revision A because of the AM437X Errata Rev. A, Advisory 15. Please, check this thread for more details.

  • Hi,

    The previous Processor SDK( can successfull boot from its u-boot) veriion is <ti-processor-sdk-linux-am437x-evm-01.00.00..03-Linux-x86-Install.bin>, the u-boot version is <u-boot-2014.07+gitAUTOINC+fb6ab76dad-gfb6ab76>..I don't know the Am437x GP EVM board version is A or B( we get it from tronlong, a ti agent in China).. I'll try lo flash NAND by loading the images from SD card. 

  • The board version should be 'B', I check it from Device Revision code: AM4379BZDNA100.
  • Hi,

    I create SD card using default images from the SDK (05.01.00.11) with script create-sdcard.sh. I insert the card into MMC1 slot and power up the board, there is no u-boot information in uart terminal. When I replace the card with the old one(agent afforded), when power up, It can work and display following message in uart terminal:

    U-Boot SPL 2014.07-g10e4fe2 (May 18 2018 - 11:01:09)

    Could not probe the EEPROM at 0x50

    Could not get board ID.

    reading u-boot.img

    reading u-boot.img

    u-Boot 2014.07-g10e4fe2 (May 18 2018 -11:01:09)

    I2C: ready

    DRAM: 1 GiB

    NAND 512MiB

    MMC: OMAP SD/MMC:0, OMAP SD/MMC:1

    reading uboot.env

    ** unable to read "uboot.env" from MMC0:1 **

    using default environment

    Could not probe the EEPROM at 0x50

    Could not get board ID.

    Net: <ethaddr> not set. validating first E-fuse MAC

    cpsw, usb_ether

    Hit any key to stop autoboot: 1

    U-boot#

    The board we get may not be the exact  AM437x-gp-evm board. The agent may modify U-boot source files(2014-07) to match their board. which files may be changed for this purpose? and can I modify it in U-boot 2018. to fit this board . Is there document instruct to modify u-boot file for  specific board?

  • Can you apply this patch and check whether the board boots?

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM437x-Hardcode-EEPROM-board-name-to-AM43__GP.patch

  • Hi,

    I apply the patch, compile and download the MLO and u-boot.img to NAND. when power up, the board can boot and display following message in uart terminal:

    U-Boot SPL 2018.01-00444-ge782a78ca9-dirty (Jan 26 2019 -10:01:40)

    Trying to boot from NAND

    SPL:Please implement spl_start_uboot() for your board

    SPL:Direct Linux boot not active!

    It stops here,. It should stop in u-boot state when key pressed.  What should I do now?

    I update the NAND with following steps in old u-boot:

    1) nand erase.chip

    2)tftpoot 0x82000000 MLO

    3)nand write 0x82000000 NAND.SPL

    4)nand write 0x82000000 NAND.SPL.backup1

    5)nand write 0x82000000 NAND SPL.backup2

    6)nand write 0x82000000 NAND.SPL.backup3

    7)tftpboot 0x82000000 u-boot.img

    8)nand write 0x82000000 NAND.u-boot

    After above steps,I restart the board, the upate u-boot run and display above message in uart terminal and stop.

  • SPL is now trying to load the uboot.env from SD card, that is why it stops at that point. To avoid this you need to define CONFIG_ENV_IS_IN_NAND in U-Boot and load and save the U-Boot environment to NAND or disable the SPL environment loading from menuconfig as shown in this post.

  • Hi,
    When I disable the "Support an environment" in SPL/TPL from menuconfig , save and compile u-boot, following errors occur:
    ...
    env/built-in.o:(.data.env_htab+0xc): undefined reference to `env_flags_validate'
    lib/built-in.o: In function `hsearch_r':
    /media/Am437x/ti-sdk-05.01.00.11/board-support/u-boot-2018.01+gitAUTOINC+cdb1cc0a9e-gcdb1cc0a9e/lib/hashtable.c:380: undefined reference to `env_callback_init'
    /media/Am437x/ti-sdk-05.01.00.11/board-support/u-boot-2018.01+gitAUTOINC+cdb1cc0a9e-gcdb1cc0a9e/lib/hashtable.c:382: undefined reference to `env_flags_init'
    scripts/Makefile.spl:349: recipe for target 'spl/u-boot-spl' failed
    make[1]: *** [spl/u-boot-spl] Error 1
    Makefile:1399: recipe for target 'spl/u-boot-spl' failed
    make: *** [spl/u-boot-spl] Error 2
  • Hello Eddie,

    Please, disable these two options in your U-Boot's menuconfig.
    SPL / TPL -> [ ] Support an environment
                            [ ] Support networking

    Rebuild, reflash and your board will work properly.

    Best regards,
    Kemal

  • Hi,
    I disable the two options from menuconfig, save , compile and flash the NAND with MLO and u-booting. It display the same message as before:
    U-Boot SPL 2018.01-00444-ge782a78ca9-dirty (Jan 26 2019-17:20:27)
    Trying to boot from NAND
    SPL:please implement spl_start_uboot() for your board
    SPL:Direct Linux boot not actived!

    I also define followings to am43xx_evm.h:
    #define CONFIG_ENV_IS_IN_NAND
    #define CONFIG_ENV_OFFSET 0x00280000
    #define CONFIG_ENV_RANGE CONFIG_ENV_SIZE

    save and compile, the result is the same with above.
  • Can you #defineDEBUG in <Processor SDK>/board-support/u-boot-<version>/include/configs/am43xx_evm.h as shown in this post? This will give us more detailed information.

  • Hi,

    I add the #define DEBUG to am43xx.evm.h, compile the u-boot, and transfer MLO and u-boot.img to NAND. When power up, the console display:

    U-Boot SPL 2018.01-00444-ge782a78ca9-dirty (Jan 27 2019 - 10:07:30)
    omap24_i2c_findpsc: speed [kHz]: 100 psc: 0xb sscl: 0xd ssch: 0xf
    Trying to boot from NAND
    spl: nand - using hw ecc
    nand: using OMAP_ECC_BCH16_CODE_HW
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    mkimage signature not found - ih_magic = ffffffff
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    image entry point: 0x80800000
    stop here.

  • Can you compress and attach the source code of your old working U-Boot?
  • Hi,

    The old u-boot please reference to attach.

    The only modified place  is in am43xx_evm.h:

    added:

    #define CONFIG_ENV_IS_IN_NAND

    #define CONFIG_ENV_OFFSET 0x00280000

    #define CONFIG_ENV_RANGE CONFIG_ENV_SIZE

    and remark folowing lines:

    #if 0

    #define CONFIG_ENV_IS_IN_FAT

    #define FAT_ENV_INTERFACE                            "mmc"

    #define FAT_ENV_DEVICE_AND_PART             "0:1"

    #define FAT_ENV_FILE                              "uboot.env"

    #define CONFIG_FAT_WRITE

    #endif

    U-Boot-2014.07.rar

  • Dear  Kemal R. Shakir,

    I'm wating for your support. If there is any information need to try Don't hesitate let me know and I'll do it with pleasure.

    When power up from NAND , The old u-boot give message in console as following:

     

    U-Boot 2014.07 (Oct 20 2018 - 17:05:17)

    I2C:   ready
    DRAM:  1 GiB
    NAND:  512 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - bad CRC, using default environment

    Could not probe the EEPROM at 0x50
    Could not get board ID.
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0 
    U-Boot# 
  • Hello user3529609,

    Please, apply this patch and check whether the U-Boot loads.
    I do not know who modified the U-boot you've attached, but he has done that work very well. It was very easy to track his changes. Well done.

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM437x-NAND-device-related-configs-set-up.patch

    Best regards,
    Kemal

  • Hi,

    This patch resolve my problem. I update the MLO and u-boot.img in NAND, when power up, It works and following message display in console:

    U-Boot 2018.01-00444-ge782a78ca9-dirty (Jan 30 2019 - 10:21:10 +0800)

    CPU  : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM:  1 GiB
    PMIC:  TPS65218
    NAND:  512 MiB
    MMC:   OMAP SD/MMC: 0
    MMC: no card present
    ** Bad device mmc 0 **
    Using default environment

    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0 
    =>
    Many thanks!
    By the way, Must I aplay this pitch to u-boot in my board if I may update to newest SDK(u-boot) in the future?
  • Yes, you will, as your board doesn't contain an EEPROM to identify itself and has a different NAND chip. Here in this patch I've combined the two patches and the changes you made to keep the U-Boot environments in NAND.

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM437x-Custom-board-NAND-and-Board-name-settings.patch

  • Dear Kemal R. Shakir,

    Many thanks for your support.

      We meet another problem when ubi filesystem  loading to NAND , kernel panic happens. and I 'll give it in this forum after chinese spring festival as we'll take a holiday.  I suspect the problem may also lie in the  different NAND. I'll give a detail information about the problem after the holiday and I hope you can support us then.

    Best regards,

  • Okay. Happy holidays for you. We'll check than kernel panic after the holiday.