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.

AM3359: Loading SPL and U-boot from TFTP

Part Number: AM3359

I have a BeagleBoard derivative and have followed the documentation provided in the SDK to enable loading the SPL and u-boot from a TFTP server. Here are the relevant excerpts from the documentation: 

From the wireshark logs, I'm able to see that the BOOTP requests are happening and the u-boot-spl.bin file is fetched and served. The console output shows:

Ive been able to trace the code execution up to this point with JTAG and CC. 

I believe the last function that's called before it hangs and goes into a reset is spl_load_image(). If I continue execution from the point in the image above and then pause a second or two later, this is the disassembly I see:

Any guidance for further debug steps would be greatly appreciated -- thanks! 

  • Hi Adam,

    our subject matter expert is out this week but let me see if we can move this along some.

    First, I see you are using upstream U-Boot. While our support in there for AM335x is pretty complete AFAIK, can you try the same with the latest TI U-Boot? You can get that here: https://git.ti.com/cgit/ti-u-boot/ti-u-boot/log/?h=ti-u-boot-2021.01  This way we may be able to establish a working baseline.

    If the above fails, I would re-try the above on an actual BeagleBone Black board, to see if there might be a HW concern/incompatibility with your custom board.

    Then, since you already have the debugger up (great!) can you see if you can step from SPL into U-Boot, to see if it got loaded, and at least executes the first few instructions correctly?

    You can also try adding a #define DEBUG statement to the top of the common/board_f.c and common/board_r.c files, that should yield additional debug outpout.

    Regards, Andreas

  • Hey Andreas, Thanks for the feedback. I rebuilt u-boot with the latest from TI's u-boot. The first output is from my board, and the rest are using a standard BBB Rev C. I don't have JTAG on the BBB at the moment but that might be something I can get setup in a day or two. Do you have a BBB on you that you could try this with? The processor SDK 08_02_00_24 comes bundled with pre-built images for SPL and u-boot over USB eth. Maybe you could see if you're able to reproduce the error I'm seeing on your end. 

    Edit: In both cases, I see that the transfer of SPL completes when using wireshark. 

    Second Edit: The first screen shot is using the bundled images that come in the processor SDK 08_02_00_24. Here's the output when I just rebuilt it now using the latest from TI.

  • Hi Adam,

    alright, as per your findings the issue is the same with the BBB, so that helps us having a common platform.

    I actually had complete Ethernet (and USB-Ethernet) based boot working a while ago, you can find all the info in this E2E threads: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/894702/am3358-beaglebone-black-am3358-emmc-not-flashing-from-usb-ethernet 

    One of the posts on that thread has an attachment with files of the eMMC flasher solution I developed (a superset of what you need), and has the following comment in the included readme file.

    ################################################################################
    # Populate pre-built U-Boot images from SDK into TFTP folder
    # Note, we can use the pre-build U-Boot images as-is, no modifications needed!
    ################################################################################

    adannenb@beast:/opt/ti-processor-sdk-linux-am335x-evm-06.03.00.106
    $ cp -v board-support/prebuilt-images/{u-boot-spl.bin-am335x-evm,u-boot-am335x-evm.img} ~/tftpboot/

    Note how it says the pre-build U-Boot images part of the SDK work as-is for Ethernet-based boot. But this was with SDK v6.03. So it may be possible there was some regression and this no longer works as it used to be. To find out, you can go back to the previous SDK versions to try the pre-built files from there:

    SDK v7.03: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM335X/07.03.00.005
    SDK v6.03: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM335X/06.03.00.106

    Can you please try both those SDKs to see if the included U-Boot files work? This will help us narrow down the failure further, and allow for some more targeted debug steps.

    Regards, Andreas

  • Andreas, I ended up doing this exactly -- I downloaded the most recent SDK for AM335x 8.02.00.24 and the included binaries there do work for the BBB. I was able to get in to U-boot and then set some environment variables and load the kernel (zImage) from tftp as well. I haven't tried compiling the binaries from the SDK source yet. 

  • Thanks for confirming you have a working starting point now, and of course glad to hear the Ethernet boot still works with SDK v8.02! Based on this I'm closing this thread now. For any new concerns not directly related to this Ethernet boot topic please open a new thread.