08-20-2014 07:19 AM
I have developed a Linux application with some custom IP in the PL. Until now, in order to run my program, I pluged a sd card with a linux image on it downloaded from Microzed website and then load the bitstream thanks to Vivado and my linux app with SDK.
Now, I would like to put on the SD card my linux app and also my bitstream in order to start my programm after powering on my Microzed board.
In order to do this, I have created a FSBL project on SDK. I have generated the boot.bin file with the following file inside:
In my SD card I have loaded the followings files:
When I plug the SD card on my Microzed nothing happen. No message are display in the terminal. The jumper are correctly set. Where are my mistake ?
08-21-2014 12:53 AM - edited 08-21-2014 12:56 AM
did you partition the sd card well?
mmcblk0p1 (boot) has to be FAT 16
mmcblk0p2 (rootfs) has to be ext4
sudo fdisk /dev/sdb then p 1 and p 2 (set the memory block) then t 83 1 and t 83 2 (set Linux as default type) then a 1 (/dev/sdb1 is now bootable) w (save) sudo mkfs.vfat -F 16 /dev/sdb1 (have you done this?) sudo mkfs.ext4 /dev/sdb2
populate the new /dev/sdb2 with a debian rootfs or any other, as you want - we will see that way later.
I guess you generated the devicetree.dtb with the Xilinx tools (SDK) am i right?
never done this before.
I only use the xilinx tools to create the BOOT.bin, and to do so,
you need a bootloader, a bitstream and u-boot.
The bitstream will be used to program the PL at booting (no need to be your final application as you can reprogram it later from the kernel driver).
The bootloader can be easily created by the SDK (fsbl project).
u-boot.elf is a renamed u-boot file obtained by cross compiling u-boot (from the relevant git).
you **need** the arm-xilinx-linux-gnueabi- cross compiler
(source the /vivado/settingsxx.sh at least - may need more complex tools if you are using another toolchain)
Here is a working system
guillaume@debian: source $XILINX_INSTALL_DIR/Vivado/2014.1/settings32.sh
guillaume@debian:~/zynq/zc706/tools$ arm-xilinx-linux-gnueabi-gcc --version arm-xilinx-linux-gnueabi-gcc (Sourcery CodeBench Lite 2013.11-53) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
For instance you could retrieve the u-boot-xlnx repository
git clone git://git.xilinx.com/u-boot-xlnx.git cd u-boot-xlnx make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_zed make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- cp u-boot u-boot.elf (to be called by SDK later)
reminder: retrieve anyother available configuration in u-boot-xlnx/include/configs
now call the SDK from a VIVADO/EDK project and create a fsbl for your current development board - soc.
Go for Tools-> Create Boot Image:
#point to an output folder /tmp
#search for the fsbl and set it as a bootloader
#search for the project bitstream.bit and set it as a datafile
#search for the renamed u-boot.elf and set is as a datafile
Order and Types are important.
this will create BOOT.bin in /tmp
copying BOOT.bin fsbl u-boot.elf bitstream.bit (not needed), should give you at least a u-boot> prompt on the serial port.
Come back if you still got problems having at least a prompt, this shouldn't be to hard to obtain.
Having a booting kernel is another matter.
08-21-2014 05:19 AM
Thanks for the response. I have tried and now I get the following error:
Xilinx First Stage Boot Loader
Release 2014.1 Aug 20 2014-14:24:47
Silicon Version 3.1
Boot mode is SD
SD: Unable to open file BOOT.BIN: 3
FSBL Status = 0xA009
08-21-2014 05:52 AM
08-21-2014 11:28 PM
I have found a workaround to my problem.
I take the default SD image from microzed, I copy on a SD card with my bitstream (bit reversing) and my linux application . Then, in the init.sh file, I load my bitstream and start my application.
08-22-2014 01:52 AM