diff mbox

[U-Boot,v3,5/5] board/ti/am335x/README: update for NAND boot

Message ID 1377773805-8751-6-git-send-email-pekon@ti.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

pekon gupta Aug. 29, 2013, 10:56 a.m. UTC
NAND boot mode on AM335x EVM has been verified, and steps
to use it has been documented and update in this README

Signed-off-by: Pekon Gupta <pekon@ti.com>
---
 board/ti/am335x/README | 59 +++++++++++++++++++++++++++++++++++---------------
 1 file changed, 42 insertions(+), 17 deletions(-)

Comments

Tom Rini Aug. 29, 2013, 12:56 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/29/2013 06:56 AM, Pekon Gupta wrote:
> NAND boot mode on AM335x EVM has been verified, and steps
> to use it has been documented and update in this README
> 
> Signed-off-by: Pekon Gupta <pekon@ti.com>
[snip]
> +	# redundant copies of MLO are kept as backup
> +	U-Boot # load mmc 0 0x81000000 MLO
> +	U-Boot # nand write 0x81000000 0x00000 0x20000
> +	U-Boot # nand write 0x81000000 0x20000 0x20000
> +	U-Boot # nand write 0x81000000 0x40000 0x20000
> +	U-Boot # nand write 0x81000000 0x60000 0x20000
> +	# flash u-boot.img
> +	U-Boot # load mmc 0 0x81000000 u-boot.img
> +	U-Boot # nand write 0x81000000 0x80000 0x60000

I had lumped these as a series of copies/loads and a single write as the
write operation was the long (time wise) part of the process.

> +	# flash kernel image
> +	U-Boot # load mmc 0 0x81000000 uImage
> +	U-Boot # nand write 0x81000000 {kernel-load-address} 0x500000
> +	# flash filesystem image
> +	U-Boot # load mmc 0 0x81000000 {filesystem-image}
> +	U-Boot # nand write 0x81000000 {filesystem-load-address} 0x300000

These should also reference real variables or MTD parts names.
- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSH0ThAAoJENk4IS6UOR1WvAcP/1zGffL7YBeZ+zAljZ3J19CD
K2xo7Tz6oRiUsvuRAhju6BtSXYL9Un+LMJYt6nh2EUPyBy4IVwQiJY65yComKrfX
+3t4gB7YcL1J7AafGLCUsvcEuenSSH+Q4oadNN0c1ZG014ZbH/6Gad3mVjZL7afZ
Ywehirtkht6YFu1y08V2mre2TfHsi2gGU4/TZLrSvPMRUj/xPUUFLkfCau4VRJlO
9AxqoIgOPRtPRI/e9DowMIMaiF7Z0yYKs8aM+sePmGmyf/cds2+fYVEBj2ZYd6hm
rlMuor2sr+6ARkgycrnRD4rJXJNJVkF+oFnqJVaiDacTHGhEQlbj3JKaSXH5q8zy
deB3wmfrd+pFLk3iqcH2nz+qPO/+9EtZPjjmzrM/lOZadClqZMo5f/ODSq3boDcV
4d3NRTAIIA9u0DhIJhuYy8lctSzIlHyXU2FTbR3TloGOMtjBtPf6w/5tMoe8K6ho
zCmzkMuNigZG8lCfTRRIW8WQvpxkPCnpBMX70yfmaBvKE0XRyb3sU55ulDqKsSDN
cyvkDaaO18IGXzTmMP+H5pB311UskIO739f+/hbm2j/wV/rdV83RY/eTHHbkWILG
Jd6LUdvUJ342aPZUzEwv2xBp2OnrMrOMY10/o4+d2bKcDhr6vze68Cm9RIQoN9U/
DfS9Wd4sHbjVQ0vbti6i
=gBNv
-----END PGP SIGNATURE-----
Tom Rini Aug. 29, 2013, 1:08 p.m. UTC | #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/29/2013 09:01 AM, Gupta, Pekon wrote:
>>
>> On 08/29/2013 06:56 AM, Pekon Gupta wrote:
>>> NAND boot mode on AM335x EVM has been verified, and steps
>>> to use it has been documented and update in this README
>>>
>>> Signed-off-by: Pekon Gupta <pekon@ti.com>
>> [snip]
>>> +	# redundant copies of MLO are kept as backup
>>> +	U-Boot # load mmc 0 0x81000000 MLO
>>> +	U-Boot # nand write 0x81000000 0x00000 0x20000
>>> +	U-Boot # nand write 0x81000000 0x20000 0x20000
>>> +	U-Boot # nand write 0x81000000 0x40000 0x20000
>>> +	U-Boot # nand write 0x81000000 0x60000 0x20000
>>> +	# flash u-boot.img
>>> +	U-Boot # load mmc 0 0x81000000 u-boot.img
>>> +	U-Boot # nand write 0x81000000 0x80000 0x60000
>>
>> I had lumped these as a series of copies/loads and a single write as the
>> write operation was the long (time wise) part of the process.
>>
> Yes, I could see your comment. I just separated each for clarity to user. 
> feel you can drop this one..
> 
>>> +	# flash kernel image
>>> +	U-Boot # load mmc 0 0x81000000 uImage
>>> +	U-Boot # nand write 0x81000000 {kernel-load-address} 0x500000
>>> +	# flash filesystem image
>>> +	U-Boot # load mmc 0 0x81000000 {filesystem-image}
>>> +	U-Boot # nand write 0x81000000 {filesystem-load-address} 0x300000
>>
>> These should also reference real variables or MTD parts names.
> Opps sorry my bad.. 
> I looked it from different angle, just as an example.
> Therefore I added comments above each command to explain each step.
> 
> Anyways this particular patch is just updating README. So, if you may
> drop this PATCH 5/5..

No, I want the README updated, it's helpful.  We should just reference
the other example things we setup like mtdparts (and make use of
${filesize} :)  Thanks!

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSH0fpAAoJENk4IS6UOR1WypsP/RvksLKO3oIUgmCCblr8BnhN
tp1kKIW4P5h90tZ9h7/dPg3Iy77DyZIncEAveu7oDrYYOwL4ThxbRW5oc8UymY6w
ZHD9HZPPzsoDwgDEY4wcL+DkDtqfPZJRewbGWJhb6v7yadFzM4hkW/peGHiEmTWQ
wPCai0ZzlI7A2nSiCvq2nYmjRR59GFupdjbwubzLIUgv9qGAOkd8muZLBpnchU5i
Na1/DLIdzwpEN1GrtmOuLo/TTxBO8rR87R7OAR8zQSmnAAeDYiPzCvZ3k6Ys40S1
7HOK8fP6zmMRor91OsFJ2AsnF2yYJyqp5uBj9hfLfjcKVJdMbSzJMXOxE5H1BRZ+
WlqhFZkTo0DM/Ssrpy9WVgzeqyE2mfE3zST7vb2Y0J4BFGVoX0egFfuKS/x2D71C
mgDPXk31uhT8PmF4VwJiHi9ZW917IpMi1u4PqavrAslY7PHOxDos8YJ8lPqI9C0O
RpyL3YgIQW4uikxxVfeIHlOzLDYNMqxFdS4GBq/towV7JefayV8d+n3B7igKPFcd
DJh7TzHIhGAKD0xN2DDILg1+twRRGvvb1eL1dyNocSzN5mTeaVFZiM3+2FZ8mFff
9sra+ZLoF6+0sF/7+uT1edwVeHeiy25uPTq3m7p/GDpr5Lv99bpgnT105hOT4HSL
JShvbj5X7740l6ofYh2l
=M1AD
-----END PGP SIGNATURE-----
diff mbox

Patch

diff --git a/board/ti/am335x/README b/board/ti/am335x/README
index 67b5246..ef28b00 100644
--- a/board/ti/am335x/README
+++ b/board/ti/am335x/README
@@ -20,23 +20,48 @@  NAND
 The AM335x GP EVM ships with a 256MiB NAND available in most profiles.  In
 this example to program the NAND we assume that an SD card has been
 inserted with the files to write in the first SD slot and that mtdparts
-have been configured correctly for the board.  As a time saving measure we
-load MLO into memory in one location, copy it into the three locatations
-that the ROM checks for additional valid copies, then load U-Boot into
-memory.  We then write that whole section of memory to NAND.
-
-U-Boot # mmc rescan
-U-Boot # env default -f -a
-U-Boot # nand erase.chip
-U-Boot # saveenv
-U-Boot # load mmc 0 81000000 MLO
-U-Boot # cp.b 81000000 81020000 20000
-U-Boot # cp.b 81000000 81040000 20000
-U-Boot # cp.b 81000000 81060000 20000
-U-Boot # load mmc 0 81080000 u-boot.img
-U-Boot # nand write 81000000 0 260000
-U-Boot # load mmc 0 ${loadaddr} uImage
-U-Boot # nand write ${loadaddr} kernel 500000
+have been configured correctly for the board. we load MLO into memory, then
+write it to NAND. Multiple redundant copies of MLO are stored for backup.
+
+Step-1: Building u-boot for NAND boot
+	Set following CONFIGxx options for NAND device.
+	CONFIG_SYS_NAND_PAGE_SIZE	number of main bytes in NAND page
+	CONFIG_SYS_NAND_OOBSIZE		number of OOB bytes in NAND page
+	CONFIG_SYS_NAND_BLOCK_SIZE	number of bytes in NAND erase-block
+	CONFIG_SYS_NAND_ECCPOS		ECC map for NAND page
+	CONFIG_SYS_NAND_ECCSCHEME	ECC scheme used by NAND
+					0 - HAM1_SW
+					1 - HAM1_HW
+					2 - BCH4_SW  (unsupported)
+					3 - BCH4_HW  (unsupported)
+					4 - BCH8_SW
+					5 - BCH8_HW
+
+Step-2: Flashing NAND via MMC/SD
+	# select BOOTSEL to MMC/SD boot and boot from MMC/SD card
+	U-Boot # mmc rescan
+	# erase flash
+	U-Boot # nand erase.chip
+	U-Boot # env default -f -a
+	U-Boot # saveenv
+	# redundant copies of MLO are kept as backup
+	U-Boot # load mmc 0 0x81000000 MLO
+	U-Boot # nand write 0x81000000 0x00000 0x20000
+	U-Boot # nand write 0x81000000 0x20000 0x20000
+	U-Boot # nand write 0x81000000 0x40000 0x20000
+	U-Boot # nand write 0x81000000 0x60000 0x20000
+	# flash u-boot.img
+	U-Boot # load mmc 0 0x81000000 u-boot.img
+	U-Boot # nand write 0x81000000 0x80000 0x60000
+	# flash kernel image
+	U-Boot # load mmc 0 0x81000000 uImage
+	U-Boot # nand write 0x81000000 {kernel-load-address} 0x500000
+	# flash filesystem image
+	U-Boot # load mmc 0 0x81000000 {filesystem-image}
+	U-Boot # nand write 0x81000000 {filesystem-load-address} 0x300000
+
+Step-3: Set BOOTSEL pin to select NAND boot, and POR the device.
+	The device should boot from images flashed on NAND device.
 
 NOR
 ===