Hi,
I use ti-sdk-am335x-evm-05.05.00.00 source code for AM335x evm board, and then I can load SPL, U-boot, uImage and ubi.img to nand flash. I can boot from nand flash, but it was fialed when mount UBIFS filesystem via nand, the log is as below:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
U-Boot SPL 2011.09 (Nov 28 2012 - 14:44:40)
Texas Instruments Revision detection unimplemented
Found a daughter card connected
U-Boot 2011.09 (Nov 28 2012 - 14:44:40)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
Found a daughter card connected
NAND: HW ECC Hamming Code selected
256 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment
Net: cpsw
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
Booting from nand ...
HW ECC BCH8 Selected
NAND read: device 0 offset 0x280000, size 0x500000
5242880 bytes read: OK
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3163552 Bytes = 3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.2.0 (darencehuang@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Wed Nov 28 14:49:18 CST 2012
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES1.0 (sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 256MB = 256MB total
[ 0.000000] Memory: 253256k/253256k available, 8888k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc059d000 (5716 kB)
[ 0.000000] .init : 0xc059d000 - 0xc05db000 ( 248 kB)
[ 0.000000] .data : 0xc05dc000 - 0xc0644198 ( 417 kB)
[ 0.000000] .bss : 0xc06441bc - 0xc0671024 ( 180 kB)
[ 0.000000] NR_IRQS:396
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[ 0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
[ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000152] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
[ 0.058959] pid_max: default: 32768 minimum: 301
[ 0.059082] Security Framework initialized
[ 0.059173] Mount-cache hash table entries: 512
[ 0.059570] CPU: Testing write buffer coherency: ok
[ 0.079528] omap_hwmod: pruss: failed to hardreset
[ 0.080657] print_constraints: dummy:
[ 0.081024] NET: Registered protocol family 16
[ 0.083160] OMAP GPIO hardware version 0.1
[ 0.085723] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.087951] omap_i2c.1: alias fck already exists
[ 0.088806] omap2_mcspi.1: alias fck already exists
[ 0.089080] omap2_mcspi.2: alias fck already exists
[ 0.089843] edma.0: alias fck already exists
[ 0.089843] edma.0: alias fck already exists
[ 0.089874] edma.0: alias fck already exists
[ 0.116577] bio: create slab <bio-0> at 0
[ 0.118804] SCSI subsystem initialized
[ 0.120513] usbcore: registered new interface driver usbfs
[ 0.120819] usbcore: registered new interface driver hub
[ 0.121002] usbcore: registered new device driver usb
[ 0.121154] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.121459] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.139007] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.140899] tps65910 1-002d: JTAGREVNUM 0x0
[ 0.143280] print_constraints: VRTC:
[ 0.144744] print_constraints: VIO: at 1800 mV
[ 0.147064] print_constraints: VDD1: 600 <--> 1500 mV at 1262 mV normal
[ 0.149353] print_constraints: VDD2: 600 <--> 1500 mV at 1137 mV normal
[ 0.150360] print_constraints: VDD3: 5000 mV
[ 0.151763] print_constraints: VDIG1: at 1800 mV
[ 0.153198] print_constraints: VDIG2: at 1800 mV
[ 0.154632] print_constraints: VPLL: at 1800 mV
[ 0.156036] print_constraints: VDAC: at 1800 mV
[ 0.157470] print_constraints: VAUX1: at 1800 mV
[ 0.158874] print_constraints: VAUX2: at 3300 mV
[ 0.160339] print_constraints: VAUX33: at 3300 mV
[ 0.161773] print_constraints: VMMC: at 3300 mV
[ 0.162261] tps65910 1-002d: No interrupt support, no core IRQ
[ 0.163482] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.164642] Switching to clocksource gp timer
[ 0.180023] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.180206] musb-hdrc musb-hdrc.0: dma type: pio
[ 0.180511] MUSB0 controller's USBSS revision = 4ea20800
[ 0.181091] musb-hdrc musb-hdrc.0: USB OTG mode controller at d083c000 using PIO, IRQ 18
[ 0.181243] musb-hdrc musb-hdrc.1: dma type: pio
[ 0.181549] MUSB1 controller's USBSS revision = 4ea20800
[ 0.181671] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.181732] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.181884] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.181884] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.181915] usb usb1: Product: MUSB HDRC host driver
[ 0.181915] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[ 0.181945] usb usb1: SerialNumber: musb-hdrc.1
[ 0.182708] hub 1-0:1.0: USB hub found
[ 0.182739] hub 1-0:1.0: 1 port detected
[ 0.183258] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using PIO, IRQ 19
[ 0.183685] NET: Registered protocol family 2
[ 0.183868] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.184173] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.184326] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.184448] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.184448] TCP reno registered
[ 0.184448] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.184478] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.184722] NET: Registered protocol family 1
[ 0.184997] RPC: Registered named UNIX socket transport module.
[ 0.185028] RPC: Registered udp transport module.
[ 0.185028] RPC: Registered tcp transport module.
[ 0.185058] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.185302] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.197418] VFS: Disk quotas dquot_6.5.2
[ 0.197509] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.198028] msgmni has been set to 494
[ 0.201232] alg: No test for stdrng (krng)
[ 0.201934] io scheduler noop registered
[ 0.201934] io scheduler deadline registered
[ 0.201995] io scheduler cfq registered (default)
[ 0.205749] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.823059] console [ttyO0] enabled
[ 0.827301] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.835113] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.842926] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.850738] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.858520] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.875732] brd: module loaded
[ 0.883728] loop: module loaded
[ 0.887268] i2c-core: driver [tsl2550] using legacy suspend method
[ 0.893707] i2c-core: driver [tsl2550] using legacy resume method
[ 0.900146] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.914062] Detected a daughter card on AM335x EVM..
[ 0.919067] CPLD version: CPLD1.0E
[ 0.922821] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.937988] Board name: A33515BB
[ 0.941345] Board version: 1.2A
[ 0.944641] SKU: SKU#01
[ 0.947723] The board is general purpose EVM in profile 0
[ 0.953826] da8xx_lcdc.0: alias fck already exists
[ 0.959472] da8xx_lcdc da8xx_lcdc.0: GLCD: Found TFC_S9700RTWV35TR_01B panel
[ 0.983093] Console: switching to colour frame buffer device 100x30
[ 0.999847] omap-gpmc omap-gpmc: GPMC revision 6.0
[ 1.004852] Registering NAND on CS0
[ 1.009246] omap_i2c.2: alias fck already exists
[ 1.025299] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz
[ 1.031707] tsl2550 2-0039: standard operating mode
[ 1.037536] tsl2550 2-0039: support ver. 1.2 enabled
[ 1.043334] davinci-mcasp.1: alias fck already exists
[ 1.049316] omap_hsmmc.0: alias fck already exists
[ 1.054748] omap_hsmmc.2: alias fck already exists
[ 1.060180] Configure Bluetooth Enable pin...
[ 1.066131] registered am33xx_sr device
[ 1.070373] _regulator_get: 2-0018 supply Vdd not found, using dummy regulator
[ 1.078033] _regulator_get: 2-0018 supply Vdd_IO not found, using dummy regulator
[ 1.106475] lis3lv02d: 8 bits 3DLH sensor found
[ 1.195678] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input0
[ 1.206604] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.213897] omap2-nand driver initializing
[ 1.218597] NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
[ 1.227813] Creating 8 MTD partitions on "omap2-nand.0":
[ 1.233367] 0x000000000000-0x000000020000 : "SPL"
[ 1.239807] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 1.246704] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 1.253540] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 1.260498] 0x000000080000-0x000000260000 : "U-Boot"
[ 1.267669] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 1.274475] 0x000000280000-0x000000780000 : "Kernel"
[ 1.282989] 0x000000780000-0x000010000000 : "File System"
[ 1.393371] OneNAND driver initializing
[ 1.398132] UBI: attaching mtd7 to ubi0
[ 1.402130] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.408691] UBI: logical eraseblock size: 126976 bytes
[ 1.414337] UBI: smallest flash I/O unit: 2048
[ 1.419219] UBI: sub-page size: 512
[ 1.424041] UBI: VID header offset: 2048 (aligned 2048)
[ 1.430297] UBI: data offset: 4096
[ 3.479705] UBI: max. sequence number: 2
[ 3.498077] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 12, need 19
[ 3.510375] UBI: attached mtd7 to ubi0
[ 3.514282] UBI: MTD device name: "File System"
[ 3.520050] UBI: MTD device size: 248 MiB
[ 3.525207] UBI: number of good PEBs: 1921
[ 3.530120] UBI: number of bad PEBs: 67
[ 3.534851] UBI: number of corrupted PEBs: 0
[ 3.539489] UBI: max. allowed volumes: 128
[ 3.544281] UBI: wear-leveling threshold: 4096
[ 3.549194] UBI: number of internal volumes: 1
[ 3.553833] UBI: number of user volumes: 1
[ 3.558471] UBI: available PEBs: 0
[ 3.563079] UBI: total number of reserved PEBs: 1921
[ 3.568267] UBI: number of PEBs reserved for bad PEB handling: 12
[ 3.574615] UBI: max/mean erase counter: 1/0
[ 3.579071] UBI: image sequence number: 516738045
[ 3.584197] UBI: background thread "ubi_bgt0d" started, PID 600
[ 3.591064] CAN device driver interface
[ 3.595062] CAN bus driver for Bosch D_CAN controller 1.0
[ 3.645324] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 3.651763] davinci_mdio davinci_mdio.0: detected phy mask fffffffc
[ 3.659515] davinci_mdio.0: probed
[ 3.663085] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
[ 3.670471] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
[ 3.678161] usbcore: registered new interface driver zd1201
[ 3.684143] usbcore: registered new interface driver cdc_ether
[ 3.690399] usbcore: registered new interface driver cdc_eem
[ 3.696472] usbcore: registered new interface driver dm9601
[ 3.702331] cdc_ncm: 04-Aug-2011
[ 3.705871] usbcore: registered new interface driver cdc_ncm
[ 3.711761] Initializing USB Mass Storage driver...
[ 3.717102] usbcore: registered new interface driver usb-storage
[ 3.723358] USB Mass Storage support registered.
[ 3.728637] mousedev: PS/2 mouse device common for all mice
[ 3.735412] input: matrix-keypad as /devices/platform/matrix-keypad/input/input1
[ 3.744476] input: ti-tsc-adcc as /devices/platform/omap/tsc/input/input2
[ 3.752990] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[ 3.759887] i2c /dev entries driver
[ 3.764129] Linux video capture interface: v2.00
[ 3.769317] usbcore: registered new interface driver uvcvideo
[ 3.775329] USB Video Class driver (1.1.1)
[ 3.780517] lm75 2-0048: hwmon0: sensor 'tmp275'
[ 3.788208] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 3.796783] cpuidle: using governor ladder
[ 3.801544] cpuidle: using governor menu
[ 3.879486] omap4_aes_mod_init: loading AM33X AES driver
[ 3.885162] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[ 3.891723] omap4_aes_probe: probe() done
[ 3.896148] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[ 3.902252] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[ 3.914001] omap4_sham_probe: probe() done
[ 3.920745] usbcore: registered new interface driver usbhid
[ 3.926605] usbhid: USB HID core driver
[ 3.931304] usbcore: registered new interface driver snd-usb-audio
[ 3.942169] mmc1: card claims to support voltages below the defined range. These will be ignored.
[ 3.952270] _regulator_get: 2-001b supply IOVDD not found, using dummy regulator
[ 3.960083] _regulator_get: 2-001b supply DVDD not found, using dummy regulator
[ 3.967773] _regulator_get: 2-001b supply AVDD not found, using dummy regulator
[ 3.975463] _regulator_get: 2-001b supply DRVDD not found, using dummy regulator
[ 3.986114] asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
[ 3.993957] ALSA device list:
[ 3.997100] #0: AM335X EVM
[ 4.000091] oprofile: hardware counters not available
[ 4.005371] oprofile: using timer interrupt.
[ 4.009826] nf_conntrack version 0.5.0 (3957 buckets, 15828 max)
[ 4.016632] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 4.022277] TCP cubic registered
[ 4.025695] NET: Registered protocol family 17
[ 4.030334] can: controller area network core (rev 20090105 abi 8)
[ 4.036895] NET: Registered protocol family 29
[ 4.041503] can: raw protocol (rev 20090105)
[ 4.045959] can: broadcast manager protocol (rev 20090105 t)
[ 4.051910] Registering the dns_resolver key type
[ 4.056915] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 4.064880] ThumbEE CPU extension supported.
[ 4.069427] mux: Failed to setup hwmod io irq -22
[ 4.074981] Power Management for AM33XX family
[ 4.079864] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 4.086517] Copied the M3 firmware to UMEM
[ 4.091003] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
[ 4.098846] smartreflex: probe of smartreflex failed with error -22
[ 4.105957] sr_init: platform driver register failed
[ 4.116333] clock: disabling unused clocks to save power
[ 4.135345] Detected MACID=0:18:31:e0:9f:7
[ 4.140808] cpsw: Detected MACID = 00:18:31:e0:9f:08
[ 4.147766] input: gpio-keys as /devices/platform/gpio-keys/input/input3
[ 4.155639] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
[ 4.166320] UBIFS error (pid 1): ubifs_read_node: bad node type (0 but expected 6)
[ 4.174224] UBIFS error (pid 1): ubifs_read_node: bad node at LEB 0:0, LEB mapping status 1
[ 4.183471] List of all partitions:
[ 4.187194] 1f00 128 mtdblock0 (driver?)
[ 4.192474] 1f01 128 mtdblock1 (driver?)
[ 4.197753] 1f02 128 mtdblock2 (driver?)
[ 4.203033] 1f03 128 mtdblock3 (driver?)
[ 4.208312] 1f04 1920 mtdblock4 (driver?)
[ 4.213562] 1f05 128 mtdblock5 (driver?)
[ 4.218841] 1f06 5120 mtdblock6 (driver?)
[ 4.224121] 1f07 254464 mtdblock7 (driver?)
[ 4.229400] No filesystem could mount root, tried: ubifs
[ 4.235046] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 4.243652] Backtrace:
[ 4.246246] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0422338>] (dump_stack+0x18/0x1c)
[ 4.255035] r6:cf93a006 r5:c05cc1fc r4:c06451c8 r3:c05fe6c8
[ 4.260986] [<c0422320>] (dump_stack+0x0/0x1c) from [<c04223a8>] (panic+0x6c/0x1a0)
[ 4.268981] [<c042233c>] (panic+0x0/0x1a0) from [<c059dd3c>] (mount_block_root+0x20c/0x228)
[ 4.277709] r3:cf81df4c r2:cf81df78 r1:cf81df78 r0:c04fe660
[ 4.283599] r7:00008000
[ 4.286285] [<c059db30>] (mount_block_root+0x0/0x228) from [<c059dfd0>] (prepare_namespace+0xac/0x1d4)
[ 4.295989] [<c059df24>] (prepare_namespace+0x0/0x1d4) from [<c059d90c>] (kernel_init+0x124/0x130)
[ 4.305328] r5:c05da440 r4:c05da440
[ 4.309082] [<c059d7e8>] (kernel_init+0x0/0x130) from [<c0041390>] (do_exit+0x0/0x67c)
[ 4.317352] r5:c059d7e8 r4:00000000
---------------------------------------------------------------------------------------------------------------------------------------------------------------
When creating UBIFS filesystem, I use the following command to create ubi.img:
mkfs.ubifs -r filesystem/ -F -o ubifs.img -m 2048 -e 126976 -c 1580 -v
ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 -v ubinize.cfg
----------------------------------------------------------------------------------------------------------------------------------------------------------------
The ubinize.cfg is as below:
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=192MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
--------------------------------------------------------------------------------------------------------------------------------------------------------------
When flashing UBIFS image to nand partition, the sequence is as below: (I switch SYSBOOT to SD card to boot, and flash ubi.img to nand)
mw.b 0x82000000 0xff 0x2f80000
mmc rescan
fatload mmc 0 0x82000000 ubi.img
nandecc hw 2
nand erase 0x780000 0xf880000
nand write 0x82000000 0x780000 0x2f80000
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
I try to reflash nand. But the result is the same when mount filesystem via nand.
Could you tell me what is wrong? Thanks.
Darence