Bad Linux ARM zImage magic!

Hi every body,

I am a new guy in SOC development and I got stucked a bit. I created my own system for the DE0-SOC and started to go steb by step trough the boot process. I created u-boot, rbf, device tree, boot script and all seems to be working until I try to start kernel. Then I get Bad Linux ARM zImage magic! error and end up in the command line of u-boot. I am vhdl developer but in this I am quite lost already for about a week. I would apreciate any help or hint what is wrong here.
I got the same issue by replacing files at default system drive keeping original zImage and with compiled zImage.

U-Boot 2013.01.01 (Nov 28 2016 - 16:50:04)

CPU   : Altera SOCFPGA Platform
BOARD : Altera SOCFPGA Cyclone V Board
I2C:   ready
DRAM:  1 GiB
MMC:   ALTERA DWMMC: 0
In:    serial
Out:   serial
Err:   serial
Skipped ethaddr assignment due to invalid EMAC address in EEPROM
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
reading u-boot.scr
1387 bytes read in 5 ms (270.5 KiB/s)
## Executing script at 02000000
-- Programming FPGA --
reading UQDSxDAQ.rbf
1822536 bytes read in 167 ms (10.4 MiB/s)

 /$$   /$$  /$$$$$$  /$$$$$$$   /$$$$$$           /$$$$$$$   /$$$$$$   /$$$$$$
| $$  | $$ /$$__  $$| $$__  $$ /$$__  $$         | $$__  $$ /$$__  $$ /$$__  $$
| $$  | $$| $$  \ $$| $$  \ $$| $$  \__//$$   /$$| $$  \ $$| $$  \ $$| $$  \ $$
| $$  | $$| $$  | $$| $$  | $$|  $$$$$$|  $$ /$$/| $$  | $$| $$$$$$$$| $$  | $$
| $$  | $$| $$  | $$| $$  | $$ \____  $$\  $$$$/ | $$  | $$| $$__  $$| $$  | $$
| $$  | $$| $$/$$ $$| $$  | $$ /$$  \ $$ >$$  $$ | $$  | $$| $$  | $$| $$/$$ $$
|  $$$$$$/|  $$$$$$/| $$$$$$$/|  $$$$$$//$$/\  $$| $$$$$$$/| $$  | $$|  $$$$$$/
 \______/  \____ $$$|_______/  \______/|__/  \__/|_______/ |__/  |__/ \____ $$$
                \__/                                                       \__/
## Starting application at 0x3FF795A4 ...
## Application terminated, rc = 0x0
-- Setting Env Variables --
reading zImage
3606616 bytes read in 323 ms (10.6 MiB/s)
reading UQDS.dtb
74210 bytes read in 12 ms (5.9 MiB/s)
Bad Linux ARM zImage magic!
reading zImage
3606616 bytes read in 324 ms (10.6 MiB/s)
reading UQDS.dtb
74210 bytes read in 12 ms (5.9 MiB/s)
## Starting application at 0x3FF795A4 ...
## Application terminated, rc = 0x0
Bad Linux ARM zImage magic!

boot script

echo -- Programming FPGA --;
fatload mmc 0:1 $fpgadata UQDSxDAQ.rbf;

echo;
echo ' /$$   /$$  /$$$$$$  /$$$$$$$   /$$$$$$           /$$$$$$$   /$$$$$$   /$$$$$$ ';
echo '| $$  | $$ /$$__  $$| $$__  $$ /$$__  $$         | $$__  $$ /$$__  $$ /$$__  $$';
echo '| $$  | $$| $$  \\ $$| $$  \\ $$| $$  \\__//$$   /$$| $$  \\ $$| $$  \\ $$| $$  \\ $$';
echo '| $$  | $$| $$  | $$| $$  | $$|  $$$$$$|  $$ /$$/| $$  | $$| $$$$$$$$| $$  | $$';
echo '| $$  | $$| $$  | $$| $$  | $$ \\____  $$\\  $$$$/ | $$  | $$| $$__  $$| $$  | $$';
echo '| $$  | $$| $$/$$ $$| $$  | $$ /$$  \\ $$ >$$  $$ | $$  | $$| $$  | $$| $$/$$ $$';
echo '|  $$$$$$/|  $$$$$$/| $$$$$$$/|  $$$$$$//$$/\\  $$| $$$$$$$/| $$  | $$|  $$$$$$/';
echo ' \\______/  \\____ $$$|_______/  \\______/|__/  \\__/|_______/ |__/  |__/ \\____ $$$';
echo '                \\__/                                                       \\__/';

fpga load 0 $fpgadata $filesize
run bridge_enable_handoff
echo -- Setting Env Variables --
setenv fdtimage UQDS.dtb
setenv mmcroot /dev/mmcblk0p2
setenv mmcload 'mmc rescan;${mmcloadcmd} mmc 0:${mmcloadpart} ${loadaddr} ${bootimage};${mmcloadcmd} mmc 0:${mmcloadpart} ${fdtaddr} ${fdtimage}'
setenv mmcboot 'setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait; bootz ${loadaddr} - ${fdtaddr}'
run mmcload
run mmcboot

printenv command

axibridge=ffd0501c
axibridge_handoff=0x00000000
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
bootcmd=run callscript;run mmcload;run bridge_enable_handoff;run mmcboot
bootdelay=5
bootimage=zImage
bootimagesize=0x600000
bridge_disable=mw $fpgaintf 0; mw $fpga2sdram 0; go $fpga2sdram_apply; mw $axibridge 0; mw $l3remap 0x1
bridge_enable_handoff=mw $fpgaintf ${fpgaintf_handoff}; go $fpga2sdram_apply; mw $fpga2sdram ${fpga2sdram_handoff}; mw $axibridge ${axibridge_handoff}; mw $l3remap ${l3remap_handoff}
callscript=if fatload mmc 0:1 $fpgadata $scriptfile;then source $fpgadata; else echo Optional boot script not found. Continuing to boot normally; fi;
ethact=mii0
fdtaddr=0x00000100
fdtimage=UQDS.dtb
fdtimagesize=0x5000
filesize=0x121e2
fpga=0
fpga2sdram=ffc25080
fpga2sdram_apply=3ff795a4
fpga2sdram_handoff=0x00000000
fpgadata=0x2000000
fpgadatasize=0x700000
fpgaintf=ffd08028
fpgaintf_handoff=0x00000000
l3remap=ff800000
l3remap_handoff=0x00000019
loadaddr=0x8000
micrel-ksz9021-clk-skew=0xf0f0
micrel-ksz9021-data-skew=0x0
mmcboot=setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait; bootz ${loadaddr} - ${fdtaddr}
mmcload=mmc rescan;${mmcloadcmd} mmc 0:${mmcloadpart} ${loadaddr} ${bootimage};${mmcloadcmd} mmc 0:${mmcloadpart} ${fdtaddr} ${fdtimage}
mmcloadcmd=fatload
mmcloadpart=1
mmcroot=/dev/mmcblk0p2
netboot=dhcp ${bootimage} ; tftp ${fdtaddr} ${fdtimage} ; run ramboot
qspiboot=setenv bootargs console=ttyS0,115200 root=${qspiroot} rw rootfstype=${qspirootfstype};bootz ${loadaddr} - ${fdtaddr}
qspibootimageaddr=0xa0000
qspifdtaddr=0x50000
qspiload=sf probe ${qspiloadcs};sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize};sf read ${fdtaddr} ${qspifdtaddr} ${fdtimagesize};
qspiloadcs=0
qspiroot=/dev/mtdblock1
qspirootfstype=jffs2
ramboot=setenv bootargs console=ttyS0,115200;bootz ${loadaddr} - ${fdtaddr}
scriptfile=u-boot.scr
setenv_ethaddr_eeprom=3ff9acb9
stderr=serial
stdin=serial
stdout=serial
verify=n

Environment size: 2083/4092 bytes

OK self solving … by accident I have found out that my dtb file is much bigger then original one… It looks like sopc2dts(when configured to generate dts) and dtc does not produce the same output… Similar yes but not the same …
now It freezes after kernel load and I keep investigating …

Make sure that the compatible strings in the root node of the DTS match to your kernel.
Otherwise it freezes, I made the same experience :wink:

just an example from an Arria 10, yours will be different.

/dts-v1/;

/ {
model = “Altera SOCFPGA Arria 10”; /* appended from boardinfo */
compatible = “altr,socfpga-arria10”, “altr,socfpga”; / appended from boardinfo /
#address-cells = <1>;
#size-cells = <1>;

Hi Thanks, for the answer I fixed it by feedidng entire system to the tree builder like:

sopc2dts --input UQDS.sopcinfo --output UQDS.dts --type dts --board emif.xml --board hps.xml --bridge-removal all --clocks

before I was using only:

sopc2dts --input UQDS.sopcinfo --output UQDS.dts

It is quite complex :slight_smile: Now I am strugling with buildroot. But I think this problem is solved.

Here’s the mail I got

Hi,

Welcome to Community!

Good to know that you are working on Windows 8.

You are getting “bad pool header” error message and then the computer restarts.
In order to understand the issue better I would like to ask you few questions:

  1.   Do you get the error message randomly?
    
  2.   What is the complete error message received?
    
  3.   Have you made any changes to the computer prior to the issue?
    
  4.   Do you have any third party antivirus software installed on the computer?
    
  5.   Are there any external devices connected to the computer?
    

Let’s do one thing, disable the automatic restart from advanced startup options to check if it the issue persists.
a. Open Charms bar by holding Windows Key + C.
b. Now click on settings and then click on Change PC settings.
c. Under PC settings click on General. Under Advanced startup, click on Re-start.
d. Under choose an option click on Troubleshoot and click on Advanced Options.
e. Under Advanced options click on Startup settings.
f. Now on the Startup settings Window click on Restart.
g. Now follow the instruction on the desktop screen.

Method 1: I would suggest you to run the hardware troubleshooter and check if it helps. Follow these steps to run the troubleshooter.
a)Press the ‘Windows + C’ to activate the charms menu or move the mouse pointer to bottom right corner of the screen and you will get the charms menu.
b) Click on ‘search’ and select ‘settings’ and type ‘Troubleshooting’ and select ‘troubleshooting’.
c) Click on ‘Hardware and Sound’ and select ‘Hardware and Devices’ and click on next to run the troubleshooter.

Method 2: I would also suggest you to try updating the drivers for the USB driver and check if that helps.
Follow the steps provided below to update the drivers.
a) Drag the mouse to bottom left corner and right-click on the ‘Start icon’.
b) Select ‘device manager’
c) In Device Manager, locate the device you want to update, and then double-click the device name.
d) Click the ‘Driver’ tab, and then click ‘Update Driver’ and follow the instructions.

Method 3:
Start the computer in clean boot state and to check if any third party applications or startup items are causing the issue.
a. Press ‘Windows key + R’ and then type ‘msconfig’ without quotes and press ‘ENTER’.
If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
b. On the ‘General’ tab, click ‘Selective Startup’.
c. Under ‘Selective Startup’, click to clear the ‘Load Startup Items’ check box.
d. Click the ‘Services tab’, click to select the ‘Hide All Microsoft Services’ check box, and then click ‘Disable All’.
e. Click ‘Apply’ and ‘OK’.
f. When you are prompted, click ‘Restart’.
g. After the computer starts verify whether you’re able to use the install apps.
Note: You need to restart the computer to a normal mode once you have finished troubleshooting. To do so, follow these steps:
a. Press ‘Windows key + R’ and then type ‘msconfig’ without quotes and press ENTER.
If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
b. Select ‘Normal Startup’.
c. Click ‘Apply’ and ‘OK’.

Or otherwise, How To Fix “BAD POOL HEADER” BSOD? : Deskdecode

The best security provider in the field of software is Mcafee but I was searching about mcafee real time scanning won t stay on and I found their support team and really they supported me well, until and unless they sorted my issue regarding Mcafee they didn’t kept the call.

Hi Everybody,
I was wondering if anyone has tried to boot a stratix 10 kernel from network using TFTP.
I am having issues regarding that. I can tftp the dtb and a kernel image but i am not sure if I need to use “Image” or “Image.gz” file.
Thanks