Hello to all,
We're using DM8127 custom board with IPNC RDK.
After trying many different ways and reading many WIki articles about how to boot from an SD card and then how to copy u-boot, uImage and filesystem to NAND so that unit will work stand-alone (without NFS and without SD card), I came up with the instructions below.
Unfortunately, with all of the documentation, these steps were not clear. I'm not sure if I have to prepare the filesystem on the SD card, if I'm using the SD card just in order to prepare the NAND on a new board.
I'd appreciate any comments. The SD card is recognized as /dev/sdb.
In order to build the bootableSD so that the NAND can be burned, files were copied as follows into a single directory:
from Binaries/DM8127/Rev1/sd/J003
---------------------------------
mksd-ti81xx.sh
filesys_full_feature.tar.gz
MLO
from Binaries/DM8127/Rev1/nand/J003
-----------------------------------
u-boot.bin
u-boot.min.nand
uImage
Steps for creating bootable SD:
-------------------------------
1) first umount /dev/sdb1 and /dev/sdb
2) navigate to directory with all of above files and run script as follows:
./mksd-ti81xx.sh /dev/sdb MLO u-boot.bin uImage filesys_full_feature.tar.gz
3) It should take a while - ending with
[Making filesystems...],
[Copying files...]
and then [Done]
4) fdisk -l should show:
Disk /dev/sdb: 3965 MB, 3965190144 bytes
255 heads, 63 sectors/track, 482 cylinders, total 7744512 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 144584 72261 c W95 FAT32 (LBA)
/dev/sdb2 160650 7743329 3791340 83 Linux
[Note: lines with disk details and bottom line will be different according to size of SD card]
5) copy ubifs_ipnc_full_feature.bin into the SD/boot directory
The umount step was not mentioned anywhere - but without it, the disk is not recognized and can't be partitioned.
The link below was helpful - but the ecc commands caused errors - and I understand that in the newer versions, there should be no ecc commands.
Insert SD card and put jumper on JP2. Boot system from SD card.
To copy from the SD card to the NAND, perform the following at the TI8148_IPNC# prompt (also partially documented):
mmc rescan 0
nand scrub 0x006C0000 0xB940000
mw.b 0x81000000 0xFF 0x5000000
fatload mmc 0 0x81000000 ubifs_ipnc_full_feature.bin
nand erase 0x006C0000 0xB940000
nand write 0x81000000 0x006C0000 0x5000000
mmc rescan 0
mw.b 0x81000000 0xFF 0x20000
fatload mmc 0 0x81000000 u-boot.min.nand
nand erase 0x0 0x20000
nand write.i 0x81000000 0x0 0x20000
mmc rescan 0
mw.b 0x81000000 0xFF 0x20000
fatload mmc 0 0x81000000 u-boot.bin
nand erase 0x20000 0x60000
nand write.i 0x81000000 0x20000 0x60000
The environment variables must be set, also:
setenv bootargs 'console=ttyO0,115200n8 rootwait=1 rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs init=/init mem=80M vram=4M notifyk.vpssm3_sva=0xBFD00000 eth=00.0C.0C.02.39.5F cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk'
setenv fileaddr 81000000
setenv filesize 3980000
saveenv
Power off system. Remove SD card, remove JP2 jumper. Power up. Should be running from NAND.
I'd appreciate any comments - and also if this helps someone, I'd like to know.
Thanks,
Mechi