This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x板子不能从nand启动以及AM335x Nand 启动UBI出错----请大牛们帮忙分析一下

Other Parts Discussed in Thread: AM3352, TPS65217

我就是按着这个这篇文档制作ubifs的,到最后依然没有能加载ubifs。

简单描述一下我的情况:我们的板子是参考BBB做的,但没有eeprom,板子没有eMMC,而是用的nand flash,除此之外和BBB没多大区别了,现在用的这款主芯片是AM3352。在uboot中改了iic读取eeprom部分,改成BBB的信息,让内核以为是BBB,然后启动。用的SDK包是SDK6.0,内核是3.2,uboot是2013.01.01版本。目前做的SD卡启动,完全没有问题,uboot、kernel和文件系统都没有问题,能启动正常。

遇到了两个问题:

1. SD卡启动uboot后,把MLO, u-boot.img, uImage, ubi,img烧写到板子的nand里,然后上电后,串口打印一直是CCC,并没有从nand启动,板子的SYSBOOT[4:0]=10011b,按说启动顺序是NAND-NANDI2C-MMC-UART,应该从nand启动的,但是没有,具体nandflash型号为:S34ML01G100TF100 。

2.从SD卡启动uboot后,烧写上面那些文件后,拔掉SD卡,输入boot命令,会从nand读取内核,并启动,但是到了要打开ubi0:rootfs的时候出错了,详细的启动打印信息在下面:

请各位前辈和TI的工程师,帮忙分析一下问题可能出在哪里,试了很多方法都不行,这里先谢谢各位大牛了。

U-Boot 2013.01.01 (Oct 24 2014 - 16:56:28)

I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
SKW board, run without EEPROM!
SKW board use default setting as BBB
board header name: [A335BNLT0A5C3513BBBK2751]
board header version: [0A5C3513BBBK2751]
board header serial: [3513BBBK2751]
NAND: 128 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net: <ethaddr> not set. Validating first E-fuse MAC
PHY reset timed out
cpsw, usb_ether
Hit any key to stop autoboot: 0

U-Boot# boot
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
Booting from nand ...

NAND read: device 0 offset 0x280000, size 0x600000
6291456 bytes read: OK
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3249840 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.2.0 (linux@ubuntu) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.03 - Linaro GCC 2014.03) ) #3 Mon Oct 27 14:31:32 CST 2014
[ 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 (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 rootfstype=ubifs rootwait=1
[ 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: 252856k/252856k available, 9288k 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 - 0xc05a6000 (5752 kB)
[ 0.000000] .init : 0xc05a6000 - 0xc063e000 ( 608 kB)
[ 0.000000] .data : 0xc063e000 - 0xc06a7070 ( 421 kB)
[ 0.000000] .bss : 0xc06a7094 - 0xc06d5e64 ( 188 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.000274] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
[ 0.067657] pid_max: default: 32768 minimum: 301
[ 0.067932] Security Framework initialized
[ 0.068084] Mount-cache hash table entries: 512
[ 0.068756] CPU: Testing write buffer coherency: ok
[ 0.093780] omap_hwmod: gfx: failed to hardreset
[ 0.111785] omap_hwmod: pruss: failed to hardreset
[ 0.113708] print_constraints: dummy:
[ 0.114440] NET: Registered protocol family 16
[ 0.118713] OMAP GPIO hardware version 0.1
[ 0.124237] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.127929] +++++++++yidaji++++++++++
[ 0.128021] omap_i2c.1: alias fck already exists
[ 0.128448] ---------yidaji----------
[ 0.128570]
[ 0.128570]
[ 0.128570]
[ 0.128601] i2c1_init_szr has been executed
[ 0.128601]
[ 0.128601]
[ 0.128631]
[ 0.128997] omap_i2c.2: alias fck already exists
[ 0.129425]
[ 0.129455]
[ 0.129455] omap_register_i2c1_bus has succeed
[ 0.129486]
[ 0.129486]
[ 0.130279] +++++++++++++naloudou+++++++++++++++++++
[ 0.130950] omap2_mcspi.1: alias fck already exists
[ 0.131439] omap2_mcspi.2: alias fck already exists
[ 0.133453] edma.0: alias fck already exists
[ 0.133483] edma.0: alias fck already exists
[ 0.133544] edma.0: alias fck already exists
[ 0.193817] bio: create slab <bio-0> at 0
[ 0.198425] SCSI subsystem initialized
[ 0.201690] usbcore: registered new interface driver usbfs
[ 0.202362] usbcore: registered new interface driver hub
[ 0.202758] usbcore: registered new device driver usb
[ 0.203308] registerd cppi-dma Intr @ IRQ 17
[ 0.203338] Cppi41 Init Done Qmgr-base(d087a000) dma-base(d0878000)
[ 0.203369] Cppi41 Init Done
[ 0.203399] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.204010] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.206420] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.209411] tps65910 1-002d: could not be detected

[ 0.227752] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 100 kHz

[ 0.231079] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.233337] Switching to clocksource gp timer
[ 0.267974] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.268280] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[ 0.268890] MUSB0 controller's USBSS revision = 4ea20800
[ 0.270874] musb-hdrc musb-hdrc.0: USB OTG mode controller at d083c000 using DMA, IRQ 18
[ 0.271179] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[ 0.271789] MUSB1 controller's USBSS revision = 4ea20800
[ 0.272735] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.272888] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.273101] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.273162] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.273193] usb usb1: Product: MUSB HDRC host driver
[ 0.273223] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[ 0.273223] usb usb1: SerialNumber: musb-hdrc.1
[ 0.275085] hub 1-0:1.0: USB hub found
[ 0.275146] hub 1-0:1.0: 1 port detected
[ 0.276214] musb-hdrc musb-hdrc.1: USB Host mode controller at d083e800 using DMA, IRQ 19
[ 0.276977] NET: Registered protocol family 2
[ 0.277313] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.277862] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.278228] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.278472] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.278503] TCP reno registered
[ 0.278533] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.278564] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.278991] NET: Registered protocol family 1
[ 0.279479] RPC: Registered named UNIX socket transport module.
[ 0.279510] RPC: Registered udp transport module.
[ 0.279510] RPC: Registered tcp transport module.
[ 0.279541] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.279968] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.295532] VFS: Disk quotas dquot_6.5.2
[ 0.295654] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.296691] msgmni has been set to 493
[ 0.302795] alg: No test for stdrng (krng)
[ 0.304016] io scheduler noop registered
[ 0.304046] io scheduler deadline registered
[ 0.304168] io scheduler cfq registered (default)
[ 0.306274] Could not set LED4 to fully on
[ 0.309295] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.932220] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
[ 0.939208] console [ttyO0] enabled
[ 0.944030] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.952301] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.960510] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.968750] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.977020] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.986267] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[ 1.013610] brd: module loaded
[ 1.027832] loop: module loaded
[ 1.031494] i2c-core: driver [tsl2550] using legacy suspend method
[ 1.038024] i2c-core: driver [tsl2550] using legacy resume method
[ 1.044555] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.103942] No daughter card found
[ 1.107604] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.114898] The board is a AM335x Beaglebone Black.
[ 1.122955] tps65217 1-0024: TPS65217 ID 0xe version 1.2
[ 1.131347] print_constraints: DCDC1: 900 <--> 1800 mV at 1500 mV
[ 1.140716] print_constraints: DCDC2: 900 <--> 3300 mV at 1125 mV
[ 1.149993] print_constraints: DCDC3: 900 <--> 1500 mV at 1125 mV
[ 1.159271] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[ 1.168548] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[ 1.177734] print_constraints: LDO3: 1800 <--> 3300 mV at 1800 mV
[ 1.187072] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[ 1.195007] omap_hsmmc.0: alias fck already exists
[ 1.200805] omap_hsmmc.1: alias fck already exists
[ 1.206573]
[ 1.208129]
[ 1.209686]
[ 1.211273] i2c1_init has been executed
[ 1.215332]
[ 1.216888]
[ 1.218444]
[ 1.220123] omap_i2c.3: alias fck already exists
[ 1.225738] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
[ 1.232849] da8xx_lcdc.0: alias fck already exists
[ 1.238739] da8xx_lcdc da8xx_lcdc.0: GLCD: Found INNOLUX_TN92 panel
[ 1.265106] Console: switching to colour frame buffer device 100x30
[ 1.295410] _omap_mux_get_by_name: Could not find signal ain0.ain0
[ 1.301940] _omap_mux_get_by_name: Could not find signal ain1.ain1
[ 1.308471] _omap_mux_get_by_name: Could not find signal ain2.ain2
[ 1.314971] _omap_mux_get_by_name: Could not find signal ain3.ain3
[ 1.321472] _omap_mux_get_by_name: Could not find signal vrefp.vrefp
[ 1.328155] _omap_mux_get_by_name: Could not find signal vrefn.vrefn
[ 1.337097] omap-gpmc omap-gpmc: GPMC revision 6.0
[ 1.342132] Registering NAND on CS0
[ 1.354309] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.362030] omap2-nand driver initializing
[ 1.366821] ONFI flash detected
[ 1.370269] ONFI param page 0 valid
[ 1.373962] NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD S34ML01G1)
[ 1.381805] Creating 8 MTD partitions on "omap2-nand.0":
[ 1.387451] 0x000000000000-0x000000020000 : "SPL"
[ 1.395416] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 1.403808] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 1.412048] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 1.420349] 0x000000080000-0x000000260000 : "U-Boot"
[ 1.428924] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 1.437225] 0x000000280000-0x000000780000 : "Kernel"
[ 1.447235] 0x000000780000-0x000008000000 : "File System"
[ 1.507507] OneNAND driver initializing
[ 1.512939] UBI: attaching mtd7 to ubi0
[ 1.517059] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.523620] UBI: logical eraseblock size: 126976 bytes
[ 1.529296] UBI: smallest flash I/O unit: 2048
[ 1.534271] UBI: VID header offset: 2048 (aligned 2048)
[ 1.540557] UBI: data offset: 4096
[ 2.622680] UBI: max. sequence number: 0
[ 2.639221] UBI error: vtbl_check: volume table check failed: record 0, error 9
[ 2.647613] UBI error: ubi_init: cannot attach mtd7
[ 2.654602] CAN device driver interface
[ 2.658630] CAN bus driver for Bosch D_CAN controller 1.0
[ 2.714080] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 2.720550] davinci_mdio davinci_mdio.0: detected phy mask fffffffb
[ 2.728271] davinci_mdio.0: probed
[ 2.731872] davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver SMSC LAN8710/LAN8720
[ 2.741210] usbcore: registered new interface driver zd1201
[ 2.747467] usbcore: registered new interface driver cdc_ether
[ 2.753936] usbcore: registered new interface driver cdc_eem
[ 2.760253] usbcore: registered new interface driver dm9601
[ 2.766204] cdc_ncm: 04-Aug-2011
[ 2.769958] usbcore: registered new interface driver cdc_ncm
[ 2.775939] Initializing USB Mass Storage driver...
[ 2.781524] usbcore: registered new interface driver usb-storage
[ 2.787841] USB Mass Storage support registered.
[ 2.793670] mousedev: PS/2 mouse device common for all mice
[ 2.801544] input: ti-tsc as /devices/platform/omap/ti_tscadc/tsc/input/input0
[ 2.811279] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
[ 2.818695] i2c /dev entries driver
[ 2.824127] Linux video capture interface: v2.00
[ 2.829681] usbcore: registered new interface driver uvcvideo
[ 2.835723] USB Video Class driver (1.1.1)
[ 2.924041] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
[ 3.864013] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 4.884033] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 5.904022] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 6.924041] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 7.944030] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 8.964019] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 9.984039] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 11.004028] omap_i2c omap_i2c.2: timeout waiting for bus ready
[ 11.012695] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 11.096099] cpuidle: using governor ladder
[ 11.101104] cpuidle: using governor menu
[ 11.109466] omap4_aes_mod_init: loading AM33X AES driver
[ 11.115234] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[ 11.121917] omap4_aes_probe: probe() done
[ 11.126739] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[ 11.132934] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[ 11.149383] omap4_sham_probe: probe() done
[ 11.158477] usbcore: registered new interface driver usbhid
[ 11.164398] usbhid: USB HID core driver
[ 11.169250] tiadc tiadc: attached adc driver
[ 11.174682] usbcore: registered new interface driver snd-usb-audio
[ 11.183349] ALSA device list:
[ 11.186523] No soundcards found.
[ 11.190093] oprofile: hardware counters not available
[ 11.195434] oprofile: using timer interrupt.
[ 11.199981] nf_conntrack version 0.5.0 (3950 buckets, 15800 max)
[ 11.206909] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 11.212646] TCP cubic registered
[ 11.216094] NET: Registered protocol family 17
[ 11.220794] can: controller area network core (rev 20090105 abi 8)
[ 11.227447] NET: Registered protocol family 29
[ 11.232116] can: raw protocol (rev 20090105)
[ 11.236633] can: broadcast manager protocol (rev 20090105 t)
[ 11.242645] Registering the dns_resolver key type
[ 11.247711] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 11.255828] ThumbEE CPU extension supported.
[ 11.260406] mux: Failed to setup hwmod io irq -22
[ 11.266204] Power Management for AM33XX family
[ 11.271118] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 11.277893] Copied the M3 firmware to UMEM
[ 11.282287] Cortex M3 Firmware Version = 0x181
[ 11.287719] sr_init: platform driver register failed
[ 11.297302] clock: disabling unused clocks to save power
[ 11.319763] Detected MACID=34:b1:f7:1a:1d:93
[ 11.325683] cpsw: Detected MACID = 34:b1:f7:1a:1d:94
[ 11.332305] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:08 UTC (946684808)
[ 11.341735] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
[ 11.349212] Please append a correct "root=" boot option; here are the available partitions:
[ 11.358062] 1f00 128 mtdblock0 (driver?)
[ 11.363403] 1f01 128 mtdblock1 (driver?)
[ 11.368774] 1f02 128 mtdblock2 (driver?)
[ 11.374114] 1f03 128 mtdblock3 (driver?)
[ 11.379455] 1f04 1920 mtdblock4 (driver?)
[ 11.384796] 1f05 128 mtdblock5 (driver?)
[ 11.390136] 1f06 5120 mtdblock6 (driver?)
[ 11.395477] 1f07 123392 mtdblock7 (driver?)
[ 11.400817] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 11.409545] Backtrace:
[ 11.412139] [<c0017854>] (dump_backtrace+0x0/0x110) from [<c0422ca0>] (dump_stack+0x18/0x1c)
[ 11.421051] r6:00008000 r5:c05056d0 r4:c06a9d48 r3:c0660d48
[ 11.427062] [<c0422c88>] (dump_stack+0x0/0x1c) from [<c0422eb8>] (panic+0x74/0x190)
[ 11.435180] [<c0422e44>] (panic+0x0/0x190) from [<c05a6cd0>] (mount_block_root+0x198/0x228)
[ 11.443969] r3:c0660d48 r2:00000000 r1:cf01df60 r0:c05056d0
[ 11.449981] r7:c05d4b34
[ 11.452667] [<c05a6b38>] (mount_block_root+0x0/0x228) from [<c05a6fe4>] (prepare_namespace+0xb0/0x1d0)
[ 11.462493] [<c05a6f34>] (prepare_namespace+0x0/0x1d0) from [<c05a6948>] (kernel_init+0x124/0x128)
[ 11.471954] r6:c0041cdc r5:c063d164 r4:c063d164
[ 11.476898] [<c05a6824>] (kernel_init+0x0/0x128) from [<c0041cdc>] (do_exit+0x0/0x678)
[ 11.485229] r5:c05a6824 r4:00000000
[ 11.662322] ti81xx_interrupt 1146: VBUS error workaround (delay coming)
[ 13.654602] ti81xx_interrupt 1146: VBUS error workaround (delay coming)

  • 请问用的NAND是什么型号的?

  • 1、bootargs正确?  先echo $bootargs

    2、nand 的0x780000位置上有ubi了?

    3、uboot烧写ubi文件系统的,格式对了?

    4、uboot 内核里面和文件系统,三者是否存在ecc问题。

    一般都是这原因了。。

  • 具体nandflash型号为:S34ML01G100TF100

  • ubi文件系统现在问题解决了,就是制作的ubifs时,-c和ubinize.cfg中vol_size参数有问题,现在通过sd卡启动uboot后,因为设置的bootcmd为run nandboot,所以之后就读取nand上的内核,并启动了ubifs,也能成功登陆。你说的这几个应该都没问题。

    现在的问题就是不插入SD卡直接上电,不会从nand启动,只是打印CCC,硬件上设置上找不到问题,为什么烧写MLO和u-boot.img到nand上,上电不会从nand启动呢?难道是u-boot中不支持nand启动?

  • 应该是AM335x没有识别到NAND上的MLO,或者没有从NAND上启动,请检查3点:

    1.硬件确认下sysboot是否是正确上下拉。

    2.检查NAND硬件电路。

    3.确认MLO是否烧写正确了:

    U-Boot# nand erase 0x0 0x20000
    U-Boot# nand write 0x82000000 0x0 0x20000

     

  • 先谢谢JianZhou的热心帮忙,下面我做过的确认工作和一些基本的理解,您可以帮我看看问题可能出在哪里了吗?谢谢啦!

    首先MLO肯定是烧写正确的,MLO在SD卡里,是完全可以启动的,同样的MLO和u-boot.img正确的烧写到nand上却启动不了。

    第二、硬件上确认了sysboot是正确的上下拉了。sysboot[4:0]=10011b。而且[11:10]=00b。

    第三、检查nand硬件电路?我觉得nand硬件电路应该没什么问题吧,因为uboot阶段,可以正确的烧写nand。

    写入nand中的MLO和uboot启动不了,SD卡启动uboot后,能读取nand中的内核和ubifs,并能正确启动系统,进入系统。

  • 我建议你芯片启动的时候,示波器抓一下NAND的信号线,确认是不是AM335x尝试从NAND读取MLO启动。

    如果有信号但是最后跳到UART去了,说明sysboot设置没问题,但是NAND上的MLO有问题,或者NAND某些数据线或者控制线有问题。

    这款spansion的NAND在其它用户那里验证过,是可以正常启动的。

  • 有没有可能是这个uboot版本中,没有nand启动部分的支持呢?只支持SD卡启动?

  • 这不可能的,你用的是SDK里的u-boot。

    现在是芯片的Romcode没有识别到你NAND里的MLO,你NAND里面的MLO和U-boot都还没有执行呢

  • 你好,Jian Zhou。

    你说的测量上电的时候nand的信号线指的是nand的读信号线--RE?还是哪些信号线?我上电的时候用示波器抓到:RE(Read Enable)信号线从低变高后,一直维持高电平。一上电,测量的RB(Ready-Busy)信号线是由低变高后立马变为低,RB为低,表示nand一直处于busy状态,这是为什么呢?

    但是在SD卡启动uboot后,拔掉SD卡(nand中的环境变量,bootcmd=run nandboot),接着执行boot命令时是能从nand中读取内核的,而且能启动内核和ubifs。

    烧写MLO和u-boot.img过程是肯定没有错误的。SD卡启动uboot后烧写过程如下:

    mmc rescan

    fatload mmc 0 0x82000000 MLO

    nand erase 0x0 0x20000

    nand write 0x82000000 0x0 0x20000

    除此之外,接下来的三个备份的MLO,我也都烧写了。

    mw.b 0x82000000 0x20000

    fatload mmc 0 0x82000000 u-boot.img

    nand erase 0x80000 0x80000

    nand write 0x 82000000 0x80000 0x80000

    之后设置的bootcmd为run nandboot,并且保存了,bootargs也是没问题的。

    上电后,不会从nand启动uboot,只是打印CCCCC。

    这整个过程问题可能存在于哪个环节?请您再帮忙给分析一下吧。

  • ROMcode启动的时候会读取NAND的MLO,所以我建议上电的时候用最好用逻辑分析仪抓一下读使能信号以及数据线,对比下NAND的读时序是否是正常的,如果哪里出现异常用逻辑分析仪很直观就能看出来。

    我还是怀疑硬件,建议硬件工程师再仔细检查下NAND这部分电路。

  • 我判断也是硬件问题的可能性更大一些,不过我们没有逻辑分析仪,还是我用示波器好好查查nand部分的电路吧。非常感谢你,zhou jian,你每次都是大半夜的回复我,看来工程师一般都睡得晚。注意身体。谢谢你的建议。

  • 有进展在帖子里给个反馈

  •   能否把你的ubif文件系统打包一下,让我也尝试挂一载一下。。

  •  这个ubifs文件系统还是建议你自己做一下吧,这个依赖于你的平台,你的nand flash的大小,zhou jian前辈在另一个帖子里发了一个教程,写的很好;可以参考着做一下,不过里面的各个参数需要弄清楚,根据自己的情况修改一下。最好不要直接一步一步傻瓜式跟着来,容易走弯路。

  • 好的,一有结果,我就过来说明一下,结贴。B/R.

  • 最终确认是nand硬件电路部分的问题,nand电路中的RB(Read/Busy)引脚接到了主芯片的两个管脚上了,去掉其中一个,可以正常启动了。非常感谢zhou jian一直给中肯的建议。

  • 感谢你的反馈!

  • 不知道楼主还上不上论坛,目前我们遇到的问题跟你这个帖子很相似,但是我们确认R/B引脚只是单独接到了cpu的wait0引脚,没有多管脚连接的情况,请问你们是如何检查硬件问题的?我们单独的去看硬件原理图不存在什么问题的,很头疼这个问题。

  • 不知楼上有没有解决该问题。目前我也遇到了类似的问题,而且是使用镁光的MT29F4G08ABADAWP可以启动,换用S34ML04G200TFI00就无法从Nand启动(硬件电路上没做任何修改只是两块Nand相互替换),还望指教。

  • 很可能是跟片子需要使用ch8还是ch16进行crc校验有关系,有段时间了,我有点忘记了。

  • 现在跟楼主一摸一样的问题就是插上SD卡后才能启动MLO和uboot.img,内核从nand中启动的,但是我硬件的R/B信号都是正常的,不知道问题出在哪了