I'm trying to boot ti-gingerbread completely from Nand using the instruction from:
http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3-DevKit-1.0_UserGuide
My processor is an OMAP3530 running on a logicpd torpedo with 256MB of nand. I followed the procedure exactly on ubuntu 10.10 with only a smaller flash size in my ubinize.cfg file:
oak(milano)/tmp/milano# cat ubinize.cfg
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=128MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
oak(milano)/tmp/milano#
Here's a log of the steps on host:
oak(milano)/tmp/milano# mkdir temp
oak(milano)/tmp/milano# cd temp
oak(milano)/tmp/milano/temp# tar -xf /vobs/Firebolt-Android/platform/gingerbread/out/target/product/firebolt/rootfs.tar.bz2
oak(milano)/tmp/milano/temp# cd ..
oak(milano)/tmp/milano# chmod 777 temp/
oak(milano)/tmp/milano# ubinize -o ubi.img -m 2048 -p 128KiB -s 512 ubinize.cfg
oak(milano)/tmp/milano# ls -ltr
total 113300
-rw-r--r-- 1 milano milano 112 2011-06-09 17:49 ubinize.cfg
drwxrwxrwx 8 milano milano 4096 2011-06-09 17:50 temp/
-rw-r--r-- 1 root root 57415680 2011-06-09 17:50 ubifs.img
-rw-r--r-- 1 milano milano 58589184 2011-06-09 17:51 ubi.img
oak(milano)/tmp/milano# export ANDROID_ROOT=/vobs/Firebolt-Android/platform/gingerbread
oak(milano)/tmp/milano# cd $ANDROID_ROOT/out/host/linux-x86/bin
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# fastboot devices
31c8000400000000040365f80d fastboot
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./fastboot flash xloader /vobs/Firebolt-Android/platform/gingerbread/x-load-omap3/x-load.bin.ift
sending 'xloader' (17 KB)...
OKAY [ 0.028s]
writing 'xloader'...
OKAY [ 0.355s]
finished. total time: 0.383s
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./fastboot flash bootloader /vobs/Firebolt-Android/platform/gingerbread/u-boot-omap3/u-boot.bin
sending 'bootloader' (225 KB)...
OKAY [ 0.225s]
writing 'bootloader'...
OKAY [ 0.547s]
finished. total time: 0.772s
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./fastboot flash boot /vobs/Firebolt-Android/platform/gingerbread/kernel/arch/arm/boot/uImage
sending 'boot' (2769 KB)...
OKAY [ 2.636s]
writing 'boot'...
OKAY [ 3.149s]
finished. total time: 5.786s
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./fastboot flash system /tmp/milano/
temp/ ubifs.img ubi.img ubinize.cfg
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./fastboot flash system /tmp/milano/ubi.img
sending 'system' (57216 KB)...
OKAY [ 54.248s]
writing 'system'...
OKAY [ 58.887s]
finished. total time: 113.135s
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# fastboot reboot
Here's the target, the only difference here from the instructions is I removed the mem=256M option:
Texas Instruments X-Loader 1.47 (Jun 6 2011 - 13:25:30)
Trying to Starting X-loader on MMC
Starting X-loader on MMC
MMC init failed
Booting from nand . . .
Starting OS Bootloader...
U-Boot 2010.06 (Jun 09 2011 - 16:39:53)
OMAP3430/3530-GP ES3.1, CPU-OPP2 L3-165MHz
OMAP3 Logic + LPDDR/NAND
I2C: ready
DRAM: 128 MiB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Board: Torpedo
Die ID #31c8000400000000040365f80d00a015
Read production data: failed - invalid header version 3!
board_get_nth_enetaddr:430 which 0 00:00:00:00:00:00
nand_unlock: start: 0ffc0000, length: 262144!
Net: smc911x-0
Hit any key to stop autoboot: 0
=> setenv nandboot 'echo Booting from nand ...; nand read ${loadaddr} ${boot_nand_offset} ${boot_nand_size}; bootm ${loadaddr}'
=> setenv bootcmd 'run nandboot'
=> setenv bootargs 'init=/init console=ttyS0,115200n8 noinitrd ip=off androidboot.console=ttyS0 rootwait \
> omap_vout.vid1_static_vrfb_alloc=y rw ubi.mtd=4 rootfstype=ubifs root=ubi0:rootfs bootdelay=2'
=> boot
Booting from nand ...
NAND read: device 0 offset 0x280000, size 0x2b4800
2836480 bytes read: OK
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux-2.6.32
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2835956 Bytes = 2.7 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux........................................................................................................................................................................
Linux version 2.6.32 (milano@c4imcc01) (gcc version 4.4.0 (GCC) ) #56 Thu Jun 9 14:25:22 EDT 2011
CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Logic OMAP3 Torpedo board on Firebolt
Memory policy: ECC disabled, Data cache writeback
OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
...snip...
omap2-nand driver initializing
OMAP NAND: use WAIT0 as R/B# pin
NAND device: Manufacturer ID: 0xad, Chip ID: 0xba (Hynix NAND 256MiB 1,8V 16-bit)
cmdlinepart partition parsing not available
Creating 8 MTD partitions on "omap2-nand":
0x000000000000-0x000000080000 : "X-Loader"
0x000000080000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "Empty"
0x000000280000-0x000000680000 : "Kernel"
0x000000680000-0x00000a680000 : "System"
0x00000a680000-0x00000e680000 : "Userdata"
0x00000e680000-0x00000fec0000 : "Cache"
0x00000fec0000-0x00000ff00000 : "Environment"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI error: vtbl_check: bad CRC at record 3: 0xd8ca9006, not 0xf116c36b
UBI error: vtbl_check: bad CRC at record 3: 0xd8ca9006, not 0xf116c36b
UBI error: process_lvol: both volume tables are corrupted
UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
UBI error: ubi_init: cannot attach mtd4
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
smsc911x: Driver version 2008-10-21.
...snip...
hub 1-1:1.0: 2 ports detected
UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 512 mtdblock0 (driver?)
1f01 1920 mtdblock1 (driver?)
1f02 128 mtdblock2 (driver?)
1f03 4096 mtdblock3 (driver?)
1f04 163840 mtdblock4 (driver?)
1f05 65536 mtdblock5 (driver?)
1f06 24832 mtdblock6 (driver?)
1f07 256 mtdblock7 (driver?)
b300 3872256 mmcblk0 driver: mmcblk
b301 1935801 mmcblk0p1
b302 1935832 mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Rebooting in 1 seconds..
I had read online about problems with UBIFS in the kernel and the mtd-utils versions and tried a simple yaffs partition image, but this seems to "fastboot flash" corrupted too. And if I boot with my file system on MMC, and xloader, u-boot, and kernel in nand, I still see issues simply trying to mount a yaffs file system. I build the yaffs file system with:
oak(milano)/vobs/Firebolt-Android/platform/gingerbread/out/host/linux-x86/bin# sudo ./mkyaffs2image /tmp/milano/temp /tmp/milano/