cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
8,750 Views
Registered: ‎10-19-2011

Booting the ZC702 without a bit file

 

If I wanted to boot the ZC702 without it programming the PL with *.bit file so I have a few questions:

 

  1. Do I need to change anything in FSBL code?
  2. Or will the FSBL know what there is no *.bit file based on the *.bif file?
    1. Who creates the bif file, the user or the tool?

For example, take the following picture from the instructions to build a boot image for the SD card

Capture.JPG

 

if the 'system.bit' was not there, and I generated the bootimage, copied it to the SD card, and rebooted the ZC702 would it boot properly? or will the bootloader think that the 'u-boot.elf' which would now follow directly after the 'zynq_fsbl.elf' in the SD card's data space is the PL's image?

 

Based on Figure 3-2 on page 26 of the Zynq-7000 developer's guide it looks like there always has to be a BIT partition.

0 Kudos
12 Replies
Highlighted
Scholar
Scholar
8,745 Views
Registered: ‎05-28-2012

Re: Booting the ZC702 without a bit file

No expert. Some personal experience...

 

The base release at http://wiki.xilinx.com/zynq-release-14-1 does not load a bitstream. You'll notice the boot.bin there is much smaller than one with a bitstream. I have build boot.bin both with and without a system.bit. The FSBL was okay with that. It is suppose to just load up the partitions in order...FSBL being first and u-boot being last. The FSBl knows when it has come across a bitstream partition and loads the FPGA with it. It won't load u-boot into the FPGA. In theory, the FSBL can remain unchanged.

 

However if u-boot or linux have drivers dependent upon anything in the PL, then they could crash.

 

I usually let the SDK "Create Zynq Boot Image" tool generate and modify the BIF. Sometimes I have to hand edit the BIF file. Specifically if I move the directory. The SDK tool generates a BIF file with absolute paths and it doesn't understand relative paths. The underlying bootgen seem okay with relative paths but the SDK tool doesn't.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,727 Views
Registered: ‎07-29-2011

Re: Booting the ZC702 without a bit file

Hi,

As said earlier in this post, Its not mandatory to give a bitstream to FSBL.

 

FSBL can handle both these combinations

FSBL+uboot

FSBL+bitstream+uboot

 

Regards

Madhubala

0 Kudos
Highlighted
Observer
Observer
8,649 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

Using SDK to Create the Boot Image with FSBL+bitstream+uboot, what offset of fsbl,bitstream,uboot?and should not to write the offset?
thanks!


0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,647 Views
Registered: ‎11-12-2007

Re: Booting the ZC702 without a bit file

You don't need to provide an offset for any of the three. Just add them in this order:

 

FSBL

Bitstream

U-Boot

 

--Rob

0 Kudos
Highlighted
Observer
Observer
8,645 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

Thanks replay very soon!
Other question, if the size of BOOT.bin including FSBL,Bitstream,u-boot is larger than 1M which also is larger than the zImage default offset in u-boot, if need to modify the u-boot and linux ?
1M room of BOOT.bin is too small for our applications.
Can other method to load the Bitstream?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
8,641 Views
Registered: ‎11-12-2007

Re: Booting the ZC702 without a bit file

I'm going to guess from your question that you want to put your BOOT.BIN image along with your Linux image in a flash device? If so then yes, you'd need to modify your offsets in U-Boot to tell U-Boot where your Linux image, ramdisk image, etc. are located in the flash memory space.

 

For the Zynq devices, the bitstream must be loaded from either the processor or JTAG. Typically that means loading it via the FSBL, but you could for example boot Linux first and then configure the programmable logic.

 

--Rob

0 Kudos
Highlighted
Observer
Observer
8,640 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

The partition of QSPI flash as follows from /arch/include/configs/zynq_zc702.h.

 

partition@qspi-fsbl {
    label = "qspi-fsbl";
    reg = <0x0 0x80000>;
    };
   partition@qspi-u-boot {
    label = "qspi-u-boot";
    reg = <0x80000 0x80000>;


    };
   partition@qspi-linux {
    label = "qspi-linux";
    reg = <0x100000 0x500000>;
    };
   partition@qspi-device-tree {
    label = "qspi-device-tree";
    reg = <0x600000 0x20000>;
    };
   partition@qspi-user {
    label = "qspi-user";
    reg = <0x620000 0xE0000>;
    };
   partition@qspi-scratch {
    label = "qspi-scratch";
    reg = <0x700000 0x100000>;
    };
   partition@qspi-rootfs {
    label = "qspi-rootfs";
    reg = <0x800000 0x800000>;
    };

 

Clearly,the boot image contain not the Bitstream, why qspi-fsbl and u-boot is not the same partition ? according to the

BOOT.bin including FSBL+UBOOT. How to know the u-boot offset ( 0x80000) for the qspi-fsbl ?

If merge the qspi-fsbl and u-boot partitions  as one partition such as BOOT.bin,the BOOT.bin is make up of FSBL and uboot, as follows, that is ok?

 

partition@qspi-boot {
    label = "qspi-boot";
    reg = <0x0 0x100000 >;
    };
  // partition@qspi-u-boot {
  // label = "qspi-u-boot";
  //  reg = <0x80000 0x80000>;


    };
   partition@qspi-linux {
    label = "qspi-linux";
    reg = <0x100000 0x500000>;
    };
   partition@qspi-device-tree {
    label = "qspi-device-tree";
    reg = <0x600000 0x20000>;
    };
   partition@qspi-user {
    label = "qspi-user";
    reg = <0x620000 0xE0000>;
    };
   partition@qspi-scratch {
    label = "qspi-scratch";
    reg = <0x700000 0x100000>;
    };
   partition@qspi-rootfs {
    label = "qspi-rootfs";
    reg = <0x800000 0x800000>;
    };

 

0 Kudos
Highlighted
Scholar
Scholar
8,624 Views
Registered: ‎05-28-2012

Re: Booting the ZC702 without a bit file

The specification of the QSPI partitions in the DTS arrived in 14.2. In 14.1 it was specified in the board file. In either case, user space access to the QSPI seems not quite ready for general use. Not much note in the Xilinx Wiki. Same for NAND. I don't think the partitions are of any real practical use.

It would have be nice if Xilinx had separated U-Boot from boot.bin. That would require the FSBL to read more than just one file, boot.bin. Another hacky way would be to use yet another bootloader that would load u-boot.bin from various media. I think the mix of proprietary FSBL/bitstream with GPL'ed U-boot in boot.bin is not good. It's a SDK licencing pain to rebuild boot.bin just because I need to change the GPL u-boot. Maybe the QSPI partition for u-boot is a sign that a separate u-boot might be near.

 

0 Kudos
Highlighted
Observer
Observer
8,615 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

Expect the replay of Xilinx.
I agree your opinion about separate u-boot. Can the BOOT.BIN in SD be wrote to QSPI flash at 0x0 addr directly and boot?I think that is okay. If can,then,i can modify and merge the qspi-fsbl and qspi-u-boot partitions .
0 Kudos
Highlighted
Observer
Observer
4,166 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

qspi.JPG

http://wiki.xilinx.com/zc702-boot-from-flash

 

What different  are the "bif" file and Output file(bin file)?

Why  is the size of BOOT.BIN  in SD (14.2 release)  only 245K which is much smaller than  zynq_fsbl_0.elf  or u-boot.elf?

What files do contain the BOOT.BIN?thanks.

41.2.JPG

 

0 Kudos
Highlighted
Observer
Observer
4,163 Views
Registered: ‎07-10-2012

Re: Booting the ZC702 without a bit file

Open the "boot.bif" file,as folloes.

the_ROM_image:
{
[bootloader]zynq_fsbl_0.elf
u-boot.elf
}
The bif file should be creat auto by SDK and can be modified.
The bif file be used to creat the BOOT.bin file by bootgen tool.
"bootgen -image boot.bif -o i BOOT.BIN".
But,Why is the size of BOOT.BIN in SD (14.2 release) only 245K which is much smaller than zynq_fsbl_0.elf or u-boot.elf?



0 Kudos
Highlighted
Scholar
Scholar
4,154 Views
Registered: ‎05-28-2012

Re: Booting the ZC702 without a bit file

The boot.bin should contain these in this order.
 zynq_fsl_0.elf
 system.bit <-- optional, bitstream created by EDK
 u-boot.elf
The ELF files contain a lot of non-executable stuff that gets stripped off by bootgen. Compare u-boot.bin and u-boot(.elf). The final boot.bin is just the executable binaries and some small headers.

Appears that the qspi_image.bin is just for QSPI programming. It is not used for actually booting. The offsets line up or should line up with the addresses in the U-Boot enviroment variable qspiboot.

 

Never used this method for programming yet. Expect I will have to eventually have to if I lose the SD Card and Ethernet. I have been using SD boot to U-boot. From U-boot, TFTP and sf commands.

0 Kudos