Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Important: as of the 2026.1 release, the new home for AMD Embedded Development Framework Documentation is https://edf.docs.amd.com/en/latest/ Please go here for the latest updates.
What is the difference between EDF-based BSPs and PetaLinux BSPs; can the boot components generated using these be interchanged?
EDF Linux® BSP provide similar functionality to a PetaLinux BSP – Boot firmware, bootloaders, Linux OS, and Linux Root file system. However, the Kernel Configuration and rootfs are richer. AMD recommends re-generating the full stack within EDF to ensure compatibility.
Can existing bootloader, kernel patches, and rootfs customizations from PetaLinux be re-used?
Existing patches can be re-used if compatible with the version of the kernel / components. RootFS customizations can be migrated using the Yocto Project methods for extending the rootFS configuration. See the development flows section of the EDF Documentation for more information.
How will FPGA integration (e.g., bitstream loading) be managed in Yocto?
Existing standard flows for FPGA bitstream loading are supported in EDF, FPGA Util, and DFX. Manager utilities are included in the default EDF Linux® disk image.
How does EDF handle SDK generation for application development?
An application SDK is released with each EDF release, however, it is recommended to generate your own SDK from within the EDF Yocto Project environment to ensure the SDK is in line with any user customizations. See the Operating System Integration sections of the EDF Documentation for more information.
How can I integrate Vivado Design Suite generated artifacts (bitstream, DTB) into EDF Yocto Project™ based builds?
Which PetaLinux features are not available in the vanilla Yocto Project?
AMD device-specific functionality and drivers may not be available in vanilla Yocto and the upstream Linux Kernel, but are included in AMD EDF via custom layers (similar to PetaLinux). AMD is committed to upstreaming, but there is generally a delay between initial release of a feature and its availably in upstream repos.
How can I migrate PetaLinux rootfs customizations (e.g., init scripts) into my EDF build?
How is the lifecycle and release of EDF managed, and how does it align to Vivado Design Suite releases?
AMD EDF currently releases on the same timeline as Vivado Design Suite releases, but as a separate component. EDF is validated against the Vivado Design Suite release, with pre-compiled artifacts updated. EDF release naming uses a YY.MM.<update> scheme. For example, EDF 25.05 aligns with the Vivado Design Suite 2025.1 release, and EDF 25.05.1 aligns with the Vivado Design Suite 2025.1.1 release.
How to include External CDO Files in Final Image Using Bootgen utility?
Overview This document outlines the steps to generate a Programmable Device Image (PDI) and integrate external Configuration Data Object (CDO) files into the final boot image for Versal and Versal-2ve-2vm platforms using the Bootgen tool.
CDO files are typically used for configuring hardware or system settings during the boot process on Versal and Versal-2ve-2vm platforms. Prerequisites Bootgen utility installed (part of Vivado tools). install Vivado tool and then source script source <path-to-Vivado>settings64.sh Access to: External CDO file(s) ls hw_project/vek385_revb_base/vek385_revb_base.runs/impl_1/gen_files/
ai_engine_data.cdo cdo_gen.tcl mmi_config.cdo
bd_1416_ps11_0_0_fpd_data.cdo fpd_data.cdo plm.elf
bd_1416_ps11_0_0_lpd_data.cdo lpd_data.cdo pmc_data.cdo
bd_1416_ps11_0_0_pmc_data.cdo metadata.cdo versal_comn_platform_ai_engine_0_0_ai_engine_data.cdo A Linux shell or Windows command prompt. Input Files The required input files are located in the /hw_project/vek385_revb_base/vek385_revb_base.runs/impl_1/gen_files/ directory: CDO Files: ai_engine_data.cdo: Configuration data for the AI Engine. fpd_data.cdo: Configuration data for the Full Power Domain (FPD). lpd_data.cdo: Configuration data for the Low Power Domain (LPD). pmc_data.cdo: Configuration data for the Platform Management Controller (PMC). metadata.cdo: Metadata for the platform. Other CDO Files: Additional configuration files for specific hardware components. Bootgen Configuration File: /hw_project/vek385_revb_base/vek385_revb_base.runs/impl_1/versal_comn_platform_wrapper_boot.bif: The Bootgen Input File (BIF) that defines the structure of the PDI. Bootgen Command The following command is used to generate the PDI: bootgen -image versal_comn_platform_wrapper_boot.bif -arch versal -w -o base_nov12_aiecdo.pdi Command Breakdown: -BIF_File.bif: Specifies the BIF file that defines the components to include in the PDI. -arch versal/versal_2ve_2v: Specifies the architecture of the target platform (versal, versal_2ve_2v). -w: Enables warnings during the PDI generation process. -o Output_file.pdi: Specifies the output file name for the generated PDI. Steps to Generate the PDI 1. Prepare the Input Files Ensure all required files (CDO files, PLM ELF file, etc.) are present in the gen_files/ directory. 2. Verify the Bootgen Configuration File (boot.bif) Open the versal_comn_platform_wrapper_boot.bif file and ensure it correctly references the input files. Example structure: new_bif:
{
id_code = 0x04db0093
extended_id_code = 0x01
id = 0x2
boot_config {smap_width=32}
image
{
name = pmc_subsys
id = 0x1c000001
partition
{
id = 0x01
type = bootloader
file = gen_files/plm.elf
}
partition
{
id = 0x09
type = pmcdata, load = 0xf2000000
file = gen_files/pmc_data.cdo
}
}
image
{
name = lpd
id = 0x4210002
partition
{
id = 0x0C
type = cdo
file = gen_files/lpd_data.cdo
}
}
image
{
name = fpd
id = 0x420c003
partition
{
id = 0x08
type = cdo
file = gen_files/fpd_data.cdo
}
}
image
{
name = pl_cfi
id = 0x18700000
partition
{
id = 0x05
type = cdo
file = versal_comn_platform_wrapper_boot_markers.rnpi
}
}
image
{
name = asufw
id = 0x1C000002
partition
{
id = 0x0F
type = cdo
file = static_files/asu_data.cdo
}
partition
{
id = 0x0B
core = asu
file = static_files/asufw.elf
}
}
image
{
name = aie2_subsys
id = 0x421c028
partition
{
id = 0x07
type = cdo
file = gen_files/ai_engine_data.cdo
}
}
} 3. Run the Bootgen Command Execute the bootgen command to generate the PDI: bootgen -image versal_comn_platform_wrapper_boot.bif -arch versal -w -o base_nov12_aiecdo.pdi
****** Bootgen v2025.2
**** Build date : Nov 12 2025-13:58:15
** Copyright 1986-2022 Xilinx, Inc. All Rights Reserved.
** Copyright 2022-2025 Advanced Micro Devices, Inc. All Rights Reserved.
[INFO] : Bootimage generated successfully 4. Verify the Output Check the generated PDI file (base_nov12_aiecdo.pdi) to ensure it includes all the required components. 5. Test the PDI Flash the PDI onto the target Versal/Versal_2ve_2v platform and verify its functionality. Recommended File Placement: Always place the input files in a directory accessible by the bootgen tool. Version Compatibility: Ensure the input files (CDO, PLM ELF, etc.) are compatible with the hardware and software versions used in your project. Error Handling: If bootgen fails, check the paths and syntax in the boot.bif file.
What tooling will replace `petalinux-build` workflows?
There are some adjustments with 2025.2 with gen-machine-conf installing yaml files for configuration for builds:
Use a dedicated Yocto layer stack (for Xilinx targets) such as:
meta-xilinx
meta-xilinx-tools
meta-amd-adaptive-socs and meta-xilinx-restricted (board-specific layers)
Replace PetaLinux’s hardware flow with:
SDT/XSA integration via Yocto layers and device-tree fragments
FPGA Manager integration through kernel config and DTB fragments
Boot sequence managed by U-Boot in Yocto (instead of PetaLinux boot scripts)
Are there features in PetaLinux that are hard to replicate in Yocto?
Yes, there are some PetaLinux features that are notably hard to replicate directly in Yocto Project. The main differences arise from tightly integrated hardware/design handoff, boot flow automation, and vendor-optimized tooling that PetaLinux provides out of the box.
Integrated hardware design and flow
What’s Different: PetaLinux ships with a tightly coupled Vivado/ export (XSA/SDT) and automated DTB handling, enabling a near-seamless path from hardware design to software. This flow is replicated using the SHEL flow (SDTGen, Lopper, gen-machine-conf) and direct cloning of the Yocto Project resource (eg, using the repo tool).
What’s Different: PetaLinux offers an ncurses-based console GUI for project creation, configuration, and workflow orchestration. Yocto is primarily CLI-driven with configuration managed with text-based configuration files. Some individual components (eg, Linux or U-Boot) can still be managed with the same ncurses-based command line GUI by using the “make menuconfig” command inside the code source tree.
How do we validate FPGA-specific features after migration?
Advised Approach:
Confirm bitstream (or PDI/CDO data) loads reliably at boot or on demand.
Verify DTB bindings and FPGA peripherals are visible to the kernel.
Ensure FPGA-enabled applications run correctly and meet performance targets.
Establish repeatable pass/fail criteria and a rollback plan if validation fails.
This tends to be designer preference, but here is a suggested, high-level test plan:
Test: Boot-time bitstream load
Steps: Boot image; loader runs; verify bitstream loaded flag in logs.
Pass criteria: bitstream load reported as successful within N seconds; FPGA peripheral accessible.
Test: Bitstream integrity
Steps: Load bitstream; read version/hash from a known register or file.
Pass criteria: hash matches expected value; version matches the intended design.
Test: FPGA peripheral accessibility
Steps: Run a small kernel/user-space test that exercises a DMA or accelerator.
Pass criteria: data transfers complete with expected results; no crashes.
Test: DTB correctness
Steps: Inspect kernel logs for FPFA/DTB bindings; enumerate devices from /dev/mmaps or sysfs.
Pass criteria: all expected devices appear and are functional.
How do we handle Vivado handoff files in Yocto builds?
Export hardware from Vivado
Complete your Vivado design and export the hardware package as an .xsa file.
How: In Vivado, use File > Export > Export Hardware or run the write_hw_platform Tcl command.
What you get: An .xsa that contains the bitstream, hardware description, and metadata needed for software integration.
Generate SDT artifacts from the .xsa
Use the .xsa to generate the System Device Tree (SDT) artifacts directory.
Tool: sdtgen (System Device Tree generator) creates the kernel/bootloader-ready device-tree pieces.
Result: A directory with the device tree (and related files) tailored to your hardware.
Create a Yocto machine configuration from SDT
Produce a Yocto machine config from the SDT artifacts.
Tool: gen-_machine-conf transforms the SDT outputs into a reusable Yocto machine setup.
Result: A machine configuration that reflects your specific hardware (SoC, peripherals, and bus topology).
Integrate SDT into the Yocto build
10. Add the generated machine configuration to your Yocto project. 11. Actions: Include the new machine in bblayers.conf (as needed). Create or adjust layers/recipes to incorporate the SDT-derived device-tree and hardware specifics. 12. Ensure the configuration is consistent with your kernel, bootloader, and FPGA flow.
Build the Yocto image
Build with BitBake using the new machine configuration.
Command: bitbake [your-machine-name]
Outcome: A kernel, bootloader, and root filesystem that integrate the Vivado hardware description from the .xsa.
Will we need to maintain custom Yocto layers for Xilinx-specific features?
Yes, flexibility of maintenance for custom Yocto layers for AMD AECG-specific features, especially if you use board-specific BSPs, FPGA integration, and boot flows – is a key benefit for users because Yocto Project workflows are based on open source infrastructure and tooling.
Create a dedicated board-layer (e.g., meta-yourboard) that contains machine config, custom kernel/boot patches, DT fragments, and FPGA/loaders. This keeps hardware-specific changes isolated and reusable.
What to put in your custom layer
Machine configurations and distro-feature tweaks (can be automated with gen-machine-conf)
Patches or defconfig changes for the kernel and U-Boot
Device-tree fragments and any FPGA manager/bitstream handling
Bitstream/DTB packaging recipes and the FPGA loader (kernel module or systemd service)
Any startup scripts, userspace utilities, or SDK customizations tied to your hardware
Maintenance approach
Align your custom layer with Yocto release cycles and the versions of the AMD AECG layers you depend on Version your hardware changes (bitstreams, XSA/SDT, DT bindings) and tag them with the target MACHINE
Use CI to validate image builds across updates to kernel, bootloaders, and FPGA-related recipes
Risks and mitigations
Layer compatibility: pin to compatible versions of meta-xilinx and the kernel to avoid conflicts
Rebase effort: plan for periodic rebases when OEM layers update, and automate patch application
Licensing: track licenses for vendor layers and ensure redistribution compliance in your layer
Are there community or vendor-supported Yocto layers for Xilinx?
Yes. There are both vendor-supported and community-supported Yocto layers for Xilinx targets.
Vendor-supported layers
meta-xilinx: Core Xilinx BSPs, kernels, bootloaders, and basic FPGA/DT work for Zynq/ZynqMP/Versal.
meta-xilinx-tools: Build tooling and utilities used with Xilinx layers.
These layers are typically maintained by Xilinx or official partners and come with vendor support options.
Community-supported layers
Often built on top of meta-xilinx and provide additional recipes, patches, or boards not covered by the official layers.
Maintained by the open-source community or third-party contributors; update cadence can vary.
FPGA communication over PCIe, what would you recommend for user space driver?
The recommendation on the device driver largely depends on the system architecture and the kind of DMA (if any) that is being used on the FPGA side.
Assuming a system topology where the x86 is the host and the FPGA is the target (or “card” side), and assuming a higher performance data path where a DMA is required, the FPGA DMA type is typically either QDMA (hard or soft) or XDMA (“DMA/Bridge Subsystem for PCIe”).
Some further info and the associated host-side drivers for these DMA IPs:
QDMA IP (hard or soft)
Linux kernel driver (KMOD + user utils) for interrupt-driven, standard kernel flow, sysfs control, etc. Good general default. See QDMA drivers
DPDK Poll-Mode Driver (PMD) for user-space, polled, very-high-throughput/low-latency data paths that is compatible with the Data Plane Development Kit (DPDK); uses UIO/VFIO underneath. Choose this when you want kernel-bypass style dataplane performance. QDMA DPDK Driver Info
Notes: QDMA supports multi-queue, MSI-X, and SR-IOV (PF/VF queue ownership & mailbox). If you need virtualization/tenant isolation, confirm SR-IOV is enabled in the IP and match with appropriate PF/VF drivers. See SR-IOV Support in QDMA
XDMA IP (“DMA/Bridge Subsystem for PCIe”)
XDMA Linux kernel driver (character-device interface) from AMD’s dma_ip_drivers repo; historically the common choice, but XDMA is becoming less common, particularly in Versal (for which many devices integrated a hardened QDMA, or choose soft QDMA for performance reasons). For XDMA, see: See AMD PG195
Upstreamed Linux XDMA driver (dmaengine) is now in mainline kernels (no char-dev ABI; uses the dmaengine framework). Choose this if you want an upstream-friendly path and you’re on a new enough kernel. Linux Kernel Mailing List citation
In recent technologies like Versal, QDMA has notable advantages in areas like hardened support (e.g., via the CPM5/QDMA Versal hard block), robust streaming and memory-mapped support with good Linux driver stability (e.g., AXI-MM), recent performance characterization with DPDK and generally more complete documentation.
For simpler or lower-performance PCIe applications that might not require a DMA at all, or require only simple DMA usage that is not QDMA or XDMA, such as in control plane applications, there are some alternative approaches.
For control path, UIO is often the best choice for simple devices (e.g., memory-mapped I/O, polling-based communication).
Advanced features like DMA, interrupt handling, and complex synchronization are sometimes harder or impossible to implement in user space, and therefore a customer Linux kernel driver should be considered. One such example where one might implement this is a PCIe-based driver for an I/O expansion FPGA where multiple I2C or SPI devices needs to be controlled on the target FPGA side over PCIe. In these cases, the FPGA-side Linux device drivers can often serve as a starting point for integrating the required functionality into a host-side PCIe driver.
Any licensing or support implications?
When using Yocto, there are generally no licensing or support implications, as Yocto is an open-source project. It is non-proprietary, meaning it can be freely used without concerns about licensing restrictions.
Additionally, AMD supports the automated generation of Software Bill of Materials (SBoM) and CVE (Common Vulnerabilities and Exposures) report creation. This is achieved using standard community tooling that integrates seamlessly with the Yocto Project.
What are the known migration myths?
This is a big change from before. Here are some common myths and how to mitigate them Top 3:
Format:
Myth: Shifting from menuconfig-driven PetaLinux workflows to command-line, recipe-driven Yocto workflows is harder.
Mitigation: Yocto Project industry standard has a wealth of information available for – from the Yocto Mega-Manual on the Yocto Project documentation page to YouTube videos, and many industry consultants. We recommend investing in Yocto training, creatinge starter templates that can be reused, and reference the documentation mapping PetaLinux concepts to Yocto equivalents.
Debug:
Myth: Tracing boot issues, bitstream loading, and kernel-device-tree interactions can be harder without PetaLinux tooling.
Mitigation: Yocto Project provides a wealth of automation and debug tooling. Many debug or loading features that PetaLinux provided were actually wrappers around Yocto Project equivalents.
Build System Complexity:
Myth: Learning and harmonizing BitBake terminology, layer management, and patch workflows can slow initial adoption.
Mitigation: Using native Yocto Project infrastructure uses the same basic concepts as PetaLinux (meta-layers, recipes, etc) because PetaLinux was a vendor-specific implementation of core Yocto Project tooling. For users new to using native Yocto Project, we recommend you to start with a minimal, board-specific layer (meta-yourboard) on top of meta-xilinx, with clear recipes for bitstream, DTB, and loader; gradually add complexity. Additionally, we highly recommend using the resources available on the AMD wiki for transation between PetaLinux commands/concepts and the native Yocto Project equivalents.
How will FPGA integration (e.g., bitstream loading) be managed in Yocto?
In Yocto Project, bitstream (or PDI/CDO content for Versal) data are included in the build area and can optionally be automatically included in the root filesystem.
Loading PL configuration data at runtime can be automated using the dfx-mgr tool. To use this tool, include it in your rootFS by setting the appropriate build configuration options. This tool automates loading and tracking PL payloads with associated device tree overlay data.
Managing PL content via Yocto Project keeps the bitstream lifecycle reproducible (via recipes, patches, and a dedicated service) and works across boards by adapting the loader to the target FPGA interface (e.g., Xilinx/Intel FPGA managers).
Are there Yocto equivalents for PetaLinux’s `petalinux-config` options?
Yes, in Yocto you achieve equivalent configuration control to PetaLinux’s petalinux-config by using Yocto’s project-level and target-specific configuration mechanisms
Global and machine configuration MACHINE, DISTRO, and DISTRO_FEATURES in conf/machine/*.conf and conf/local.conf to select target hardware, features (e.g., systemd, sysvinit, initscripts), and image behavior. Example: MACHINE = "versal-yocto"; DISTRO_FEATURES_append = " systemd" to enable systemd.
Layer and feature management bblayers.conf to enable/disable layers (e.g., meta-xilinx, meta-versal, meta-yourboard). IMAGE_FEATURES to toggle features like ssh, package-management, debug-tweaks, etc.
Kernel and bootloader customization Use recipes-kernel to apply Kconfig options (bitbake -c menuconfig virtual/kernel) or to patch defconfig/kconfig fragments. U-Boot options via the same approach (bitbake -c menuconfig u-boot) or patching. The “make menuconfig” option inside software repositories that support ncurses-based configuration management (Eg, Linux & U-Boot)
Device tree and FPGA flow Device-tree fragments (.dtsi) added via a kernel recipe or a dedicated dtb-fragment/*.bbappend file. FPGA manager/bitstream integration via patches or dedicated recipes (bitstream.bb, loader.bb) in a custom layer.
Why is the boot.scr file no longer produced by default for Versal and Versal2 boards, and what key changes does EFI introduce to the boot process after the transition from Distroboot to EFI boot?
This document is relevant only to the 2025.2 release and later as the UEFI boot flow in 2025.1 was based on the Distroboot flow.
AMD Embedded Development Framework (EDF) is intended to be complaint with the ARM System Ready specification which mandates the use of UEFI boot and UEFI based Capsule Update mechanism. As u-boot supports UEFI boot (or, a subset of it sufficient for this purposes), the u-boot configuration has been updated accordingly. This document outlines the u-boot to Linux kernel boot process using UEFI. Transition from Distro Boot (boot.scr) to EFI Boot Flow in EDF : Historically Xilinx/AMD embedded boards have booted using u-boots Distro Boot mechanism. This is implemented by means of a set of functions and variables in the u-boot environment which cycle through a number of boot options searching for a valid boot method. In practice, this usually means finding and executing a boot script (boot.scr) on a boot device. The boot script is then responsible for loading components and running the `booti …` command to hand control to the kernel. With the move to UEFI boot Distro Boot has been disabled - it is no longer the default boot command. In EDF images, boot scripts are no longer installed in the /boot partition and uboot will not search for them automatically. The Distro Boot functionality (functions and variables) are still available in the environment but would need to be executed from a u-boot command line manually. EFI System Partition (ESP) and UEFI environment : Per the UEFI spec, u-boot expects bootable media to contain a dedicated EFI System Partition (ESP) which must be first partition on the disk, must be formatted with fat32 (vfat) and must have a specific partition type in order to be detected correctly. Files stored in the ESP must also conform to a pre-defined directory structure and file naming convention. In practice, the ESP is used in a similar way to the /boot partition was used on Linux systems and contains all binaries and configuration files required for booting, such as the kernel Image, EFI executables, Xen config files and executables and second stange bootloader (systemd-boot/GRUB) executables and config files. u-boot maintains a UEFI specific environment , separate from its own environment, to store UEFI specific variables and values. You can print the UEFI environment from the u-boot console using print -e or manipulated the UEFI environment with commands such as eficonfig and efidebug. The UEFI environment is not persisted to OSPI as with u-boot’s own environment but is instead saved as a file, named ubootenv.var, to the active ESP. u-boot will use the first ESP it finds when enumerating devices and there is no way to influence which device it will find first so the behaviour is undefined when mutiple devices are in use .
|-- EFI
| `-- BOOT
| `-- bootaa64.efi
|-- Image
|-- loader
| |-- entries
| | |-- edf-linux.conf
| | `-- edf-xen.conf
| |-- loader.conf
| `-- random-seed
|-- ubootefi.var
|-- xen.cfg
`-- xen.efi u-boot boot device enumeration and bootmenu As defined in the UEFI spec, u-boot will enumerate all available boot media and dynamically generate UEFI boot entries to match these devices. These entries are labeled with a specific naming convention; mmc 0, mmc 1, usb 0, usb 1, etc. Versal> efidebug boot dump
Boot0000:
attributes: A-- (0x00000001)
label: mmc 0
file_path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000000000000)/SD(0)/SD(0)
data:
00000000: 4e ac 08 81 11 9f 59 4d 85 0e e2 1a 52 2c 59 b2 N.....YM....R,Y. The enumerated devices are listed in the UEFI variable BootOrder in the order in which they were found. If the bootefi bootmgboot command were used, u-boot would attempt to boot from each of the devices in order by attempting to executing an EFI binary of a specific name (<ESP>/BOOT/EFI/BOOTAA64.EFI) if it is present. This file could be a Kernel, bootloader, shim or any other valid EFI binary, u-boot will simply execute it. In EDF, the default u-boot boot command is set to bootmenu -e (for Versal or newer), which presents the user with a list of the auto-generated boot entries to choose from and has a short timeout. Depending on the number of devices detected and the specific hardware configuration of the board, the list shown will differ. *** U-Boot Boot Menu ***
mmc 0
usb 0
Exit
Press UP/DOWN to move, ENTER to select, ESC to quit The assignment of devices to names should be deterministic so the same devices should be assigned the same names on subsequent boots but as this process is done dynamically on each boot, the mapping may change if devices are added or removed. In other words, plugging in a second bootable USB key is not guaranteed to be assigned usb 1 as it might be found first by u-boot. systemd-boot systemd-boot (formally gummiboot) is a simple UEFI boot manager which has been subsumed into the systemd project and provides additional functionality which is not available to us in u-boot. The default EFI binary installed in the EDF ESP (discussed in the previous section) is systemd-boot along with the required configuration files.
EDF Xen
EDF Linux
─────────────────────
Boot in 5 s.
systemd-boot confirms to a bootloader configuration files standard which requires a loader directory in the ESP, a top level loader.conf and a single config file per boot option, for example edf-linux.conf and edf-xen.conf When the selected option is chosen (or the timeout expires) the boot manager will execute the boot configuration in the selected configuration file. The command line arguments passed to the Kernel or Xen use the partition UUID to identify the root filesystem which will be booted - this UUID is randomly generated during the build and will match in the partition information on the disk and in the bootloader configuration files. In other words, each image will have a different UUID and will allow the bootloader to identify specifically which root filesystem it should use to boot, especially in the scenario where multiple devices are connected concurrently. Flashing exactly the same image to multiple devices will likely result in undefined behaviour as the bootloader will boot whichever partition it finds first with the matching UUID. As shown in the menu above, systemd-boot has configuration files for EDF Linux (default) which is a Yocto Linux distribution and EDF Xen which boots the Xen binary and configuration in dom0-less mode before booting the kernel. In practice, the root filesystem is common to both of these boot options with the required Xen tools and configurations installed to be used when booting Xen. Capsule Update amd-edf:~$ FWUPD_UEFI_ESP_PATH=/efi sudo -E fwupdtool install uefi-capsule-versal-vek280-sdt-seg-bootfw-firmware.cab versal> efidebug boot add -b 6 "Capsule Update" mmc 0:1 EFI/UpdateCapsule
versal> efidebug boot next 6
versal> efidebug capsule disk-update UEFI environment and ubootenv.var The following is retained for information value but is largely only relevant to the 2025.1 release or if manual changes are being made to the u-boot UEFI environment The ubootenv.var is read from the root of the EFI System Partition (ESP) and is used to persist changes to the UEFI environment. This file can contain a list of boot options and boot order preference. u-boot will iterate through these boot settings, attempting to boot each in order until one boots. These boot options are usually named BootXXXX where XXXX is a hexadecimal number and the BootOrder setting will define the order in which these will be attempted. In the 2025.1 release, the Yocto build system pre-generated the ubootefi.var file and installed it in the ESP. As this is very difficult to maintain and updated, as well as issues relating to how u-boot deals with (or doesnt deal with) systems with multiple ESPs, this method of booting the system was removed in favour of using systemd-boot (outlined above). However, the recipe used to build the ubootefi.var file are still available in the code base if required. Setting U-Boot Arguments a. Boot Script Method: Automating the same steps using a boot.scr script: Step 1: Prepare script source (boot.cmd) Create a boot.cmd file using the attached content : Step 2: Generate boot.scr mkimage -c none -A arm64 -T script -d boot.cmd boot.scr Step 3: Transfer boot.scr via TFTP set the tftp path in systest terminal and then load to 0x40000000 via tftp versal2> tftpb 0x40000000 boot.scr Step 4: Execute the script versal2> source 0x40000000 log: b. EFI Boot Entry via efidebug stop at u-boot: Syntax: versal> efidebug boot add -b <boot_id> "<boot_label>" <device_type> <devnum:part> <kernel_path> -s '<kernel_cmdline>'
Versal> efidebug boot next <boot_id>
versal> boot <boot_id> – any unused number <boot_label> – descriptive text mmc / usb – depending on your device 0:1 – correct device:partition where ESP/root files live /Image – actual file you want to execute root=PARTUUID=... and other kernel arguments – matching your root filesystem and memory settings. Example: Versal> efidebug boot add -b 10 "Direct Kernel" mmc 0:1 /Image -s "root=PARTUUID=45923539-e493-4c18-9a29-5638c8bcb456 ro rootwait earlycon uio_pdrv_genirq.of_id=generic-uio cma=1024M"
Versal> efidebug boot order 10
versal2> boot From logs: [ 0.000000] Kernel command line: root=PARTUUID=45923539-e493-4c18-9a29-5638c8bcb456 ro rootwait earlycon uio_pdrv_genirq.of_id=generic-uio cma=1024M
log: ,
How do we configure EDF 2025.2 to use U-Boot distro boot (boot.scr) instead of UEFI boot ?
Overview By default, EDF 2025.2 uses UEFI boot with systemd-boot as the boot manager. However, you can configure it to use traditional U-Boot distro boot mechanism with boot.scr script. This FAQ provides step-by-step instructions for this migration. Key Differences Feature UEFI Boot (Default in 2025.2) Distro Boot Boot Manager systemd-boot U-Boot direct Boot Configuration EFI boot entries in /efi/loader/entries/ boot.scr script EFI_PROVIDER "systemd-boot" "" (unset) Partition Table GPT-hybrid MSDOS Root Detection PARTUUID Device path (/dev/mmcblk) Boot Package systemd-bootconf-edf u-boot-edf-scr Required Source Changes 1. meta-amd-adaptive-socs Layer Changes File: meta-amd-adaptive-socs-bsp/recipes-bsp/u-boot/u-boot-xlnx/u-boot-misc.cfg Description: Disable the PREBOOT configuration to prevent automatic environment initialization that interferes with distro boot. cd sources/meta-amd-adaptive-socs
vim meta-amd-adaptive-socs-bsp/recipes-bsp/u-boot/u-boot-xlnx/u-boot-misc.cfg
# Comment out both CONFIG_USE_PREBOOT and CONFIG_PREBOOT lines
-CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; mw 0xF1D61008 1;mw 0xF1090030 1;mw 0xF1D21008 0x1;mw 0xF1A20324 0xF;mw 0xF1A40004 0x2;mw 0xF1A40000 0x2;mw 0xEB410280 0x1;mw 0xEB410284 0x1;mw 0xEB410288 0x1;mw 0xEB41028C 0x1;mw 0xEB410290 0x1;mw 0xEB410294 0x1;mw 0xEB410298 0x1;mw 0xEB41029C 0x1;mw 0xF1060A00 0x1 1;mw 0xF1060A08 0xF"
+#CONFIG_USE_PREBOOT=y
+#CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; mw 0xF1D61008 1;mw 0xF1090030 1;mw 0xF1D21008 0x1;mw 0xF1A20324 0xF;mw 0xF1A40004 0x2;mw 0xF1A40000 0x2;mw 0xEB410280 0x1;mw 0xEB410284 0x1;mw 0xEB410288 0x1;mw 0xEB41028C 0x1;mw 0xEB410290 0x1;mw 0xEB410294 0x1;mw 0xEB410298 0x1;mw 0xEB41029C 0x1;mw 0xF1060A00 0x1 1;mw 0xF1060A08 0xF" 2. meta-amd-edf Layer Changes 2.1 Enable U-Boot Script for Versal File: conf/distro/amd-edf.conf Description: Add Versal platform to use u-boot-edf-scr boot script. cd sources/meta-amd-edf
vim conf/distro/amd-edf.conf
# Add the line: UBOOT_BOOT_SCRIPT_SOC_DEFAULT:versal = "u-boot-edf-scr"
# Boot script only required for Zynq, ZynqMP and Kria devices.
UBOOT_BOOT_SCRIPT_SOC_DEFAULT = ""
+UBOOT_BOOT_SCRIPT_SOC_DEFAULT:versal = "u-boot-edf-scr"
UBOOT_BOOT_SCRIPT_SOC_DEFAULT:zynq = "u-boot-edf-scr"
UBOOT_BOOT_SCRIPT_SOC_DEFAULT:zynqmp = "u-boot-edf-scr"
UBOOT_BOOT_SCRIPT_SOC_DEFAULT:kria:zynqmp = "u-boot-xlnx-scr" 2.2 Change U-Boot Boot Command File: recipes-bsp/u-boot/versal/bootcmd-bootefi.cfg Description: Change the boot command from UEFI bootmenu to distro boot. vim recipes-bsp/u-boot/versal/bootcmd-bootefi.cfg
# Change the CONFIG_BOOTCOMMAND value
-CONFIG_BOOTCOMMAND="bootmenu -e"
+CONFIG_BOOTCOMMAND="run distro_bootcmd" Step-by-Step Migration Procedure Step 1: Navigate to Your Build Directory cd /path/to/UEFI_to_Distro_boot_2025.2 Step 2: Apply Source Changes Apply all the changes listed in the "Required Source Changes" section above to the following layers: sources/meta-amd-adaptive-socs/ sources/meta-amd-edf/ Step 3: Initialize Build Environment source edf-init-build-env Step 4: Rebuild # Build the Boot.bin or OSPI image
MACHINE=versal-vrk160-sdt-seg bitbake edf-ospi
# Build SoC Common disk image (wic)
MACHINE=amd-cortexa72-common bitbake edf-linux-disk-image Booting VRK160 OSPI+SD: Booting VPK120 SD:
When Is It Recommended to Use the --template Option for a Custom Hardware Machine?
gen-machine-conf Template Usage Short Answer: Template usage depends on your boot mode configuration. Use --template for multi-stage boot (OSPI/QSPI → SD/UFS). Avoid it for single-stage SD boot use full gen-machine-conf command. Boot Mode Quick Reference Boot Mode Type Use Template? Recommendation Multi-Stage (OSPI/QSPI → SD/UFS) Yes Recommended; environment in OSPI/QSPI, rootfs on SD/UFS Single-Stage (SD Boot only) No Avoid template or disable CONFIG_PREBOOT When to USE the --template Option Recommended for EDF-based Custom Machines
For multi-stage boot (OSPI/QSPI → SD/UFS), using the --template option is recommended. Multi-Stage Boot Flow Details: Stage 1: OSPI/QSPI (Boot Components) BOOT.BIN stored in OSPI/QSPI Device tree blob (DTB) packaged in BOOT.BIN (first-stage boot media: OSPI/QSPI) for EDF flow U-Boot stored in OSPI/QSPI U-Boot environment resides in flash at fixed offset Environment automatically created on first boot Stage 2: SD/UFS (Kernel/Rootfs) Kernel Image loaded from SD/UFS Root filesystem on SD/UFS Environment Handling: Environment fully managed in OSPI/QSPI flash by U-Boot No dependency on uboot.env on SD/UFS Automatic environment creation on first boot Benefits: Faster boot (critical components in flash) Large storage for kernel/rootfs (SD/UFS) Matches EDF reference flows and templates Proven configuration used by AMD evaluation boards Example Command: # Using --template option
$ gen-machine-conf parse-sdt --template <path-to-your-own-template-yaml-file> \
--hw-description <path-to-sdt-handoff-dir> \
--machine-name <unique-machine-name>
Rationale: Templates are optimized for multi-stage boot Environment handling is correct for flash-based configurations Matches CED reference design boot flow When NOT to USE the --template Option Not Recommended: Single-Stage SD Boot For Single-Stage Boot SD Mode, avoid using the --template option as-is, or modify the template to prevent U-Boot environment errors. Issues with Templates in Single-Stage SD Boot: Problem: EDF templates include a CONFIG_PREBOOT in u-boot-misc.cfg that expects: Environment in flash (OSPI/QSPI), OR A valid uboot.env file on FAT partition On SD card boot, this leads to repeated environment error messages: Loading Environment from FAT...
*** Error - No Valid Environment Area found Root Cause: The template's preboot configuration assumes OSPI/QSPI flash with U-Boot environment at a fixed offset, which doesn't exist in SD boot mode. Recommended Approach for Single-Stage SD Boot: Option 1: Avoid Template (Recommended) Generate the machine configuration without --template: # Using without template and with custom layer
$ gen-machine-conf parse-sdt --hw-description <path-to-sdt-handoff-dir> \
-c <path-to-layer>/sources/meta-custom-bsp/conf Or use full command with multi config options: # Using full command with multi config options for eval board with ced designs
$ gen-machine-conf parse-sdt --hw-description <path-to-sdt-handoff-dir> \
-c <path-to-layer>/sources/meta-custom-bsp/conf -g full --machine-name <machine-name> \
--add-config CONFIG_YOCTO_BBMC_CORTEXR5_1_FREERTOS=y \
--add-config CONFIG_YOCTO_BBMC_CORTEXR5_0_BAREMETAL=y \
--domain-file ../sources/meta-xilinx/meta-xilinx-standalone-sdt/conf/domainyaml/openamp-overlay-versal.yaml \
-O versal-vek280-sdt-seg
Do NOT Inherit EDF Templates If Your Design: Does not use OSPI/QSPI as a primary boot device Uses a different flash layout than the EDF reference Implements a custom boot flow or non-standard environment handling Boots only from SD (single-stage SD boot) Uses a single combined BOOT.BIN with custom partitioning Bundles kernel/rootfs into FIT images stored in OSPI/QSPI with custom offsets Requires custom flash partition offsets different from EDF reference EDF Template Assumptions 1. OSPI/QSPI Flash Layout: Reserved space for U-Boot environment at a fixed offset Standard EDF partition layout Specific memory-mapped register configurations 2. Preboot Logic: Configured in: meta-amd-adaptive-socs/recipes-bsp/u-boot/u-boot-xlnx/u-boot-misc.cfg Contains hardware initialization sequences Expects environment in flash 3. Boot Flow: Multi-stage: OSPI/QSPI → SD/UFS Environment managed in flash No FAT-based environment on SD For custom boards or non-standard layouts, create a new machine configuration and customize: Flash partitioning Environment storage offsets CONFIG_PREBOOT and related boot scripts Boot device selection Quick Decision Tree What boot mode are you using?
│
├─ Multi-Stage (OSPI/QSPI → SD/UFS)
│ └─ Use --template
│ └─ EDF templates are optimized for this
│
└─ Single-Stage (SD-only boot)
└─ Don't use --template
└─ Use full gen-machine-conf command
OR
└─ Disable CONFIG_PREBOOT if using template
Why do EDF prebuilt images fail to boot on some VCK190/VMK180 boards, and which board should be selected to boot EDF prebuilt images old or new SD level shifter, and how should boards with the old SD level shifter be handled when using the new level BSP?
EDF Prebuilt Image Boot Failures on VCK190/VMK180 Boards Important information users: EDF boot.bin artifacts are generated targeting the new SD level shifter configuration only This is because current shipped VCK190/VMK180 boards use the new SD level shifter The new configuration provides improved signal integrity and compatibility This limitation is documented to avoid confusion for users EDF prebuilt images may fail to boot on VCK190/VMK180 boards with the old SD level shifter, use PetaLinux images or build custom EDF images with old-sd-levelshifter configuration EDF prebuilt images are validated and supported only on VCK190/VMK160 boards with the new SD level shifter configuration. The Nexperia Level Shifter that was included on some early VCK190 and VMK180 boards has been End-Of-Lifed. The BSP has been updated to match the timing of the new level shifter and is not compatible with the older one, therefore, boards with the older level shifter are not compatible with EDF prebuilt images. Supported configuration (EDF) New SD level shifter configuration EDF images are supported on boards with the new SD level shifter. Figure 1: New SD level shifter configuration (Supported for EDF) Unsupported configuration (EDF) Old SD level shifter configuration Boards with the old SD level shifter are not supported with EDF prebuilt images. Figure 2: Old SD level shifter configuration (Not supported for EDF) VCK190/VMK180 Board Selection: Old vs New SD Level Shifter When running EDF Prebuilt images, users must select boards with new-sd-levelshifter. Example : There are two versions of the board listed in Vivado. See below to determine which option to choose for your board's serial number. Versal-VCK190 Versal-VMK180 On the board, there is a sticker that has a number starting with 043. All 043-05005-01-101-xxxx (VCK190) and 043-05005-02-101-xxxx (VMK180), 043-05005-XX-1A-xxxx and later serials have the latest level shifter. The 101 variant is the first series of boards to ship with the latest level shifter captured in the BOM/Schematics. Select the "New SD Level Shifter" selection for these newer boards. Boards prior to those serial numbers and serials that are 4 digits have the old IP4856CX25/CZ. Select the "Versal VCK190 Evaluation Platform" for these boards. Usage guidance Some early VCK190 and VMK180 boards were manufactured with a Nexperia level shifter that has since been End‑Of‑Lifed (EOL). Newer boards use an New level shifter with different timing characteristics. To support this change: The BSP has been updated to match the timing of the new level shifter. This updated BSP is not compatible with the older SD level shifter. As a result, EDF prebuilt images will fail to boot on boards that use the older level shifter. To ensure correct booting of EDF prebuilt images, you must: Check the board serial number sticker on your VCK190 or VMK180. Identify whether your board has the new or old SD level shifter. Selecting the wrong board definition can lead to SD boot failure, even if the hardware appears functional. Quick Reference Table: Board Selection Guide Board Type Serial Number Pattern SD Level Shifter Type Vivado Board Selection VCK190 043-05005-01-101-xxxx New SD level shifter VCK190 – New SD Level Shifter VMK180 043-05005-02-101-xxxx New SD level shifter VMK180 – New SD Level Shifter VCK190 / VMK180 043-05005-XX-1A-xxxx and later New SD level shifter Select “New SD Level Shifter” option VCK190 / VMK180 Serial numbers prior to 101 variant or 4‑digit serials Old IP4856CX25 / CZ Versal VCK190 Evaluation Platform Handling Old SD Level Shifter Board with the New level BSP VCK190/VMK189 Old Level Shifter: Reuse Existing New-Level-Shifter EDF BSP by Replacing PDI When to Use This Procedure Use this flow if: Target hardware is VCK190/VMK180 old level shifter board. You already have EDF prebuilt boot artifacts (PLM/PSM/TF-A/U-Boot/DTB). You need a BOOT.BIN that boots correctly on old level shifter hardware. Key Idea Keep the existing EDF prebuilt software components, but replace only the boot PDI with a PDI generated from Vivado example project built for the old level shifter platform. Inputs Vivado 2026.1 environment. EDF prebuilt extracted folder containing: bootgen.bif plmfw.elf, psmfw.elf, arm-trusted-firmware.elf, u-boot.elf, cortexa72-linux.dtb New PDI generated from old-level-shifter Vivado example (example: new_seg_vck190_boot.pdi). Step 1: Generate PDI from Vivado Example (Old Level Shifter) Open Vivado and select Example Project. Choose template: EDF Base Design. In Default Part page, select Versal VCK190 Evaluation Platform (old level shifter target), not the “with New SD Level Shifter” platform. Finish project creation. Generate device image (from block design run/Generate Device Image). Collect generated boot PDI from your generated segment/output folder (example: new_seg_vck190_boot.pdi). Step 2: Copy New PDI into EDF Prebuilt Extracted Boot Folder Example working directory from validated run:
Yocto_edf_2026.1_latest_artifacts_versal-vck190-md_xilinx-bootbin/boot.bin-extracted Copy the old-level-shifter-generated PDI into this directory. Example: cp ../project_1/new_seg_vck190_boot.pdi . Step 3: Update bootgen.bif Edit bootgen.bif and replace the bootimage PDI entry. Before image {
{ type=bootimage, file=base-design.pdi }
{ type=bootloader, file=plmfw.elf }
{ core=psm, file=psmfw.elf }
} After image {
{ type=bootimage, file=new_seg_vck190_boot.pdi }
{ type=bootloader, file=plmfw.elf }
{ core=psm, file=psmfw.elf }
} Step 4: Regenerate BOOT.BIN source /proj/xbuilds/2026.1_daily_latest/installs/lin64/2026.1/Vivado/settings64.sh
bootgen -image bootgen.bif -arch versal -w -o BOOT.BIN Expected output: [INFO] : Bootimage generated successfully Step 5: Boot and Validate on Old Level Shifter Board Use generated BOOT.BIN for board boot. Validation checkpoints from known-good run: PLM loads all images (lpd, pl_cfi, aie_subsys, fpd, apu_ss) and reaches Boot PDI Load: Done. TF-A banner appears. U-Boot prompt appears. dhcp succeeds. mmc info should detect SD card (in successful run, SD card details were printed). If you still see SD voltage-select failure (Card did not respond to voltage select! : -110), confirm: Correct old-level-shifter platform was selected in Vivado. Updated PDI is actually referenced in bootgen.bif. New BOOT.BIN was used for boot (not stale prebuilt image). Warnings such as missing TPM/RNG/EFI persistent variables are common for this setup and are not the primary blocker for boot. Summary For old level shifter hardware, do not replace full EDF prebuilt software stack. Replace only the PDI with one generated from the old-level-shifter Vivado example project, rebuild BOOT.BIN with bootgen, and boot using this new image. Boot log: -
What is the purpose, applicability, usage, customization, and R52 impact of the U‑Boot PREBOOT CMN workaround?
U-Boot PREBOOT CMN Workaround Overview This document describes the CONFIG_PREBOOT workaround added to U-Boot configuration for AMD Adaptive SoCs, specifically addressing CMN (Coherent Mesh Network) and peripheral initialization requirements before the main boot process. Reference: u-boot-misc.cfg 1. Why This Workaround is Needed Background The PREBOOT environment variable executes commands before the main U-Boot boot-command runs. This workaround addresses several critical initialization requirements: Primary Reasons: CMN (Coherent Mesh Network) Initialization The CMN fabric requires specific register configurations before peripheral access Without proper CMN setup, certain peripherals may not be accessible or may cause system hangs Critical for multi-core coherency and system fabric communication Peripheral Power-On/Reset Sequencing Some peripherals require explicit enable/initialization before use Hardware errata workarounds for specific silicon revisions Ensures peripherals are in a known good state before Linux boot R52 Co-Processor Integration Configures shared resources between A72 (APU) and R52 (RPU) Sets up peripheral access permissions and clocking Prevents conflicts when R52 firmware accesses peripherals Boot Reliability Addresses race conditions in hardware initialization Ensures deterministic boot behavior across silicon variants Mitigates timing-related boot failures 2. Peripheral and Register Mapping Current Configuration Breakdown CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; \
mw 0xF1D61008 1; \
mw 0xF1090030 1; \
mw 0xF1D21008 0x1; \
mw 0xF1A20324 0xF; \
mw 0xF1A40004 0x2; \
mw 0xF1A40000 0x2; \
mw 0xEB410280 0x1; \
mw 0xEB410284 0x1; \
mw 0xEB410288 0x1; \
mw 0xEB41028C 0x1; \
mw 0xEB410290 0x1; \
mw 0xEB410294 0x1; \
mw 0xEB410298 0x1; \
mw 0xEB41029C 0x1; \
mw 0xF1060A00 0x1 1; \
mw 0xF1060A08 0xF" Register Details Address Range Peripheral/Function Purpose Value Notes 0xF1D61008 CMN Main Control Enable CMN fabric 0x1 Critical for coherency 0xF1090030 System Level Control System initialization 0x1 Platform-specific 0xF1D21008 CMN Secondary Control CMN configuration 0x1 Related to mesh network 0xF1A20324 Peripheral Clock/Reset Enable peripheral clocks 0xF Bitmask for multiple peripherals 0xF1A40004 Peripheral Control 1 Power/reset control 0x2 Specific peripheral enable 0xF1A40000 Peripheral Control 2 Power/reset control 0x2 Specific peripheral enable 0xEB410280 CMN Node Config 0 CMN node initialization 0x1 First CMN node 0xEB410284 CMN Node Config 1 CMN node initialization 0x1 Second CMN node 0xEB410288 CMN Node Config 2 CMN node initialization 0x1 Third CMN node 0xEB41028C CMN Node Config 3 CMN node initialization 0x1 Fourth CMN node 0xEB410290 CMN Node Config 4 CMN node initialization 0x1 Fifth CMN node 0xEB410294 CMN Node Config 5 CMN node initialization 0x1 Sixth CMN node 0xEB410298 CMN Node Config 6 CMN node initialization 0x1 Seventh CMN node 0xEB41029C CMN Node Config 7 CMN node initialization 0x1 Eighth CMN node 0xF1060A00 Interrupt Controller IRQ enable/config 0x1 Byte write (size=1) 0xF1060A08 Interrupt Mask IRQ mask register 0xF Enable specific interrupts Peripherals Affected Based on the register addresses, this workaround impacts: CMN (Coherent Mesh Network) All 8 CMN nodes (0xEB410280 - 0xEB41029C) CMN main and secondary controllers Impact: Multi-core cache coherency, DDR access, DMA operations System Interrupt Controller GIC (Generic Interrupt Controller) configuration Impact: Interrupt routing, R52 interrupt handling Peripheral Power and Clock Management Clock gating controls Reset sequencing Impact: PCIe, USB, Ethernet peripherals Cross-Domain Resources (APU/RPU) Shared peripheral access Impact: R52 co-processor communication 3. Custom Flow User Integration When to Add This Workaround Custom flow users should add this workaround when: Using CMN-enabled AMD Adaptive SoC platforms (Versal Premium, Versal AI Edge) Experiencing boot hangs during U-Boot or kernel initialization Peripheral detection failures (missing devices in Linux) R52 firmware integration requiring peripheral sharing Multi-core applications requiring cache coherency NOT needed for Zynq-7000 (no CMN) NOT needed for Zynq UltraScale+ MPSoC (different architecture) How to Add for Custom Flow Option A: Modify U-Boot Device Tree (Recommended) Add to your platform's device tree environment node: / {
chosen {
u-boot,preboot = "if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; \
mw 0xF1D61008 1; \
mw 0xF1090030 1; \
mw 0xF1D21008 0x1; \
mw 0xF1A20324 0xF; \
mw 0xF1A40004 0x2; \
mw 0xF1A40000 0x2; \
mw 0xEB410280 0x1; \
mw 0xEB410284 0x1; \
mw 0xEB410288 0x1; \
mw 0xEB41028C 0x1; \
mw 0xEB410290 0x1; \
mw 0xEB410294 0x1; \
mw 0xEB410298 0x1; \
mw 0xEB41029C 0x1; \
mw 0xF1060A00 0x1 1; \
mw 0xF1060A08 0xF";
};
}; Option B: U-Boot Configuration File Create/modify u-boot-misc.cfg in your U-Boot build: CONFIG_USE_PREBOOT=y
CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; mw 0xF1D61008 1;mw 0xF1090030 1;mw 0xF1D21008 0x1;mw 0xF1A20324 0xF;mw 0xF1A40004 0x2;mw 0xF1A40000 0x2;mw 0xEB410280 0x1;mw 0xEB410284 0x1;mw 0xEB410288 0x1;mw 0xEB41028C 0x1;mw 0xEB410290 0x1;mw 0xEB410294 0x1;mw 0xEB410298 0x1;mw 0xEB41029C 0x1;mw 0xF1060A00 0x1 1;mw 0xF1060A08 0xF"
CONFIG_BOOTCOMMAND="bootmenu -e;" Apply during U-Boot build: ./scripts/kconfig/merge_config.sh .config /path/to/u-boot-misc.cfg 4. Customer Customization Guide How to Modify for Custom Peripherals Step 1: Identify Your Peripheral Requirements Consult your hardware reference manual for: Peripheral base addresses Required initialization registers Reset/enable bit positions Clock dependencies Step 2: Determine Register Addresses Example for adding a custom peripheral at base address 0xF2000000: # Enable peripheral clock (hypothetical register)
mw 0xF1A20328 0x1
# Release peripheral reset
mw 0xF2000000 0x3
# Configure peripheral mode
mw 0xF2000004 0x100 Step 3: Add to PREBOOT Command Append your commands to the existing PREBOOT: CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; \
mw 0xF1D61008 1; \
... [existing commands] ... \
mw 0xF1060A08 0xF; \
mw 0xF1A20328 0x1; \
mw 0xF2000000 0x3; \
mw 0xF2000004 0x100" Step 4: Maintain CMN Configuration CRITICAL: Always keep CMN-related commands: mw 0xF1D61008 1 - CMN main enable mw 0xEB410280 - 0xEB41029C - CMN node enables Removing these will cause system instability. Conditional Peripheral Initialization For designs where peripherals are optionally present: CONFIG_PREBOOT="if test -n \"${firstboot_saveenv}\"; then run firstboot_saveenv; fi; \
mw 0xF1D61008 1; \
... [CMN init] ... \
if test \"${has_custom_periph}\" = \"yes\"; then \
mw 0xF2000000 0x3; \
fi" Debugging Custom Additions Enable U-Boot debug output: setenv bootdelay 5
setenv verify yes
# Run each mw command manually to verify
mw 0xF2000000 0x3
md 0xF2000000 1 # Read back to verify write 5. Impact on R52 Users R52 Architecture Overview The R52 cores (RPU - Real-time Processing Unit) share system resources with A72 cores (APU - Application Processing Unit): Shared peripherals: UART, timers Shared memory: DDR Shared interconnect: CMN fabric Critical Impacts on R52 Users 1. CMN Configuration Impact Issue: R52 requires CMN to be properly initialized for DDR and peripheral access If APU (Linux) initializes CMN differently than expected by R52 firmware, conflicts arise Symptoms: R52 firmware hangs when accessing peripherals DMA failures from R52 Data corruption in shared memory Mitigation:
The PREBOOT workaround ensures CMN is initialized before R52 firmware starts, creating a stable baseline. R52 User Action Required: // In R52 firmware, verify CMN is ready before peripheral access
#define CMN_STATUS_REG 0xF1D61008
while (!(*(volatile uint32_t*)CMN_STATUS_REG & 0x1)) {
// Wait for CMN initialization by U-Boot
} 2. Peripheral Ownership Conflicts Issue: Both APU and RPU may attempt to initialize the same peripheral Register writes from PREBOOT affect R52's view of peripheral state Example Conflict - UART: Address 0xF1A40004 = 0x2 (from PREBOOT)
|
+-- May enable UART clock that R52 firmware doesn't expect R52 User Action Required: Document peripheral ownership in system design: APU owns: UART0, I2C0, SPI0
RPU owns: UART1, CAN0, CAN1
Shared: I2C1 (mutex required) Coordinate initialization - Don't re-initialize peripherals in R52 if PREBOOT already configured them Use IPI (Inter-Processor Interrupt) for handshaking: // R52 waits for APU to complete peripheral init
wait_for_ipi_from_apu();
// Now safe to use peripheral 3. Interrupt Routing Impact Issue: mw 0xF1060A00 0x1 1 # IRQ enable
mw 0xF1060A08 0xF # IRQ mask These affect GIC (interrupt controller) shared by APU and RPU. R52 User Action Required: Verify R52 interrupt routing in GIC is not overridden Configure R52-specific interrupts after PREBOOT completes Use separate interrupt groups for APU/RPU 4. Boot Ordering Dependencies Two R52 Boot Scenarios: Scenario A: R52 Boots Before Linux (Early Boot) FSBL → R52 Firmware → U-Boot → [PREBOOT] → Linux R52 already running when PREBOOT executes PREBOOT may modify peripheral state R52 is using Required: R52 firmware must be resilient to peripheral state changes Scenario B: Linux Boots R52 (Late Boot) FSBL → U-Boot → [PREBOOT] → Linux → Load R52 Firmware PREBOOT completes before R52 starts R52 sees stable peripheral state