Author Topic: Linux TE0726-2 not booting  (Read 2526 times)

andersenbond

  • Active Member
  • *
  • Posts: 6
Linux TE0726-2 not booting
« on: February 14, 2019, 10:59:28 AM »
Hi,
So I'm new with the TE0726-2 board and I'm having some issues running Linux on the board. I've tried both Petaliux 2017.4 and 2018.2 and got the same result that the kernel never starts. Everytime I tried the last output I get is the "Starting Kernel" from U-boot and nothing happens after that.

Basically I created the .hdf file with the script provided by Trenz in the Test_board example, used it as input in petalinux and after getting the image and everything I created the BOOT.bin and burned it in the flash memory copy the .dtb and the kernel to the SD but the kernel never gets to print anything. Id appreciate if you guys have any suggestion in how to fix this problem.

Kind regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #1 on: February 15, 2019, 07:59:47 AM »
Hi,
can you try out one time the prebuilt boot.bin and image.ub, please.

If I understand you correctly, you did not use  image.ub container with all included. You has separated device tree, kernel, rootfs, correct? Did you configure petalinux(and uboot) for this setup?

br
John

andersenbond

  • Active Member
  • *
  • Posts: 6
Re: Linux TE0726-2 not booting
« Reply #2 on: February 15, 2019, 01:08:26 PM »
Hi John,
Thank you for the quick reply, so I followed this tutorial here ( https://www.digikey.com/eewiki/display/Motley/Getting+Started+with+the+ZynqBerry#GettingStartedwiththeZynqBerry-Linux )  to create the image with petalinux, and the result was a directory containing the kernel, device tree and the rootfs.

There are additional configurations needed?
Ill try the prebuilt image now and let you know the outcome.
Regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #3 on: February 15, 2019, 01:35:27 PM »
Hi,

I don't know this tutorial, so I can't tell you if something is missing on it.  Sorry.
It's also not clear with which Vivado/Petalinux version this tutorial was created. Depending on the Vivado/Petalinux version some steps can be changed.

Try out our reference design (currently 18.2), and if you has problem, let me know.

br
John

andersenbond

  • Active Member
  • *
  • Posts: 6
Re: Linux TE0726-2 not booting
« Reply #4 on: February 18, 2019, 03:01:45 PM »
Hi John so i tried two different steps and still have the same problem.

The first one was using the prebuild images available on the test_board folder.
after trying the images i first got this error:
  Verifying Hash Integrity ... sha1+ OK
## Flattened Device Tree blob at 11800000
   Booting using the fdt blob at 0x11800000
  Uncompressing Kernel Image ... Error: inflate() returned -3
gzip compressed: uncompress error -1

Must RESET board to recover
resetting ...

Since that error is related to the loadaddr and netstart I loaded the image using this commands on u-boot:
Zynq> fatload mmc 0 0x4000000 image.ub
Zynq> bootm 0x4000000 - 0x41800000     

 and the kernel still hangs after this output:
    ## Loading kernel from FIT Image at 04000000 ...
Using 'conf@system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x04000104
     Data Size:    3980001 Bytes = 3.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   326f6cd17a10f3a5a9e9a25ca15e3e9616fd7097
   Verifying Hash Integrity ... sha1+ OK

The uboot I used was build following trenz tutorial, Also the image i build following the same tutorial hangs.
The board I'm using is - 2: te0726-03r, xc7z010clg225-1, trenz.biz:te0726_r:part0:2.1    

Regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #5 on: February 18, 2019, 03:19:27 PM »
Hi,
do you have the R-version of the TE0726, with less DDR and some connectors not soldered?
Can you tell me the serial number of your TE0726?
What's happens when you use prebuilt files without any changes --> download design again, if you has create something with our scripts.
br
John

andersenbond

  • Active Member
  • *
  • Posts: 6
Re: Linux TE0726-2 not booting
« Reply #6 on: February 20, 2019, 05:55:54 PM »
I tried both the 2018.2 and 2017.4 and o got the same results.
The first one is that just by adding the image.ub to the SD card the uboot asks for the system.dtb and since the prebuilt files doesn't include the .dtb file I used one that I generated with petalinux and the kernel hangs after the following output:

     Hash algo:    sha1
     Hash value:   326f6cd17a10f3a5a9e9a25ca15e3e9616fd7097
   Verifying Hash Integrity ... sha1+ OK


The serial number of my board is 462345
Kind regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #7 on: February 21, 2019, 06:35:15 AM »
Hi,
Do not mix  generated files from different design sources! pebuilt image.ub includes device tree, but it seems U-boot used other environment variables,
Can it be that you saved u-boot environments from one of your tutorial into the flash, see:

They had the same problem after they used this tutorial like you has done.

I checked your Serial number, you used the correct board part files, your TE0726-02 is nearly link TE0726-03R. TE0726-02 has all connectors assembled, -03R not. We offered this variant only for a short time, so I was a little bit confused as you has select the R variant.
For the variant with 128MB, you must pay attention on petalinux configuration. You must reduce NetBoot Offset, the default offset is not correct for smaller DDR, see:

br
John


andersenbond

  • Active Member
  • *
  • Posts: 6
Re: Linux TE0726-2 not booting
« Reply #8 on: February 25, 2019, 01:20:22 PM »
Hi John,
So after running run eraseenv I was able to boot linux on the board both the prebuilt file and the one I created on my computer, now I have one questions that is basically I need to run petalinux on an Hypervisor and for that I need to make some changes on Linux source code, my question is if there's a way to set petalinux to use the source code on my computer.

Kind regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #9 on: March 01, 2019, 04:53:46 PM »
Hi,
there are much different ways.
Easiest way to create linux is to use petalinux. add yocto recepts for changes or change links to for kernel, uboot... to local repository of the xilinx git hub of the linx sources (I think this should possible, but I never tried out --> check petalinux userguides of your used version).
br
John

andersenbond

  • Active Member
  • *
  • Posts: 6
Re: Linux TE0726-2 not booting
« Reply #10 on: March 04, 2019, 06:09:44 PM »
Hi John,

I was able to create the image by changing the source location and it works fine I have this one last question that it's how can I boot linux using the zImage and the device tree instead of the fit image, the thing Is that I'm going to use the image on an Hypervisor where I'm not using u-boot to load the image but a custom boot-loader where I load the zImage and the dtb to the memory and then jump to the kernel passing the dtb address and the machine ID on some of the registers (R1 and R3), this technique works in the Xilinx's board and imx but in order to do that I must use the zImage.

kind regards,
Ailton Lopes

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1987
Re: Linux TE0726-2 not booting
« Reply #11 on: March 05, 2019, 09:01:34 AM »
Hi,

zImage is included into the build, check the generated image folder ./images/linux/

But you can also exclude filesystem and device tree from image.ub container.

Or you use uImage: petalinux-package --image -c kernel --format uImage
See also:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842223/U-boot

uImage is also a simple container, see: https://stackoverflow.com/questions/22322304/image-vs-zimage-vs-uimage


To tell Uboot where he must  search for different files and types, check  petalinux-config and petalinux-config -c u-boot (uboot config on 2018.2 and newer)

br
John