From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 15/15] M28: Add doc/README.m28 documentation
Date: Mon, 12 Sep 2011 06:06:49 +0200 [thread overview]
Message-ID: <1315800409-19876-16-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1315800409-19876-1-git-send-email-marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
---
doc/README.m28 | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 223 insertions(+), 0 deletions(-)
create mode 100644 doc/README.m28
diff --git a/doc/README.m28 b/doc/README.m28
new file mode 100644
index 0000000..b749ce0
--- /dev/null
+++ b/doc/README.m28
@@ -0,0 +1,223 @@
+DENX M28EVK
+===========
+
+This document describes the DENX M28/M28EVK U-Boot port. This document mostly
+covers topics related to making the module/board bootable.
+
+Terminology
+-----------
+
+The dollar symbol ($) introduces a snipped of shell code. This shall be typed
+into the unix command prompt in U-Boot source code root directory.
+
+The (=>) introduces a snipped of code that should by typed into U-Boot command
+prompt.
+
+Contents
+--------
+
+0) Files of the M28/M28EVK port
+1) Prerequisites
+2) Compiling U-Boot for M28
+3) Installation of U-Boot for M28EVK to SD card
+4) Installation of U-Boot for M28 to NAND flash
+
+0) Files of the M28/M28EVK port
+-------------------------------
+
+arch/arm/cpu/arm926ejs/mx28/ - The CPU support code for the Freescale i.MX28
+arch/arm/include/asm/arch-mx28/ - Header files for the Freescale i.MX28
+board/denx/m28evk/ - M28EVK board specific files
+include/configs/m28evk.h - M28EVK configuration file
+
+1) Prerequisites
+----------------
+
+To make the M28 module or the M28 module or M28EVK board bootable, some tools
+are necessary. The first one is the "elftosb" tool distributed by Freescale
+Semiconductor. The other tool is the "mxsboot" tool found in U-Boot source tree.
+
+Firstly, obtain the elftosb archive from the following location:
+
+ http://foss.doredevelopment.dk/mirrors/imx/elftosb-10.12.01.tar.gz
+
+We use a $VER variable here to denote the current version. At the time of
+writing of this document, that is "10.12.01". To obtain the file from command
+line, use:
+
+ $ VER="10.12.01"
+ $ wget http://foss.doredevelopment.dk/mirrors/imx/elftosb-${VER}.tar.gz
+
+Extract the file:
+
+ $ tar xzf elftosb-${VER}.tar.gz
+
+Compile the file. We need to manually tell the linker to use also libm:
+
+ $ cd elftosb-${VER}/
+ $ make LIBS="-lstdc++ -lm" elftosb
+
+Optionally, remove debugging symbols from elftosb:
+
+ $ strip bld/linux/elftosb
+
+Finally, install the "elftosb" binary. The "install" target is missing, so just
+copy the binary by hand:
+
+ $ sudo cp bld/linux/elftosb /usr/local/bin/
+
+Make sure the "elftosb" binary can be found in your $PATH, in this case this
+means "/usr/local/bin/" has to be in your $PATH.
+
+2) Compiling U-Boot for M28
+---------------------------
+
+Compiling the U-Boot for M28 is straightforward and done as compiling U-Boot
+for any other ARM device. For cross-compiler setup, please refer to ELDK5.0
+documentation. First, clean up the source code:
+
+ $ make mrproper
+
+Next, configure U-Boot for M28EVK:
+
+ $ make m28evk_config
+
+Lastly, compile U-Boot and prepare a "BootStream". The "BootStream" is a special
+type of file, which the i.MX28 CPU can boot. This is handled by the following
+command:
+
+ $ make u-boot.sb
+
+HINT: To speed-up the build process, you can add -j<N>, where N is number of
+ compiler instances that'll run in parallel.
+
+The code produces "u-boot.sb" file. This file needs to be augmented with a
+proper header to allow successful boot from SD or NAND. Adding the header is
+discussed in the following chapters.
+
+3) Installation of U-Boot for M28EVK to SD card
+-----------------------------------------------
+
+To boot an M28 from SD, set the boot mode DIP switches according to i.MX28
+manual chapter 12.2.1 (Table 12-2), PORT=SSP0, SD/MMC master on SSP0, 3.3V.
+
+An SD card the i.MX28 CPU can use to boot U-Boot must contain a DOS partition
+table, which in turn carries a partition of special type and which contains a
+special header. The rest of partitions in the DOS partition table can be used
+by the user.
+
+To prepare such partition, use your favourite partitioning tool. The partition
+must have the following parameters:
+
+ * Start sector .......... sector 2048
+ * Partition size ........ at least 1024 kb
+ * Partition type ........ 0x53 (sometimes "OnTrack DM6 Aux3")
+
+For example in Linux fdisk, the sequence for a clear card is the following:
+
+ * o ..................... create a clear partition table
+ * n ..................... create new partition
+ * p ............. primary partition
+ * 1 ............. first partition
+ * 2048 .......... first sector is 2048
+ * +1M ........... make the partition 1Mb big
+ * t 1 ................... change first partition ID
+ * 53 ............ change the ID to 0x53 (OnTrack DM6 Aux3)
+ * <create other partitions>
+ * w ..................... write partition table to disk
+
+The partition layout is ready, next the special partition must be filled with
+proper contents. The contents is generated by running the following command (see
+chapter 2)):
+
+ $ ./tools/mxsboot sd u-boot.sb u-boot.sd
+
+The resulting file, "u-boot.sd", shall then be written to the partition. In this
+case, we assume the first partition of the SD card is /dev/mmcblk0p1:
+
+ $ dd if=u-boot.sd of=/dev/mmcblk0p1
+
+Last step is to insert the card into M28EVK and boot.
+
+NOTE: If the user needs to adjust the start sector, the "mxsboot" tool contains
+ a "-p" switch for that purpose. The "-p" switch takes the sector number as
+ an argument.
+
+4) Installation of U-Boot for M28 to NAND flash
+-----------------------------------------------
+
+To boot an M28 from NAND, set the boot mode DIP switches according to i.MX28
+manual chapter 12.2.1 (Table 12-2), PORT=GPMI, NAND 1.8 V.
+
+There are two possibilities when preparing an image writable to NAND flash.
+
+ I) The NAND wasn't written at all yet or the BCB is broken
+ ----------------------------------------------------------
+ In this case, both BCB (FCB and DBBT) and firmware needs to be
+ written to NAND. To generate NAND image containing all these,
+ there is a tool called "mxsboot" in the "tools/" directory. The tool
+ is invoked on "u-boot.sb" file from chapter 2):
+
+ $ ./tools/mxsboot nand u-boot.sb u-boot.nand
+
+ NOTE: The above invokation works for NAND flash with geometry of
+ 2048b per page, 64b OOB data, 128kb erase size. If your chip
+ has a different geometry, please use:
+
+ -w <size> change page size (default 2048 b)
+ -o <size> change oob size (default 64 b)
+ -e <size> change erase size (default 131072 b)
+
+ The geometry information can be obtained from running U-Boot
+ on M28 by issuing the "nand info" command.
+
+ The resulting file, "u-boot.nand" can be written directly to NAND
+ from the U-Boot prompt. To simplify the process, the U-Boot default
+ environment contains script "update_nand_full" to update the system.
+
+ This script expects a working TFTP server containing the file
+ "u-boot.nand" in it's root directory. This can be changed by
+ adjusting the "update_nand_full_filename" varible.
+
+ To update the system, run the following in U-Boot prompt:
+
+ => run update_nand_full
+
+ In case you would only need to update the bootloader in future,
+ see II) below.
+
+ II) The NAND was already written with a good BCB
+ ------------------------------------------------
+ This part applies after the part I) above was done at least once.
+
+ If part I) above was done correctly already, there is no need to
+ write the FCB and DBBT parts of NAND again. It's possible to upgrade
+ only the bootloader image.
+
+ To simplify the process of firmware update, the U-Boot default
+ environment contains script "update_nand_firmware" to update only
+ the firmware, without rewriting FCB and DBBT.
+
+ This script expects a working TFTP server containing the file
+ "u-boot.sb" in it's root directory. This can be changed by
+ adjusting the "update_nand_firmware_filename" varible.
+
+ To update the system, run the following in U-Boot prompt:
+
+ => run update_nand_firmware
+
+ III) Special settings for the update scripts
+ --------------------------------------------
+ There is a slight possibility of the user wanting to adjust the
+ STRIDE and COUNT options of the NAND boot. For description of these,
+ see i.MX28 manual section 12.12.1.2 and 12.12.1.3.
+
+ The update scripts take this possibility into account. In case the
+ user changes STRIDE by blowing fuses, the user also has to change
+ "update_nand_stride" variable. In case the user changes COUNT by
+ blowing fuses, the user also has to change "update_nand_count"
+ variable for the update scripts to work correctly.
+
+ In case the user needs to boot a firmware image bigger than 1Mb, the
+ user has to adjust the "update_nand_firmware_maxsz" variable for the
+ update scripts to work properly.
--
1.7.5.4
next prev parent reply other threads:[~2011-09-12 4:06 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 4:06 [U-Boot] [PATCH 00/15 V2] Support for the DENX M28 SoM Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 01/15] iMX28: Initial support for iMX28 CPU Marek Vasut
2011-09-14 7:10 ` Stefano Babic
2011-09-27 13:45 ` [U-Boot] [PATCH 01/15 V2] " Marek Vasut
2011-09-30 9:42 ` [U-Boot] [PATCH 01/15 V3] " Marek Vasut
2011-10-13 16:19 ` Stefano Babic
2011-10-13 18:14 ` Marek Vasut
2011-10-13 20:45 ` Wolfgang Denk
2011-10-14 7:51 ` Stefano Babic
2011-10-14 7:59 ` Marek Vasut
2011-10-14 21:00 ` Wolfgang Denk
2011-10-14 21:06 ` Marek Vasut
2011-10-13 23:38 ` [U-Boot] [PATCH 01/15 V4] " Marek Vasut
2011-10-14 21:14 ` [U-Boot] [PATCH 01/15 V5] " Marek Vasut
2011-10-14 21:01 ` [U-Boot] [PATCH 01/15 V3] " Wolfgang Denk
2011-10-14 21:10 ` Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 02/15] iMX28: Add SSP MMC driver Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 03/15] FEC: Add support for iMX28 quirks Marek Vasut
2011-09-14 7:17 ` Stefano Babic
2011-09-14 12:11 ` Marek Vasut
2011-09-14 15:38 ` Mike Frysinger
2011-09-12 4:06 ` [U-Boot] [PATCH 04/15] iMX28: Add PINMUX control Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 05/15] iMX28: Add I2C bus driver Marek Vasut
2011-09-12 5:30 ` Heiko Schocher
2011-09-12 13:31 ` Marek Vasut
2011-09-13 12:05 ` Wolfram Sang
2011-09-13 12:56 ` Marek Vasut
2011-09-13 13:12 ` Wolfram Sang
2011-09-13 13:20 ` Marek Vasut
2011-09-13 13:31 ` Wolfram Sang
2011-09-13 22:24 ` [U-Boot] [PATCH 05/15 V2] " Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 06/15] iMX28: Add GPIO control Marek Vasut
2011-09-14 7:25 ` Stefano Babic
2011-09-12 4:06 ` [U-Boot] [PATCH 07/15] iMX28: Add SPI driver Marek Vasut
2011-09-12 16:35 ` Mike Frysinger
2011-09-12 17:42 ` Marek Vasut
2011-09-12 20:26 ` Mike Frysinger
2011-09-12 22:45 ` Marek Vasut
2011-09-13 22:26 ` [U-Boot] [PATCH 07/15 V2] " Marek Vasut
2011-09-14 2:50 ` Mike Frysinger
2011-09-14 3:14 ` Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 08/15] iMX28: Add APBH DMA driver Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 09/15] iMX28: Add GPMI NAND driver Marek Vasut
2011-09-28 21:26 ` Scott Wood
2011-09-28 21:42 ` Marek Vasut
2011-09-28 21:57 ` Scott Wood
2011-09-28 22:09 ` Marek Vasut
2011-09-28 22:13 ` Scott Wood
2011-09-28 22:34 ` Marek Vasut
2011-09-28 22:12 ` Marek Vasut
2011-09-28 22:23 ` Scott Wood
2011-09-28 22:17 ` [U-Boot] [PATCH 09/15 V2] " Marek Vasut
2011-09-28 22:32 ` [U-Boot] [PATCH 09/15 V3] " Marek Vasut
2011-09-29 0:07 ` [U-Boot] [PATCH 09/15 V4] " Marek Vasut
2011-09-30 9:39 ` [U-Boot] [PATCH 09/15 V5] " Marek Vasut
2011-10-10 21:06 ` Scott Wood
2011-09-12 4:06 ` [U-Boot] [PATCH 10/15] iMX28: Add driver for internal RTC Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 11/15] iMX28: Add image header generator tool Marek Vasut
2011-09-12 16:38 ` Mike Frysinger
2011-09-12 17:40 ` Marek Vasut
2011-09-12 20:24 ` Mike Frysinger
2011-09-12 22:13 ` Marek Vasut
2011-09-13 22:27 ` [U-Boot] [PATCH 11/15 V2] " Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 12/15] iMX28: Add u-boot.sb target to Makefile Marek Vasut
2011-09-12 16:33 ` Mike Frysinger
2011-09-12 17:40 ` Marek Vasut
2011-09-13 22:28 ` [U-Boot] [PATCH 12/15 V2] " Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 13/15] iMX28: Add support for DENX M28EVK board Marek Vasut
2011-09-13 22:29 ` [U-Boot] [PATCH 13/15 V2] " Marek Vasut
2011-09-14 2:48 ` Mike Frysinger
2011-09-14 3:17 ` Marek Vasut
2011-09-14 3:33 ` Mike Frysinger
2011-09-14 4:24 ` Marek Vasut
2011-09-14 5:01 ` Mike Frysinger
2011-09-14 5:10 ` Marek Vasut
2011-09-14 22:12 ` Mike Frysinger
2011-09-14 23:13 ` Marek Vasut
2011-09-20 2:15 ` [U-Boot] [PATCH 13/15 V3] " Marek Vasut
2011-09-12 4:06 ` [U-Boot] [PATCH 14/15] M28: Add MMC SPL Marek Vasut
2011-09-30 9:40 ` [U-Boot] [PATCH 14/15 V2] " Marek Vasut
2011-10-14 12:09 ` [U-Boot] [PATCH 14/15 V3] " Marek Vasut
2011-09-12 4:06 ` Marek Vasut [this message]
2011-10-21 22:44 ` [U-Boot] [PATCH 00/17 V3] Support for the DENX M28 SoM Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 01/17 RESEND V5] iMX28: Initial support for iMX28 CPU Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 02/17 RESEND] iMX28: Add SSP MMC driver Marek Vasut
2011-11-08 20:45 ` Andy Fleming
2011-11-08 21:42 ` Marek Vasut
2011-11-08 21:50 ` Andy Fleming
2011-11-09 8:18 ` Stefano Babic
2011-11-09 8:38 ` Marek Vasut
2011-11-09 8:52 ` Stefano Babic
2011-10-21 22:44 ` [U-Boot] [PATCH 03/17 RESEND] FEC: Add support for iMX28 quirks Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 04/17 RESEND] iMX28: Add PINMUX control Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 05/17 RESEND V2] iMX28: Add I2C bus driver Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 06/17 RESEND] iMX28: Add GPIO control Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 07/17 RESEND V2] iMX28: Add SPI driver Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 08/17 RESEND] iMX28: Add APBH DMA driver Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 09/17 RESEND V5] iMX28: Add GPMI NAND driver Marek Vasut
2011-11-04 13:13 ` Veli-Pekka Peltola
2011-11-04 13:30 ` Marek Vasut
2011-11-04 14:02 ` Veli-Pekka Peltola
2011-11-05 2:24 ` Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 10/17 RESEND] iMX28: Add driver for internal RTC Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 11/17 RESEND V2] iMX28: Add image header generator tool Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 12/17 V3] iMX28: Add u-boot.sb target to Makefile Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 13/17 V4] iMX28: Add support for DENX M28EVK board Marek Vasut
2011-10-31 9:12 ` Igor Grinberg
2011-10-31 11:42 ` [U-Boot] [PATCH 13/17 V5] " Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 14/17 V4] M28: Add MMC SPL Marek Vasut
2011-10-23 21:42 ` Robert Schwebel
2011-10-31 11:44 ` [U-Boot] [PATCH 14/17 V5] " Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 15/17 RESEND] M28: Add doc/README.m28 documentation Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 16/17] iMX28: Fix ARM vector handling Marek Vasut
2011-10-21 22:44 ` [U-Boot] [PATCH 17/17] M28: Add memory detection into SPL Marek Vasut
2011-10-31 11:45 ` [U-Boot] [PATCH 17/17 V2] " Marek Vasut
2011-11-05 2:39 ` [U-Boot] [PATCH 17/17 V3] " Marek Vasut
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=1315800409-19876-16-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox