AMD PetaLinux + OpenAMP Demos
2024-12-17
| 2025-1-7
本文字數 519閱讀時長 2 分鐘
type
status
date
slug
summary
tags
category
icon
password
⚠️
This demo is based on PetaLinux 2024.1 release.

  • Switch to bash:
    • Set $SHELL to /bin/bash:
      • Disable dash as the default system shell (/bin/sh):
        • Select: <No>
      • Install PetaLinux Tools Installer:
        • Installer will be installed to: ./install
      • Source PetaLinux environments:
        • Create project from ZCU102 BSP:
          • The project will be created to: ./xilinx-zcu102-2024.1
        • Build OpenAMP dtb:
          • Select configs:
            • DTG Settings → Enable openamp dtsi
            • Yocto Settings → Parallel thread execution → Set number of bb threads (BB_NUMBER_THREADS)
              • E.g. 8
          • PetaLinux project config is located at: ./project-spec/configs/config
        • Enable OpenAMP and its examples in rootfs:
          • Select the configs:
            • Filesystem Packages → misc → openamp-fw-echo-testd
            • Filesystem Packages → misc → openamp-fw-mat-muld
            • Filesystem Packages → misc → openamp-fw-rpc-demo
            • Petalinux Package Groups → packagegroup-petalinux-openamp → packagegroup-petalinux-openamp
        • Enable Linux Kernel debug info:
          • Select the configs:
            • Kernel hacking → Kernel debugging
            • Kernel hacking → Compile-time checks and compiler options → Debug information → Rely on the toolchain’s implicit default DWARF version
            • General setup →Compiler optimization level → Optimize for size (-Os)
            • Device Drivers → Character devices → /dev/mem virtual device support
        • If we want to build zynqmp_r5_remoteproc driver into kernel, instead of kernel module:
          • Select the configs:
            • Device Drivers → Remoteproc drivers → Support for Remote Processor subsystem → ZynqMP R5 remoteproc support, choose: y
        • Build the project:
          • Boot QEMU with Linux kernel and rootfs we just built:
            • When --kernel is specified, PetaLinux will try to load all the images from <plnx-proj-root>/images/linux/:
              • For Zynq UltraScale+ MPSoC:
                • TF-A image: <plnx-proj-root>/images/linux/bl31.elf
                • U-Boot: <plnx-proj-root>/images/linux/u-boot.elf
                • Linux kernel image: <plnx-proj-root>/images/linux/Image
                • Initrd/Initramfs image: <plnx-proj-root>/images/linux/ramdisk.cpio.gz.u-boot
                • Rootfs (as SD card image): <plnx-proj-root>/images/linux/rootfs.ext4
                • DTB: <plnx-proj-root>/images/linux/system.dtb
                • HW DTB: <plnx-proj-root>/images/linux/zynqmp-qemu-multiarch-arm.dtb
                • … etc
                • P.S. The TF-A boots the loaded kernel image, with PMU firmware running in the background.
          • Remote debug Linux kernel:

          • OpenAMP
          • 第 1 章 - 超標量處理器概覽Linux Kernel: SBI MPXY
            Loading...
            目錄