summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-07-10 21:29:14 +0300
committerTom Rini <trini@konsulko.com>2023-07-10 21:29:14 +0300
commit146a82c017d51eb2c3b8be33854f200f1e52a1cb (patch)
treec2bb134d105bcc9855e6c39ac5b422e5416735ff /doc
parent05aa6516c6bb419d01d69fac457c0de563bfd694 (diff)
parent76c61f29d63163d178b1584ecc9fc2c96c538ff0 (diff)
downloadu-boot-146a82c017d51eb2c3b8be33854f200f1e52a1cb.tar.xz
Merge branch 'next'
Diffstat (limited to 'doc')
-rw-r--r--doc/README.pcap2
-rw-r--r--doc/README.rmobile1
-rw-r--r--doc/README.s5p44182
-rw-r--r--doc/SPL/README.spl-secure-boot4
-rw-r--r--doc/board/amlogic/index.rst1
-rw-r--r--doc/board/amlogic/p201.rst2
-rw-r--r--doc/board/amlogic/p212.rst2
-rw-r--r--doc/board/amlogic/s400.rst2
-rw-r--r--doc/board/amlogic/videostrong-kii-pro.rst112
-rw-r--r--doc/board/emulation/qemu-arm.rst2
-rw-r--r--doc/board/microchip/mpfs_icicle.rst6
-rw-r--r--doc/board/nxp/ls1046ardb.rst2
-rw-r--r--doc/board/nxp/mx6sabresd.rst2
-rw-r--r--doc/board/rockchip/rockchip.rst6
-rw-r--r--doc/board/sifive/unmatched.rst2
-rw-r--r--doc/board/socionext/developerbox.rst154
-rw-r--r--doc/board/st/stm32mp1.rst2
-rw-r--r--doc/board/ti/j7200_evm.rst332
-rw-r--r--doc/board/ti/k3.rst1
-rw-r--r--doc/board/xen/xenguest_arm64.rst10
-rw-r--r--doc/build/clang.rst36
-rw-r--r--doc/develop/driver-model/bind.rst2
-rw-r--r--doc/develop/driver-model/fs_firmware_loader.rst6
-rw-r--r--doc/develop/uefi/uefi.rst68
-rw-r--r--doc/device-tree-bindings/firmware/firmware-version.txt22
-rw-r--r--doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml105
-rw-r--r--doc/mkeficapsule.110
-rw-r--r--doc/mkfwumdata.189
-rw-r--r--doc/sphinx/requirements.txt2
-rw-r--r--doc/usage/cmd/source.rst2
-rw-r--r--doc/usage/dfu.rst2
31 files changed, 940 insertions, 51 deletions
diff --git a/doc/README.pcap b/doc/README.pcap
index 8e30b93c66..10318ef0a9 100644
--- a/doc/README.pcap
+++ b/doc/README.pcap
@@ -1,6 +1,6 @@
PCAP:
-U-boot supports live Ethernet packet capture in PCAP(2.4) format.
+U-Boot supports live Ethernet packet capture in PCAP(2.4) format.
This is enabled by CONFIG_CMD_PCAP.
The capture is stored on physical memory, and should be copied to
diff --git a/doc/README.rmobile b/doc/README.rmobile
index ea170a25a6..524d839558 100644
--- a/doc/README.rmobile
+++ b/doc/README.rmobile
@@ -35,6 +35,7 @@ Currently the following boards are supported:
| R8A77965 M3-N | Renesas Electronics ULCB | r8a77965_ulcb
|---------------+----------------------------------------+-------------------
| R8A77970 V3M | Renesas Electronics Eagle | r8a77970_eagle_defconfig
+| R8A77970 V3M | Renesas Electronics V3MSK | r8a77970_v3msk_defconfig
|---------------+----------------------------------------+-------------------
| R8A77995 D3 | Renesas Electronics Draak | r8a77995_draak_defconfig
'===============+========================================+===================
diff --git a/doc/README.s5p4418 b/doc/README.s5p4418
index ac724d08a0..8ec7b05fd2 100644
--- a/doc/README.s5p4418
+++ b/doc/README.s5p4418
@@ -38,7 +38,7 @@ The source code for (the used?) LUbuntu 16.04 can be found at [5].
Links
=====
-[1] FriendlyArm U-boot v2016.01:
+[1] FriendlyArm U-Boot v2016.01:
https://github.com/friendlyarm/u-boot/tree/nanopi2-v2016.01
diff --git a/doc/SPL/README.spl-secure-boot b/doc/SPL/README.spl-secure-boot
index f2f8d78883..982fbec654 100644
--- a/doc/SPL/README.spl-secure-boot
+++ b/doc/SPL/README.spl-secure-boot
@@ -12,7 +12,7 @@ Methodology
The SPL image is responsible for loading the next stage boot loader, which is
the main u-boot image. For secure boot process on these platforms ROM verifies
-SPL image, so to continue chain of trust SPL image verifies U-boot image using
+SPL image, so to continue chain of trust SPL image verifies U-Boot image using
spl_validate_uboot(). This function uses QorIQ Trust Architecture header
-(appended to U-boot image) to validate the U-boot binary just before passing
+(appended to U-Boot image) to validate the U-Boot binary just before passing
control to it.
diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst
index 66b581c837..46f44bf34e 100644
--- a/doc/board/amlogic/index.rst
+++ b/doc/board/amlogic/index.rst
@@ -118,6 +118,7 @@ Board Documentation
sei610
s400
u200
+ videostrong-kii-pro
wetek-core2
wetek-hub
wetek-play2
diff --git a/doc/board/amlogic/p201.rst b/doc/board/amlogic/p201.rst
index 28aae98d99..13b732fc7e 100644
--- a/doc/board/amlogic/p201.rst
+++ b/doc/board/amlogic/p201.rst
@@ -56,7 +56,7 @@ image but sources have been shared by Linux development contractor, Baylibre:
$ make
$ export FIPDIR=$PWD/fip
-Go back to mainline U-boot source tree then :
+Go back to mainline U-Boot source tree then :
.. code-block:: bash
diff --git a/doc/board/amlogic/p212.rst b/doc/board/amlogic/p212.rst
index c1b73e83b1..a872f32f0f 100644
--- a/doc/board/amlogic/p212.rst
+++ b/doc/board/amlogic/p212.rst
@@ -50,7 +50,7 @@ the git tree published by the board vendor:
$ make
$ export FIPDIR=$PWD/fip
-Go back to mainline U-boot source tree then :
+Go back to mainline U-Boot source tree then :
.. code-block:: bash
diff --git a/doc/board/amlogic/s400.rst b/doc/board/amlogic/s400.rst
index 59dda82375..205e7c38fa 100644
--- a/doc/board/amlogic/s400.rst
+++ b/doc/board/amlogic/s400.rst
@@ -56,7 +56,7 @@ image but sources have been shared by Linux development contractor, Baylibre:
$ make
$ export FIPDIR=$PWD/fip
-Go back to mainline U-boot source tree then :
+Go back to mainline U-Boot source tree then :
.. code-block:: bash
diff --git a/doc/board/amlogic/videostrong-kii-pro.rst b/doc/board/amlogic/videostrong-kii-pro.rst
new file mode 100644
index 0000000000..1c6adac996
--- /dev/null
+++ b/doc/board/amlogic/videostrong-kii-pro.rst
@@ -0,0 +1,112 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for Videostrong KII Pro (S905)
+=====================================
+
+Videostrong KII Pro is an Android STB manufactured by Videostrong and
+based on the Amlogic p201 reference board, with the following specification:
+
+ - Amlogic S905 ARM Cortex-A53 quad-core SoC @ 1.5GHz
+ - ARM Mali 450 GPU
+ - 2GB DDR3 SDRAM
+ - 16GB eMMC
+ - Gigabit Ethernet
+ - Boardcom BCM4335 WiFi and BT 4.0
+ - HDMI 2.0 4K/60Hz display
+ - 3x USB 2.0 host
+ - 1x USB 2.0 otg
+ - microSD
+ - Infrared receiver
+ - Blue LED
+ - Red LED
+ - Power button (case, front)
+ - Reset button (underside)
+ - DVB Card: DVB-S and DVB-T/C
+
+Schematics are not publicly available.
+
+U-Boot Compilation
+------------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=aarch64-none-elf-
+ $ make videostrong-kii-pro_defconfig
+ $ make
+
+U-Boot Signing with Pre-Built FIP repo
+--------------------------------------
+
+.. code-block:: bash
+
+ $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
+ $ cd amlogic-boot-fip
+ $ mkdir my-output-dir
+ $ ./build-fip.sh wetek-play2 /path/to/u-boot/u-boot.bin my-output-dir
+
+U-Boot Manual Signing
+---------------------
+
+Amlogic does not provide sources for the firmware and tools needed to create
+a bootloader image and Videostrong has not publicly shared the U-Boot sources
+needed to build FIP binaries for signing. However you can use the WeTek
+Play2 binaries from the amlogic-boot-fip repo as the WeTek Play2 and the
+Videostrong KII Pro share the same RAM chips.
+
+.. code-block:: bash
+
+ $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1
+ $ cd amlogic-boot-fip/wetek-play2
+ $ export FIPDIR=$PWD
+
+Go back to the mainline U-Boot source tree then:
+
+.. code-block:: bash
+
+ $ mkdir fip
+ $ cp $FIPDIR/bl2.bin fip/
+ $ cp $FIPDIR/acs.bin fip/
+ $ cp $FIPDIR/bl21.bin fip/
+ $ cp $FIPDIR/bl30.bin fip/
+ $ cp $FIPDIR/bl301.bin fip/
+ $ cp $FIPDIR/bl31.img fip/
+ $ cp u-boot.bin fip/bl33.bin
+ $ $FIPDIR/blx_fix.sh \
+ fip/bl30.bin \
+ fip/zero_tmp \
+ fip/bl30_zero.bin \
+ fip/bl301.bin \
+ fip/bl301_zero.bin \
+ fip/bl30_new.bin \
+ bl30
+ $ $FIPDIR/fip_create --bl30 fip/bl30_new.bin \
+ --bl31 fip/bl31.img \
+ --bl33 fip/bl33.bin \
+ fip/fip.bin
+ $ sed -i 's/\x73\x02\x08\x91/\x1F\x20\x03\xD5/' fip/bl2.bin
+ $ python3 $FIPDIR/acs_tool.py fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
+ $ $FIPDIR/blx_fix.sh \
+ fip/bl2_acs.bin \
+ fip/zero_tmp \
+ fip/bl2_zero.bin \
+ fip/bl21.bin \
+ fip/bl21_zero.bin \
+ fip/bl2_new.bin \
+ bl2
+ $ cat fip/bl2_new.bin fip/fip.bin > fip/boot_new.bin
+ $ $FIPDIR/aml_encrypt_gxb --bootsig \
+ --input fip/boot_new.bin
+ --output fip/u-boot.bin
+
+Then write U-Boot to SD or eMMC with:
+
+.. code-block:: bash
+
+ $ DEV=/dev/boot_device
+ $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 conv=fsync
+ $ dd if=fip/u-boot.bin of=fip/u-boot.bin.gxbb bs=512 seek=9 skip=8 count=87 conv=fsync,notrunc
+ $ dd if=/dev/zero of=fip/u-boot.bin.gxbb bs=512 seek=8 count=1 conv=fsync,notrunc
+ $ dd if=bl1.bin.hardkernel of=fip/u-boot.bin.gxbb bs=512 seek=2 skip=2 count=1 conv=fsync,notrunc
+ $ ./aml_chksum fip/u-boot.bin.gxbb
+ $ dd if=fip/u-boot.bin.gxbb of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+ $ dd if=fip/u-boot.bin.gxbb of=$DEV conv=fsync,notrunc bs=1 count=440
diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
index 16f66388eb..b42d924cc6 100644
--- a/doc/board/emulation/qemu-arm.rst
+++ b/doc/board/emulation/qemu-arm.rst
@@ -54,7 +54,7 @@ Note that for some odd reason qemu-system-aarch64 needs to be explicitly
told to use a 64-bit CPU or it will boot in 32-bit mode. The -nographic argument
ensures that output appears on the terminal. Use Ctrl-A X to quit.
-Additional persistent U-boot environment support can be added as follows:
+Additional persistent U-Boot environment support can be added as follows:
- Create envstore.img using qemu-img::
diff --git a/doc/board/microchip/mpfs_icicle.rst b/doc/board/microchip/mpfs_icicle.rst
index 09c2c6a9c1..1464e536e9 100644
--- a/doc/board/microchip/mpfs_icicle.rst
+++ b/doc/board/microchip/mpfs_icicle.rst
@@ -134,7 +134,7 @@ Build OpenSBI
.. code-block:: none
make PLATFORM=generic FW_PAYLOAD_PATH=<u-boot-directory>/u-boot.bin
- FW_FDT_PATH=<u-boot-directory>/arch/riscv/dts/microchip-mpfs-icicle-kit-.dtb
+ FW_FDT_PATH=<u-boot-directory>/arch/riscv/dts/mpfs-icicle-kit-.dtb
3. Output "fw_payload.bin" file available at
"<opensbi-directory>/build/platform/generic/firmware/fw_payload.bin"
@@ -277,14 +277,14 @@ load uImage (with initramfs).
done
Bytes transferred = 14482480 (dcfc30 hex)
- RISC-V # tftpboot ${fdt_addr_r} microchip-mpfs-icicle-kit.dtb
+ RISC-V # tftpboot ${fdt_addr_r} mpfs-icicle-kit.dtb
ethernet@20112000: PHY present at 9
ethernet@20112000: Starting autonegotiation...
ethernet@20112000: Autonegotiation complete
ethernet@20112000: link up, 1000Mbps full-duplex (lpa: 0x7800)
Using ethernet@20112000 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.5
- Filename 'microchip-mpfs-icicle-kit.dtb'.
+ Filename 'mpfs-icicle-kit.dtb'.
Load address: 0x82200000
Loading: #
2.5 MiB/s
diff --git a/doc/board/nxp/ls1046ardb.rst b/doc/board/nxp/ls1046ardb.rst
index 35465d0061..49b4842b30 100644
--- a/doc/board/nxp/ls1046ardb.rst
+++ b/doc/board/nxp/ls1046ardb.rst
@@ -150,7 +150,7 @@ Then, launch openocd like::
openocd -f u-boot.tcl
-You should see the U-boot SPL banner followed by the banner for U-Boot proper
+You should see the U-Boot SPL banner followed by the banner for U-Boot proper
in the output of openocd. The CMSIS-DAP adapter is slow, so this can take a
long time. If you don't see it, something has gone wrong. After a while, you
should see the prompt. You can load an image using semihosting by running::
diff --git a/doc/board/nxp/mx6sabresd.rst b/doc/board/nxp/mx6sabresd.rst
index fe15ba7b79..c9869f4a73 100644
--- a/doc/board/nxp/mx6sabresd.rst
+++ b/doc/board/nxp/mx6sabresd.rst
@@ -53,7 +53,7 @@ This will generate the SPL and u-boot-dtb.img binaries.
- Boot first from SD card as shown in the previous section
-In U-boot change the eMMC partition config::
+In U-Boot change the eMMC partition config::
=> mmc partconf 2 1 0 0
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 99376fb54c..4c555e1c9c 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -333,12 +333,12 @@ Note:
Unlike later SoC models the rk3066 BootROM doesn't have SDMMC support.
If all other boot options fail then it enters into a BootROM mode on the USB OTG port.
-This method loads TPL/SPL on NAND with U-boot and kernel on SD card.
+This method loads TPL/SPL on NAND with U-Boot and kernel on SD card.
SD Card
^^^^^^^
-U-boot expects a GPT partition map and a boot directory structure with files on the SD card.
+U-Boot expects a GPT partition map and a boot directory structure with files on the SD card.
.. code-block:: none
@@ -363,7 +363,7 @@ Boot partition:
zImage
rk3066a-mk808.dtb
-To write a U-boot image to the SD card (assumed to be /dev/sda):
+To write a U-Boot image to the SD card (assumed to be /dev/sda):
.. code-block:: bash
diff --git a/doc/board/sifive/unmatched.rst b/doc/board/sifive/unmatched.rst
index de2aab59bb..c515949066 100644
--- a/doc/board/sifive/unmatched.rst
+++ b/doc/board/sifive/unmatched.rst
@@ -558,7 +558,7 @@ for partitions one through three respectively.
--new=3:10280:10535 --change-name=3:env --typecode=3:3DE21764-95BD-54BD-A5C3-4ABE786F38A8 \
/dev/mtdblock0
-Write U-boot SPL and U-boot to their partitions.
+Write U-Boot SPL and U-Boot to their partitions.
.. code-block:: none
diff --git a/doc/board/socionext/developerbox.rst b/doc/board/socionext/developerbox.rst
index 2d943c23be..aa7080e26c 100644
--- a/doc/board/socionext/developerbox.rst
+++ b/doc/board/socionext/developerbox.rst
@@ -57,14 +57,20 @@ Installation
You can install the SNI_NOR_UBOOT.fd via NOR flash writer.
-Flashing the U-Boot image on DeveloperBox requires a 96boards UART mezzanine or other mezzanine which can connect to LS-UART0 port.
-Connect USB cable from host to the LS-UART0 and set DSW2-7 to ON, and turn the board on again. The flash writer program will be started automatically; don’t forget to turn the DSW2-7 off again after flashing.
+Flashing the U-Boot image on DeveloperBox requires a 96boards UART mezzanine
+or other mezzanine which can connect to the LS-UART0 port.
+Connect USB cable from host to the LS-UART0 and set DSW2-7 to ON, and turn the
+board on again. The flash writer program will be started automatically;
+don't forget to turn the DSW2-7 off again after flashing.
-*!!CAUTION!! If you failed to write the U-Boot image on wrong address, the board can be bricked. See below page if you need to recover the bricked board. See the following page for more detail*
+*!!CAUTION!! If you write the U-Boot image on wrong address, the board can
+be bricked. See below page if you need to recover the bricked board. See
+the following page for more details*
https://www.96boards.org/documentation/enterprise/developerbox/installation/board-recovery.md.html
-When the serial flasher is running correctly is will show the following boot messages shown via LS-UART0::
+When the serial flasher is running correctly it will show the following boot
+messages printed to the LS-UART0 console::
/*------------------------------------------*/
@@ -81,7 +87,143 @@ Once the flasher tool is running we are ready flash the UEFI image::
flash rawwrite 200000 100000
>> Send SPI_NOR_UBOOT.fd via XMODEM (Control-A S in minicom) <<
-*!!NOTE!! The flasher command parameter is different from the command for board recovery. U-Boot uses the offset 200000 (2-five-0, 2M in hex) and the size 100000 (1-five-0, 1M in hex).*
+*!!NOTE!! The flasher command parameter is different from the command for
+board recovery. U-Boot uses the offset 200000 (2-five-0, 2M in hex) and the
+size 100000 (1-five-0, 1M in hex).*
-After transferring the SPI_NOR_UBOOT.fd, turn off the DSW2-7 and reset the board.
+After transferring the SPI_NOR_UBOOT.fd, turn off the DSW2-7 and
+reset the board.
+
+Enable FWU Multi Bank Update
+============================
+
+DeveloperBox supports the FWU Multi Bank Update. You *MUST* update both
+*SCP firmware* and *TF-A* for this feature. This will change the layout and
+the boot process but you can switch back to the normal one by changing
+the DSW 1-4 off.
+
+Configure U-Boot
+----------------
+
+To enable the FWU Multi Bank Update on the DeveloperBox board the
+configs/synquacer_developerbox_defconfig enables default FWU configuration ::
+
+ CONFIG_FWU_MULTI_BANK_UPDATE=y
+ CONFIG_FWU_MDATA=y
+ CONFIG_FWU_MDATA_MTD=y
+ CONFIG_FWU_NUM_BANKS=2
+ CONFIG_FWU_NUM_IMAGES_PER_BANK=1
+ CONFIG_CMD_FWU_METADATA=y
+
+And build it::
+
+ cd u-boot/
+ export ARCH=arm64
+ export CROSS_COMPILE=aarch64-linux-gnu-
+ make synquacer_developerbox_defconfig
+ make -j `noproc`
+ cd ../
+
+By default, the CONFIG_FWU_NUM_BANKS and CONFIG_FWU_NUM_IMAGES_PER_BANKS are
+set to 2 and 1 respectively. This uses FIP (Firmware Image Package) type image
+which contains TF-A, U-Boot and OP-TEE (the OP-TEE is optional).
+You can use fiptool to compose the FIP image from those firmware images.
+
+Rebuild SCP firmware
+--------------------
+
+Rebuild SCP firmware which supports FWU Multi Bank Update as below::
+
+ cd SCP-firmware/
+ OUT=./build/product/synquacer
+ ROMFW_FILE=$OUT/scp_romfw/$SCP_BUILD_MODE/bin/scp_romfw.bin
+ RAMFW_FILE=$OUT/scp_ramfw/$SCP_BUILD_MODE/bin/scp_ramfw.bin
+ ROMRAMFW_FILE=scp_romramfw_release.bin
+
+ make CC=arm-none-eabi-gcc PRODUCT=synquacer MODE=release
+ tr "\000" "\377" < /dev/zero | dd of=${ROMRAMFW_FILE} bs=1 count=196608
+ dd if=${ROMFW_FILE} of=${ROMRAMFW_FILE} bs=1 conv=notrunc seek=0
+ dd if=${RAMFW_FILE} of=${ROMRAMFW_FILE} bs=1 seek=65536
+ cd ../
+
+And you can get the `scp_romramfw_release.bin` file.
+
+Rebuild OPTEE firmware
+----------------------
+
+Rebuild OPTEE to use in new-layout FIP as below::
+
+ cd optee_os/
+ make -j`nproc` PLATFORM=synquacer ARCH=arm \
+ CROSS_COMPILE64=aarch64-linux-gnu- CFG_ARM64_core=y \
+ CFG_CRYPTO_WITH_CE=y CFG_CORE_HEAP_SIZE=524288 CFG_CORE_DYN_SHM=y \
+ CFG_CORE_ARM64_PA_BITS=48 CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_TA_LOG_LEVEL=1
+ cp out/arm-plat-synquacer/core/tee-pager_v2.bin ../arm-trusted-firmware/
+
+The produced `tee-pager_v2.bin` is to be used while building TF-A next.
+
+
+Rebuild TF-A and FIP
+--------------------
+
+Rebuild TF-A which supports FWU Multi Bank Update as below::
+
+ cd arm-trusted-firmware/
+ make CROSS_COMPILE=aarch64-linux-gnu- -j`nproc` PLAT=synquacer \
+ TRUSTED_BOARD_BOOT=1 SPD=opteed SQ_RESET_TO_BL2=1 GENERATE_COT=1 \
+ MBEDTLS_DIR=../mbedtls BL32=tee-pager_v2.bin \
+ BL33=../u-boot/u-boot.bin all fip fiptool
+
+And make a FIP image.::
+
+ cp build/synquacer/release/fip.bin SPI_NOR_NEWFIP.fd
+ tools/fiptool/fiptool update --tb-fw build/synquacer/release/bl2.bin SPI_NOR_NEWFIP.fd
+
+UUIDs for the FWU Multi Bank Update
+-----------------------------------
+
+FWU multi-bank update requires some UUIDs. The DeveloperBox platform uses
+following UUIDs.
+
+ - Location UUID for the FIP image: 17e86d77-41f9-4fd7-87ec-a55df9842de5
+ - Image type UUID for the FIP image: 10c36d7d-ca52-b843-b7b9-f9d6c501d108
+ - Image UUID for Bank0 : 5a66a702-99fd-4fef-a392-c26e261a2828
+ - Image UUID for Bank1 : a8f868a1-6e5c-4757-878d-ce63375ef2c0
+
+These UUIDs are used for making a FWU metadata image.
+
+u-boot$ ./tools/mkfwumdata -i 1 -b 2 \
+ 17e86d77-41f9-4fd7-87ec-a55df9842de5,10c36d7d-ca52-b843-b7b9-f9d6c501d108,5a66a702-99fd-4fef-a392-c26e261a2828,a8f868a1-6e5c-4757-878d-ce63375ef2c0 \
+ ../devbox-fwu-mdata.img
+
+Create Accept & Revert capsules
+
+u-boot$ ./tools/mkeficapsule -A -g 7d6dc310-52ca-43b8-b7b9-f9d6c501d108 NEWFIP_accept.Cap
+u-boot$ ./tools/mkeficapsule -R NEWFIP_revert.Cap
+
+Install via flash writer
+------------------------
+
+As explained in above section, the new FIP image and the FWU metadata image
+can be installed via NOR flash writer.
+
+Once the flasher tool is running we are ready to flash the images.::
+Write the FIP image to the Bank-0 & 1 at 6MB and 10MB offset.::
+
+ flash rawwrite 600000 180000
+ flash rawwrite a00000 180000
+ >> Send SPI_NOR_NEWFIP.fd via XMODEM (Control-A S in minicom) <<
+
+ flash rawwrite 500000 1000
+ flash rawwrite 530000 1000
+ >> Send devbox-fwu-mdata.img via XMODEM (Control-A S in minicom) <<
+
+And write the new SCP firmware.::
+
+ flash write cm3
+ >> Send scp_romramfw_release.bin via XMODEM (Control-A S in minicom) <<
+
+At last, turn on the DSW 3-4 on the board, and reboot.
+Note that if DSW 3-4 is turned off, the DeveloperBox will boot from
+the original EDK2 firmware (or non-FWU U-Boot if you already installed).
diff --git a/doc/board/st/stm32mp1.rst b/doc/board/st/stm32mp1.rst
index c0b1daa041..63b44776ff 100644
--- a/doc/board/st/stm32mp1.rst
+++ b/doc/board/st/stm32mp1.rst
@@ -345,7 +345,7 @@ Build Procedure
- BL33=u-boot-nodtb.bin
- BL33_CFG=u-boot.dtb
- You can also update a existing FIP after U-boot compilation with fiptool,
+ You can also update a existing FIP after U-Boot compilation with fiptool,
a tool provided by TF-A_::
# fiptool update --nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb fip-stm32mp157c-ev1.bin
diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst
new file mode 100644
index 0000000000..0d3a526516
--- /dev/null
+++ b/doc/board/ti/j7200_evm.rst
@@ -0,0 +1,332 @@
+.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+.. sectionauthor:: Udit Kumar <u-kumar1@ti.com>
+
+J7200 Platforms
+===============
+
+Introduction:
+-------------
+The J7200 family of SoCs are part of K3 Multicore SoC architecture platform
+targeting automotive applications. They are designed as a low power, high
+performance and highly integrated device architecture, adding significant
+enhancement on processing power, graphics capability, video and imaging
+processing, virtualization and coherent memory support.
+
+The device is partitioned into three functional domains, each containing
+specific processing cores and peripherals:
+
+1. Wake-up (WKUP) domain:
+ * Device Management and Security Controller (DMSC)
+
+2. Microcontroller (MCU) domain:
+ * Dual Core ARM Cortex-R5F processor
+
+3. MAIN domain:
+ * Dual core 64-bit ARM Cortex-A72
+
+More info can be found in TRM: https://www.ti.com/lit/pdf/spruiu1
+
+Boot Flow:
+----------
+Below is the pictorial representation of boot flow:
+
+.. code-block:: text
+
+ +------------------------------------------------------------------------+-----------------------+
+ | DMSC | MCU R5 | A72 | MAIN R5/C7x |
+ +------------------------------------------------------------------------+-----------------------+
+ | +--------+ | | | |
+ | | Reset | | | | |
+ | +--------+ | | | |
+ | : | | | |
+ | +--------+ | +-----------+ | | |
+ | | *ROM* |----------|-->| Reset rls | | | |
+ | +--------+ | +-----------+ | | |
+ | | | | : | | |
+ | | ROM | | : | | |
+ | |services| | : | | |
+ | | | | +-------------+ | | |
+ | | | | | *R5 ROM* | | | |
+ | | | | +-------------+ | | |
+ | | |<---------|---|Load and auth| | | |
+ | | | | | tiboot3.bin | | | |
+ | | Start | | +-------------+ | | |
+ | | TIFS |<---------|---| Start | | | |
+ | | | | | TIFS | | | |
+ | +--------+ | +-------------+ | | |
+ | : | | | | | |
+ | +---------+ | | Load | | | |
+ | | *TIFS* | | | system | | | |
+ | +---------+ | | Config data | | | |
+ | | |<--------|---| | | | |
+ | | | | +-------------+ | | |
+ | | | | : | | |
+ | | | | : | | |
+ | | | | : | | |
+ | | | | +-------------+ | | |
+ | | | | | *R5 SPL* | | | |
+ | | | | +-------------+ | | |
+ | | | | | DDR | | | |
+ | | | | | config | | | |
+ | | | | +-------------+ | | |
+ | | | | | Load | | | |
+ | | | | | tispl.bin | | | |
+ | | | | +-------------+ | | |
+ | | | | | Load R5 | | | |
+ | | | | | firmware | | | |
+ | | | | +-------------+ | | |
+ | | |<--------|---| Start A72 | | | |
+ | | | | | and jump to | | | |
+ | | | | | DM fw image | | | |
+ | | | | +-------------+ | | |
+ | | | | | +-----------+ | |
+ | | |---------|-----------------------|---->| Reset rls | | |
+ | | | | | +-----------+ | |
+ | | TIFS | | | : | |
+ | |Services | | | +-----------+ | |
+ | | |<--------|-----------------------|---->|*ATF/OPTEE*| | |
+ | | | | | +-----------+ | |
+ | | | | | : | |
+ | | | | | +-----------+ | |
+ | | |<--------|-----------------------|---->| *A72 SPL* | | |
+ | | | | | +-----------+ | |
+ | | | | | | Load | | |
+ | | | | | | u-boot.img| | |
+ | | | | | +-----------+ | |
+ | | | | | : | |
+ | | | | | +-----------+ | |
+ | | |<--------|-----------------------|---->| *U-Boot* | | |
+ | | | | | +-----------+ | |
+ | | | | | | prompt | | |
+ | | | | | +-----------+ | |
+ | | | | | | Load R5 | | |
+ | | | | | | Firmware | | |
+ | | | | | +-----------+ | |
+ | | |<--------|-----------------------|-----| Start R5 | | +-----------+ |
+ | | |---------|-----------------------|-----+-----------+-----|----->| R5 starts | |
+ | | | | | | Load C7 | | +-----------+ |
+ | | | | | | Firmware | | |
+ | | | | | +-----------+ | |
+ | | |<--------|-----------------------|-----| Start C7 | | +-----------+ |
+ | | |---------|-----------------------|-----+-----------+-----|----->| C7 starts | |
+ | | | | | | +-----------+ |
+ | | | | | | |
+ | +---------+ | | | |
+ | | | | |
+ +------------------------------------------------------------------------+-----------------------+
+
+- Here DMSC acts as master and provides all the critical services. R5/A72
+ requests DMSC to get these services done as shown in the above diagram.
+
+Sources:
+--------
+1. SYSFW:
+ Tree: git://git.ti.com/k3-image-gen/k3-image-gen.git
+ Branch: master
+
+2. ATF:
+ Tree: https://github.com/ARM-software/arm-trusted-firmware.git
+ Branch: master
+
+3. OPTEE:
+ Tree: https://github.com/OP-TEE/optee_os.git
+ Branch: master
+
+4. DM Firmware:
+ Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git
+ Branch: ti-linux-firmware
+
+5. U-Boot:
+ Tree: https://source.denx.de/u-boot/u-boot
+ Branch: master
+
+Build procedure:
+----------------
+1. SYSFW:
+
+.. code-block:: bash
+
+ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- SOC=j7200 SBL=u-boot-spl.bin SYSFW_PATH=<path to sysfw>/ti-fs-firmware-j7200-gp.bin
+ u-boot-spl.bin is generated at step 4.
+
+2. ATF:
+
+.. code-block:: bash
+
+ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=generic SPD=opteed
+
+3. OPTEE:
+
+.. code-block:: bash
+
+ make PLATFORM=k3-j7200 CFG_ARM64_core=y
+
+4. U-Boot:
+
+* 4.1 R5:
+
+.. code-block:: bash
+
+ make CROSS_COMPILE=arm-linux-gnueabihf- j7200_evm_r5_defconfig O=build/r5
+ make CROSS_COMPILE=arm-linux-gnueabihf- O=build/r5
+
+* 4.2 A72:
+
+.. code-block:: bash
+
+ make CROSS_COMPILE=aarch64-linux-gnu- j7200_evm_a72_defconfig O=build/a72
+ make CROSS_COMPILE=aarch64-linux-gnu- ATF=<ATF dir>/build/k3/generic/release/bl31.bin TEE=<OPTEE OS dir>/out/arm-plat-k3/core/tee-pager_v2.bin DM=<DM firmware>/ti-dm/j7200/ipc_echo_testb_mcu1_0_release_strip.xer5f O=build/a72
+
+Target Images
+--------------
+Copy the below images to an SD card and boot:
+ - tiboot3.bin from step 1
+ - tispl.bin, u-boot.img from 4.2
+
+Image formats:
+--------------
+
+- tiboot3.bin:
+
+.. code-block:: console
+
+ +-----------------------+
+ | X.509 |
+ | Certificate |
+ | +-------------------+ |
+ | | | |
+ | | R5 | |
+ | | u-boot-spl.bin | |
+ | | | |
+ | +-------------------+ |
+ | | | |
+ | | FIT header | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | DTB 1...N | | |
+ | | +---------------+ | |
+ | +-------------------+ |
+ | | | |
+ | | FIT HEADER | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | sysfw.bin | | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | board config | | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | PM config | | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | RM config | | |
+ | | +---------------+ | |
+ | | | | | |
+ | | | Secure config | | |
+ | | +---------------+ | |
+ | +-------------------+ |
+ +-----------------------+
+
+- tispl.bin
+
+.. code-block:: console
+
+ +-----------------------+
+ | |
+ | FIT HEADER |
+ | +-------------------+ |
+ | | | |
+ | | A72 ATF | |
+ | +-------------------+ |
+ | | | |
+ | | A72 OPTEE | |
+ | +-------------------+ |
+ | | | |
+ | | R5 DM FW | |
+ | +-------------------+ |
+ | | | |
+ | | A72 SPL | |
+ | +-------------------+ |
+ | | | |
+ | | SPL DTB 1...N | |
+ | +-------------------+ |
+ +-----------------------+
+
+
+Switch Setting for Boot Mode
+----------------------------
+
+Boot Mode pins provide means to select the boot mode and options before the
+device is powered up. After every POR, they are the main source to populate
+the Boot Parameter Tables.
+
+The following table shows some common boot modes used on J7200 platform. More
+details can be found in the Technical Reference Manual:
+https://www.ti.com/lit/pdf/spruiu1 under the `Boot Mode Pins` section.
+
+
+*Boot Modes*
+
+============ ============= =============
+Switch Label SW9: 12345678 SW8: 12345678
+============ ============= =============
+SD 00000000 10000010
+EMMC 01000000 10000000
+OSPI 01000000 00000110
+UART 01110000 00000000
+USB DFU 00100000 10000000
+============ ============= =============
+
+For SW8 and SW9, the switch state in the "ON" position = 1.
+
+eMMC:
+-----
+ROM supports booting from eMMC raw read or UDA FS mode.
+
+Below is memory layout in case of booting from
+boot 0/1 partition in raw mode.
+
+Current allocated size for tiboot3 size is 1MB, tispl is 2MB.
+
+Size of u-boot.img is taken 4MB for refernece,
+But this is subject to change depending upon atf, optee size
+
+.. code-block:: console
+
+ boot0/1 partition (8 MB) user partition
+ 0x0+----------------------------------+ 0x0+------------------------+
+ | tiboot3.bin (1 MB) | | |
+ 0x800+----------------------------------+ | |
+ | tispl.bin (2 MB) | | |
+ 0x1800+----------------------------------+ | |
+ | u-boot.img (4MB) | | |
+ 0x3800+----------------------------------+ | |
+ | | | |
+ 0x3900+ environment | | |
+ | | | |
+ 0x3A00+----------------------------------+ +-------------------------+
+
+In case of UDA FS mode booting, following is layout.
+
+All boot images tiboot3.bin, tispl and u-boot should be written to
+fat formatted UDA FS as file.
+
+.. code-block:: console
+
+ boot0/1 partition (8 MB) user partition
+ 0x0+---------------------------------+ 0x0+-------------------------+
+ | | | tiboot3.bin* |
+ 0x800+----------------------------------+ | |
+ | | | tispl.bin |
+ 0x1800+----------------------------------+ | |
+ | | | u-boot.img |
+ 0x3800+----------------------------------+ | |
+ | | | |
+ 0x3900+ | | environment |
+ | | | |
+ 0x3A00+----------------------------------+ +-------------------------+
+
+
+
+In case of booting from eMMC, write above images into raw or UDA FS.
+and set mmc partconf accordingly.
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index b49a60caf1..2b2f4bb8bb 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -31,6 +31,7 @@ K3 Based SoCs
:maxdepth: 1
j721e_evm
+ j7200_evm
am62x_sk
Boot Flow Overview
diff --git a/doc/board/xen/xenguest_arm64.rst b/doc/board/xen/xenguest_arm64.rst
index 1327f88f99..e9bdaf7ffb 100644
--- a/doc/board/xen/xenguest_arm64.rst
+++ b/doc/board/xen/xenguest_arm64.rst
@@ -6,7 +6,7 @@ Xen guest ARM64 board
This board specification
------------------------
-This board is to be run as a virtual Xen [1] guest with U-boot as its primary
+This board is to be run as a virtual Xen [1] guest with U-Boot as its primary
bootloader. Xen is a type 1 hypervisor that allows multiple operating systems
to run simultaneously on a single physical server. Xen is capable of running
virtual machines in both full virtualization and para-virtualization (PV)
@@ -16,7 +16,7 @@ Paravirtualized drivers are a special type of device drivers that are used in
a guest system in the Xen domain and perform I/O operations using a special
interface provided by the virtualization system and the host system.
-Xen support for U-boot is implemented by introducing a new Xen guest ARM64
+Xen support for U-Boot is implemented by introducing a new Xen guest ARM64
board and porting essential drivers from MiniOS [3] as well as some of the work
previously done by NXP [4]:
@@ -39,7 +39,7 @@ previously done by NXP [4]:
Board limitations
-----------------
-1. U-boot runs without MMU enabled at the early stages.
+1. U-Boot runs without MMU enabled at the early stages.
According to Xen on ARM ABI (xen/include/public/arch-arm.h): all memory
which is shared with other entities in the system (including the hypervisor
and other guests) must reside in memory which is mapped as Normal Inner
@@ -54,14 +54,14 @@ Board limitations
2. No serial console until MMU is up.
Because data cache maintenance is required until the MMU setup the
early/debug serial console is not implemented. Therefore, we do not have
- usual prints like U-boot’s banner etc. until the serial driver is
+ usual prints like U-Boot’s banner etc. until the serial driver is
initialized.
3. Single RAM bank supported.
If a Xen guest is given much memory it is possible that Xen allocates two
memory banks for it. The first one is allocated under 4GB address space and
in some cases may represent the whole guest’s memory. It is assumed that
- U-boot most likely won’t require high memory bank for its work andlaunching
+ U-Boot most likely won’t require high memory bank for its work andlaunching
OS, so it is enough to take the first one.
diff --git a/doc/build/clang.rst b/doc/build/clang.rst
index 1d35616eb5..cc265506c2 100644
--- a/doc/build/clang.rst
+++ b/doc/build/clang.rst
@@ -74,3 +74,39 @@ simplified with a simple wrapper script - saved as
#!/bin/sh
exec clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd "$@"
+
+
+Known Issues
+------------
+
+When build U-boot for `xenguest_arm64_defconfig` target, it reports linkage
+error:
+
+.. code-block:: bash
+
+ aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `do_hypervisor_callback':
+ /home/leoy/Dev2/u-boot/drivers/xen/hypervisor.c:188: undefined reference to `__aarch64_swp8_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_set_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_clear_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_set_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/hypervisor.o: in function `synch_test_and_clear_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/events.o: in function `synch_test_and_clear_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:28: undefined reference to `__aarch64_ldclr1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/events.o: in function `synch_test_and_set_bit':
+ /home/leoy/Dev2/u-boot/./arch/arm/include/asm/xen/system.h:40: undefined reference to `__aarch64_ldset1_acq_rel'
+ aarch64-linux-gnu-ld.bfd: drivers/xen/gnttab.o: in function `gnttab_end_access':
+ /home/leoy/Dev2/u-boot/drivers/xen/gnttab.c:109: undefined reference to `__aarch64_cas2_acq_rel'
+ Segmentation fault
+
+To fix the failure, we need to append option `-mno-outline-atomics` in Clang
+command to not generate local calls to out-of-line atomic operations:
+
+.. code-block:: bash
+
+ make HOSTCC=clang xenguest_arm64_defconfig
+ make HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- \
+ CC="clang -target aarch64-linux-gnueabi -mno-outline-atomics" -j8
diff --git a/doc/develop/driver-model/bind.rst b/doc/develop/driver-model/bind.rst
index b19661b5fe..0d0d40734c 100644
--- a/doc/develop/driver-model/bind.rst
+++ b/doc/develop/driver-model/bind.rst
@@ -7,7 +7,7 @@ Binding/unbinding a driver
This document aims to describe the bind and unbind commands.
For debugging purpose, it should be useful to bind or unbind a driver from
-the U-boot command line.
+the U-Boot command line.
The unbind command calls the remove device driver callback and unbind the
device from its driver.
diff --git a/doc/develop/driver-model/fs_firmware_loader.rst b/doc/develop/driver-model/fs_firmware_loader.rst
index b0823700a9..149b8b436e 100644
--- a/doc/develop/driver-model/fs_firmware_loader.rst
+++ b/doc/develop/driver-model/fs_firmware_loader.rst
@@ -92,9 +92,9 @@ For example of getting DT phandle from /chosen and creating instance:
if (ret)
return ret;
-Firmware loader driver is also designed to support U-boot environment
+Firmware loader driver is also designed to support U-Boot environment
variables, so all these data from FDT can be overwritten
-through the U-boot environment variable during run time.
+through the U-Boot environment variable during run time.
For examples:
@@ -110,7 +110,7 @@ fw_ubi_volume:
When above environment variables are set, environment values would be
used instead of data from FDT.
The benefit of this design allows user to change storage attribute data
-at run time through U-boot console and saving the setting as default
+at run time through U-Boot console and saving the setting as default
environment values in the storage for the next power cycle, so no
compilation is required for both driver and FDT.
diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
index ffe25ca231..6626ceec52 100644
--- a/doc/develop/uefi/uefi.rst
+++ b/doc/develop/uefi/uefi.rst
@@ -318,6 +318,33 @@ Run the following command
--guid <image GUID> \
<capsule_file_name>
+The UEFI specification does not define the firmware versioning mechanism.
+EDK II reference implementation inserts the FMP Payload Header right before
+the payload. It coutains the fw_version and lowest supported version,
+EDK II reference implementation uses these information to implement the
+firmware versioning and anti-rollback protection, the firmware version and
+lowest supported version is stored into EFI non-volatile variable.
+
+In U-Boot, the firmware versioning is implemented utilizing
+the FMP Payload Header same as EDK II reference implementation,
+reads the FMP Payload Header and stores the firmware version into
+"FmpStateXXXX" EFI non-volatile variable. XXXX indicates the image index,
+since FMP protocol handles multiple image indexes.
+
+To add the fw_version into the FMP Payload Header,
+add --fw-version option in mkeficapsule tool.
+
+.. code-block:: console
+
+ $ mkeficapsule \
+ --index <index> --instance 0 \
+ --guid <image GUID> \
+ --fw-version 5 \
+ <capsule_file_name>
+
+If the --fw-version option is not set, FMP Payload Header is not inserted
+and fw_version is set as 0.
+
Performing the update
*********************
@@ -330,7 +357,7 @@ bit in OsIndications variable with
=> setenv -e -nv -bs -rt -v OsIndications =0x0000000000000004
-Since U-boot doesn't currently support SetVariable at runtime, its value
+Since U-Boot doesn't currently support SetVariable at runtime, its value
won't be taken over across the reboot. If this is the case, you can skip
this feature check with the Kconfig option (CONFIG_EFI_IGNORE_OSINDICATIONS)
set.
@@ -510,6 +537,45 @@ where signature.dts looks like::
};
};
+Anti-rollback Protection
+************************
+
+Anti-rollback prevents unintentional installation of outdated firmware.
+To enable anti-rollback, you must add the lowest-supported-version property
+to dtb and specify --fw-version when creating a capsule file with the
+mkeficapsule tool.
+When executing capsule update, U-Boot checks if fw_version is greater than
+or equal to lowest-supported-version. If fw_version is less than
+lowest-supported-version, the update will fail.
+For example, if lowest-supported-version is set to 7 and you run capsule
+update using a capsule file with --fw-version of 5, the update will fail.
+When the --fw-version in the capsule file is updated, lowest-supported-version
+in the dtb might be updated accordingly.
+
+To insert the lowest supported version into a dtb
+
+.. code-block:: console
+
+ $ dtc -@ -I dts -O dtb -o version.dtbo version.dts
+ $ fdtoverlay -i orig.dtb -o new.dtb -v version.dtbo
+
+where version.dts looks like::
+
+ /dts-v1/;
+ /plugin/;
+ &{/} {
+ firmware-version {
+ image1 {
+ image-type-id = "09D7CF52-0720-4710-91D1-08469B7FE9C8";
+ image-index = <1>;
+ lowest-supported-version = <3>;
+ };
+ };
+ };
+
+The properties of image-type-id and image-index must match the value
+defined in the efi_fw_image array as image_type_id and image_index.
+
Executing the boot manager
~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/device-tree-bindings/firmware/firmware-version.txt b/doc/device-tree-bindings/firmware/firmware-version.txt
new file mode 100644
index 0000000000..ee90ce3117
--- /dev/null
+++ b/doc/device-tree-bindings/firmware/firmware-version.txt
@@ -0,0 +1,22 @@
+firmware-version bindings
+-------------------------------
+
+Required properties:
+- image-type-id : guid for image blob type
+- image-index : image index
+- lowest-supported-version : lowest supported version
+
+Example:
+
+ firmware-version {
+ image1 {
+ image-type-id = "09D7CF52-0720-4710-91D1-08469B7FE9C8";
+ image-index = <1>;
+ lowest-supported-version = <3>;
+ };
+ image2 {
+ image-type-id = "5A7021F5-FEF2-48B4-AABA-832E777418C0";
+ image-index = <2>;
+ lowest-supported-version = <7>;
+ };
+ };
diff --git a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
index 4f5404f999..6a22aeea30 100644
--- a/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
+++ b/doc/device-tree-bindings/firmware/fwu-mdata-mtd.yaml
@@ -1,13 +1,13 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
-$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-sf.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
+$id: http://devicetree.org/schemas/firmware/u-boot,fwu-mdata-mtd.yaml#
+$schema: http://devicetree.org/meta-schemas/base.yaml#
title: FWU metadata on MTD device without GPT
maintainers:
- - Masami Hiramatsu <masami.hiramatsu@linaro.org>
+ - Jassi Brar <jaswinder.singh@linaro.org>
properties:
compatible:
@@ -15,24 +15,101 @@ properties:
- const: u-boot,fwu-mdata-mtd
fwu-mdata-store:
- maxItems: 1
- description: Phandle of the MTD device which contains the FWU medatata.
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Phandle of the MTD device which contains the FWU MetaData and Banks.
- mdata-offsets:
+ mdata-parts:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
minItems: 2
- description: Offsets of the primary and secondary FWU metadata in the NOR flash.
+ maxItems: 2
+ description: labels of the primary and secondary FWU metadata partitions in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node.
+
+ patternProperties:
+ "fwu-bank[0-9]":
+ type: object
+ description: List of FWU mtd-backed banks. Typically two banks.
+
+ properties:
+ id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Index of the bank.
+
+ label:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ minItems: 1
+ maxItems: 1
+ description: label of the partition, in the 'fixed-partitions' subnode of the 'jedec,spi-nor' flash device node, that holds this bank.
+
+ patternProperties:
+ "fwu-image[0-9]":
+ type: object
+ description: List of images in the FWU mtd-backed bank.
+
+ properties:
+ id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Index of the bank.
+
+ offset:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Offset, from start of the bank, where the image is located.
+
+ size:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Size reserved for the image.
+
+ uuid:
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+ minItems: 1
+ maxItems: 1
+ description: UUID of the image.
+
+ required:
+ - id
+ - offset
+ - size
+ - uuid
+ additionalProperties: false
+
+ required:
+ - id
+ - label
+ - fwu-images
+ additionalProperties: false
required:
- compatible
- fwu-mdata-store
- - mdata-offsets
-
+ - mdata-parts
+ - fwu-banks
additionalProperties: false
examples:
- |
- fwu-mdata {
- compatible = "u-boot,fwu-mdata-mtd";
- fwu-mdata-store = <&spi-flash>;
- mdata-offsets = <0x500000 0x530000>;
- };
+ fwu-mdata {
+ compatible = "u-boot,fwu-mdata-mtd";
+ fwu-mdata-store = <&flash0>;
+ mdata-parts = "MDATA-Pri", "MDATA-Sec";
+
+ fwu-bank0 {
+ id = <0>;
+ label = "FIP-Bank0";
+ fwu-image0 {
+ id = <0>;
+ offset = <0x0>;
+ size = <0x400000>;
+ uuid = "5a66a702-99fd-4fef-a392-c26e261a2828";
+ };
+ };
+ fwu-bank1 {
+ id = <1>;
+ label = "FIP-Bank1";
+ fwu-image0 {
+ id = <0>;
+ offset = <0x0>;
+ size = <0x400000>;
+ uuid = "a8f868a1-6e5c-4757-878d-ce63375ef2c0";
+ };
+ };
+ };
+...
diff --git a/doc/mkeficapsule.1 b/doc/mkeficapsule.1
index 1ca245a10f..c4c2057d5c 100644
--- a/doc/mkeficapsule.1
+++ b/doc/mkeficapsule.1
@@ -62,6 +62,16 @@ Specify an image index
Specify a hardware instance
.PP
+FMP Payload Header is inserted right before the payload if
+.BR --fw-version
+is specified
+
+
+.TP
+.BI "-v\fR,\fB --fw-version " firmware-version
+Specify a firmware version, 0 if omitted
+
+.PP
For generation of firmware accept empty capsule
.BR --guid
is mandatory
diff --git a/doc/mkfwumdata.1 b/doc/mkfwumdata.1
new file mode 100644
index 0000000000..7dd718b26e
--- /dev/null
+++ b/doc/mkfwumdata.1
@@ -0,0 +1,89 @@
+.\" SPDX-License-Identifier: GPL-2.0-or-later
+.\" Copyright (C) 2023 Jassi Brar <jaswinder.singh@linaro.org>
+.TH MKFWUMDATA 1 2023-04-10 U-Boot
+.SH NAME
+mkfwumdata \- create FWU metadata image
+.
+.SH SYNOPSIS
+.SY mkfwumdata
+.OP \-a activeidx
+.OP \-p previousidx
+.OP \-g
+.BI \-i\~ imagecount
+.BI \-b\~ bankcount
+.I UUIDs
+.I outputimage
+.YS
+.SY mkfwumdata
+.B \-h
+.YS
+.
+.SH DESCRIPTION
+.B mkfwumdata
+creates metadata info to be used with FWU.
+.
+.SH OPTIONS
+.TP
+.B \-h
+Print usage information and exit.
+.
+.TP
+.B \-a
+Set
+.IR activeidx
+as the currently active Bank. Default is 0.
+.
+.TP
+.B \-p
+Set
+.IR previousidx
+as the previous active Bank. Default is
+.IR activeidx "-1"
+or
+.IR bankcount "-1,"
+whichever is non-negative.
+.
+.TP
+.B \-g
+Convert the
+.IR UUIDs
+as GUIDs before use.
+.
+.TP
+.B \-i
+Specify there are
+.IR imagecount
+images in each bank.
+.
+.TP
+.B \-b
+Specify there are a total of
+.IR bankcount
+banks.
+.
+.TP
+.IR UUIDs
+Comma-separated list of UUIDs required to create the metadata :-
+location_uuid,image_type_uuid,<images per bank uuid list of all banks>
+.
+.TP
+.IR outputimage
+Specify the name of the metadata image file to be created.
+.
+.SH BUGS
+Please report bugs to the
+.UR https://\:source\:.denx\:.de/\:u-boot/\:u-boot/\:issues
+U-Boot bug tracker
+.UE .
+.SH EXAMPLES
+Create a metadata image with 2 banks and 1 image/bank, BankAct=0, BankPrev=1:
+.PP
+.EX
+.in +4
+$ \c
+.B mkfwumdata \-a 0 \-p 1 \-b 2 \-i 1 \\\\\&
+.in +6
+.B 17e86d77-41f9-4fd7-87ec-a55df9842de5,\\\\\&
+.B 10c36d7d-ca52-b843-b7b9-f9d6c501d108,\\\\\&
+.B 5a66a702-99fd-4fef-a392-c26e261a2828,a8f868a1-6e5c-4757-878d-ce63375ef2c0 \\\\\&
+.B fwu-mdata.img
diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt
index f9f6cc6e92..aed4492117 100644
--- a/doc/sphinx/requirements.txt
+++ b/doc/sphinx/requirements.txt
@@ -11,7 +11,7 @@ packaging==21.3
Pygments==2.11.2
pyparsing==3.0.7
pytz==2022.1
-requests==2.27.1
+requests==2.31.0
six==1.16.0
snowballstemmer==2.2.0
Sphinx==3.4.3
diff --git a/doc/usage/cmd/source.rst b/doc/usage/cmd/source.rst
index 6f5fa28513..697f644745 100644
--- a/doc/usage/cmd/source.rst
+++ b/doc/usage/cmd/source.rst
@@ -161,7 +161,7 @@ The boot scripts (boot.scr) is created with:
mkimage -T script -n 'Test script' -d boot.txt boot.scr
-The script can be execute in U-boot like this:
+The script can be execute in U-Boot like this:
.. code-block::
diff --git a/doc/usage/dfu.rst b/doc/usage/dfu.rst
index ed47ff561e..68cacbbef6 100644
--- a/doc/usage/dfu.rst
+++ b/doc/usage/dfu.rst
@@ -9,7 +9,7 @@ Overview
The Device Firmware Upgrade (DFU) allows to download and upload firmware
to/from U-Boot connected over USB.
-U-boot follows the Universal Serial Bus Device Class Specification for
+U-Boot follows the Universal Serial Bus Device Class Specification for
Device Firmware Upgrade Version 1.1 the USB forum (DFU v1.1 in www.usb.org).
U-Boot implements this DFU capability (CONFIG_DFU) with the command dfu