Building uboot for cyclone V SoC - Building uboot for cyclone V SoC
Hello, We want to build boot image for customized cyclone V SoC board. We are following the below document, using Quartus Prime 22.1 Standard Edition on Ubuntu 20.04 system, https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Appendix_45_Building_Linux_Binaries We are getting below error while building uboot /usr/bin/ld: tools/imagetool.o: in function `imagetool_get_type': imagetool.c:(.text+0xa): undefined reference to `__stop_image_type' /usr/bin/ld: imagetool.c:(.text+0x12): undefined reference to `__start_image_type' /usr/bin/ld: tools/imagetool.o: in function `imagetool_verify_print_header': imagetool.c:(.text+0x73): undefined reference to `__stop_image_type' /usr/bin/ld: imagetool.c:(.text+0x7a): undefined reference to `__start_image_type' collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: tools/dumpimage] Error 1 make: *** [Makefile:1900: tools] Error 2 Can you please share your insights. Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘ https://supporttickets.intel.com/s/?language=en_US’ , view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions. Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hi Snehal Just to update the forum case. The missing steps from the RBO page are the steps below: 1.Step to convert the sof to rbf. You could use the command below to convert the sof. quartus_cpf -c -o bitstream_compression=on soc_system.sof soc_system.rbf 2.Missing u-boot.scr could be gotten from the gsrd page. https://releases.rocketboards.org/2025.03/gsrd/c5_gsrd/u-boot.scr 3.Place both rbf and the u-boot.scr in the sdcard partition 1 (sdfs) Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
case reopening
Replies:
Re: Building uboot for cyclone V SoC
Case reopening.
Replies:
Re: Building uboot for cyclone V SoC
Hello, We are currently working with Quartus Prime Standard Edition v22.1 and have noticed that it no longer includes the embedded_command_shell file, which was previously available in earlier versions as part of the SoC-EDS. This shell was essential for launching tools like bsp-editor and mkpimage used to generate the preloader for the Cyclone V SoC. While following the "Building Bootloader for Cyclone V and Arria 10" guide, I am able to successfully boot the HPS and access all its peripherals. However, the FPGA does not get configured - only the HPS boots correctly, and the FPGA remains unconfigured, even when using an updated .rbf file. Interestingly, this issue does not occur when using Quartus v18.1 - in that version, both the HPS and FPGA configure as expected. This suggests that something may have changed or is missing in the newer version's flow. Could you please advise if there is a new procedure or an additional step required in v22.1 to ensure the FPGA bitstream is loaded properly during boot? Looking forward to your guidance on resolving this issue. Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi Since there are no feedback for this case, I shall set this case to close pending. If you still need further assistance, you are welcome reopen this case within 20days or open a new case, someone will be right with you. If you happened to close this case you will receive a survey. If you think you would rank your support experience less than 4 out of 5, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience. Regards Jingyang
Replies:
Re: Building uboot for cyclone V SoC
Hi Do you have any more follow up question on this issue? Regards Jingyang,Teh
Replies:
Re: Building uboot for cyclone V SoC
Hi In the new flow the sopc2dts generator have been discontinued and should no be used. You will have to make the changes base on the devkit device tree located in the location : https://github.com/altera-fpga/u-boot-socfpga/blob/c13fb267004c4c79d3573360f033f4a32e8a3c79/arch/arm/dts/socfpga_cyclone5_socdk.dts#L4 Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello, 1) Are you using 2 different UART baudrate for the linux and uboot? -- during built can we select baudrate, PFA uboot and device tree 2) Following the steps https://www.rocketboards.org/foswiki/Documentation/HOWTOCreateADevicetreeForCycloneVSoC , we could generate a dts file for customized board but facing issue while generating a dtb file. Below is the error message DTC arch/arm/boot/dts/my_cv_fpga_overlay.dtb Error: arch/arm/boot/dts/my_cv_fpga_overlay.dts:50.10-11 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:351: arch/arm/boot/dts/my_cv_fpga_overlay.dtb] Error 1 make: *** [Makefile:1403: my_cv_fpga_overlay.dtb] Error 2 PFA header and dts file generated, as per our observation dts is not being updated wrt to header file generated.. Can you please share the pointers. Thanks and regards, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi The sopc2dts tool have been discontinued. Currently, all device tree example are created and stored in the uboot branch and linux branch (arch/arm/dts/socfpga_cyclone5_socdk.dts). It is advisable to make changes to the devkit device tree. Are you using 2 different UART baudrate for the linux and uboot? Can you share me both linux and ubiit device tree to me? Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello Jingyang Teh, Can you please share pointers regarding dts file generation for customized board using Quartus Prime 22.1 Standard version tool. Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hello, Can you help with command to generate dts with sopcinfo and board xml files as input. The below command works in SOC EDS, which is discontinued in Quartus 22.1 sopc2dts --input soc_system.sopcinfo\ --output soc_system.dts\ --type dts\ --board soc_system_board_info.xml\ --board hps_common_board_info.xml\ --bridge-removal all\ --clocks Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hello, 1) PFA debug log images, Image_1 is when baud in 115200 uboot boot log is visible but as soon as it goes to kernel config then it shows garbage data, if baud changed to 230400 then uboot boot log is not visible garbage data but kernel boot log can be seen after that all system runs on 230400 baud even able to run the application. 2) PFA debug log, we have enabled emac 0 hps peripheral in fpga mode. But ethernet is not being detected. Is it because we are using dtb file generated by the steps mentioned in the below document. Do we need to generate dtb by some other steps, if yes please share the steps. https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Appendix_45_Building_Linux_Binaries Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi The changes looks good in the device tree. What is the new error message that you are getting? Did the logs show the DDR size define in the device tree size to be 512MB? Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello, Did try this but still getting error, PFA dts file Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi The ddr in the hardware you are using is having a 512MB DDR as where the GSRD for the devkit is having 1GB. Please change the device tree arch/arm/dts/socfpga_cyclone5_socdk.dts to memory { name = "memory"; device_type = "memory"; reg = <0x0 0x20000000>; /* 1GB */ }; Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hi, I tried but same error. I tried booting using files generated on another system, getting attached error, can you please help.
Replies:
Re: Building uboot for cyclone V SoC
Hi Could you also try these packages: sudo apt install make sudo apt install gcc sudo apt install binutils-doc gcc-multilib autoconf automake libtool flex bison gcc-doc gcc-11-multilib gcc-11-doc gcc-11-locales sudo apt install ncurses sudo apt install ncurses-compat-libs sudo apt-get install gcc-arm-linux-gnueabihf Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hi, Tried on another ubuntu 20.04 system, the build is successful. But on my system I still get the error even after installing the packages you have suggested. Any suggesstions Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi Sorry for the late reply, I was OOO last week. Have you installed the packages in my previous comment in your environment? I tried building the steps but did not observe the error you are facing. Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello, PFA steps and terminal log on Ubuntu 20.04 Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hello JingyangTeh, PFA error received and details of issues received for both Ubuntu 20.04 and Ubuntu 22.04. Building it in Ubuntu 22.04is successful, but zImage and Rootfs build is getting issue.
Replies:
Re: Building uboot for cyclone V SoC
Hi Could you try installing some pre-requisite packages below: sudo apt-get install gawk wget git-core diffstat unzip texinfo \ gcc-multilib build-essential chrpath socat cpio python python3 \ python3-pip python3-pexpect xz-utils debianutils iputils-ping \ python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm \ libncurses-dev gawk flex bison openssl libssl-dev If not could you try building it in Ubuntu 22.04 with the packages above too. Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello JingyangTeh, I'm using Ubuntu 20.04 linux system, can you share which linux environment you tried building uboot Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hello JingyangTeh, I tried the steps but still gtting error. PFA. Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi I tried the steps and able to build uboot successfully. Could you try setting : export CROSS_COMPILE=arm-none-linux-gnueabihf- Also check the path for the compiler to be set properly: wget https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz tar xf gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz rm gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz Further more the cv_bsp_generator.p t needs to run using python2 instead of python3 export PATH=`pwd`/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/bin:$PATH Regards Jingyang, Teh
Replies:
Re: Building uboot for cyclone V SoC
Hello JingyangTeh, Please PFA error message https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Appendix_45_Building_Linux_Binaries this document is suggesting to use uboot branch 2022.04, but I'm getting below error. Can you please help with the issue. collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:104: tools/dumpimage] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.host:104: tools/mkimage] Error 1 make[1]: *** [scripts/Makefile.host:104: tools/fit_info] Error 1 make[1]: *** [scripts/Makefile.host:104: tools/fit_check_sign] Error 1 make: *** [Makefile:1900: tools] Error 2 Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hello TruHy, Tried adding export ARCH=arm but still getting same error Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
I think there is a missing parameter, try adding this before or after step 6: export ARCH=arm
Replies:
Re: Building uboot for cyclone V SoC
Hello JingyangTeh, Thanks for the response. Please check the steps below, 1) git clone https://github.com/altera-opensource/u-boot-socfpga 2) git checkout -b test-bootloader -t origin/socfpga_v2022.10 3) cd arch/arm/mach-socfpga/cv_bsp_generator/ 4) python cv_bsp_generator.py -i path/hps_isw_handoff/soc_system_hps_0 -o ~/software/bootloader/u-boot-socfpga/board/altera/cyclone5-socdk/qts 5) cd arch/arm/mach-socfpga/cv_bsp_generator/ 6) export CROSS_COMPILE=~/software/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf- 7) make socfpga_cyclone5_defconfig make -j 48 Error message: ./tools/mkimage: unsupported type Altera SoCFPGA CV/AV preloader make[1]: *** [scripts/Makefile.spl:426: spl/u-boot-spl.sfp] Error 1 make: *** [Makefile:2081: spl/u-boot-spl] Error 2 make: *** Deleting file 'spl/u-boot-spl' Thanks, snehal_p
Replies:
Re: Building uboot for cyclone V SoC
Hi Sorry for the late reply. If you are using the latest in the repo, there might be some bugs that was recently uploaded. In the uboot repository, could checkout the branch "git checkout -b test-bootloader -t origin/socfpga_v2024.04" . Regards Jingyang, Teh - 2025-02-21
external_document