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-AM335X: SD boot fails

Part Number: PROCESSOR-SDK-AM335X


Tool/software: Linux

Hello everyone,

I've a custom board with an AM335X on it that uses U-Boot and Linux.

The board normally boots correctly from NAND (SysBoot: 10011b) and from Linux I can see SD cards without problems.

Now I'm trying to update my system with the latest Processor SDK (u-boot-2018.01 and linux-rt-4.14.79) and during development I'd like to work with SD card. So:

  1. I've prepared the SD card with the script in Processor SDK;
  2. I've changed the Sysboot configuration to11100b;
  3. I've put my file MLO and u-boot.img on the first partition (boot) and uImage on the second partition (SDHC).

But the system doesn't start and I can't see nothing on the console.

I've tried with my old MLO and u-boot.img and also with the files supplied with the SDK, but nothing change.

Now I can't understand what's happening and I don't know what to try to fix the problem.

If someone could help me, I'd appreciate very much.

Thanks

Roberto


  • Here is the console output with the old system. The new system displays nothing.

    U-Boot SPL 2013.10-00001-gb1a1b45 (Dec 07 2016 - 16:27:49) [divelk-2.0.0]


    U-Boot 2013.10-00001-gb1a1b45 (Dec 07 2016 - 16:27:49) [divelk-2.0.0]

    AM335X-GP rev 2.1 1000 MHz
    I2C:   ready
    DRAM:  256 MiB
    Now running in RAM - U-Boot at: 8ff4f000
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
    Net:   cpsw, usb_ether
    autoboot in 1 seconds (stop with PASSWORD)...

    NAND read: device 0 offset 0x2a0000, size 0x600000
     6291456 bytes read: OK

    NAND read: device 0 offset 0x280000, size 0x20000
     131072 bytes read: OK
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-3.12.10-divelk-2.0.0-xeno2
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4795640 Bytes = 4.6 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       XIP Kernel Image ... OK
       Using Device Tree in place at 80f80000, end 80f8c96a

    Starting kernel ...

    [    0.162716] DSS not supported on this SoC
    [    0.569679] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    0.601296] musb-hdrc musb-hdrc.0.auto: Falied to request rx1.
    [    0.607456] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
    [    0.618572] musb-hdrc musb-hdrc.1.auto: Falied to request rx1.
    [    0.625095] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
    [    0.656176] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [    0.671048] of_dma_request_slave_channel: dma-names property of node '/ocp/tscadc@44e0d000' missing or empty
    [    0.685510] cpu cpu0: cpu0 regulator not ready, retry
    [    1.041510] of_dma_request_slave_channel: dma-names property of node '/ocp/tscadc@44e0d000' missing or empty
    [    1.056571] of_dma_request_slave_channel: dma-names property of node '/ocp/tscadc@44e0d000' missing or empty
    [    1.852348] of_dma_request_slave_channel: dma-names property of node '/ocp/tscadc@44e0d000' missing or empty
    [    1.866226] of_dma_request_slave_channel: dma-names property of node '/ocp/tscadc@44e0d000' missing or empty

    INIT: version 2.88 booting

    Starting udev
    cat: can't open '/etc/modules-load.d/*.conf': No such file or directory
    Starting Bootlog daemon: bootlogd.

    Configuring network interfaces... Successfully initialized wpa_supplicant

    nl80211: 'nl80211' generic netlink not found

    Failed to initialize driver 'nl80211'

    wlan0: Unsupported driver 'nl80211'

    Cannot find device "wlan0"

    done.

    Fri Oct 19 21:02:00 UTC 2018


    INIT: Entering runlevel: 5


    Starting system message bus: dbus.

    Starting Dropbear SSH server: dropbear.

    Starting syslogd/klogd: done

    ***************************************************************

    ***************************************************************

    NOTICE: This file system contains the followin GPLv3 packages:

            binutils-symlinks

            binutils

            gdbserver



    If you do not wish to distribute GPLv3 components please remove

    the above packages prior to distribution.  This can be done using

    the opkg remove command.  i.e.:

        opkg remove <package>

    Where <package> is the name printed in the list above



    NOTE: If the package is a dependency of another package you

          will be notified of the dependent packages.  You should

          use the --force-removal-of-dependent-packages option to

          also remove the dependent packages as well

    ***************************************************************

    ***************************************************************

    Starting Lighttpd Web Server: lighttpd.

    2018-10-19 21:02:01: (log.c.194) server started

    Starting LLExecError: could not insert module /data/plc/DIVAxendriverCAN.ko: Invalid module format

    .

    Starting Signal Software*********** SIGNAL SRL BOOT *********

    Loading USB gadget printer driver

    USB gadget printer driver loaded

    Programming FPGA

    fd =3

    JTAG Sitara programmer

    (C) Signal s.r.l.  (LC)    Ver 1.00   Oct 12 2016 17:00:42



    ZZZ l=130460

    NOTE "CREATOR" = "QUARTUS PRIME JAM COMPOSER 16.0"

    NOTE "DATE" = "2018/07/24"

    NOTE "DEVICE" = "EP4CE6"

    NOTE "NEED_FREQUENCY_CONTROL" = "0"

    NOTE "FILE" = "tpl2055.sof"

    NOTE "TARGET" = "1"

    NOTE "IDCODE" = "020F10DD"

    NOTE "USERCODE" = "20000004"

    NOTE "CHECKSUM" = "00289A70"

    NOTE "SAVE_DATA" = "DEVICE_DATA"

    NOTE "SAVE_DATA_VARIABLES" = "V0, A12, A13, A25, A42, A93, A43, A92, A94, A95, A105, A109, A111"

    NOTE "STAPL_VERSION" = "JESD71"

    NOTE "JAM_VERSION" = "2.0"

    NOTE "ALG_VERSION" = "67"

    first_word = 0x4A414D01

    1 status = 0

    2 status = 0

    Device #1 IDCODE is 020F10DD

    configuring SRAM device(s)...

    DONE

    Exit code = 0... Success

    Retry n.1 Duration=2.193971s

    FPGA programmed

    Application not started

    Eclipse executable file not present

    .

    Stopping Bootlog daemon: bootlogd.

     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|

    Arago Project http://arago-project.org diva ttyO0

    Arago 2013.12 diva ttyO0

    diva login:

  • Hello Roberto,

    Can you apply this patch, rebuild, replace the old images in the SD card with the new generated ones and retry?

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM335x-Set-board-name-to-A33515BB-if-EEPROM-probe-fa.patch

    Best regards,
    Kemal

  • Hi Kemal,

    I tried to rebuild U-Boot but the process stops on SPL.
    This is the output of the console.

    ...
    ...
    arm-linux-gnueabihf-ld.bfd: la sezione u-boot-spl ".rodata" non si adatterà alla regione ".sram"
    arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 5680 bytes
    ../scripts/Makefile.spl:349: recipe for target 'spl/u-boot-spl' failed
    make[2]: *** [spl/u-boot-spl] Error 1
    /mnt/sdb/TI_SDK/ti-processor-sdk-linux-rt-am335x-evm-05.03.00.07/board-support/u-boot-2018.01+gitAUTOINC+313dcd69c2-g57f10f0441/Makefile:1399: recipe for target 'spl/u-boot-spl' failed
    make[1]: *** [spl/u-boot-spl] Error 2
    make[1]: uscita dalla directory "/mnt/sdb/TI_SDK/ti-processor-sdk-linux-rt-am335x-evm-05.03.00.07/board-support/u-boot-2018.01+gitAUTOINC+313dcd69c2-g57f10f0441/am335x_evm"
    Makefile:150: recipe for target 'sub-make' failed
    make: *** [sub-make] Error 2


    Best regards,

    Roberto

  • This shouldn't happen. Do you have defined DEBUG flag somewhere in the header files?
  • No Kemal.
    I've search around the code and I haven't found any reference to DEBUG.
    I've applied the patch successfully and tried to compile using am335x_evm_defconfig.
    In addition I can compile correctly U-Boot using my defconfig.
  • Can you try to build with this command?

    cd /mnt/sdb/TI_SDK/ti-processor-sdk-linux-rt-am335x-evm-05.03.00.07/
    make u-boot_clean && make u-boot
  • This command has been completed successfully.
    But what defconfig file are you using?
  • The defconfig file is picked in <Processor SDK>/Rules.make file.
    #u-boot machine
    UBOOT_MACHINE=am335x_evm_config

    Which defconfig file you use?
  • This are my commands.

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=am335x_evm distclean
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=am335x_evm mrproper
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=am335x_evm am335x_evm_config
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- DEVICE_TREE=am335x-signal-diva-tpl2055 O=am335x_evm
  • Does your board prints something on the console now, with the new MLO and u-boot.img images?

  • I found the problem on the U-Boot build.
    I missed the path of the SDK cross-compilation tools. So it was using the tools supplied with Ubuntu.
    Now I can compile without problems.
  • I've updated the two files, but nothing appears on the console.
  • On which reference board design is your custom board based? Which DDR and PMIC you have on it? Can you archive and attach the U-Boot source of the old working MLO and u-boot.img?

  • Hi Kemal,
    our board is based on a SOM from Dave.
    This is the link where you can find more information about the hardware.

    wiki.dave.eu/.../Hardware_Manual_(Diva)
  • Just one information more.
    Also using my MLO and u-boot.img on the SD the system doesn't start.
    I can start it, from the FLASH.
  • So, you mean that you can boot the board with the new generated images from the FLASH?
  • No. I think that I wasn't clear.

    1) my MLO and u-boot.img on NAND: OK
    2) my MLO and u-boot.img on SD: error
    3) TI MLO and u-boot.img on SD: error

    In your opinion, could it be a problem with the SD card during the boot process? It's a Kingston SDC4/16GB Micro SDHC Class 4.

    Thank you very much for your help. I appreciate it
  • Roberto Chiarini said:
    In your opinion, could it be a problem with the SD card during the boot process? It's a Kingston SDC4/16GB Micro SDHC Class 4.


    Yes, it is possible. Since the same MLO and u-boot.img which work on NAND doesn't work on SD card. Also the SysBoot: 11100b boot sequence is MMC1->MMC0->UART0->USB0. Can you try to boot with SysBoot: 10111b MMC0->SPI0->UART0->USB0 boot sequence?

  • With 10111b as SysBoot I can see nothing on console.
    I'll buy another SD to check if the problem with that.
  • Hi Kemal,

    the problem wasn't the sd card, but how it was formatted.

    The first time I formatted the SD from Windows following the procedure described here: .

    But I think that something went wrong.

    Now using the script "create-sdcard.sh" the situation is different. I formatted the SD card with 2 partitions (one for boot files and one for filesystem) and I copied binaries on the first partition (MLO, u-boot.img).

    1) With my old binaries the system starts well.

    U-Boot SPL 2013.10-00001-gb1a1b45 (Dec 07 2016 - 16:27:49) [divelk-2.0.0]
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2013.10-00001-gb1a1b45 (Dec 07 2016 - 16:27:49) [divelk-2.0.0]
    
    AM335X-GP rev 2.1 600 MHz
    I2C:   ready
    DRAM:  256 MiB
    Now running in RAM - U-Boot at: 8ff4f000
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
    Net:   cpsw, usb_ether
    autoboot in 1 seconds (stop with PASSWORD)...
    
    NAND read: device 0 offset 0x2a0000, size 0x492350
     4793168 bytes read: OK
    
    NAND read: device 0 offset 0x280000, size 0xa000
     40960 bytes read: OK
    ## Booting kernel from Legacy Image at 80007fc0 ...
       Image Name:   Linux-3.12.10-divelk-2.0.0-xeno2
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4792480 Bytes = 4.6 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 80f80000
       Booting using the fdt blob at 0x80f80000
       XIP Kernel Image ... OK
       Loading Device Tree to 8fe01000, end 8fe0d96a ... OK
    
    Starting kernel ...
    
    [    0.192785] DSS not supported on this SoC
    [    0.805628] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    0.849004] musb-hdrc musb-hdrc.0.auto: Falied to request rx1.
    [    0.855211] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
    [    0.866935] musb-hdrc musb-hdrc.1.auto: Falied to request rx1.
    [    0.873407] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
    [    0.915296] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [    0.936793] cpu cpu0: cpu0 regulator not ready, retry
    
    INIT: version 2.88 booting
    
    Starting udev
    ERROR: could not open directory /lib/modules/3.12.10-divelk-2.0.0-xeno2-00008-g68052cfc: No such file or directory
    WARNING: -e needs -E or -F
    ERROR: could not open directory /lib/modules/3.12.10-divelk-2.0.0-xeno2-00008-g68052cfc: No such file or directory
    FATAL: could not search modules: No such file or directory
    cat: can't open '/etc/modules-load.d/*.conf': No such file or directory
    Starting Bootlog daemon: bootlogd.
    
    Configuring network interfaces... Successfully initialized wpa_supplicant
    
    rfkill: Cannot open RFKILL control device
    
    Could not read interface wlan0 flags: No such device
    
    WEXT: Could not set interface 'wlan0' UP
    
    wlan0: Failed to initialize driver interface
    
    Cannot find device "wlan0"
    
    done.
    
    Sun Dec 27 14:53:00 UTC 2015
    
    
    INIT: Entering runlevel: 5
    
    
    Starting system message bus: dbus.
    
    Starting Dropbear SSH server: dropbear.
    
    Starting syslogd/klogd: done
    
    ***************************************************************
    
    ***************************************************************
    
    NOTICE: This file system contains the followin GPLv3 packages:
    
            binutils-symlinks
    
            binutils
    
            gdbserver
    
    
    
    If you do not wish to distribute GPLv3 components please remove
    
    the above packages prior to distribution.  This can be done using
    
    the opkg remove command.  i.e.:
    
        opkg remove <package>
    
    Where <package> is the name printed in the list above
    
    
    
    NOTE: If the package is a dependency of another package you
    
          will be notified of the dependent packages.  You should
    
          use the --force-removal-of-dependent-packages option to
    
          also remove the dependent packages as well
    
    ***************************************************************
    
    ***************************************************************
    
    Starting Lighttpd Web Server: lighttpd.
    
    2015-12-27 14:53:03: (log.c.194) server started
    
    Starting LLExec.
    
    Starting Signal Software*********** SIGNAL SRL BOOT *********
    
    Loading USB gadget printer driver
    
    USB gadget printer driver loaded
    
    Programming FPGA
    
    fd =3
    
    JTAG Sitara programmer
    
    (C) Signal s.r.l.  (LC)    Ver 1.00   Oct 12 2016 17:00:42
    
    
    
    ZZZ l=130460
    
    NOTE "CREATOR" = "QUARTUS PRIME JAM COMPOSER 16.0"
    
    NOTE "DATE" = "2018/07/24"
    
    NOTE "DEVICE" = "EP4CE6"
    
    NOTE "NEED_FREQUENCY_CONTROL" = "0"
    
    NOTE "FILE" = "tpl2055.sof"
    
    NOTE "TARGET" = "1"
    
    NOTE "IDCODE" = "020F10DD"
    
    NOTE "USERCODE" = "20000004"
    
    NOTE "CHECKSUM" = "00289A70"
    
    NOTE "SAVE_DATA" = "DEVICE_DATA"
    
    NOTE "SAVE_DATA_VARIABLES" = "V0, A12, A13, A25, A42, A93, A43, A92, A94, A95, A105, A109, A111"
    
    NOTE "STAPL_VERSION" = "JESD71"
    
    NOTE "JAM_VERSION" = "2.0"
    
    NOTE "ALG_VERSION" = "67"
    
    first_word = 0x4A414D01
    
    1 status = 0
    
    2 status = 0
    
    Device #1 IDCODE is 020F10DD
    
    configuring SRAM device(s)...
    
    DONE
    
    Exit code = 0... Success
    
    Retry n.1 Duration=2.310863s
    
    FPGA programmed
    
    .
    
    Stopping Bootlog daemon: bootlogd.
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org diva ttyO0
    
    Arago 2013.12 diva ttyO0
    
    diva login:

    2) With my new binaries I can see something from MLO on the console, but nothing from U-Boot.

    U-Boot SPL 2018.01 (Jun 04 2019 - 08:21:33)
    ConfigID ERROR: 0xffffffff
    Trying to boot from MMC1
    spl: payload image: *s load addr: 0x20 size: -2139095072
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    
    U-Boot SPL 2018.01 (Jun 04 2019 - 08:21:33)
    ConfigID ERROR: 0xffffffff
    Trying to boot from MMC1
    spl: payload image: *s load addr: 0x20 size: -2139095072
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    
    U-Boot SPL 2018.01 (Jun 04 2019 - 08:21:33)
    ConfigID ERROR: 0xffffffff
    Trying to boot from MMC1
    spl: payload image: *s load addr: 0x20 size: -2139095072
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    
    U-Boot SPL 2018.01 (Jun 04 2019 - 08:21:33)
    ConfigID ERROR: 0xffffffff
    Trying to boot from MMC1
    spl: payload image: *s load addr: 0x20 size: -2139095072
    Jumping to U-Boot
    loaded - jumping to U-Boot...
    

    3) With TI binaries (modified with your patch), I cannot see nothing on the console.

    I've tried to investigate the point 2 and I've found that boot process arrives to function jump_to_image_no_args in common/spl/spl.c file.

    But after the instruction "image_entry();" I can't understand what's happening.

  • Hello Roberto,

    To make that board work with the Processor SKD you will need to request the board files from the manufacturer and port these files to the Processor SDK. Otherwise if you have only the board's schematic and list of the used components you will need to do a full bring up.

    Best regards,
    Kemal
  • Hi Kemal,

    I'm trying to port the files supplied from the manufacturer to your SDK (point 2).
    Do you have any idea how to understand what's going on at/after "image_entry()" instruction in "common/spl/spl.c" file?
    I don't know how to debug that. I've setup some debug instruction in "spl.c" and it seem that all is going well in MLO, but I don't know what's happening next.

    Thanks
    Roberto
  • After the image entry instruction the U-Boot should run in the external RAM. Can you check which DDR configurations your board took and is the proper DDR initialized? Please, also check this thread.

  • Hi Kemal,

    I've checked DDR configuration and it looks ok.

    But again the system hangs on SPL.

    I haven't a JTAG debugger, so I tried two tests

    1) using the new MLO and an old u-boot.img file: the system works;

    2) using the old MLO and the new u-boot.img file: the systems hangs on SPL.

    If I've understood correctly, it's SPL that configures hardware and RAM. That should mean the problem is not on DDR initialisation and is on U-Boot, not SPL.

    What do you think?

  • Yes, it appears that the issue is in U-Boot. Can you add #define DEBUG  line in the very beginning of the <Processor SDK>/board-support/u-boot-<version>/include/configs/am335x_evm.h file and check whether the new debug log will give you any clue?

  • I cannot see anything from U-Boot and it continously restart SPL.

    Below you can find the log.

    8424.log.txt

  • You need to setup your board's U-Boot device tree. See this post for instance.

  • I've already set it.

    I post my boards files, so that you can check them.

  • Can you compress and attach the working U-Boot source you have? There are a lot of other things to check beside the board files.

  • I've some problem attaching the file. The maximum size allowed is 20000 kb and if I split the tar in multiple files, I get a red pop-up saying to retry or contact the administrator.

    Do you have any tips or an alternative method?

  • Can you send it to my email.

  • OK.

    I sent you the files by e-mail.

  • Please, make the <u-boot-version>/arch/arm/dts/am335x-signal-diva-tpl2055.dts point to <u-boot-version>/arch/arm/dts/am335x-evm.dts and add CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" to your board's defconfig file.

    cd <u-boot-version>/arch/arm/dts/
    ln -sf am335x-evm.dts am335x-signal-diva-tpl2055.dts

  • Hi Kemal,

    you got it!

    The problem was on CONFIG_DEFAULT_DEVICE_TREE non set in defconfig file.

    Thanks for your help!