You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Targets.md
+43-20Lines changed: 43 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3396,16 +3396,18 @@ Entering idle loop...
3396
3396
3397
3397
AMD/Xilinx Zynq-7000 (XC7Z020) on the ZC702 Evaluation Kit - dual ARM Cortex-A9 (ARMv7-A 32-bit), 1 GB DDR3, 16 MB QSPI NOR (N25Q128A), SDIO, dual UART. Older sibling of the ZynqMP family - distinct silicon, different controllers (`XQspiPs` not `XQspiPsu`, Arasan SDHCI v2.0 not v3.0, no CSU/PMU/PUF, PL310 L2).
3398
3398
3399
-
wolfBoot is loaded by the Xilinx Zynq-7000 FSBL into DDR:
3399
+
wolfBoot replaces U-Boot in the Zynq-7000 boot flow -- there is no
3400
+
U-Boot stage. wolfBoot is loaded by the Xilinx Zynq-7000 FSBL into
3401
+
DDR:
3400
3402
```
3401
-
BootROM -> FSBL -> wolfBoot -> signed app (or U-Boot/Linux)
3403
+
BootROM -> FSBL -> wolfBoot -> signed app or Linux kernel
3402
3404
```
3403
3405
3404
3406
The FSBL handles all PS init (DDR, MIO, clocks, QSPI ref clock); wolfBoot only initializes UART, the QSPI controller, runs the verify/swap logic, and chain-loads the next stage.
3405
3407
3406
3408
This target supports:
3407
-
-**QSPI boot** (primary): `config/examples/zynq7000.config` -- one config for bare-metal, U-Boot, and Linux payloads (LINUX_PAYLOAD=1 + MMU=1 + ELF=1; bare-metal apps don't pay any runtime cost beyond ~5 KB of unused FDT/MMU code).
3408
-
-**SD card boot**: `config/examples/zc702_sdcard.config` -- bare-metal payload from MBR-partitioned SD via the generic SDHCI driver and the Arasan v2.0 translation in `hal/zynq7000.c`.
3409
+
-**QSPI boot** (primary): `config/examples/zynq7000.config` -- one config for both bare-metal and Linux payloads (LINUX_PAYLOAD=1 + MMU=1 + ELF=1; bare-metal apps don't pay any runtime cost beyond ~5 KB of unused FDT/MMU code).
3410
+
-**SD card boot**: `config/examples/zynq7000_sdcard.config` -- bare-metal **and** Linux payloads from MBR-partitioned SD via the generic SDHCI driver and the Arasan v2.0 translation in `hal/zynq7000.c`.
3409
3411
-**JTAG-loaded dev** via Platform Cable II + xsdb (no flash required).
3410
3412
3411
3413
### Prerequisites
@@ -3438,7 +3440,7 @@ Key options in `config/examples/zynq7000.config`:
3438
3440
-`ARCH=ARM` - 32-bit ARM
3439
3441
-`TARGET=zynq7000` - selects `hal/zynq7000.{c,h,ld}` and the `CORTEX_A9` arch.mk block
3440
3442
-`SIGN=ECC256` / `HASH=SHA256` - smaller and faster than RSA on Cortex-A9
3441
-
-`LINUX_PAYLOAD=1 MMU=1 ELF=1` - lets the same image boot Linux/U-Boot or bare-metal. `do_boot` switches to the ARM Linux boot ABI (`r0=0`, `r1=~0`, `r2=DTB_phys`, `r3=0`) which bare-metal apps simply ignore. `MMU=1` enables `update_ram.c`'s DTB-load codepath and pulls in `src/fdt.o`; wolfBoot does not manage page tables (it inherits FSBL's flat 1:1 DDR mapping). `ELF=1` lets wolfBoot understand `vmlinux` / `u-boot.elf` inputs and load only their LOAD segments. Cost over a strictly bare-metal-only build: ~5 KB extra wolfBoot binary (31 KB -> 36 KB).
3443
+
-`LINUX_PAYLOAD=1 MMU=1 ELF=1` - lets the same image boot Linux or bare-metal. `do_boot` switches to the ARM Linux boot ABI (`r0=0`, `r1=~0`, `r2=DTB_phys`, `r3=0`) which bare-metal apps simply ignore. `MMU=1` enables `update_ram.c`'s DTB-load codepath and pulls in `src/fdt.o`; wolfBoot does not manage page tables (it inherits FSBL's flat 1:1 DDR mapping). `ELF=1` lets wolfBoot understand ELF inputs (e.g. `vmlinux`) and load only their LOAD segments. Cost over a strictly bare-metal-only build: ~5 KB extra wolfBoot binary (31 KB -> 36 KB).
3442
3444
-`EXT_FLASH=1` - QSPI as external flash via `XQspiPs`
3443
3445
-`WOLFBOOT_LOAD_ADDRESS=0x10000000` - DDR offset 256 MB, where the verified app is staged before `do_boot`. Must be **above** wolfBoot's own region (`0x04000000`-`0x040FFFFF`) because `src/update_ram.c` enforces `dst > _end`.
3444
3446
-`WOLFBOOT_LOAD_DTS_ADDRESS=0x11000000` - DDR offset 272 MB, where a DTB read out of `PART_DTS_BOOT` would be relocated. Ignored for bare-metal payloads and for the appended-DTB Linux flow (where the DTB lives at the end of the signed kernel image).
@@ -3478,10 +3480,10 @@ The result is a 32-bit ARM ELF with entry point `0x04000000` and `.text` start a
`bootgen` ships with Vitis. The `.bif` template at `tools/scripts/zc702/zc702_qspi.bif` is the minimum bootable image; add `download.bit` and a DTB if you also need to load the PL bitstream and a Linux device tree (see Milestone 5).
3486
+
`bootgen` ships with Vitis. The `.bif` template at `tools/scripts/zynq7000/zynq7000_qspi.bif` is the minimum bootable image; add `download.bit` and a DTB if you also need to load the PL bitstream and a Linux device tree (see Milestone 5).
3485
3487
3486
3488
### Programming QSPI
3487
3489
@@ -3517,7 +3519,7 @@ For driver bring-up or quick iteration, skip bootgen and load directly via Platf
3517
3519
3518
3520
```sh
3519
3521
source /opt/Xilinx/2025.2/Vitis/settings64.sh # once per shell
3520
-
xsdb tools/scripts/zc702/jtag_load.tcl
3522
+
xsdb tools/scripts/zynq7000/jtag_load.tcl
3521
3523
```
3522
3524
3523
3525
The script runs the prebuilt FSBL (PS init: DDR/MIO/clocks/UART), then loads `wolfboot.elf` over the top, sets PC to `0x04000000` and CPSR to SVC with IRQ/FIQ masked, and resumes. Override paths via `FSBL_ELF=...` or `WOLFBOOT_ELF=...` env vars.
`program_flash` ships with Vitis. Then run wolfBoot via `xsdb tools/scripts/zc702/jtag_load.tcl` - it should verify and chain-load the test app, producing the heartbeat output above.
3572
+
`program_flash` ships with Vitis. Then run wolfBoot via `xsdb tools/scripts/zynq7000/jtag_load.tcl` - it should verify and chain-load the test app, producing the heartbeat output above.
3571
3573
3572
3574
### QSPI driver self-test (`TEST_EXT_FLASH`)
3573
3575
3574
3576
To exercise the `XQspiPs` driver in isolation - read JEDEC ID, sector erase + page program + linear-mode read-back of a 256-byte pattern at `0x200000`:
3575
3577
3576
3578
```sh
3577
3579
make CFLAGS_EXTRA=-DTEST_EXT_FLASH wolfboot.elf
3578
-
xsdb tools/scripts/zc702/jtag_load.tcl
3580
+
xsdb tools/scripts/zynq7000/jtag_load.tcl
3579
3581
```
3580
3582
3581
3583
Expected output:
@@ -3616,10 +3618,14 @@ For TX-only commands sent without RX capture, `qspi_xfer4` picks `TXD1`/`TXD2`/`
3616
3618
3617
3619
### SD card boot (Milestone 6)
3618
3620
3619
-
`config/examples/zc702_sdcard.config` enables SD-card boot via the generic
3621
+
`config/examples/zynq7000_sdcard.config` enables SD-card boot via the generic
3620
3622
SDHCI driver (`src/sdhci.c`) with HAL hooks in `hal/zynq7000.c` that
3621
3623
translate the driver's Cadence SD4HC register layout to the Arasan
3622
-
SDHCI v2.0 standard layout used by the Zynq-7000 controller.
3624
+
SDHCI v2.0 standard layout used by the Zynq-7000 controller. The config
3625
+
sets `LINUX_PAYLOAD=1 MMU=1 ELF=1` so the same SD-card image can chain-
3626
+
load either a bare-metal app or a signed appended-DTB Linux zImage --
3627
+
Linux-from-SD is verified end-to-end on ZC702 (full kernel banner +
3628
+
SMP + driver init through to rootfs panic).
3623
3629
3624
3630
**Strap**: SW16-3 + SW16-4 ON (others OFF). `BOOT_MODE_REG = 0x5`.
3625
3631
@@ -3631,18 +3637,29 @@ SDHCI v2.0 standard layout used by the Zynq-7000 controller.
3631
3637
| p2 | 0x83 Linux raw | 16 MB | Signed boot image (`BOOT_PART_A=1`) |
3632
3638
| p3 | 0x83 Linux raw | 16 MB | Signed update image (`BOOT_PART_B=2`) |
3633
3639
3634
-
`tools/scripts/zc702/prepare_sdcard.sh` lays this out (parted msdos +
3640
+
`tools/scripts/zynq7000/prepare_sdcard.sh` lays this out (parted msdos +
3635
3641
manual MBR type/active patch + dd of signed images).
0 commit comments