解决方案
- 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.
- In the system-level menuconfig, highlight the option entitled "kernel <xlnx-3.8>" and press <ENTER>.
- 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>.
- 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
- 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>.
- 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
- Select "Exit" in the menuconfig by using the right and left arrow keys and press <ENTER>.
- Perform any other necessary modifications to the system-level configuration and then select "Exit" in the main menuconfig menu and press <ENTER>.
- 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.