Booting PetaLinux 2014.2 from an SD card
Using the pre-built image
We start by putting the pre-built image on the SD card and boot PetaLinux.
We use the petalinux-package command to generate a BOOT.bin file containing the first-stage bootloader, U-Boot and the bitstream.
-->petalinux-package --boot --fsbl .../zynq_fsbl --fpga .../download.bit --uboot
Copy files to SD card
Copy the BOOT.BIN and the image.ub files to the SD card in this order.
Power on the ZedBoard
Insert the SD card in the card slot, connect a terminal and power on the board. The boot process will start and we see the U-boot prompt. Then press any key to stop U-boot. The default boot command in U-boot tries to boot from the system memory. We must change it to boot from the SD card instead. Here is the command to do that:
U-Boot-PetaLinux> setenv bootcmd 'run sdboot'; saveenv
Then type reset to restart the boot process.
This time the system will boot and show the login prompt.
New board bringup
We follow the Petalinux Board Bringup Guide to create the new PetaLinux BSP. Normally there are three stages to the board bringup process:
Create a new PetaLinux platform
The first step is to create a new PetaLinux SDK software platform, ready for building a Linux system customized to our hardware platform. The petalinux-create command is used to achieve this:
-> petalinux-create --type project --template <CPU_TYPE> --name <PROJECT_NAME>
CPU_TYPE (zynq or microblaze)
Here is the result.
Fixing software bugs
Before we can continue, we have to fix two software bugs in the PetaLinux design flow.
Here is a solution for the first problem found in the Xilinx forum.
Here is a solution for the second problem I found in the Xilinx forum.
Now we are ready to continue the board bringup task.
Import hardware description
1. Go to the directory which contains the hardware description (system_wrapper.hdf) generated from Vivado (LED_Controller.sdk).
2. Import the hardware description with the command: petalinux-config --get-hw-description -p <plnx-proj-root>
The -p option points to the PetaLinux project (PetaZed) that will be updated to match the hardware platform configuration.
It launches the top system configuration menu when the command is used the first time or the tool detects there is a change in the system configuration.
3. We will exit without making any changes.
Build system image
1. Change into the directory of our PetaLinux project (PetaZed).
2. Run petalinux-build to build the system image
3. When the build has finished the following files have been written to the images/linux directory.
4. Follow the description in the beginning of this blog entry to put the image on an SD card and boot PetaLinux on the ZedBoard.
Fixing software bugs slows down the development speed.
Top Previous Next
|Leave a Comment:|