public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder@fris.de>
To: Frieder Schrempf <frieder.schrempf@kontron.de>, u-boot@lists.denx.de
Cc: Fabio Estevam <festevam@denx.de>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Oliver Graute <oliver.graute@kococonnector.com>,
	Patrick Wildt <patrick@blueri.se>
Subject: [PATCH v2 5/6] doc: sl-mx8mm: Add guide for copying the bootloader to SPI NOR
Date: Thu, 19 Jan 2023 12:20:38 +0100	[thread overview]
Message-ID: <20230119112040.47574-6-frieder@fris.de> (raw)
In-Reply-To: <20230119112040.47574-1-frieder@fris.de>

From: Frieder Schrempf <frieder.schrempf@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@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


  parent reply	other threads:[~2023-01-19 11:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 11:20 [PATCH v2 0/6] Some documentation updates for Kontron i.MX8MM hardware Frieder Schrempf
2023-01-19 11:20 ` [PATCH v2 1/6] doc: sl-mx8mm: Mention OSM 1.1 support Frieder Schrempf
2023-01-19 11:20 ` [PATCH v2 2/6] doc: sl-mx8mm: Add note about using cross toolchain Frieder Schrempf
2023-01-19 11:20 ` [PATCH v2 3/6] doc: sl-mx8mm: Update the NXP TF-A source reference Frieder Schrempf
2023-01-19 11:20 ` [PATCH v2 4/6] doc: sl-mx8mm: Update references to latest DDR firmware 8.18 Frieder Schrempf
2023-01-19 11:20 ` Frieder Schrempf [this message]
2023-01-19 11:20 ` [PATCH v2 6/6] doc: sl-mx8mm: Add CROSS_COMPILE to U-Boot make call and improve comment Frieder Schrempf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230119112040.47574-6-frieder@fris.de \
    --to=frieder@fris.de \
    --cc=festevam@denx.de \
    --cc=frieder.schrempf@kontron.de \
    --cc=marcel.ziswiler@toradex.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=patrick@blueri.se \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox