doc: arch/powerpc: add architecture documentation
cover doc: arch/powerpc: add architecture documentation
There is no proper PowerPC page under doc/arch, everything is in the README files scattered around the boards. Add an overview, the mpc85xx boot image layouts and a PBL guide, with the PBL one covering the practical bits like building, flashing and not bricking the board.
Bradley Morgan (3):
doc: arch/powerpc: add an overview
doc: arch/powerpc: document the mpc85xx boot images
doc: arch/powerpc: add a PBL guide
doc/arch/index.rst | 1 + doc/arch/powerpc/boot.rst | 59 ++++++++++++ doc/arch/powerpc/index.rst | 12 +++ doc/arch/powerpc/pbl.rst | 144 +++++++++++++++++++++++++++++ doc/arch/powerpc/powerpc.rst | 169 +++++++++++++++++++++++++++++++++++ 5 files changed, 385 insertions(+) create mode 100644 doc/arch/powerpc/boot.rst create mode 100644 doc/arch/powerpc/index.rst create mode 100644 doc/arch/powerpc/pbl.rst create mode 100644 doc/arch/powerpc/powerpc.rst
Signature · 1 line
2.47.3
PATCH 1/3 doc: arch/powerpc: add an overview
PowerPC support is split over three CPU families and the only bits written down are in the README files next to the boards. Add an arch page covering the families, the boards, how to build and the config options people keep asking about.
--- doc/arch/index.rst | 1 + doc/arch/powerpc/index.rst | 10 +++ doc/arch/powerpc/powerpc.rst | 166 +++++++++++++++++++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 doc/arch/powerpc/index.rst create mode 100644 doc/arch/powerpc/powerpc.rst
doc/arch/index.rst +1 -0
@@ -12,6 +12,7 @@ Architecture-specific doc m68k mips nios2 + powerpc/index riscv sandbox/index sh
doc/arch/powerpc/index.rst new file +10 -0
@@ -0,0 +1,10 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2026, Bradley Morgan <[email protected]> + +PowerPC +======= + +.. toctree:: + :maxdepth: 2 + + powerpc
doc/arch/powerpc/powerpc.rst new file +166 -0
166 lines not on this page · raw message
Signature · 1 line
2.47.3
PATCH 2/3 doc: arch/powerpc: document the mpc85xx boot images
In reply to Bradley MorganBoards boot from NOR, through a PBL image the BootROM runs, or with a TPL and SPL pair out of NAND, and the image layout changes with each. Write the layouts and the config options that control them down so nobody has to figure it out from the linker scripts again.
--- doc/arch/powerpc/boot.rst | 57 ++++++++++++++++++++++++++++++++++++ doc/arch/powerpc/index.rst | 1 + doc/arch/powerpc/powerpc.rst | 4 ++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 doc/arch/powerpc/boot.rst
doc/arch/powerpc/boot.rst new file +57 -0
@@ -0,0 +1,57 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. Copyright (C) 2026, Bradley Morgan <[email protected]> + +Boot images on MPC85xx +====================== + +There are two boot models and the image layout tells you which one you +are dealing with. + +NOR flash +--------- + +U-Boot is linked for CONFIG_TEXT_BASE and u-boot.bin goes straight to +flash. If the SoC has a boot page (CONFIG_MPC85XX_HAVE_RESET_VECTOR), +the reset vector sits at the top of the 4K page, 0xfffffffc. + +With CONFIG_OF_SEPARATE, binman glues u-boot-dtb.bin together using +arch/powerpc/dts/u-boot.dtsi. For a RAM image without a reset vector, +CONFIG_SYS_MPC85XX_NO_RESETVEC throws .resetvec away and moves .bootpg +up. + +RAMBOOT +------- + +RAMBOOT means the BootROM loads the image for you. Depending on the +board that is SD, SPI or NAND, and the defconfig name says which: + +* P2041RDB_SDCARD_defconfig, P2041RDB_SPIFLASH_defconfig +* T1024RDB_SDCARD_defconfig, T1024RDB_SPIFLASH_defconfig, + T1024RDB_NAND_defconfig +* T2080RDB_SDCARD_defconfig, T2080RDB_SPIFLASH_defconfig, + T2080RDB_NAND_defconfig + +These select CONFIG_RAMBOOT_PBL and build a PBL image instead of a plain +u-boot.bin: + +* u-boot.pbl, when U-Boot proper is the only stage +* u-boot-with-spl-pbl.bin, when CONFIG_SPL_FSL_PBL is set and an SPL runs + first + +NAND +---- + +Some P1010 and P1020 boards boot from NAND with a TPL in L2 SRAM that +sets up DDR, then an SPL that loads U-Boot proper. That is the +CONFIG_TPL and CONFIG_SPL_INIT_MINIMAL setup in the _NAND defconfigs. + +SPL builds in general also produce u-boot-with-spl.bin, which is SPL +plus U-Boot proper padded to CONFIG_SPL_PAD_TO. + +SD and SPI, the other way +------------------------- + +The BootROM also handles raw SD and SPI images that carry their own boot +sector. Either let CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR prepend one for +eSDHC, or use the external boot_format tool. See +doc/README.mpc85xx-sd-spi-boot and doc/README.ramboot-ppc85xx.
doc/arch/powerpc/index.rst +1 -0
@@ -8,3 +8,4 @@ PowerPC :maxdepth: 2 powerpc + boot
doc/arch/powerpc/powerpc.rst +3 -1
@@ -130,7 +130,8 @@ MPC85xx: See doc/README.mpc85xx-spin-table. * CONFIG_MPC85XX_HAVE_RESET_VECTOR, CONFIG_SYS_MPC85XX_NO_RESETVEC and - CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR are the image layout knobs. + CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR are the image layout knobs, they + are explained in :doc:`/arch/powerpc/boot`. Device trees ------------
@@ -157,6 +158,7 @@ No magic here, other architectures do the same. More reading ------------ +* :doc:`/arch/powerpc/boot` * doc/README.pblimage * doc/README.ramboot-ppc85xx * doc/README.mpc85xx-sd-spi-boot
Signature · 1 line
2.47.3
PATCH 3/3 doc: arch/powerpc: add a PBL guide
In reply to Bradley MorganThe PBL side is the fun part and most of it lives in people's heads. Explain what the RCW and PBI files are, how to build and flash the image, what to watch out for before somebody bricks their board, and what it takes to add PBL support for a new one.
--- doc/arch/powerpc/boot.rst | 2 + doc/arch/powerpc/index.rst | 1 + doc/arch/powerpc/pbl.rst | 144 +++++++++++++++++++++++++++++++++++ doc/arch/powerpc/powerpc.rst | 1 + 4 files changed, 148 insertions(+) create mode 100644 doc/arch/powerpc/pbl.rst
doc/arch/powerpc/boot.rst +2 -0
@@ -38,6 +38,8 @@ u-boot.bin: * u-boot-with-spl-pbl.bin, when CONFIG_SPL_FSL_PBL is set and an SPL runs first +Poking at those images has its own page, see :doc:`/arch/powerpc/pbl`. + NAND ----
doc/arch/powerpc/index.rst +1 -0
@@ -9,3 +9,4 @@ PowerPC powerpc boot + pbl
doc/arch/powerpc/pbl.rst new file +144 -0
144 lines not on this page · raw message
doc/arch/powerpc/powerpc.rst +1 -0
@@ -159,6 +159,7 @@ More reading ------------ * :doc:`/arch/powerpc/boot` +* :doc:`/arch/powerpc/pbl` * doc/README.pblimage * doc/README.ramboot-ppc85xx * doc/README.mpc85xx-sd-spi-boot
Signature · 1 line
2.47.3
Quoted 16 lines · Bradley Morgan
There is no proper PowerPC page under doc/arch, everything is in the README files scattered around the boards. Add an overview, the mpc85xx boot image layouts and a PBL guide, with the PBL one covering the practical bits like building, flashing and not bricking the board.
Bradley Morgan (3):
doc:arch/powerpc: add an overview
doc:arch/powerpc: document the mpc85xx boot images
doc:arch/powerpc: add a PBL guidedoc/arch/index.rst | 1 + doc/arch/powerpc/boot.rst | 59 ++++++++++++ doc/arch/powerpc/index.rst | 12 +++ doc/arch/powerpc/pbl.rst | 144 +++++++++++++++++++++++++++++ doc/arch/powerpc/powerpc.rst | 169 +++++++++++++++++++++++++++++++++++ 5 files changed, 385 insertions(+)
Quoted 4 lines
create mode 100644
doc/arch/powerpc/boot.rst
create mode 100644doc/arch/powerpc/index.rst
create mode 100644doc/arch/powerpc/pbl.rst
create mode 100644doc/arch/powerpc/powerpc.rst
Self-NAK, wing it and do a V2 and add a new doc with it to make life betterin the future :)
Quoted 2 lines
--- Thanks!