Zynq-7000 AP SoC Boot - Rebooting to a Different Boot Image and Bitstream from Linux Tech Tip

Zynq-7000 AP SoC Boot - Rebooting to a Different Boot Image and Bitstream from Linux Tech Tip

Document History
Date
Version
Author
Description of Revisions
29-April-2014
1.0
chandramohan pujari
Initial Version




1. Summary

The power Demo was created with a vision to provide user with the flexibility to identify the system power, CPU utilization, CPU frequency scaling at run time and thus providing an opportunity to validate power budgets while designing the system. It also demonstrates power consumption during execution of Ubuntu desktop application on Zynq. User can execute applications and perform different I/O operation on Zynq PS peripheral supported by Ubuntu desktop to measure power consumption.
As stated, Power Demo operates in two different modes namely Normal Mode and Ubuntu Mode.
  1. Normal Mode: System is booted with OSL images and has a provision for loading PL logic independently
  2. Ubuntu Mode: in which the kernel images with minimal customization's and Ubuntu desktop as root file system are used.


This tech tip aims to help understand user the process of bringing up Normal Mode when in Ubuntu Mode and vice a verse in Linux. The step by step process to operate in 2 different modes dynamically is explained here. Essentially this tech tip provides insight on how to use two sets of different images and boot the second boot image and bit stream dynamically while booted up and operating one of the prefixed modes of power demo. This tech also assumes that user is familiar with operating and different features supported by power demo. It’s strongly advised that users goes through the “ Zynq-7000 AP SoC Installing and Running Power Demo” tech tip before proceeding with the current tech tip.

2. Implementation

Implementation Details
Design Type
PS + PL
SW Type
Linux
CPUs
2 ARM Cortex-A9
PS Features
  • DDR3 533 MHZ
  • L2-Caches
  • USB
  • Ethernet
  • UART
Boards/Tools
ZC702
Xilinx Tools Version
Vivado 2013.4
Board
ZC702 Rev 1.0

3. Attachments

Files Provided

Application Images for copying in to FAT32 partition of SD card


4. Infrastructure Required for Operation

This section talks about the infrastructure one needs to have in order to boot the second image and bit stream in Linux. Its advised that user of power demo creates the SD card with the images provided by the tech tip
Zynq-7000 AP SoC Installing and Running Power Demo. However if someone tries to manually create the partitions and contents manually, here are the set up details.
  1. The SD card should be partitioned in to two partitions namely ext3 and FAT32. Make sure to use an 8 GB SD card and allocate 2 GB for FAT32 partition and rest of the 6 GB for ext3 partition. User is free to use any of the partition tools such as Gparted or Ease US partition tool.
  2. Write the Ubuntu desktop rootfs to the ext3 partition.
  3. Steps 1 and 2 can be completed by following “Zynq-7000 AP SoC Ubuntu Desktop on Peta Linux Tech Tip” present at

http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+Ubuntu+Desktop+on+Peta+Linux+Tech+Tip
4) The last step is to get the application binaries and images to be copied to FAT32 partition of SD card. These binaries and images are provided with this tech tip. User can copy these images to FAT32 partition by safely removing any of the preexisting contents present in FAT32 partition.

Upon on completion, the FAT partition should look like as shown in figure 1.0 below
Figure 1.0: Contents of FAT32 partition

Figure 1.0

5. Step by Step details

This section tries to explain the step by step process followed in bringing up second boot image when user triggers the request from the UI. To provide some insight on the process to trigger the boot up request here is a small explanation of UI.
Host machine application is C# based GUI program executing on windows machine. The UI of the power demo is shown below in Figure 2.0. Using this UI, user can send commands and receives different kind responses from ZC702 board.

Power Demo UI

Figure 2.0

Host machine GUI application provide a check box option to switch between Ubuntu desktop application and Normal PS/PL application Mode. This check option is available in “Configuration” Section as highlighted below:

Configuration Section

Figure 3.0

Before getting in to detailed process it is assumed that the system initially is booted in Normal mode. In order to operate in Ubuntu Mode user should select the Ubuntu check box as present under configuration pane on left side of the UI. Once the user selects the Ubuntu check box, the process follows to get the Ubuntu desktop up, as explained below.

  1. The selection from UI informs the application running in the back-end using a specified protocol to boot the system in Ubuntu mode.
  2. As can be seen in the Figure 1.0, there are 2 directories namely ubuntu and osl, these directories hold the images to be used while bringing up specific mode.
  3. Since user requested the system to be put in to Ubuntu mode, the back-end application copies the images present in ubuntu folder to top level directory, overwriting the existing images.
  4. After copying the ubuntu images to top level directory, the host application issues a ”reboot” command to the system.
  5. The system which was running in normal mode would now have images which are customized to point to ubuntu desktop rootfs present in ext3 partition instead of normal ramdisk image which will be present in FAT32 partition, bringing up Ubuntu on Zynq.
  6. Even the back-end application executable is replaced as a process of copying effectively customized to run the ubuntu applications.
  7. User is requested to wait for the system to be rebooted and to display Ubuntu Desktop on the connected Display.
  8. Upon successful boot, “Apply” button on the extreme right corner in Demo configuration pane gets highlighted.
  9. Now user is free to operate with different features provided in power demo.

If user prefers to switch back to normal mode, he/she is supposed to uncheck the Ubuntu check box. A process in similar lines as explained above would occur. A brief explanation is provided below for better understanding.

  1. User unchecks the ubuntu checkbook to revert to the Normal Mode.
  2. The selection from UI informs the application running in the backend using a specified protocol to boot the system in Normal mode.
  3. Since user requested the system to be put in to Normal mode, the backend application copies the images present in osl folder to top level directory, overwriting the existing images.
  4. After copying the osl images to top level directory, the backend application issues a ”reboot” command to the system.
  5. The system which was running in ubuntu mode would now have images for Normal mode, thus bringing up the system in to Normal Mode.
  6. Even the backend application executable is replaced as a process of copying effectively customized to run the PS/PL applications.
  7. User is requested to wait for the system to be rebooted
  8. Upon successful boot, “Apply” button on the extreme right corner in Demo configuration pane gets highlighted.

Now user is free to operate with different features provided in power demo as explained in Zynq-7000 AP SoC Installing and Running Power Demo Tech Tip.

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy