* [U-Boot] [PATCH v3] README.mx28evk: add
@ 2012-03-21 15:26 Otavio Salvador
2012-03-21 19:26 ` Marek Vasut
0 siblings, 1 reply; 3+ messages in thread
From: Otavio Salvador @ 2012-03-21 15:26 UTC (permalink / raw)
To: u-boot
This is mainline a copy of README.m28 changing the references to the
mx28evk counterpart and removing NAND instructions as it is not
supported by the board.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
---
doc/README.mx28evk | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 153 insertions(+), 0 deletions(-)
create mode 100644 doc/README.mx28evk
diff --git a/doc/README.mx28evk b/doc/README.mx28evk
new file mode 100644
index 0000000..ddca310
--- /dev/null
+++ b/doc/README.mx28evk
@@ -0,0 +1,153 @@
+Freescale MX28EVK
+=================
+
+This document describes the Freescale MX28EVK U-Boot port. This document mostly
+covers topics related to making the board bootable. Only the MX28EVK revision D
+has been tested.
+
+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 MX28EVK port
+1) Prerequisites
+2) Compiling U-Boot for MX28EVK
+3) Installation of U-Boot for MX28EVK to SD card
+
+0) Files of the MX28EVK 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/mx28evk/ - MX28EVK board specific files
+include/configs/mx28evk.h - MX28EVK configuration file
+
+1) Prerequisites
+----------------
+
+To make the MX28EVK 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 MX28
+----------------------------
+
+Compiling the U-Boot for MX28 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 MX28EVK:
+
+ $ make mx28evk_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 MX28EVK to SD card
+------------------------------------------------
+
+To boot an MX28 from SD, set the boot mode DIP switches as:
+
+ * Boot Mode Select: 1 0 0 1 (Boot from SD card Slot 0 - U42)
+ * JTAG PSWITCH RESET: To the left (reset enabled)
+ * Battery Source: Down
+ * Wall 5V: Up
+ * VDD 5V: To the left (off)
+ * Hold Button: Down (off)
+
+Full reference at i.MX28 manual chapter 12.2.1 (Table 12-2).
+
+An SD card that can be used to boot U-Boot on a i.MX28 CPU 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 follows. Be sure to
+run fdisk with the option "-u=sectors" to set units to sectors:
+
+ * 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 MX28EVK 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.
--
1.7.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v3] README.mx28evk: add
2012-03-21 15:26 [U-Boot] [PATCH v3] README.mx28evk: add Otavio Salvador
@ 2012-03-21 19:26 ` Marek Vasut
2012-03-21 19:41 ` Otavio Salvador
0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2012-03-21 19:26 UTC (permalink / raw)
To: u-boot
Dear Otavio Salvador,
> This is mainline a copy of README.m28 changing the references to the
> mx28evk counterpart and removing NAND instructions as it is not
> supported by the board.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> doc/README.mx28evk | 153
> ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 153
> insertions(+), 0 deletions(-)
> create mode 100644 doc/README.mx28evk
>
> diff --git a/doc/README.mx28evk b/doc/README.mx28evk
> new file mode 100644
> index 0000000..ddca310
> --- /dev/null
> +++ b/doc/README.mx28evk
> @@ -0,0 +1,153 @@
> +Freescale MX28EVK
> +=================
> +
> +This document describes the Freescale MX28EVK U-Boot port. This document
> mostly +covers topics related to making the board bootable. Only the
> MX28EVK revision D +has been tested.
> +
> +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 MX28EVK port
> +1) Prerequisites
> +2) Compiling U-Boot for MX28EVK
> +3) Installation of U-Boot for MX28EVK to SD card
> +
> +0) Files of the MX28EVK 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/mx28evk/ - MX28EVK board specific files
> +include/configs/mx28evk.h - MX28EVK configuration file
> +
> +1) Prerequisites
> +----------------
> +
> +To make the MX28EVK 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.
This is copy-paste
> +
> +2) Compiling U-Boot for MX28
> +----------------------------
> +
> +Compiling the U-Boot for MX28 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 MX28EVK:
> +
> + $ make mx28evk_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.
> +
Copy-paste
> +3) Installation of U-Boot for MX28EVK to SD card
> +------------------------------------------------
> +
> +To boot an MX28 from SD, set the boot mode DIP switches as:
> +
> + * Boot Mode Select: 1 0 0 1 (Boot from SD card Slot 0 - U42)
> + * JTAG PSWITCH RESET: To the left (reset enabled)
> + * Battery Source: Down
> + * Wall 5V: Up
> + * VDD 5V: To the left (off)
> + * Hold Button: Down (off)
> +
> +Full reference at i.MX28 manual chapter 12.2.1 (Table 12-2).
> +
> +An SD card that can be used to boot U-Boot on a i.MX28 CPU 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 follows. Be sure
> to +run fdisk with the option "-u=sectors" to set units to sectors:
> +
> + * 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 MX28EVK 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.
All of this seems like a copy-paste to me, sorry if I'm just being annoyed right
now and dumbified by it. Please clear this to me as I'm uncertain about my
reading skills now.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v3] README.mx28evk: add
2012-03-21 19:26 ` Marek Vasut
@ 2012-03-21 19:41 ` Otavio Salvador
0 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2012-03-21 19:41 UTC (permalink / raw)
To: u-boot
On Wed, Mar 21, 2012 at 16:26, Marek Vasut <marek.vasut@gmail.com> wrote:
>> This is mainline a copy of README.m28 changing the references to the
>> mx28evk counterpart and removing NAND instructions as it is not
>> supported by the board.
>
> All of this seems like a copy-paste to me, sorry if I'm just being annoyed right
> now and dumbified by it. Please clear this to me as I'm uncertain about my
> reading skills now.
We share a lot of information among the two boards (mx28evk and
m28evk) and this ends duplicating some information, however I don't
think both are similar enough that end user won't be confused about
them. As you can see comparing both the mx28evk:
* adds pins settings;
* boards test revision;
* drop NAND information;
* fix references to the board;
Splitting it in two, or three files, will make harder for user to find
the need information; thus it seems better to have a small duplication
of this and easy end user finding.
I do think many boards has common stuff but splitting those details
too much ends up making hard to find the needed information.
--
Otavio Salvador? ? ? ? ? ? ? ? ? ? ? ? ? ? ?O.S. Systems
E-mail: otavio at ossystems.com.br? http://www.ossystems.com.br
Mobile: +55 53 9981-7854? ? ? ?? ? ? ?http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-21 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 15:26 [U-Boot] [PATCH v3] README.mx28evk: add Otavio Salvador
2012-03-21 19:26 ` Marek Vasut
2012-03-21 19:41 ` Otavio Salvador
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.