[Zedboard u-boot Linux system porting]-zybo Zync-7000 development Board work booting Linux on the Zybo

Source: Internet
Author: User
Tags gparted vivado

Zybo Zync-7000 Development Board work booting Linux on the Zybo

This article translated from: http://www.dbrss.org/zybo/tutorial4.html
This article is mainly about Zybo hardware system construction,u-boot,linux-kernel Transplant,Linaro file system transplant.

Introduction

If you is new to Linux I would recommend reading through some of the references at the bottom of the page. For the tutorial I am working on a Linux Ubuntu 14.04 vm. Figure 1 is a important overview of the entire design process and how everything comes together to create the necessary C omponents to boot Linux on the Zynq-7000 SoC. The end goal of this tutorial are to cover the steps from the beginning stages all the the-the-the-to booting a Linaro Linux Distri Bution with a graphical user interface on the Zybo. At this point, the tutorial only covers the stages-to-booting to a Linaro root shell.

things you'll need!!

Xilinx Vivado 2014
Xilinx SDK 2014
Digilent ' s Zybo Board
Linux-digilent-dev Master-next Branch obtained here.
U-boot-digilent-dev Master-next Branch obtained here.

Step 1:obtaining necessary files and repositories

I would recommend making a project folder to work from. I am working from Zee-bow on the desktop but it's up to you as to where you are want to setup. Also Create folders to put the boot files and root system files as we create them. I named these folders Sd_boot and Sd_fs.

1) Download the Zybo base system from the Digilnets Zybo product page.

2) Download the Digilent Inc. U-boot-digilent-dev and Linux-digilent-dev repositories. Make sure to get the Master-next branch as these contain the necessary Zybo config and DTS files. These'll is used to create the kernel and u-boot.elf.

Figure 2:cloning Linux-digilent-dev and U-boot-digilent-dev into my working folder.
Note: Be sure to download the Zybo corresponding configuration file in Master-next Branch, u-boot and kernel do not include these files by default

Step 2:compiling U-boot

In order to compile the u-boot and later the kernel we need to set up the tools and extend the $PATH environment variable To find the tools. I would recommend moving the first II exports and the source into your. BASHRC so you don't have to set them again after Closing the terminal.

Figure 3:setting up the tools and the $PATH environment variable

The next step is to configure and compile the u-boot. Navigate to the U-boot-digilent-dev folder in the terminal. Before compiling the u-boot we need to a change of the zynq_zybo.h file to prevent the u-boot from loading the RAMDisk. Instead we want it to pass to the root filesystem.

Figure 4:configure and building u-boot for Zybo.

Now lets compile the u-boot. Run make with the specific board Zynq_zybo_config file and then run make and the Execute and link u-boot should compile.

Figure 5:configure and building u-boot for Zybo.

If you get a error during this step your $PATH environment variable most likely can don't find the tools necessary to Compi Le the u-boot. If the u-boot compiled correctly you should see a u-boot on the top level of the U-boot-digilent-dev folder. Lets move this to the Sd_boot folder and add an elf extenstion. This is used to generate the Boot.bin in the following step.

Figure 6:adding the elf extension to U-boot.

Step 3:building the base design

Now in to the base design. Open your chosen version of Vivado, I am working with Vivado 2014.4 and the corresponding SDK. Open the base design project under ZYBO_BASE_SYSTEM/SOURCE/VIVADO/HW/ZYBO_BSD/ZYBO_BSD.XPR. If you are using the version, the base design is created with then this next part does not pertain Go ahead and generate the bitstream. If you is not using the version, that it is created on and you'll be prompted with a older Project version warning an D an option to automatically upgrade to the current version. Select okay to automatically upgrade. A second warning would apear saying Vivado no longer uses ' work ', select Okay. The third warning is notify you some Xilinx IP ' s has undergone changes in this version of Vivado, select report IP s Tatus. Select the Upgrade Selected at the bottom of the design tool. It would ask if you wish to proceed, select OK.

Figure 7:upgrading IPs in Vivado 2014.4.

The tool would notify you there were six critical warning messages, select OK. These won't cause an issue with the system. The next step is to generate the bitstream. There is no implementations available so the tool would ask to launch synthesis and implementation before generating the B Itstream, select Yes. There'll is warnings that appear during the Sysnthesis and implementation, select OK does not worry on those for now. I would recommend reading up in some of the references as this is the take some time depending on the processing power of you R computer. Once The tool has finished you'll need to export hardware.

Figure 8:exporting the hardware for SDK.

Include the bitstream when exporting the hardware and then launch the SDK

Figure 9:include Bitstream when exporting hardware.

Step 4:first Stage Boot Loader

Once the SDK loads create a new application project. Make sure the hardware platform have selected the hardware you previously exported from Vivado. Select C and standalone for the target software language and OS platform. Name the project FSBL and select Next.

Figure 10:new Application Project specification

Now we'll need to modify the FSBL_HOOKS.C file and set the MAC address. Locate the Zybo specific fsbl_hooks.c file in the ZYBO_BASE_SYSTEM/SOURCE/VIVADO/SDK/FSBL folder and replace the one Was generated in the SDK FSBL project. Once you has replaced the fsbl_hooks clean and build the project. This would generate the fsbl.elf used to create the Boot.bin in the next step.

Step 5:building Boot.bin

Select Create Zynq Boot image under the Xilinx Tools tab. We need to add, with order, the Fsbl.elf, System_wrapper.bit, and the u-boot.elf in order to create the Boot.bin. The FSBL can found in the Zybo_base_system/source/vivado/hw/zybo_bsd/zybo_bsd.sdk/fsbl/debug folder. The system_wrapper.bit can found in the Zybo_base_system/source/vivado/hw/zybo_bsd/zybo_bsd.sdk/system_wrapper_hw_ Platform_0 folder. In an earlier step we moved the u-boot.elf into a the Sd_boot folder. Next Specify the output path where you want the Boot.bin to be generated.

Figure 11:generating Boot.bin.

Step 6:building the Linux kernel

The next step is to build the Linux kernel. Navigate to the Linux-digilent-dev folder we downloaded earlier. Now we is ready to compile the kernel. Make sure to run make on the Xilinx_zynq_defconfig file to set up the configurations for the ZYNQ chip before compiling th E kernel.

Figure 12:uncompressing the Zimage kernel image.

Step 7:generating the Device Tree Blob

Before we generate the device tree blob we need to make some slight adjustments to the Zynq_zybo.dts file found Linux-digi Lent_dev/arch/arm/boot/dts. Particularly line, 62. Changing the clock prevented an error, occured after booting the root shell.

Figure 13:modifying the Zynq_zybo.dts.

Now we is ready to generate the DtB file. After this is a complete copy of it into the Sd_boot folder and rename it devicetree.dtb.

Figure 14:modifying the Zynq_zybo.dts.

Step 8:partitioning your Secure Digital card

There is a couple of ways to does this, the easier the "is" to use Gparted. A second-to-use-command line tool FDISK. If you don't have gparted it's fairly easy to download and install. Type sudo apt-get install gparted to install it and sudo gparted to run it. Once You has it install plug in your SD card and select it from the Drop window on the top left. If you had any information on the SD card make sure to back it up otherwise select the Partition tab and unmount the part Ition then select and delete the partition. Select The check mark that appears, confirming you wish to delete the partition. Create the new partitions, the first with a beginning offset of 4 MiB. The first partition should is FAT32 and be 1 GiB, the second partition should is EXT4 and can take the remaining space.

Figure 15:partitioning the boot SD card.

Step 9:obtaining the Linaro file system

Download the Linaro file system tar ball from here. We is interested in the last one in the list. Extract the contents and CD into Binary/boot/filesystem.dir. Now we need to sync the contents of this folder with the ROOT_FS partition we just created.

Figure 16:syncing the Linaro root file system with the ROOT_FS partition on the SD card.

Step 10:booting the Zybo

Now we need to put Boot.bin, DEVICETREE.DTB, and uimage onto the FAT32 BOOT partition. I would recommend creating a temporary folder, mounting the boot partition to this folder, and then using rsync to copy th e files over. Once the files is on the correct partition eject the SD card and put it into your zybo. Make sure the JP5 jumper are set to SD and JP7 are set to wall. You can boot it from the USB-I would recommend using the wall to power the board. Connect to a UART port terminal, I use Gtkterm to connect to the hardware. It's available in the Ubuntu software Center, when running it make sure to use sudo as it'll need permission to connect to the USB port. Power on the Zybo and then in the serial port terminal set the "configuration to the port" where the Zybo is connected and s ET the baud rate to 11500, everything else should stay as defualt.

Figure 17:booting from SD on the Zybo to the Linaro root shell.

References

[1] Xilinx Getting Started Wiki
[2] Digilent Embedded Linux hands-on Tutorial for the Zybo
[3] What-is-linux
[4] Device Tree Wiki
[5] INITRD Wiki

[Zedboard u-boot Linux system porting]-zybo Zync-7000 development Board work booting Linux on the Zybo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.