public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] MX28: Add u-boot.mx28.sd and u-boot.mx28.nand make targets
@ 2012-05-22 23:32 Marek Vasut
  2012-05-22 23:32 ` [U-Boot] [PATCH 2/3] MX28: Cleanup mxsboot within make mrproper Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Marek Vasut @ 2012-05-22 23:32 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
CC: Albert Aribaud <albert.u.boot@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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-06-22 13:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 23:32 [U-Boot] [PATCH 1/3] MX28: Add u-boot.mx28.sd and u-boot.mx28.nand make targets Marek Vasut
2012-05-22 23:32 ` [U-Boot] [PATCH 2/3] MX28: Cleanup mxsboot within make mrproper Marek Vasut
2012-05-22 23:32 ` [U-Boot] [PATCH 3/3] M28: Disable USB power on boot Marek Vasut
2012-05-23 11:14   ` Wolfgang Denk
2012-05-23 11:53     ` Marek Vasut
2012-05-23 12:48       ` Fabio Estevam
2012-05-23 13:08         ` Marek Vasut
2012-05-23 13:10           ` Fabio Estevam
2012-05-23 13:01   ` Fabio Estevam
2012-05-23 13:07     ` Marek Vasut
2012-05-23 13:15       ` Fabio Estevam
2012-05-23 13:20         ` Marek Vasut
2012-05-23  9:16 ` [U-Boot] [PATCH 1/3] MX28: Add u-boot.mx28.sd and u-boot.mx28.nand make targets Wolfgang Denk
2012-05-23  9:27   ` Marek Vasut
2012-05-23  9:44     ` Marek Vasut
2012-05-23 11:17       ` Wolfgang Denk
2012-05-23 11:34         ` Marek Vasut
2012-05-23 11:47           ` Wolfgang Denk
2012-05-23 12:22             ` Marek Vasut
2012-06-21 20:31               ` Wolfgang Denk
2012-06-22 12:44                 ` Marek Vasut
2012-06-22 13:11                   ` Wolfgang Denk
2012-05-23 11:16     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox