[PATCH v2 5/6] doc: sl-mx8mm: Add guide for copying the bootloader to SPI NOR
Frieder Schrempf
frieder at fris.de
Thu Jan 19 12:20:38 CET 2023
From: Frieder Schrempf <frieder.schrempf at kontron.de>
This adds a guide for copying the raw bootloader image on the SD card
to the SPI NOR using U-Boot itself.
Signed-off-by: Frieder Schrempf <frieder.schrempf at kontron.de>
---
doc/board/kontron/sl-mx8mm.rst | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/doc/board/kontron/sl-mx8mm.rst b/doc/board/kontron/sl-mx8mm.rst
index 76cc49f9d7..a8a3d5fc24 100644
--- a/doc/board/kontron/sl-mx8mm.rst
+++ b/doc/board/kontron/sl-mx8mm.rst
@@ -90,7 +90,39 @@ Burn the flash.bin to SD card at an offset of 33 KiB:
Boot
^^^^
-Put the SD card in the slot on the board and apply power.
+Put the SD card in the slot on the board and apply power. Check the serial
+console for output.
+
+Flash the Bootloader to SPI NOR
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+1. Determine and note the exact size of the ``flash.bin`` image in bytes (e.g.
+ by running ``ls -l flash.bin``)
+
+2. On the U-Boot CLI copy the bootloader from SD card to RAM:
+
+ .. code-block::
+
+ mmc dev 1
+ mmc read $loadaddr 0x42 0x1000
+
+3. Erase the SPI NOR flash:
+
+ .. code-block::
+
+ sf probe
+ sf erase 0x0 0x200000
+
+4. Copy the bootloader from RAM to SPI NOR. For the last parameter of the
+ command, use the size determined in step 1 in **hexadecimal notation**:
+
+ .. code-block::
+
+ sf write $loadaddr 0x400 0x13B6F0
+
+.. note::
+
+ To be able to boot from SPI NOR the OTP fuses need to be set accordingly.
Further Information
-------------------
--
2.39.0
More information about the U-Boot
mailing list