From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AA26C00A5A for ; Thu, 19 Jan 2023 11:22:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02C378566F; Thu, 19 Jan 2023 12:21:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=fris.de header.i=@fris.de header.b="LJgKX3Tg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB42A85667; Thu, 19 Jan 2023 12:21:15 +0100 (CET) Received: from mail.fris.de (mail.fris.de [IPv6:2a01:4f8:c2c:390b::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 157288565F for ; Thu, 19 Jan 2023 12:21:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=frieder@fris.de Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 53FDAC0307; Thu, 19 Jan 2023 12:21:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1674127270; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=XNNZc7xvdFzwmwK3HfXV7s2SqvdER+PqTIcrLDSXcwY=; b=LJgKX3TgolBT+/cnK6BNvj0sHfUHQAnXkwA+qT4Qit9Al6/ycuEofVUzrw18CX7JRvpKb1 rv9zrxiPmZFELn0wwL4zhhPjK4QPuKgB44/fD3aJgobdz7Dj+qBzFXteYyyq9Q7fKVWkQo uUcI3ObyMSEYTl7g7mYS0iwJ7m26ZbbTNKyAPYJxMN++hTJBXxBSK/ajC2/Fu353qYEpC1 90dlBH8z970pSH+gO093HFT+nkAc82nEYnd6T+/k7Lq35Hp8BDoo9rWbEMwcLYQEHii1e/ W+IHwVCXhkgp/3kZ02EymIV4Wm+1j5fMmbXew2Xb/2kIOrpPBp/OQk7YR47D2A== From: Frieder Schrempf To: Frieder Schrempf , u-boot@lists.denx.de Cc: Fabio Estevam , Marcel Ziswiler , Oliver Graute , Patrick Wildt 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 Message-Id: <20230119112040.47574-6-frieder@fris.de> In-Reply-To: <20230119112040.47574-1-frieder@fris.de> References: <20230119112040.47574-1-frieder@fris.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Frieder Schrempf 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 --- 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