Linux and PetaLinux on Zynq
Understand the kernel, user space, Device Tree and safe paths for accessing PL hardware.
Why use an operating system
A standalone, or bare-metal, application directly controls the processor without a complete operating system. Linux adds isolated processes, threads, scheduling, virtual memory, file systems, networking and a driver model.
These services add context-switch, interrupt and memory-management latency. Linux suits rich interfaces, networking, storage and complex applications. A deterministic control loop can remain on the RPU or in the PL.
User space and kernel space
A user program should not freely access every physical register. It requests a service from the kernel, the privileged core of Linux, through a system call. The kernel checks permissions and delegates the operation to a driver.
| Layer | Responsibility |
|---|---|
| Application | Algorithm and product behavior |
| Library | Stable application API |
| Kernel | Processes, memory, interrupts and security |
| Driver | Translation between kernel API and hardware |
| Hardware | Registers, DMA, interrupts and streams |

PetaLinux and the Device Tree
PetaLinux groups AMD tools for building Linux systems for FPGA SoCs. It uses Yocto, cross-compilation tools and the exported hardware description.
The flow creates a project, imports hardware, configures kernel and root file system, builds images, packages boot and deploys to the board. Hardware and software must remain synchronized.
The Device Tree is a structured hardware description read by the Linux kernel at boot. It describes devices the kernel cannot discover automatically. A custom AXI node can provide its address, range, interrupt, clocks and compatible string. This string lets the kernel select the matching driver.
led_controller@a0000000 {
compatible = "fpgapourtous,led-controller-1.0";