All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 5/5] docs: README.sunxi: Move nand documentation
Date: Wed, 13 Dec 2017 11:33:06 +0530	[thread overview]
Message-ID: <1513144986-13619-5-git-send-email-jagan@amarulasolutions.com> (raw)
In-Reply-To: <1513144986-13619-1-git-send-email-jagan@amarulasolutions.com>

Move documentation of README.nand from board files
into docs/README.sunxi

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v3:
- New patch

 board/sunxi/README.nand | 54 --------------------------------------------
 doc/README.sunxi        | 60 +++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 58 insertions(+), 56 deletions(-)
 delete mode 100644 board/sunxi/README.nand

diff --git a/board/sunxi/README.nand b/board/sunxi/README.nand
deleted file mode 100644
index a5d4ff0..0000000
--- a/board/sunxi/README.nand
+++ /dev/null
@@ -1,54 +0,0 @@
-Allwinner NAND flashing
-=======================
-
-A lot of Allwinner devices, especially the older ones (pre-H3 era),
-comes with a NAND. NANDs storages are a pretty weak choice when it
-comes to the reliability, and it comes with a number of flaws like
-read and write disturbs, data retention issues, bloks becoming
-unusable, etc.
-
-In order to mitigate that, various strategies have been found to be
-able to recover from those issues like ECC, hardware randomization,
-and of course, redundancy for the critical parts.
-
-This is obviously something that we will take into account when
-creating our images. However, the BROM will use a quite weird pattern
-when accessing the NAND, and will access only at most 4kB per page,
-which means that we also have to split that binary accross several
-pages.
-
-In order to accomodate that, we create a tool that will generate an
-SPL image that is ready to be programmed directly embedding the ECCs,
-randomized, and with the necessary bits needed to reduce the number of
-bitflips. The U-Boot build system, when configured for the NAND will
-also generate the image sunxi-spl-with-ecc.bin that will have been
-generated by that tool.
-
-In order to flash your U-Boot image onto a board, assuming that the
-board is in FEL mode, you'll need the sunxi-tools that you can find at
-this repository: https://github.com/linux-sunxi/sunxi-tools
-
-Then, you'll need to first load an SPL to initialise the RAM:
-sunxi-fel spl spl/sunxi-spl.bin
-
-Load the binaries we'll flash into RAM:
-sunxi-fel write 0x4a000000 u-boot-dtb.bin
-sunxi-fel write 0x43000000 spl/sunxi-spl-with-ecc.bin
-
-And execute U-Boot
-sunxi-fel exe 0x4a000000
-
-On your board, you'll now have all the needed binaries into RAM, so
-you only need to erase the NAND...
-
-nand erase.chip
-
-Then write the SPL and its backup:
-
-nand write.raw.noverify 0x43000000 0 40
-nand write.raw.noverify 0x43000000 0x400000 40
-
-And finally write the U-Boot binary:
-nand write 0x4a000000 0x800000 0xc0000
-
-You can now reboot and enjoy your NAND.
\ No newline at end of file
diff --git a/doc/README.sunxi b/doc/README.sunxi
index 48f82cb..c682606 100644
--- a/doc/README.sunxi
+++ b/doc/README.sunxi
@@ -10,7 +10,8 @@ U-Boot on SunXi
 Tutorial describe all details relevant for U-Boot on Allwinner SunXi platform. 
 
 	1. Allwinner 64-bit boards
-	2. Verified Boot
+	2. Allwinner NAND flashing
+	3. Verified Boot
 
 1. Allwinner 64-bit boards
 ==========================
@@ -172,7 +173,62 @@ Then write this image to a microSD card, replacing /dev/sdx with the right
 device file (see above):
 $ dd if=firmware.img of=/dev/sdx bs=8k seek=1
 
-2. Verified Boot
+2. Allwinner NAND flashing
+==========================
+
+A lot of Allwinner devices, especially the older ones (pre-H3 era),
+comes with a NAND. NANDs storages are a pretty weak choice when it
+comes to the reliability, and it comes with a number of flaws like
+read and write disturbs, data retention issues, bloks becoming
+unusable, etc.
+
+In order to mitigate that, various strategies have been found to be
+able to recover from those issues like ECC, hardware randomization,
+and of course, redundancy for the critical parts.
+
+This is obviously something that we will take into account when
+creating our images. However, the BROM will use a quite weird pattern
+when accessing the NAND, and will access only at most 4kB per page,
+which means that we also have to split that binary accross several
+pages.
+
+In order to accomodate that, we create a tool that will generate an
+SPL image that is ready to be programmed directly embedding the ECCs,
+randomized, and with the necessary bits needed to reduce the number of
+bitflips. The U-Boot build system, when configured for the NAND will
+also generate the image sunxi-spl-with-ecc.bin that will have been
+generated by that tool.
+
+In order to flash your U-Boot image onto a board, assuming that the
+board is in FEL mode, you'll need the sunxi-tools that you can find at
+this repository: https://github.com/linux-sunxi/sunxi-tools
+
+Then, you'll need to first load an SPL to initialise the RAM:
+sunxi-fel spl spl/sunxi-spl.bin
+
+Load the binaries we'll flash into RAM:
+sunxi-fel write 0x4a000000 u-boot-dtb.bin
+sunxi-fel write 0x43000000 spl/sunxi-spl-with-ecc.bin
+
+And execute U-Boot
+sunxi-fel exe 0x4a000000
+
+On your board, you'll now have all the needed binaries into RAM, so
+you only need to erase the NAND...
+
+nand erase.chip
+
+Then write the SPL and its backup:
+
+nand write.raw.noverify 0x43000000 0 40
+nand write.raw.noverify 0x43000000 0x400000 40
+
+And finally write the U-Boot binary:
+nand write 0x4a000000 0x800000 0xc0000
+
+You can now reboot and enjoy your NAND.
+
+3. Verified Boot
 ================
 
 U-Boot supports an image verification method called "Verified Boot".
-- 
2.7.4

  parent reply	other threads:[~2017-12-13  6:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  6:03 [U-Boot] [PATCH v3 1/5] sunxi: a64: Enable FIT Signature Jagan Teki
2017-12-13  6:03 ` [U-Boot] [PATCH v3 2/5] sunxi: arm64: Increase CONFIG_SYS_BOOTM_LEN to 32MB Jagan Teki
2017-12-13 15:34   ` Maxime Ripard
2017-12-13  6:03 ` [U-Boot] [PATCH v3 3/5] docs: Document verified-boot for sunxi a64 Jagan Teki
2017-12-13 15:38   ` Maxime Ripard
2017-12-13 16:11     ` Jagan Teki
2017-12-14  9:07       ` Maxime Ripard
2017-12-13 15:59   ` Quentin Schulz
2017-12-13 16:16     ` Jagan Teki
2017-12-13 16:25       ` Andre Przywara
2017-12-13 16:35         ` Jagan Teki
2017-12-13 16:47           ` Andre Przywara
2017-12-14  1:28             ` Tom Rini
2017-12-13  6:03 ` [U-Boot] [PATCH v3 4/5] docs: README.sunxi: Move sunxi64 documentation Jagan Teki
2017-12-13 15:38   ` Maxime Ripard
2017-12-13 16:21     ` Jagan Teki
2017-12-13 16:12   ` Andre Przywara
2017-12-14  1:30     ` Tom Rini
2017-12-13  6:03 ` Jagan Teki [this message]
2017-12-13 15:39 ` [U-Boot] [PATCH v3 1/5] sunxi: a64: Enable FIT Signature Maxime Ripard
2017-12-13 16:08   ` [U-Boot] [linux-sunxi] " Peter Korsgaard
2017-12-14  8:16     ` Jagan Teki
2017-12-14  8:51       ` Peter Korsgaard
2017-12-14  8:33   ` [U-Boot] " Jagan Teki
2017-12-15 13:41     ` Maxime Ripard
2017-12-15 14:36       ` Andre Przywara
2017-12-15 15:05         ` Jagan Teki
2017-12-15 15:31           ` Andre Przywara
2017-12-15 15:02       ` Jagan Teki

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=1513144986-13619-5-git-send-email-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.