Sorry, you need to enable JavaScript to visit this website.

Zedboard does not boot the Linux from SD-card

Unsolved
15 posts / 0 new
jade's picture
jade
Junior(1)
Zedboard does not boot the Linux from SD-card

Hello,
my Zedboard does not boot the Linux from the SD-card. It just loads U-Boot and prompts "zed-boot". I have to call "boot" to load Linux. As far as I can tell the jumpers are set correct.
JP7 is on SIG/GND
JP8 is on SIG/GND
JP9 is on 3V3/SIG
JP10 is on 3V3/GND
JP11 is on SIG/GND
JP18 is on 2V5
I have a jumper on JP6
Though I think my board is missing one jumper. On many pictures I see boards that have jumper on the inner pin of JP3.
What is the problem here?
Is it necessary to have the PC connected via UART/JTAG to boot Linux?
Best
Jan

JFoster's picture
JFoster
Moderator(55)
Hello Jade,

Hello Jade,

Based on the setup you provided, you are in SD boot, so that should not be a problem. As far at the JP3 jumper, on my setup goes, I do not have any jumper either so that should not be an issue as well. You do not need to have the PC connect via JTAG to do a SD boot of Linux. However I would suggest you plug your PC into the UART micro USB connection on Zedboard so you can monitor what is going on via a terminal program.

My questions for you are which linux are you running? Are you running the preloaded linux image that we preload into the sdcard that comes with your Zedboard? Or is it a petalinux/pulsar Linux of some sort? Also try running through the "Zedboard Getting Started Guide" to see if you missed anythign during your setup process.

http://zedboard.org/support/documentation/1521

--Josh

jade's picture
jade
Junior(1)
Hi Josh,

Hi Josh,
thank your for your answer. Regarding your question: I use the preloaded Linux image that comes with the Zedboard. I'm currently reading the Getting Started Guide.
There is more strange behavior with my board. I use Ubuntu 16.04 LTS on my workstation. I chose that distro/version because it is officially supported by Xilinx for Vivado. I also installed the cable drivers. Still I can not use /dev/ttyUSB0 to connect to the board via UART. I can only use /dev/ttyACM0. Though /dev/ttyUSB0 does exist and I can connect, but there is no output from the board. Connecting with /dev/ttyACM0 always ends up at the zed-boot prompt where I have to run "boot" to load Linux.
My guess is that I have more than one problem here. Is it possible that U-Boot is not correctly configured on my board? Can you tell me what I can do to configue U-Boot such that it automatically loads Linux?
What can I do or check regarding the USB problem?
Best
Jan
 

jade's picture
jade
Junior(1)
Hello,

Hello,
regarding the ttyUSB0/ttyACM0 problem: I think my expectation was wrong here. The board works correct. The ttyUSB0 seems to be reserved for JTAG. I was used to another board where I can use ttyUSB0 for UART.
Best
Jan
 

jade's picture
jade
Junior(1)
Hi Josh,

Hi Josh,
I think the U-Boot configuration that came with my board is not correct. I managed to build and install my own FSBL/U-Boot/Linux using Yocto (Krogoth). It automatically boots the Linux after 3 seconds.
Best
Jan

gicgatv's picture
gicgatv
Junior(0)
Hi! Jan,

Hi! Jan,
I'm in the same situation. I've tried the demos card, the official linux release and I have to write "boot" at the u-boot prompt. I've created a Yocto 2.2 OS, but I'm having the same problem.
I've created the sd with 2 partition, in the fat 16 I copied boot.bin, uImage, devtree.dtb the uEnv.txt, I decompressed the linux files into second partition, but no way.  Always the same situation that I have to connect in uart to the board and write "boot" in the prompt
 Did you make a special uboot configuration into yocto configuration files?
Many thanks in advance
Giuseppe
 

jade's picture
jade
Junior(1)
Hi Giuseppe,

Hi Giuseppe,
I think it is still no working correctly for me as well. I definitely saw it booting automatically. Though on the next say it stopped in u-boot again. Can you try to boot to Linux, execute "poweroff" and then press the reset button? Does it boot directly to Linux then? I think that worked for me. I can not check right now myself.
I love to figure this out. Maybe we can share the effort. My hunch is that there is something wrong in the uEnv.txt.
Here is mine:
 

kernel_image=uImage
devicetree_image=uImage-zynq-zed.dtb
bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && bootm 0x3000000 - 0x2A00000
 
Does yours look the same?
Best regards
Jan
 

gicgatv's picture
gicgatv
Junior(0)
Hi Jan,

Hi Jan,
Glad to share the effort with you!
I have tried the command poweroff, and doesn't work. I used init 0 instead, and after resetting, it works like in your case.
I think the uEnv.txt is correct, It is the same I use. I think it's correct because It is loaded after to write boot and hit enter.
If you pay attention to the first lines after hit enter, It is loaded like on my board, as follows:

boot

Device: sdhci@e0100000

Manufacturer ID: 3

------------------------------

Capacity: 29.7 GiB                                       read the SD

Bus Width: 4-bit

Erase Group Size: 512 Bytes

 

reading uEnv.txt                                         read the File uEnv.txt

312 bytes read in 10 ms (30.3 KiB/s)

Loaded environment from uEnv.txt

Importing environment from SD ...

Running uenvcmd ...

Copying Linux from SD to RAM...

reading uImage                                           read the kernel  

3511392 bytes read in 311 ms (10.8 MiB/s)

reading uImage-zynq-zed.dtb                              read the device tree

9513 bytes read in 19 ms (488.3 KiB/s)

## Booting kernel from Legacy Image at 03000000 ...

   Image Name:   Linux-4.4.0-xilinx

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3511328 Bytes = 3.3 MiB

   Load Address: 00008000

   Entry Point:  00008000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 02a00000

   Booting using the fdt blob at 0x2a00000

   Loading Kernel Image ... OK

   Loading Device Tree to 1f313000, end 1f318528 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0

--------------------------------------------------------------------------

 

And follows to boot...

 

I think the problem is the generation of the boot.bin, During the file system generation in yocto probably a layer o a configuration to create the right boot is missing.

 

Best Regards

Giuseppe 

 
 

jade's picture
jade
Junior(1)
Hi Giuseppe,

Hi Giuseppe,
ok ... but I saw the same behavior with the Linux that is installed on the SD card that came with the board. I don't know how that distro was created. Is it Yocto-based?
Maybe something makes U-Boot halt during the 3 second bootdelay. When using minicom there are sometimes erroneous symbols printed in the terminal. I didn't pay much attention but could that cause U-Boot to halt? I wonder if booting works "better" with a shorter or no bootdelay. I can not try myself as I am on a business trip until Saturday.
Best
Jan

gicgatv's picture
gicgatv
Junior(0)
Hi Jan,

Hi Jan,
I don't know if the U-Boot works better with a shorter bootdelay.
In my last experiment I understood that the boot created by yocto, needs to rename files that generate. It expects the following files:
fpga.bin
system.dtb
uImage
Before renaming the file uImage-<machine name>.dtb  generated by Yocto, It was doing the same commented by you, It was stopping, printing strange characters and then you have the prompt available to write "boot" and then boot.
I renamed my uImage-zynq-zed.dtb into system.dtb and It follows to boot enveif it stops reading Kernel :( My log is following:

U-Boot SPL 2016.01 (Nov 17 2016 - 20:02:30)

mmc boot

Trying to boot from MMC

reading fpga.bin

spl_load_image_fat: error reading image fpga.bin, err - -1

spl: error reading image fpga.bin, err - 1

reading system.dtb

reading uImage

reading uImage
Here It stops and do not follows the boot, And I can't write "boot"
I'm trying to have a look to the kernel part. Do you have an Idea about that? 
What about yor Delay experiment? Regards
Giuseppe
 

jade's picture
jade
Junior(1)
Hi Giuseppe,

Hi Giuseppe,
 
a shorter boot delay did not solve the problem.
 
I found this: https://bugs.launchpad.net/igloocommunity/+bug/1006683
 
This very much reminds me of our problem. Unfortunately I am not an electro engineer. I can not attach a 10K pullup. I am not sure what to make of this. I think there is garbage in some RX pipeline. How can it be cleared?
 
Can someone from AVNET give a comment or maybe a hint?
 
Best
Jan

JFoster's picture
JFoster
Moderator(55)
Hi Jan,

Hi Jan,

Have you tried downloading the pre built petalinux image from Xilinx? You can find it at 

https://www.xilinx.com/support/download/index.html/content/xilinx/en/dow...

download the ZED BSP.

Here are the steps to get it loaded onto your zedboard. 

1. Extract the files twice to where you have a folder labeled "Avnet-Digilent-ZedBoard-2016.3" (I use 7-Zip).

2. Go to "Avnet-Digilent-ZedBoard-2016.3\pre-built\linux\images" within that folder to access the SD card images

3. Copy them over to your SD Card and eject SD Card.

4. Place SD Card in J12 SD card connector on your Zedboard.

5. Make sure J7-J11 are in SD Boot

6. Turn power on and monitor Linux via a Terminal program

--Josh

gicgatv's picture
gicgatv
Junior(0)
Hi Jan,

Hi Jan,
I have found a solution that probably is Working for you to, and I hope for all people that desire to use Yocto Distributions!!!
First of all is important to understand that Yocto create boot files that are a little different from official but are Working.
To Understand the structure is important to go to the yocto build forder where it deploy the distro build. 
In My case is: /media/Fast/yocto/poky/build/tmp/deploy/images/zedboard-zynq7/
There are many files, some of them are symbolic links and sometimes could have some problem during copy, In my opinion is important to try, and choose if use symbolic links or referenced files. In this explanation I'm going to use referenced files. You should find some of similar in your folder. It's important to copy and rename in the sd card fat 16/32 boot partition the following files:
 
                                          Computer                                                                                                       SD
 
boot.bin-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0                        ---->              boot.bin
u-boot-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0.img                    ---->              u-boot.img
uImage--4.4-xilinx+git0+89cc643aff-r0-zynq-zed-20161117183112.dtb                          ---->              uImage-zynq-zed.dtb
uImage--4.4-xilinx+git0+89cc643aff-r0-zedboard-zynq7-20161117183112.bin               ---->              uImage                 ***
uEnv-zedboard-zynq7-v2016.01-xilinx+gitAUTOINC+07b02489f2-r0.txt                        ---->              uEnv.txt
 
*** = You could left uImage, but if for some reason it not working or it write some strange characters, rename uImage into uImage.bin and modify the generated uEnv.txt, adding the .bin extension like follows:
 
                                                 kernel_image=uImage     ---->   kernel_image=uImage.bin
 
After populating the ext4 with the core-image-blabla.tar.gz image, like the official instructions, if everything went right, it is done!
 
It's important to remark that with yocto boot files, the zed board enter in a debug mode if the Uart cable is connected before powering the board. For that reason it stops the boot and show the u-boot prompt, giving you the opportunity of debug boot and boot options. 
My linux boot in about 10 seconds, so, If I power the board with uart cable disconnected, I wait a bit more than 10 seconds and I plug the uart cable, I can see the Yocto login!!!
I suggest to add the ssh server to the Yocto disto, connect the board to the Ethernet network and use ssh.
Best Regards
 Giuseppe
 
 
 
 
 

jade's picture
jade
Junior(1)
Hi Giuseppe,

Hi Giuseppe,
 
thanks for sharing! It works much better now. Without a cable connected to UART the board now boots directly to Linux! Installing an SSH server is a good hint.

With a USB cable connected to UART it still behaves strange. The first time I turn on the power for the board it stops in U-Boot most of the times.. But after pushing the Reset-Button one or two times it boots directly to Linux.
 
Best regards
Jan

iashraf's picture
iashraf
Junior(0)
solved

Thanks guys,
I just wanted to share that not connecting the UART cable lets the board boot linux from SD Card.