Writing xloader to NAND

Hi,

I had no luck yet to write xloader successfully to Beagle's NAND. Fortunately, I now know how to recover, as without user button pressing it won't boot then any more :wink:

I use x-load.bin.ift_for_NAND from

http://code.google.com/p/beagleboard/downloads/list

with file size of 9808 bytes and

> md5sum x-load.bin.ift_for_NAND
cfe971c26a0dd2c5ac178bbab2443eb8 x-load.bin.ift_for_NAND

Then using uboot 1.3.3 and

http://www.sakoman.net/omap3/flash%20procedure.txt

(uboot 1.3.3 section) I do

-- cut --
U-Boot 1.3.3 (Jun 20 2008 - 17:06:22)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
RAM Configuration:
Bank #0: 80000000 128 MB
Bank #1: 88000000 0 kB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0:1 0x80000000 xload
reading xload

9808 bytes read
OMAP3 beagleboard.org # nand unlock
device 0 whole chip
nand_unlock: start: 00000000, length: 268435456!
NAND flash successfully unlocked
OMAP3 beagleboard.org # nand erase 0 80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write 80000000 0 80000

NAND write: device 0 offset 0x0, size 0x80000
  524288 bytes written: OK
-- cut --

Then, re-powering the board without user button pressed results in no 40T any more, so I think system tries to boot from (broken) NAND, but nothing happens.

Any idea what's wrong here?

Thanks

Dirk

It seems you missed the 'nand ecc hw' step, I needed that to get xload
working when flashing it with uboot 1.1.4.

For reference, these are the steps I use:

mmcinit
fatload mmc 0 0x80200000 x-load.bin.ift
nand unlock
nand ecc hw
nand erase 0 80000
nand write 0x80200000 0 80000
fatload mmc 0 0x80200000 u-boot-beagleboard-git-r9.bin
nand unlock
nand ecc sw
nand erase 80000 160000
nand write 0x80200000 80000 160000

regards,

Koen

koen wrote:

Hi,

I had no luck yet to write xloader successfully to Beagle's NAND.
Fortunately, I now know how to recover, as without user button
pressing it won't boot then any more :wink:

I use x-load.bin.ift_for_NAND from

http://code.google.com/p/beagleboard/downloads/list

with file size of 9808 bytes and

> md5sum x-load.bin.ift_for_NAND
cfe971c26a0dd2c5ac178bbab2443eb8 x-load.bin.ift_for_NAND

Then using uboot 1.3.3 and

http://www.sakoman.net/omap3/flash%20procedure.txt

(uboot 1.3.3 section) I do

-- cut --
U-Boot 1.3.3 (Jun 20 2008 - 17:06:22)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
RAM Configuration:
Bank #0: 80000000 128 MB
Bank #1: 88000000 0 kB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0:1 0x80000000 xload
reading xload

9808 bytes read
OMAP3 beagleboard.org # nand unlock
device 0 whole chip
nand_unlock: start: 00000000, length: 268435456!
NAND flash successfully unlocked
OMAP3 beagleboard.org # nand erase 0 80000

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write 80000000 0 80000

NAND write: device 0 offset 0x0, size 0x80000
524288 bytes written: OK
-- cut --

Then, re-powering the board without user button pressed results in no
40T any more, so I think system tries to boot from (broken) NAND, but
nothing happens.

Any idea what's wrong here?

It seems you missed the 'nand ecc hw' step, I needed that to get xload
working when flashing it with uboot 1.1.4.

Hmm, yes,

http://www.sakoman.net/omap3/flash%20procedure.txt

mentions 'nand ecc hw' in u-boot 1.1.4 section, but u-boot 1.3.3 section doesn't have this. I use uboot 1.3.3 from Steve's git.

For reference, these are the steps I use:

mmcinit
fatload mmc 0 0x80200000 x-load.bin.ift
nand unlock
nand ecc hw
nand erase 0 80000
nand write 0x80200000 0 80000
fatload mmc 0 0x80200000 u-boot-beagleboard-git-r9.bin
nand unlock
nand ecc sw
nand erase 80000 160000
nand write 0x80200000 80000 160000

Thanks

Dirk

You could try loading uboot 1.1.4 into ram, jumping to that and write
x-loader to NAND from there.

regards,

Koen

koen <koen.kooi@gmail.com> writes:

Can you try this procedure, http://code.google.com/p/beagleboard/wiki/BeagleNANDFlashing

Regards,
Khasim

Syed Mohammed, Khasim wrote:

    koen <koen.kooi@gmail.com <mailto:koen.kooi@gmail.com>> writes:

     >> Hi,
     >>
     >> I had no luck yet to write xloader successfully to Beagle's NAND.
     >> Fortunately, I now know how to recover, as without user button
     >> pressing it won't boot then any more :wink:
     >>
     >> I use x-load.bin.ift_for_NAND from
     >>
     >> http://code.google.com/p/beagleboard/downloads/list
     >>
     >> with file size of 9808 bytes and
     >>
     >> > md5sum x-load.bin.ift_for_NAND
     >> cfe971c26a0dd2c5ac178bbab2443eb8 x-load.bin.ift_for_NAND
     >>
     >> Then using uboot 1.3.3 and
     >>
     >> http://www.sakoman.net/omap3/flash%20procedure.txt
     >>
     >> (uboot 1.3.3 section) I do
     >>
     >> -- cut --
     >> U-Boot 1.3.3 (Jun 20 2008 - 17:06:22)
     >>
     >> OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
     >> OMAP3 Beagle Board + LPDDR/NAND
     >> RAM Configuration:
     >> Bank #0: 80000000 128 MB
     >> Bank #1: 88000000 0 kB
     >> NAND: 256 MiB
     >> In: serial
     >> Out: serial
     >> Err: serial
     >> Hit any key to stop autoboot: 0
     >> OMAP3 beagleboard.org <http://beagleboard.org> # mmcinit
     >> OMAP3 beagleboard.org <http://beagleboard.org> # fatload mmc 0:1
    0x80000000 xload
     >> reading xload
     >>
     >> 9808 bytes read
     >> OMAP3 beagleboard.org <http://beagleboard.org> # nand unlock
     >> device 0 whole chip
     >> nand_unlock: start: 00000000, length: 268435456!
     >> NAND flash successfully unlocked
     >> OMAP3 beagleboard.org <http://beagleboard.org> # nand erase 0 80000
     >>
     >> NAND erase: device 0 offset 0x0, size 0x80000
     >> Erasing at 0x60000 -- 100% complete.
     >> OK
     >> OMAP3 beagleboard.org <http://beagleboard.org> # nand write
    80000000 0 80000
     >>
     >> NAND write: device 0 offset 0x0, size 0x80000
     >> 524288 bytes written: OK
     >> -- cut --
     >>
     >> Then, re-powering the board without user button pressed results
    in no
     >> 40T any more, so I think system tries to boot from (broken)
    NAND, but
     >> nothing happens.
     >>
     >> Any idea what's wrong here?
     >
     > It seems you missed the 'nand ecc hw' step, I needed that to get
    xload
     > working when flashing it with uboot 1.1.4. <http://1.1.4.>
     >
     > For reference, these are the steps I use:
     >
     > mmcinit
     > fatload mmc 0 0x80200000 x-load.bin.ift
     > nand unlock
     > nand ecc hw
     > nand erase 0 80000
     > nand write 0x80200000 0 80000
     > fatload mmc 0 0x80200000 u-boot-beagleboard-git-r9.bin
     > nand unlock
     > nand ecc sw
     > nand erase 80000 160000
     > nand write 0x80200000 80000 160000

    I had the same problem flashing x-load with u-boot 1.3.3.
    <http://1.3.3.> Using
    u-boot 1.1.4 with the commands above worked fine.

Can you try this procedure, http://code.google.com/p/beagleboard/wiki/BeagleNANDFlashing

This might help, but wouldn't identify the issue. As discussed at IRC, the issue was the lack of ecc hw switch in git uboot. This is fixed now. Similar documentation as your above link is already available at

http://elinux.org/BeagleBoardNAND

Dirk