Adding an application to Petalinux for ZCU216 - asiaa/BURSTT GitHub Wiki

  1. Create an application.

 homin@homin-5820:~/petalinux/tools/common/petalinux/bin/zcu216_v2022_1$ petalinux-create -t apps --name helloworld-app --template c
 INFO: Create apps: helloworld-app
 INFO: New apps successfully created in /home/homin/petalinux/tools/common/petalinux/bin/zcu216_v2022_1/project-spec/meta-user/recipes-apps/helloworld-app

  1. Enable that application by enabling "user packages" -> "helloworld-app"

homin@homin-5820:~/petalinux/tools/common/petalinux/bin/zcu216_v2022_1$ petalinux-config -c rootfs

  1. Zynq UltraScale+ MPSoC users: Ensure that the petalinux-initramfs-image image filesystem type is set to INITRD.
    1. Make sure you are in the petalinux-config main menu.
    2. Select Image Packaging Configuration in the menuconfig. Note: Press to go into the sub-menu.
    3. Keep the Root filesystem type as INITRD.
    4. Select INITRAMFS/INITRD Image Name.
    5. Verify that the image name is petalinux-initramfs-image.
    6. Select Exit and select Yes when asked to save the new configuration.

homin@homin-5820:~/petalinux/tools/common/petalinux/bin/zcu216_v2022_1$ petalinux-config 

  1. Package the BOOT.BIN file by:

 homin@homin-5820:~/petalinux/tools/common/petalinux/bin/zcu216_v2022_1$ petalinux-package --boot --force --fpga pre-built/linux/images/system.bit    --fsbl pre-built/linux/images/zynqmp_fsbl.elf    --u-boot pre-built/linux/images/u-boot.elf   --pmufw pre-built/linux/images/pmufw.elf   --atf pre-built/linux/images/bl31.elf

  1. Copy that generated BOOT.BIN under ~/images/linux and "boot.scr", "Image", "system.dtb" and "rootfs.cpio.gz.u-boot" to SD card. Don't include other files.

  1. After booting, go to /usr/bin then run the

# helloworld-app

  1. If no board is available, can run the simulation instead. user and password is petalinux

homin@homin-5820:~/petalinux/tools/common/petalinux/bin/zcu216_v2022_1$ petalinux-boot --qemu --prebuilt 3

⚠️ **GitHub.com Fallback** ⚠️