UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor kleber
Visitor
11,874 Views
Registered: ‎10-04-2013

Zedboard hangs at "starting kernel ..."

Jump to solution

I'm trying to get a custom petalinux image to run on my Zedboard. I have successfully gone through the "make menuconfig; make" sequence to generate the images, and I can get the FSBL and u-boot to run and unpack the kernel on my zedboard.  However, when it gets to "Starting kernel ..." the board just hangs indefinitely.  Is there any way to know what is causing the hangup?  

 

Here is my u-boot output:

 

 

U-Boot 2013.01 (Oct 16 2013 - 12:27:12)

 

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: zynq_sdhci: 0
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0

boot Petalinux
Device: zynq_sdhci
Manufacturer ID: 27
OEM: 5048
Name: SD04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading image.ub
8992712 bytes read in 17648 ms (497.1 KiB/s)
## Booting kernel from FIT Image at 02000000 ...
Using 'conf@1' configuration
Trying 'kernel@1' kernel subimage
Description: PetaLinux Kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x020000f0
Data Size: 8981985 Bytes = 8.6 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: crc32
Hash value: bbb91cbe
Verifying Hash Integrity ... crc32+ OK
## Flattened Device Tree from FIT Image at 02000000
Using 'conf@1' configuration
Trying 'fdt@1' FDT blob subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x02890fb8
Data Size: 9392 Bytes = 9.2 KiB
Architecture: ARM
Hash algo: crc32
Hash value: 238cc06e
Hash algo: sha1
Hash value: dd19cab30e413d026752225f05547fd2fce35260
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x02890fb8
Uncompressing Kernel Image ... OK
Loading Device Tree to 0effa000, end 0efff4af ... OK

Starting kernel ...

<This is where it hangs forever>

 

 

 

Here is my u-boot env configuration in case that matters:

 

U-Boot 2013.01 (Oct 16 2013 - 12:27:12)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: zynq_sdhci: 0
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
U-Boot-PetaLinux> printenv
autoload=yes
baudrate=115200
bootcmd=run sdboot
bootdelay=4
bootenvsize=0x00020000
bootenvstart=0x00500000
bootfile=image.ub
bootsize=0x00500000
bootstart=0x00000000
clobstart=2000000
console=console=ttyPS0,115200
cp_dtb2ram=sf probe 0; sf read ${clobstart} ${dtbstart} ${dtbsize}
dtbboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; sf read ${dtbnetstart} ${dtbstart} ${dtbsize}; bootm ${netstart} - ${dtbnetstart}
dtbnetboot=tftp ${netstart} image.ub; tftp ${dtbnetstart} system.dtb; bootm ${netstart} - ${dtbnetstart}
dtbnetstart=0x1a80000
eraseconf=sf probe 0; sf erase ${confstart} ${confsize}
eraseenv=sf probe 0; sf erase ${bootenvstart} ${bootenvsize}
ethact=Gem.e000b000
ethaddr=00:0a:35:00:a9:71
fault=echo $img image size is greater than allocated place - $img is NOT UPDATED
filesize=0x1338208
get_dtb=run cp_dtb2ram; fdt addr ${clobstart}
hostname="Avnet-Digilent-ZedBoard-14.5"
install_dtb=sf probe 0; sf erase ${dtbstart} ${dtbsize};sf write ${clobstart} ${dtbstart} ${filesize}
install_jffs2=sf probe 0; sf erase ${jffs2start} ${jffs2size};sf write ${clobstart} ${jffs2start} ${filesize}
install_kernel=sf probe 0; sf erase ${kernstart} ${kernsize};sf write ${fileaddr} ${kernstart} ${filesize}
install_uboot=sf probe 0; sf erase ${bootstart} ${bootsize};sf write ${clobstart} ${bootstart} ${filesize}
kernsize=0x00a80000
kernstart=0x00520000
load_boot=tftp ${clobstart} BOOT.BIN
load_dtb=tftp ${clobstart} system.dtb
load_jffs2=tftp ${clobstart} rootfs.jffs2
load_kernel=tftp ${clobstart} image.ub
loadaddr=0x2000000
mtdids=nor0=physmap-flash-0
mtdparts=mtdparts=physmap-flash-0:5M(boot),128K(bootenv),10752K(image),0M(spare)
nc=setenv stdout nc;setenv stdin nc;
ncip=AUTO
netboot=tftp ${netstart} image.ub && bootm
netstart=0x2000000
psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0
sd_update_boot=echo Updating BOOT from SD;mmcinfo; fatload mmc 0:1 ${clobstart} BOOT.BIN; run install_uboot
sd_update_kernel=echo Updating Kernel from SD;mmcinfo; fatload mmc 0:1 ${clobstart} ${bootfile}; set fileaddr ${clobstart};run install_kernel
sdboot=echo boot Petalinux; mmcinfo;fatload mmc 0 ${netstart} ${bootfile}; bootm
serial=setenv stdout serial;setenv stdin serial
serverip=AUTO
sfboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; bootm ${netstart}
test_crc=if imi ${clobstart}; then run test_img; else echo $img Bad CRC - $img is NOT UPDATED; fi
test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var
update_boot=setenv img BOOT.BIN; setenv psize ${bootsize}; setenv installcmd install_uboot; run load_boot test_img; setenv img; setenv psize; setenv installcmd
update_dtb=setenv img DTB; setenv psize ${dtbsize}; setenv installcmd install_dtb; run load_dtb test_img; setenv img
update_jffs2=setenv img JFFS2; setenv psize ${jffs2size}; setenv installcmd install_jffs2; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd
update_kernel=setenv img KERNEL; setenv psize ${kernsize}; setenv installcmd "install_kernel"; run load_kernel test_crc; setenv img; setenv psize; setenv installcmd

Environment size: 3220/131068 bytes

 

 

0 Kudos
1 Solution

Accepted Solutions
Visitor kleber
Visitor
16,413 Views
Registered: ‎10-04-2013

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

I trace the problem to an option selected in "make menuconfig".

 

In the kernel parameters:

device drivers -> GPIO Support -> Xilinx GPIO Support

 

If this option is selected the system won't boot.  By default it is not selected, but it seemed like a reasonable option to check since it indicates support for Xilinx AXI/XPS GPIO devices.

View solution in original post

7 Replies
Visitor kleber
Visitor
16,414 Views
Registered: ‎10-04-2013

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

I trace the problem to an option selected in "make menuconfig".

 

In the kernel parameters:

device drivers -> GPIO Support -> Xilinx GPIO Support

 

If this option is selected the system won't boot.  By default it is not selected, but it seemed like a reasonable option to check since it indicates support for Xilinx AXI/XPS GPIO devices.

View solution in original post

Visitor dallas
Visitor
11,778 Views
Registered: ‎09-10-2013

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

How did you debug your kernel hang issue when there was no serial output to know what was wrong?  Was it simply trial and error you did?  Thanks.

0 Kudos
Scholar rfs613
Scholar
11,768 Views
Registered: ‎05-28-2013

Re: Zedboard hangs at "starting kernel ..."

Jump to solution
I seem to recall a similar issue being reported a while back on this forum. I believe the cause was overlapping memory regions, defined in the .dts file. Check the start address and size of the UART and the GPIO areas for overlap.
0 Kudos
Visitor kleber
Visitor
11,752 Views
Registered: ‎10-04-2013

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

@dallas, It was basically trial and error.  I had only changed a few things from the default setup, so I tried changing them back a few at a time until I found the problem.  I'm guessing that I only saw the problem because my linux boot setup did not include a bitstream so the kernel was probably trying to probe addresses that didn't exist.

0 Kudos
Adventurer
Adventurer
11,046 Views
Registered: ‎01-21-2014

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

I am having the same situation, that is I am not having the bitstream (download.bit). Kernel hangs at "starting kernel"

I have enabled printk statements even then nothing is printed.

 

But as soon as I put download.bit file in BOOT.BIN, it boots without any issue.

 

Can you please share what all setup files you modifed? 

0 Kudos
Newbie prakanth
Newbie
6,179 Views
Registered: ‎04-14-2016

Re: Zedboard hangs at "starting kernel ..."

Jump to solution

Suheb,

 

Were you able to resolve the problem where Kernel hangs when PL bit file is included in the BOOT.bin? I am experiencing this problem and early printk is not helping.  Your response is much appreciated.

 

Participant perencia-wc
Participant
1,319 Views
Registered: ‎10-03-2017

Re: Zedboard hangs at "starting kernel ..."

Jump to solution
I was going crazy with this. Thanks!
0 Kudos