Hi to all,
For my custom DM6446 design I followed the below link to write kernel image to NAND flash
http://processors.wiki.ti.com/index.php/Writing_Kernel_Image_to_NAND_Flash
-------------------------------------------------------------------------------------------
DaVinci EVM #tftp 0x80700000 uImage
TFTP from server 192.168.170.238; our IP address is 192.168.184.91
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################
done
Bytes transferred = 1495924 (16d374 hex)
DaVinci EVM # nand erase 0x2060000 0x16d400
NAND erase: device 0 offset 0x2060000, size 0x16d400
Erasing at 0x21cc000 -- 100% complete.
OK
DaVinci EVM # nand write 0x80700000 0x2060000 0x16d400
NAND write: device 0 offset 0x2060000, size 0x16d400
1496064 bytes written: OK
DaVinci EVM # setenv bootcmd 'nboot 80700000 0 2060000;bootm'
DaVinci EVM # saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
DaVinci EVM # boot
Loading from NAND 64MiB 1,8V 8-bit, offset 0x2060000
Image Name: Linux-2.6.10_mvl401
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1495860 Bytes = 1.4 MB
Load Address: 80008000
Entry Point: 80008000
## Booting image at 80700000 ...
Image Name: Linux-2.6.10_mvl401
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1495860 Bytes = 1.4 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
OK
Starting kernel ...
Linux version 2.6.10_mvl401
-------------------------------------------------------------------------------------------
It can succesfully start the kernel read from NAND . However when I reboot the system it gives the below error:
-------------------------------------------------------------------------------------------
Loading from NAND 64MiB 1,8V 8-bit, offset 0x2060000
** Bad Magic Number 0xffffffff **
## Booting image at 80700000 ...
Bad Magic Number
-------------------------------------------------------------------------------------------
I also tried to erase /dev/mtd2 and write uImage to /dev/mtd2 from NFS and saw that my bootparams are erased when I boot it.
What may be the reason for "Bad Magic Number" after reboot?
Thanks and best regards
Ferhat