Page History
...
Excerpt | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Petalinux Project Creation- Short HOWTOGetting Linux working on Zynq is very simple, following steps are required
This is generic how-to, everything is setup for your by the Vivado->PetaLinux flow. Note, the boot.bin generated by PetaLinux may not always work, in such case it is recommended to make the boot.bin with SDK-GUI or command line tools manually. There is no need to install anything else, or to fetch anything from any github repos, etc. PetaLinux 2019.2PetaLinux Installation
Creating a Project from Vivado Project
Petalinux ConfigurationMost settings can be changed with menu-config:
Manual changes can be done in the subfolder "<plnx-proj-root>/project-spec/meta-user/"
|
PetaLinux 2018.3
PetaLinux Installation
Additional Descriptions
References
|
PetaLinux 2018.3
PetaLinux Installation
- (optional) Create new VM with supported Linux OS.
- Attention: Use English as OS language for your Linux System (Keyboard language can be any language). Other languages may cause errors on PetaLinux build process.
- Download PetaLinux from Xilinx Website: http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
- Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
- Example: Use Vivado 2018.3 with SDK 2018.3 and PetaLinux 2018.3
- Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
- Use UG1144 "PetaLinux Tools Documentation - Reference
- (optional) Create new VM with supported Linux OS.
- Attention: Use English as OS language for your Linux System (Keyboard language can be any language). Other languages may cause errors on PetaLinux build process.
- Download PetaLinux from Xilinx Website: http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
- Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
- Example: Use Vivado 2018.3 with SDK 2018.3 and PetaLinux 2018.3
- Choose a PetaLinux Version, that's corresponding to the installed Vivado and SDK Version.
- Use UG1144 "PetaLinux Tools Documentation - Reference Guide" that's corresponding with your PetaLinux Version
- Change owner of installation directory to non root (see Troubleshoot page)
- Check "PetaLinux Tools Installation Requirements" chapter and install missing tool/libraries
- Use installation instructions from chapter "PetaLinux Tools Installation Steps"
- Deactivate Webtalk: $ petalinux-util --webtalk off
- See also Petalinux Troubleshoot#Petalinux2018.3
- Note:
- There is no need to install anything else, or to fetch anything from any github repos, etc.
- It is recommended to test the installation by creating a dummy template project and building it.
- Download one of the BSP Examples from Xilinx Website (Only to test your installation)
- Install:$ petalinux-create -t project -s <path-to-bsp>
- Build: $ petalinux-build
...
- PetaLinux Working Environment (see UG1144)
- PetaLinux Tools Installation is completed.
- "/bin/sh" is bash
- Set Working Environment:
- $ source <path-to-installed-PetaLinux>/settings.sh
- Set cross compiler:
- $ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
- $ export ARCH=arm
- Create a New Project (see UG1144):
- $ petalinux-create --type project --template <CPU_TYPE> --name <PROJECT_NAME>
- <CPU_TYPE>: zynqMP, zynq, microblaze
- <PROJECT_NAME>:The name of the project you are building
- Import Hardware Configuration (see UG1144):
- Export Hardware Definition File (*.hdf) from the Vivado Project into the PetaLinux subfolder "<plnx-proj-root>/hw-description":
- change to the hardware description folder:
- Run:$ petalinux-config --get-hw-description
- :
- change to the hardware description folder:
- While anywhere in the project folder tree:
- Run:$ petalinux-config
- It's recommended to deactivate FSBL-Configuration and build FSBL and Boot.bin with SDK/HSI: "linux Components Selection --->" "[ ] First Stage Bootloader
- Run:$ petalinux-config -
- Run:$ petalinux-config -c rootfs
- -get-hw-description
- Export Hardware Definition File (*.hdf) from the Vivado Project into the PetaLinux subfolder "<plnx-proj-root>/hw-description":
- (optional) Configure your PetaLinuxBuild System Image (see UG1144):
- While anywhere in the project folder tree:
- Run:$ petalinux-build
- Build log-file:"<plnx-proj-root>/build/build.log"
- Take u-boot.elf and image.ub from "<plnx-proj-root>/images/linux" and make BOOT.BIN. It is recommended to create the FSBL with SDK/HSI tools.
Petalinux Configuration
Most settings can be changed with menu-config ($ petalinux-config).
There are 3 more files that user can edit, they are
...
There should be no reason to modify any other files by editing them (most of them are generated and would be overwritten).
Additional Descriptions
Children Display |
---|
References
...
...
- petalinux-config
- It's recommended to deactivate FSBL-Configuration and build FSBL and Boot.bin with SDK/HSI: "linux Components Selection --->" "[ ] First Stage Bootloader
- Run:$ petalinux-config -c kernel
- Run:$ petalinux-config -c rootfs
- petalinux-config
- Build System Image (see UG1144):
- While anywhere in the project folder tree:
- Run:$ petalinux-build
- Build log-file:"<plnx-proj-root>/build/build.log"
- Take u-boot.elf and image.ub from "<plnx-proj-root>/images/linux" and make BOOT.BIN. It is recommended to create the FSBL with SDK/HSI tools.
Petalinux Configuration
Most settings can be changed with menu-config ($ petalinux-config).
There are 3 more files that user can edit, they are
File | Description | Location |
---|---|---|
system-top.dts | Device tree changes are to be applied here | <petalinux-project>/subsystems/linux/configs/device-tree |
platform-top.h | U-boot changes are to be applied here | <petalinux-project>/subsystems/linux/configs/u-boot |
fsbl_hooks.c | FSBL changes are to be applied here | SDK/HSI FSBL-Template |
There should be no reason to modify any other files by editing them (most of them are generated and would be overwritten).
...