Hello to everyone.I’m a doctorate of the department of Electronics Engineering of the University of Modena and Reggio Emilia (Italy) and I’m working in collaboration with a company in Bologna (Italy). This company gave me an Altera Cyclone V SOC Development Kit (already used by others inside the company, but I made sure it was brought back in the factory settings depicted by the user manual). I have to admit that I’m pretty new to Linux, and I have little knowledge about the way operating systems work (much more about how a transistor works or is made). I have followed no one course in my academic career about how to bother with operating systems compilations. I instead have a good knowledge about C language and a sufficient knowledge about assembly and matlab. And, as you will have noticed, not being a native speaker, even my English is not perfect: sorry for that. I work on Ubuntu 14.04 LTS operating in a virtual machine (VirtualBox version 5.2.12) running on Windows 8.1 operating in my laptop; Ubuntu is updated to the latest version and also all the packages installed. Using the included SDcard image (with Angstrom Linux) and all the factory settings the kit works just fine, with no particular trouble. Now, in the last weeks I was slavishly following the “getting started” guides available at rocketboards.org for the 17.1 toolkit (at the time when I have started 18.0 was not yet delivered).
- I have started with “Compiling the Hardware Design” using the 2017.10 GSRD and using the 17.1 version of Quartus, generating the system in Platform Developer. The procedure terminates correctly and all the files supposed to be generated, they are.
- Then following the guide “Generating and Compiling the Preloader” I generate and compile the preloader and again this time it seems that all the required files have been generated correctly in the appropriate folder.
- Next, I generate the device tree using the device tree generator (sopc2dts) adopting the following settings:
- The next step is the Linux compilation, made following again the apposite guide on rocketboards.org, again in the version for the 17.1 gsrd release. I have set the host with all the packages shown in the guide; the only trouble is with ia32-libs needed since my machine is 64 bits: that package cannot be found and so cannot be installed. Then I proceed by building kernel and rootfs using angstrom 2017.10 distribution, i.e. using the following commands:
- I have created once the u-boot.scr script using the instructions in the guide “Progremming FPGA”.
- Finally, I proceed with the creation of the SDcard image, and here the problems begin. I started with the paragraph “Creating SD Card Image Using Provided Script”. The guide, as I read, presents details on how to create the gsrd bootable sd card image, similar with the sd card image that is provided as part of the precompiled binaries package. The tool used is make_sdimage.py.
2. Creating SD Card Image Using Rebuilt Binaries: in this case the guide is very laconic, as it explains that: this section presents how to build the sd card image for arria v from the rebuilt binaries. this is very similar with creating using prebuilt binaries, except using the files from where they are built. the default locations are used.This is followed by the list of locations. Now, I try to recover the files required by the list following the locations shown; Obviously, lacking the file u-boot-cyclone5.img, I have tried to rename the file u-boot.img that I have found in the folder created after the kernel compilation. So, I have written the following set of instructions: cd ~ mkdir linux-socfpga-gsrd-17.1-cv-bin cd ~/linux-socfpga-gsrd-17.1-cv-bin mkdir rootfs cp /home/davide/angstrom-build/deploy/glibc/images/cyclone5/gsrd-console-image-cyclone5.tar.xz /home/davide/linux-socfpga-gsrd-17.1-cv-bin xz -d gsrd-console-image-cyclone5.tar.xz sudo tar xf gsrd-console-image-cyclone5.tar -C rootfs cp /home/davide/angstrom-build/deploy/glibc/images/cyclone5/zImage /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/SDcard/u-boot-cyclone5.img /home/davide/linux-socfpga-gsrd-17.1-cv-bin# cd /home/davide/angstrom-build/deploy/glibc/images/cyclone5# mkdir prova# cp /home/davide/angstrom-build/deploy/glibc/images/cyclone5/gsrd-console-image-cyclone5.tar.gz /home/davide/angstrom-build/deploy/glibc/images/cyclone5/prova# cd /home/davide/angstrom-build/deploy/glibc/images/cyclone5/prova# gunzip gsrd-console-image-cyclone5.tar.gz# cp /home/davide/angstrom-build/deploy/glibc/images/cyclone5/prova/gsrd-console-image-cyclone5.tar /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/cv_soc_devkit_ghrd/soc_system.rbf /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/cv_soc_devkit_ghrd/software/spl_bsp/preloader-mkpimage.bin /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/cv_soc_devkit_ghrd/socfpga.dtb /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/u-boot.scr /home/davide/linux-socfpga-gsrd-17.1-cv-bin cp /home/davide/u-boot-socfpga/u-boot.img /home/davide/linux-socfpga-gsrd-17.1-cv-bin cd /home/davide/linux-socfpga-gsrd-17.1-cv-bin mv u-boot.img u-boot-cyclone5.img Now, writing again the image created on the SD card, the DevKit again gets stuck (with no surprise). The output is: U-Boot SPL 2013.01.01 (May 16 2018 - 13:45:39) BOARD : Altera SOCFPGA Cyclone V Board CLOCK: EOSC1 clock 25000 KHz CLOCK: EOSC2 clock 25000 KHz CLOCK: F2S_SDR_REF clock 0 KHz CLOCK: F2S_PER_REF clock 0 KHz CLOCK: MPU clock 925 MHz CLOCK: DDR clock 400 MHz CLOCK: UART clock 100000 KHz CLOCK: MMC clock 50000 KHz CLOCK: QSPI clock 370000 KHz RESET: COLD INFO : Watchdog enabled SDRAM: Initializing MMR registers SDRAM: Calibrating PHY SEQ.C: Preparing to start memory calibration SEQ.C: CALIBRATION PASSED SDRAM: 1024 MiB SDRAM: Initializing SDRAM ECC SDRAM: ECC initialized successfully with 1588 ms SDRAM: ECC Enabled ALTERA DWMMC: 0 U-Boot 2013.01.01-00138-g239ae4d (May 22 2018 - 16:25:58) CPU : Altera SOCFPGA Platform BOARD : Altera SOCFPGA Cyclone V Board I2C: ready DRAM: 1 GiB MMC: ALTERA DWMMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: mii0 Hit any key to stop autoboot: 0 reading u-boot.scr 128 bytes read in 3 ms (41 KiB/s)# # Executing script at 02000000 Wrong image format for "source" command reading zImage 4376720 bytes read in 202 ms (20.7 MiB/s) reading socfpga.dtb 24490 bytes read in 6 ms (3.9 MiB/s)# # Flattened Device Tree blob at 00000100 Booting using the fdt blob at 0x00000100 Loading Device Tree to 03ff7000, end 03ffffa9 ... OK Starting kernel ...
- NOTE: since I work with Virtualbox, Ubuntu cannot see the SD card reader, so I transfer the image created to a shared folder with the host PC operating windows. Then I burn the SDcard with the Win32DiskImager program. When I use this program with the SDcard image delivered with the kit, it works fine, so I guess the problem doesn’t sits in this step.
I think I have the exact same problem as the one in your 2nd post.I'm using an Arrow SoCKit board and running Ubuntu 16.04 LTS on virtualbox. As I knew that the pre-built GSRD 16.01 worked I tried to work my way backwards. I copied the GSRD 16.01 to my sd-card, then I replaced the preloader, rootfs and soc-system.rbf with one rebuilt using GHRD 1601. This worked fine and Linux booted fine. I then tried to switch out zImage file with the one I've compiled myself using Yocto, but that caused a lot of different errors. So I'm not sure where the error is. However there is one warning in my Yocto build that is concerning. I think the freezing error is caused by bad u-boot.img and/or u-boot.scr, but I'm extremely uncertain of this. WARNING: No recipes available for: .../work/sockit/angstrom-v2016.12-yocto2.2/layers/meta-arrow-sockit/recipes-core/webkit/webkitgtk_2.12.5.bbappend *This is fine I guess. .../work/sockit/angstrom-v2016.12-yocto2.2/layers/meta-arrow-sockit/recipes-kernel/linux/linux-altera-ltsi_4.1%.bbappend *But I think this one is causing some real issues It also seems like someone has deleted some branches on github that might cause some broken builds with Yocto. https://forum.rocketboards.org/t/yocto-build-broken-due-to-branch-deletion-on-github/1329 I would try to work myself backwards from sd-card you know that works. Hope this helps, and if you find a solution, please post it :) -aln