Linux kernel not booting with a custom .dtb on SocKit

Hello everybody,

First I would like to say that I am following this wiki and its documentations since a while ago, and I have to say that it has been already very helpful.
Here is my current situation : I am working on a project with the Arrow SocKit Cyclone V. I have completed successfully the HW and the SW lab materials, so I am starting to be familiar with the workflow.

I have designed customs peripherals with Qsys and compiled them with Quartus Prime 15.1.
Now, my goal is to make those peripherals visibles from Linux Angström.

I compiled the preloader and u-boot in order to perform debugging from EDS. Then from Qsys I converted my .sopcinfo file to a dtb using socpc2dts under cygdrive environment. I copied the dtb int the fat partition.
I have also updated the .rbf file, but I am not sure that it’s necessary, isn’t it ?

Still, the kernel is not booting :

reading u-boot.scr
232 bytes read in 4 ms (56.6 KiB/s)
## Executing script at 02000000
reading soc_system.rbf
7007204 bytes read in 335 ms (19.9 MiB/s)
altera_load: Failed with error code -4
## Starting application at 0x3FF7952C ...
## Application terminated, rc = 0x0
reading zImage
3465776 bytes read in 166 ms (19.9 MiB/s)
reading soc_system.dtb
16481 bytes read in 7 ms (2.2 MiB/s)
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x00000100
   Loading Device Tree to 03ff8000, end 03fff060 ... OK

Starting kernel ...

Do you have a fix for it ?
I think that the problem may come from u-boot or from the version of the kernel.

Regards,

I’ve run into a number of problems with the socp2dts application and have since learned to stop using it all together. I would recommend starting from the “golden image” dts file and adding your new peripherals into it manually, one at a time.

You can also compare the golden image dts to yours created from socp2dts to see whats different. Chances are there will be a lot of differences right out of the gate before you come across where the custom peripherals were added.

-Steve

Hi I hade a similar problem. In fact it loads a configuration data into the memory but it is unable to load them in the FPGA altera_load: Failed with error code -4 time out a couple of days ago and I solved it by selecting compress file during rbf generation.
Unfortunately now I face other problem:

  1. Starting application at 0x3FF795A4 …

  2. Application terminated, rc = 0x0

Bad Linux ARM zImage magic!

Hello,
U-Boot error “altera_load: Failed with error code -4” is cuased with wrong MSEL switch selection. This is told in Embedded Linux Beginners Guide at RocketBoards (https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide, stage 7. Testing System at the bottom of the page). There is also solution, but I am not sure about differences of MSEL switches accross different development boards.
I was meeting the error Bad Linux ARM zImage magic! for a long time and I found out that it is caused by using different versions of components participating the boot flow. The magic is meant to be one of magic numbers situated in Linux kernel, so in zImage file. The only solution, which I found to use Yours own preloader, U-Boot and Device Tree file, is to use prebuild image of SD card situated at {Quartus instalation folder}\embedded\embeddedsw\socfpga\prebuilt_images. This SD card images looks to be more compatible with actual version of Quartus and Embedded Design Studio that the SD card image from GSRD/GHRD. You can mention that different kernel are used in the SD image of GHRD and these prebuild images, for example.
I hope this message will help someone.