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: 
Highlighted
Visitor hoople
Visitor
7,793 Views
Registered: ‎11-05-2014

Trouble booting Linux kernel on custom board

We have a custom board with a xc7z030 on it.  But other than the part difference the board design is taken very closely from the ZC706 board.

 

I built a BOOT.BIN file with the normal work flow (UG980) and copied it to the SD card, but I get nothing at all on the terminal, not yet knowing if the hardware works or not, I switched to the QSPI to see if that works.  That got me along farther so I decided that I’ll come back to the SD card once I get everything working from the QSPI.  So far I’ve got the FSBL and u-boot running, but there’s where more trouble begins.  

 

The problems:

First, (and this is probably just an annoyance) I don’t know how to keep it from trying to do a network boot (see BOOTP in the terminal view below).  How do I skip this?

 

Second, even though FSBL and u-boot are running from the QSPI, it’s looking to the SD card for the kernel.  I managed to get the kernel to load by running mkimage on a fit file (see attached) to include an uncompressed vmlinux image and my dtb into a image.ub file and placing that on the SD card.

 

The questions:

How can I configure u-boot to use the zImage and dtb that I loaded into the QSPI with via my BOOT.bin file?

Why can’t I boot from the SD card?  The hardware doesn’t seem to be the problem since I can read the kernel from it.

This should be all quite automated with Petalinux work flow but it doesn't seem to be the case...  okay, so that isn't a question, but might spur some usefull feedback.

 

Any insight you can offer will be greatly appreciated!

 

Gem.e000b000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5

Retry count exceeded
Hit any key to stop autoboot:  0
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SS08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
reading image.ub
8682512 bytes read in 455 ms (18.2 MiB/s)
## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  PetaLinux Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x010000f0
     Data Size:    8666112 Bytes = 8.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    crc32
     Hash value:   c1fc3020
   Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x01843dd4
     Data Size:    15104 Bytes = 14.8 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   32b880b8
   Verifying Hash Integrity ... crc32+ OK
   Booting using the fdt blob at 0x1843dd4
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 07ff9000, end 07fffaff ... OK

Starting kernel ...

Here’s my bif file:

 

the_ROM_image:
{
       [bootloader]/home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.linux/images/linux/zynq_fsbl.elf
       /home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.sdk/metha_top_system_wrapper_hw_platform_0/metha_top_system_wrapper.bit
       /home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.linux/images/linux/u-boot.elf
       [offset = 0xF00000]/home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.linux/images/linux/zImage.bin
       [offset = 0x1800000]/home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.linux/images/linux/system.dtb
       [offset = 0x1810000]/home/mattadsitt/Metha2/Custom_5_1/METHA20_Custom.linux/images/linux/urootfs.cpio.gz
}

 

and here's my fit file

 

/dts-v1/;

/ {
    description = "Metha 2.0 kernel and FDT blob";
    #address-cells = <1>;

    images {
        kernel@1 {
            description = "M2.0 Linux kernel";
            data = /incbin/("./vmlinux");
            type = "kernel";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0x00008000>;
            entry = <0x00008000>;
            hash@1 {
                algo = "crc32";
            };
        };
        fdt@1 {
            description = "Metha 2.0 DTS";
            data = /incbin/("./system.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
            hash@1 {
                algo = "crc32";
            };
        };
    };

    configurations {
        default = "conf@1";
        conf@1 {
            description = "Linux kernel and FDT blob";
            kernel = "kernel@1";
            fdt = "fdt@1";
        };
    };
};
0 Kudos
2 Replies
Observer dtrask
Observer
6,899 Views
Registered: ‎01-08-2014

Re: Trouble booting Linux kernel on custom board

Somebody out there must have an answer to this. I am having the same trouble figuring out how to stop the network boot and just go straight to the SD card. It's annoying to wait 17 seconds ever time I power-on or reset for a network boot that is never going to happen.

0 Kudos
Explorer
Explorer
6,884 Views
Registered: ‎10-14-2015

Re: Trouble booting Linux kernel on custom board

there is a very useful guide for different boot options (QSPI, SD card, eMMC) on zedboard.org website: http://zedboard.org/support/design/4701/76

 

it's called "Booting Picozed Using QSPI and eMMC"

 

I have used this guide for setting my custom board.

 

Best Regards,

Rocco

0 Kudos