UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 60406

PetaLinux - How Do I Use PetaLinux To Build the Linux Kernel or UBOOT From a Git Repository?

Description

PetaLinux 2013.10 and later support the ability to retrieve source code for the Linux kernel or UBOOT from a Git repository.  How do I use this feature in my design workflow?

Solution

  1. In order to use this feature, first create a hardware project and PetaLinux BSP in Xilinx SDK as described in the PetaLinux Board Bringup Guide (UG980).
    Once a PetaLinux project has been created, enter the system-level configuration menuconfig with the command petalinux-config -c all.

  2. In the system-level menuconfig, highlight the option entitled "kernel <xlnx-3.8>" and press <ENTER>.

  3. In the sub-menu, select "remote" as the source code location and press <ENTER>.  Upon pressing <ENTER>, control is returned to the main menuconfig and a new sub-menu option entitled "Remote linux-kernel settings" is available. 
    Highlight this menu option and press <ENTER>.

  4. In the sub-menu, select "Remote linux-kernel git URL" and press <ENTER>. 
    Enter the fully qualified URL of the Git repository from which to clone the source code tree. 
    The default URL for the Xilinx GitHub repository for the Linux kernel is https://github.com/Xilinx/linux-xlnx.git

  5. Upon entering a URL, control returns to the "Remote linux-kernel settings" sub-menu.  Highlight the option entitled "Remot git TAG/Commit ID" and press <ENTER>. 

  6. Enter a branch name, tag name, or Commit ID hash to clone.  Common branch names for the Xilinx Linux kernel tree are "master" and "master-next." 
    Additional branch and tag names can be seen on the Xilinx Linux kernel Git repository web page at https://github.com/Xilinx/linux-xlnx

  7. Select "Exit" in the menuconfig by using the right and left arrow keys and press <ENTER>.

  8. Perform any other necessary modifications to the system-level configuration and then select "Exit" in the main menuconfig menu and press <ENTER>.

  9. The Linux kernel source code will be downloaded prior to executing the menuconfig for the Linux kernel.

 

UBOOT can also be retrieved from a remote Git repository in a similar fashion.  

Simply select the option entitled "u-boot-plnx" in the system-level menuconfig and then follow the same basic steps outlined above.  

The default Git checkout URL for UBOOT is https://github.com/Xilinx/u-boot-xlnx.git.  

Note: UBOOT source code is not downloaded until a system build is performed using the petalinux-build command.

AR# 60406
Date Created 04/24/2014
Last Updated 05/12/2014
Status Active
Type General Article
Tools
  • PetaLinux
  • PetaLinux - 2013.10