diff options
Diffstat (limited to 'Documentation/boards/imx/nxp-imx8mp-evk.rst')
-rw-r--r-- | Documentation/boards/imx/nxp-imx8mp-evk.rst | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/Documentation/boards/imx/nxp-imx8mp-evk.rst b/Documentation/boards/imx/nxp-imx8mp-evk.rst index 366c1de500..da26339864 100644 --- a/Documentation/boards/imx/nxp-imx8mp-evk.rst +++ b/Documentation/boards/imx/nxp-imx8mp-evk.rst @@ -40,14 +40,17 @@ As a last step of this process those files need to be placed in firmware/${f}; \ done -Get and Build the ARM Trusted firmware --------------------------------------- +Get and Build the Trusted Firmware A +------------------------------------ -Get ATF from https://source.codeaurora.org/external/imx/imx-atf, branch -imx_5.4.3_2.0.0:: +Get TF-A from https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ and +checkout version v2.7:: make PLAT=imx8mp bl31 - cp build/imx8mp/release/bl31.bin ${barebox_srctree}/imx8mp-bl31.bin + cp build/imx8mp/release/bl31.bin ${barebox_srctree}/firmware/imx8mp-bl31.bin + +.. warning:: It is important to use a version >= v2.7 else your system + might not boot. Build Barebox ------------- @@ -63,3 +66,39 @@ Boot Configuration The NXP i.MX8MP-EVK board has four switches responsible for configuring bootsource/boot mode. The settings for the different boot sources are printed on the board. + +Installing barebox +================== + +When the EVK is strapped to boot from eMMC, the i.MX8M bootrom will +consult the eMMC ext_csd register to determine whether to boot +from the active eMMC boot partition or from the user area. + +The same barebox image written to the start of the SD-Card can +be written to the start of the eMMC user area. Power-fail-safe +installation to the eMMC boot partition requires special handling: + + - The barebox image must be written to the inactive boot partition, + then afterwards, the newly written boot partition is activated + (This is controlled by the barebox ``mmcX.boot`` variable). + + - The barebox image includes a 32KiB preamble that allows the image + to be directly writable to the start of the SD-Card or eMMC user area. + Unlike older i.MX8M, the i.MX8MP BootROM expects the bootloader to not + start at an offset when booting from eMMC boot partitions, thus the first + 32KiB must be stripped. + +The following steps are required to write the image to the QSPI NOR flash: + + - Strip the 32KiB preamble, like it is done for the eMMC boot partition case + (see above). + + - The QSPI NOR partition ``barebox`` must be erased before the stripped + image is written. The erase size depends on the stripped image size but + always start at offset 0. + + - Write the stripped barebox image to the QSPI NOR partition ``barebox`` + at offset 0. + +The ``barebox_update`` command takes care of this and need just be +supplied a barebox image as argument. |