Arria10 uboot size exceed limit

Hi all,
i trying to build uboot for arria10

git clone https://github.com/altera-opensource/u-boot-socfpga.git uboot-socfpga
cd uboot-socfpga
export CROSS_COMPILE=~/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-
git checkout v2017.09 && git checkout -b v2017.09 && make mrproper
make socfpga_arria10_config && make

but resulting binary is bigger then 204796 bytes
i make image using

bsp-create-settings --preloader-settings-dir=hps_isw_handoff --type=uboot --settings=software/settings.bsp
bsp-update-settings --settings=software/settings.bsp --set uboot.boot_device ${boot_type^^} --set uboot.rbf_filename ghrd_10as066n2.periph.rbf --set uboot.disable_uboot_build true
bsp-generate-files --settings=software/settings.bsp --bsp-dir=software/bootloader
make --debug TGZ=$project/software/bootloader/uboot-socfpga.tar.gz PREBUILT_DIR=$project/software/bootloader/prebuilt -C software/bootloader

 Successfully remade target file 'uboot-socfpga/u-boot.bin'.

Must remake target ‘u-boot_w_dtb.bin’.
cat uboot-socfpga/u-boot.bin devicetree.dtb > u-boot_w_dtb.bin
Successfully remade target file ‘u-boot_w_dtb.bin’.
Must remake target ‘uboot_w_dtb-mkpimage.bin’.
mkpimage --header-version 1 -o uboot_w_dtb-mkpimage.bin u-boot_w_dtb.bin u-boot_w_dtb.bin u-boot_w_dtb.bin u-boot_w_dtb.bin
Image size must not be more than 204796 bytes
Makefile:252: recipe for target ‘uboot_w_dtb-mkpimage.bin’ failed

so i have two question.
could someone direct me to the information how to build binary which can be converted to the ssbl?
could someone direct me to the link how to build small ssbl which init DDR and then load uboot to DDR and not to sram to avoid size limitation?

Hope this helps:

You must build uboot on a Linux platform and I’ve only done it using the SocEDS tools.
I’ve followed the procedure below on Ubuntu 16 and Centos 6.5:

  1. Open a SoC EDS embedded_command_shell.sh
    example:
    /usr/altera/16.1/embedded/embedded_command_shell.sh

  2. cd <your_quartus_project> then open bsp-editor
    % cd
    % bsp-editor &

  3. Create a new HPS BSP via the File Menu “New HPS BSP”

  4. Using the dropdown menu labeled “Operating System” select “U-Boot Bootloader (Arria 10 HPS)”

  5. Point to the software handoff directory (hps_isw_handoff) created from the Quartus Compile and click OK

  6. Edit the RBF filename to match the one you created (usually contained in the output folder)
    Note: You can set an option in Quartus to make an RBF at compile time
    Manual method:
    % cd output
    % quartus_cpf -c -o bitstream_compression=on your_project.sof your_project.rbf

  7. Select the desired boot device (SD/MMC is default for an SD card), Click Generate then Exit

  8. Navigate to the location of the created u-boot in your terminal
    % cd <your_quartus_project>/software/uboot_bsp

  9. Build it
    % make

Output Files:

  • Write this one to the SD card (etc)
    U-boot executable with device tree binary wrapped in mkpimage header:
    uboot_w_dtb-mkpimage.bin

U-boot executable with device tree binary:
u-boot_w_dtb.bin

Further Reading:
For SD Card - see page 30:

Unlike Cyclone V, Arria 10 integrates uboot and the preolader into a single uboot executable. There may be a way to produce a stripped down preloader equivalent but I personally do not know how to do it at this time. Hope this was helpful. Cheers!

Yes, thank you. the problem is that i need to put some features as well as ubi\ubifs support and it’s not fit to the on-chip ram memory. So i would like to roll-back monopith uboot to split variant (spl+uboot) as it was for Cyclone V. And i can’t find information how to do it for arria 10.

Hi! thank you for your help, but your steps will use uboot old 2014 version from tar.gz which is in package of Quartus.
I would like to use latest 2017.09 version where is triple-speed ethernet and 10G phy support present.
I didn’t find any variant how to make uboot from git and not from archive except way to build it separately and put binary to the prebuilt folder.
also i can’t use sd card way because i need to use qspi flash.
the problem is that 2017.09 uboot with needed features is big enough and it’s unable to create uboot_w_dtb-mkpimage.bin because of size limitation at 199.99KB from mkpimage side.
so i would like to split uboot to spl + uboot but i can’t find any information or guidelines how to do it for Arria 10.

This is just a hair-brained idea but I’ve got to say it - could you use the stock u-boot configured for qspi boot to load the full u-boot version of choice into DDR and launch it (like a bare metal application)? In this way it would function similar to a stripped back pre-loader. I thought the spl in Cyclone V was a stripped back version of u-boot. Wish I could be of more help. Good luck. Cheers!