title | permalink |
---|---|
PetaLinux Build Guide for Ultra96 |
/documentation/consumer/ultra96/ultra96-v1/build/peta-linux.md.html |
PetaLinux provides a complete, reference Linux distribution that has been integrated and tested for Xilinx devices. The reference Linux distribution includes both binary and source Linux packages including:
- Boot loader
- CPU-optimized kernel
- Linux applications & libraries
- C & C++ application development
- Debug
- Thread and FPU support
- Integrated web server for easy remote management of network and firmware configurations.
Download the following files from Xilinx Download Page. You will need to create a Xilinx account.
-
- PetaLinux 2018.2 Installer
-
- Ultra96 BSP
- Host OS: Ubuntu 16:04 LTS
- CPU: 4 core or more recommended
- RAM: Minimum 8GB
- Storage: 30GB or more
- Internet Connection
- Run the installer:
$ ./petalinux-v2018.2-final-installer.run <install-directory-of-choice>/peta
- Accept License Agreements when prompted.
- Done!
- Setup PetaLinux Environment
$ cd <petalinux-install-directory> $ source peta/settings.sh
- Create Project from Ultra96 BSP
$ petalinux-create -t project -s <path-to>/xilinx-ultra96-reva-v2018.2-final.bsp
$ cd xilinx-ultra96-reva-2018.2/
$ petalinux-build
- Grab a cup of coffee... this might take a while.
$ petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga hardware/xilinx-ultra96-reva-2018.2/xilinx-ultra96-reva-2018.2.runs/impl_1/design_1_wrapper.bit --pmufw components/plnx_workspace/pmu-firmware/pmu-firmware/Release/pmu-firmware.elf --u-boot
All files required for this step will be present at /images/linux/ once the build is completed
-
Format the SD Card with the following layout. To do this you can use tools such as fdisk, GParted, gnome-disks etc.
- Partition 1:
- Format: FAT32
- Size: 1GB
- Label: boot
- Partition 2:
- Format: ext4
- Size: 4GB or more
- Label: rootfs
- Partition 1:
-
Copy Boot files
$ cd <project-dir>/images/linux/ $ cp BOOT.BIN <mount-point-for-boot> $ cp image.ub <mount-point-for-boot>
-
Flash rootfs Partition
$ sudo dd if=rootfs.ext4 of=/dev/sdX2 $ sync
Once the installation is complete safely remove the sdcard and insert into your Ultra96 and power-on, you should see PetaLinux boot.
For a more detailed look at PetaLinux SDK take a look at this documentation from Xilinx.
{% include media.html media_url="https://youtu.be/x6xbFGmwxoQ" %}