Reserve SDRAM memory - u-boot "Bad Linux ARM zImage magic!"


#1

Hi,
I´m a VHDL guy, not a Linux one, but I want to try out the use of sgmdma Altera IP component, to write directly in HPS SDRAM of Altera Cyclone V Dev Kit.
By now, I´m using the GHRD 16.1, and as I could see by searching some examples and discussions, I would like to reserve memory from kernel, to avoid conflicts with Linux. I think that this approach would very good to solve my project.
So, I have just downloaded and get working the GSRD 16.1 at my kit, then I have tried to reserve memory by u-boot script just like indicated in this reference:
(https://www.altera.com/support/support-resources/knowledge-base/solutions/rd06132014_165.html)

So, just to clarify: by now what I want is just to test the memory reservation. The problem I have encountered is that with this command:
setenv bootargs console=ttyS0,115200 mem=512M

I get no error, but just after typing this one:
setenv mmcboot setenv bootargs console=ttyS0,115200 mem=512M root=${mmcroot} rw rootwait;bootz ${loadaddr} - ${fdtaddr}

I get a “Bad Linux ARM zImage magic!” As you can see below:

SOCFPGA_CYCLONE5 # setenv mmcboot setenv bootargs console=ttyS0,115200 mem=512M root=${mmcroot} rw rootwait;bootz ${loadaddr} - ${fdtaddr}
Bad Linux ARM zImage magic!
SOCFPGA_CYCLONE5 #

And after that with a boot command I just can´t boot Linux.

Could you please help with this issue? Am I doing something stupid or like that? By changing the boot.script and compiling it that error is the same…

Thank you in advance,
Lucas