These targets allow for easy invocation of mxstool, for generating
the u-boot images bootable in mx28 CPU.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Wolfgang Denk <w...@denx.de>
Cc: Stefano Babic <sba...@denx.de>
Cc: Fabio Estevam <feste...@gmail.com>
CC: Albert Aribaud <albert.u.b...@aribaud.net>
---
 Makefile               |    6 ++++++
 doc/README.mx28_common |   39 +++++++++++++++++++++++----------------
 2 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index bd37c7a..cafe12d 100644
--- a/Makefile
+++ b/Makefile
@@ -453,6 +453,12 @@ $(obj)u-boot.sb:       $(obj)u-boot.bin 
$(obj)spl/u-boot-spl.bin
                elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
                        -o $(obj)u-boot.sb
 
+$(obj)u-boot.mx28.sd:  $(obj)u-boot.sb
+               $(obj)tools/mxsboot sd $(obj)u-boot.sb $(obj)u-boot.mx28.sd
+
+$(obj)u-boot.mx28.nand: $(obj)u-boot.sb
+               $(obj)tools/mxsboot nand $(obj)u-boot.sb $(obj)u-boot.mx28.nand
+
 ifeq ($(CONFIG_SANDBOX),y)
 GEN_UBOOT = \
                cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
diff --git a/doc/README.mx28_common b/doc/README.mx28_common
index 448d221..cad3029 100644
--- a/doc/README.mx28_common
+++ b/doc/README.mx28_common
@@ -83,8 +83,10 @@ Examples:
        $ 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:
+type of file, which the i.MX28 CPU can boot. Having this file is useful for
+updating U-Boot on an already running system. In case you need an SD card image
+or NAND image, you can skip this step, since this file will be generated in the
+process anyway. Generation of "BootStream" is handled by the following command:
 
        $ make u-boot.sb
 
@@ -102,7 +104,6 @@ To boot a MX28 based board 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
@@ -133,18 +134,21 @@ 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
+       $ make u-boot.mx28.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:
+The resulting file, "u-boot.mx28.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
+       $ dd if=u-boot.mx28.sd of=/dev/mmcblk0p1
 
 Last step is to insert the card into MX28 based board 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.
+      an argument. The invocation of the "mxsboot" tool for SD boot is like the
+      following:
+
+       $ ./tools/mxsboot sd u-boot.sb u-boot.mx28.sd
 
 4) Installation of U-Boot for NAND flash
 -----------------------------------------------
@@ -158,10 +162,9 @@ There are two possibilities when preparing an image 
writable to NAND flash.
        ----------------------------------------------------------
           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):
+          run the following command:
 
-                $ ./tools/mxsboot nand u-boot.sb u-boot.nand
+                $ make u-boot.mx28.nand
 
           NOTE: The above invokation works for NAND flash with geometry of
                 2048b per page, 64b OOB data, 128kb erase size. If your chip
@@ -172,14 +175,18 @@ There are two possibilities when preparing an image 
writable to NAND flash.
                 -e <size>      change erase size (default 131072 b)
 
                 The geometry information can be obtained from running U-Boot
-                on the MX28 board by issuing the "nand info" command.
+                on the MX28 board by issuing the "nand info" command. The
+                invocation of custom "mxsboot" call is then as follows:
+
+                  $ ./tools/mxsboot nand u-boot.sb u-boot.mx28.nand
 
-          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.
+          The resulting file, "u-boot.mx28,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
+          "u-boot.mx28.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:
-- 
1.7.10

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to