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.

AM625: AM62x : spl/u-boot-spl.bin exceeds file size limit issue

Part Number: AM625

Hello experts!

Facing issue for u-boot 2021 version.

Trying compile u-boot and getting error for spl.

make -f /home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/workspace/sources/u-boot-ti-staging/scripts/Makefile.build obj=spl/drivers/soc/ti
| cp spl/u-boot-spl-dtb.bin spl/u-boot-spl.bin
| /home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/workspace/sources/u-boot-ti-staging/tools/k3_gen_x509_cert.sh -c 16 -b spl/u-boot-spl.bin \
| -o tiboot3.bin -l 0x43c00000 -r 1 -k /home/aws-suma/test/core-secdev-k3/keys/custMpk.pem
| SWRV = 1
| spl/u-boot-spl.bin exceeds file size limit:
| limit: 0x30220 bytes
| actual: 0x31108 bytes
| excess: 0xee8 bytes
| /home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/workspace/sources/u-boot-ti-staging/Makefile:1929: recipe for target 'spl/u-boot-spl.bin' failed
| make[1]: *** [spl/u-boot-spl.bin] Error 1
| make[1]: *** Deleting file 'spl/u-boot-spl.bin'
| make[1]: Leaving directory '/home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/tmp/work/am62xx_onecontrol_lrd_k3r5-poky-linux-gnueabi/u-boot-ti-staging/1_2021.01+git999-r33/u-boot-ti-staging-2021.01+git999'
| Makefile:167: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/workspace/sources/u-boot-ti-staging'
| ERROR: oe_runmake failed
| WARNING: /home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/tmp/work/am62xx_onecontrol_lrd_k3r5-poky-linux-gnueabi/u-boot-ti-staging/1_2021.01+git999-r33/temp/run.do_compile.12291:1 exit 1 from 'exit 1'
| ERROR: Execution of '/home/aws-suma/builds/build-lrd-am62xx-onecontrol-lrd-5.10-rt-test/tmp/work/am62xx_onecontrol_lrd_k3r5-poky-linux-gnueabi/u-boot-ti-staging/1_2021.01+git999-r33/temp/run.do_compile.12291' failed with exit code 1
ERROR: Task (mc:k3r5:/home/aws-suma/builds/yocto/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_2021.01.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 780 tasks of which 777 didn't need to be rerun and 1 failed.

Thanks,

Suraj.

  • Hi Suraj,

    Please describe the details of the U-Boot source you use? Is it from the Processor SDK, which SDK version? Or ti-u-boot repo from git.ti.com? which branch? or source from somewhere else?

  • The official OpenEmbedded/Yocto BSP layer for Texas Instruments platforms.

    It is hosted on git.yoctoproject.org/.../ with the
    source repository at git://git.yoctoproject.org/meta-ti


    This layer depends on:

    URI: git://git.openembedded.org/openembedded-core
    layers: meta
    branch: dunfell

    URI: git://git.yoctoproject.org/meta-arm
    layers: meta-arm
    branch: dunfell


    The base BSP part of meta-ti should work with different OpenEmbedded/Yocto
    distributions and layer stacks, such as:
    distro-less (only with OE-Core), with Yocto/Poky, with Angstrom or Arago.

    Please follow the recommended setup procedures of your OE distribution.


    Send pull requests, patches, comments or questions to:
    meta-ti@lists.yoctoproject.org

    Please note - meta-ti mailing list requires subscription for posting:
    lists.yoctoproject.org/.../meta-ti

    Maintainers:
    Ryan Eatmon <reatmon@ti.com>
    Denys Dmytriyenko <denys@konsulko.com>

  • Suraj,

    Thanks for the details. I am routing your query to our Yocto expert for comments.

  • Hi Suraj,

    | spl/u-boot-spl.bin exceeds file size limit:
    | limit: 0x30220 bytes
    | actual: 0x31108 bytes
    | excess: 0xee8 bytes

    This points to U-Boot SPL (R5) a.k.a. tiboot3.bin getting too large and the build process running out of space. For this very first boot step memory is very tight to to AM62x internal SRAM size constraints so any CONFIG option enablement at this state has to be carefully considered in terms of size impact, and often features that are not needed need to be turned off (like SPI memory support) to free up space for additional features you may want to add. That's also the reason we have multiple defconfigs at this stage for AM62x, such as one specifically for USB DFU boot, and Ethernet boot.

    If you change the default defconfig for U-Boot you need to consider those space constraints. If a standard build with the standard defconfig breaks that's another issue.

    Also note that we only support the Yocto layerstack as per our TI SDK (current version is v8.6, see https://www.ti.com/tool/PROCESSOR-SDK-AM62X) so the best course of action for you is probably to setup Yocto as per SDK documentation instructions, witness it building successfully/working, and then migrating whatever you need to your custom setup.

    If you believe whatever you are doing _should_ work you can also reach out directly to the mailing list with your concern.

    Regards, Andreas

  • Thanks Andreas.

    Got it.

  • Hi!

    also for completeness sake, and perhaps it helps somebody in the future, a related comment:

    I was working on something related the other day and found that even if the U-Boot R5 SPL on AM6x seems to fit (no "spl/u-boot-spl.bin exceeds file size limit" error message is shown during build) into the reserved memory region it doesn't mean everything is well. U-Boot R5 SPL actually uses the same SRAM memory region for early (pre-relocation) stack, and there are scenarios where the stack size grows beyond what is reserved, corrupting the U-Boot R5 SPL image, starting with the device tree binary blob that is appended. I've seen this manifesting itself with strange DDR initialization errors which are caused by corrupted DDR device tree init data rather than some HW failure. This concern is internally tracked as SITSW-2333.

    Regards, Andreas