I'm working on a custom board with a AM3352 onboard with a Spansion S34ML08G2 NAND part. I've created a file system from an Narcisuss online builder. I've spent a few days ensuring that I've setup the mtd utils correctly to generate the filesystem, and think that I have them setup properly.
The SPL, UBoot, and Kernel all come from nand and seem to operate fine. The filesystem also seems to load up just fine according to the UBI statements below. However, it seems like things fall apart when the kernel tries to navigate to the root of the file system, where it claims it can't find. The kernel tries to bypass, and loads getty, but the login doesn't work; just shoots me back to a prompt, likely because its not accessing the file system. I've experemented with loading up bootargs with 'init=/etc' and 'init=/etc/inittab' with no luck. Below is the bootargs I'm trying boot with.
bootargs=console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7 rootfstype=ubifs noinitrd
Forgive the NAND_DEBUG output, I've been hunting down memory problems for the past week or so.
Can anyone point me in the right direction to solve this problem?
Thanks,
Jason
U-Boot# $kernel_from_nand
NAND read: device 0 offset 0x280000, size 0x500000
nand_isbad_bbt(): bbt info for offs 0x00280000: (block 20) 0x00
nand_isbad_bbt(): bbt info for offs 0x002a0000: (block 21) 0x00
nand_isbad_bbt(): bbt info for offs 0x002c0000: (block 22) 0x00
nand_isbad_bbt(): bbt info for offs 0x002e0000: (block 23) 0x00
nand_isbad_bbt(): bbt info for offs 0x00300000: (block 24) 0x00
nand_isbad_bbt(): bbt info for offs 0x00320000: (block 25) 0x00
nand_isbad_bbt(): bbt info for offs 0x00340000: (block 26) 0x00
nand_isbad_bbt(): bbt info for offs 0x00360000: (block 27) 0x00
nand_isbad_bbt(): bbt info for offs 0x00380000: (block 28) 0x00
nand_isbad_bbt(): bbt info for offs 0x003a0000: (block 29) 0x00
nand_isbad_bbt(): bbt info for offs 0x003c0000: (block 30) 0x00
nand_isbad_bbt(): bbt info for offs 0x003e0000: (block 31) 0x00
nand_isbad_bbt(): bbt info for offs 0x00400000: (block 32) 0x00
nand_isbad_bbt(): bbt info for offs 0x00420000: (block 33) 0x00
nand_isbad_bbt(): bbt info for offs 0x00440000: (block 34) 0x00
nand_isbad_bbt(): bbt info for offs 0x00460000: (block 35) 0x00
nand_isbad_bbt(): bbt info for offs 0x00480000: (block 36) 0x00
nand_isbad_bbt(): bbt info for offs 0x004a0000: (block 37) 0x00
nand_isbad_bbt(): bbt info for offs 0x004c0000: (block 38) 0x00
nand_isbad_bbt(): bbt info for offs 0x004e0000: (block 39) 0x00
nand_isbad_bbt(): bbt info for offs 0x00500000: (block 40) 0x00
nand_isbad_bbt(): bbt info for offs 0x00520000: (block 41) 0x00
nand_isbad_bbt(): bbt info for offs 0x00540000: (block 42) 0x00
nand_isbad_bbt(): bbt info for offs 0x00560000: (block 43) 0x00
nand_isbad_bbt(): bbt info for offs 0x00580000: (block 44) 0x00
nand_isbad_bbt(): bbt info for offs 0x005a0000: (block 45) 0x00
nand_isbad_bbt(): bbt info for offs 0x005c0000: (block 46) 0x00
nand_isbad_bbt(): bbt info for offs 0x005e0000: (block 47) 0x00
nand_isbad_bbt(): bbt info for offs 0x00600000: (block 48) 0x00
nand_isbad_bbt(): bbt info for offs 0x00620000: (block 49) 0x00
nand_isbad_bbt(): bbt info for offs 0x00640000: (block 50) 0x00
nand_isbad_bbt(): bbt info for offs 0x00660000: (block 51) 0x00
nand_isbad_bbt(): bbt info for offs 0x00680000: (block 52) 0x00
nand_isbad_bbt(): bbt info for offs 0x006a0000: (block 53) 0x00
nand_isbad_bbt(): bbt info for offs 0x006c0000: (block 54) 0x00
nand_isbad_bbt(): bbt info for offs 0x006e0000: (block 55) 0x00
nand_isbad_bbt(): bbt info for offs 0x00700000: (block 56) 0x00
nand_isbad_bbt(): bbt info for offs 0x00720000: (block 57) 0x00
nand_isbad_bbt(): bbt info for offs 0x00740000: (block 58) 0x00
nand_isbad_bbt(): bbt info for offs 0x00760000: (block 59) 0x00
5242880 bytes read: OK
U-Boot# boom 0x82000000
Unknown command 'boom' - try 'help'
U-Boot# bootm 0x82000000
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.2.0-g9bd25ff-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3186368 Bytes = 3 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-g9bd25ff-dirty (remo@remo-laptop) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-2013034
[ 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: 130048
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7 rootfstype=ubifs noinitrd
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 513192k/513192k available, 11096k 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 : 0xe0800000 - 0xff000000 ( 488 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0595000 (5684 kB)
[ 0.000000] .init : 0xc0595000 - 0xc05d0000 ( 236 kB)
[ 0.000000] .data : 0xc05d0000 - 0xc06386d8 ( 418 kB)
[ 0.000000] .bss : 0xc06386fc - 0xc06673e4 ( 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.000122] 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.059509] CPU: Testing write buffer coherency: ok
[ 0.079895] omap_hwmod: gfx: failed to hardreset
[ 0.096160] omap_hwmod: pruss: failed to hardreset
[ 0.097259] print_constraints: dummy:
[ 0.097595] NET: Registered protocol family 16
[ 0.099700] OMAP GPIO hardware version 0.1
[ 0.102264] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.105255] omap2_mcspi.1: alias fck already exists
[ 0.105468] omap2_mcspi.2: alias fck already exists
[ 0.106384] edma.0: alias fck already exists
[ 0.106414] edma.0: alias fck already exists
[ 0.106414] edma.0: alias fck already exists
[ 0.132965] bio: create slab <bio-0> at 0
[ 0.135101] SCSI subsystem initialized
[ 0.136657] usbcore: registered new interface driver usbfs
[ 0.136962] usbcore: registered new interface driver hub
[ 0.137145] usbcore: registered new device driver usb
[ 0.139099] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.140167] Switching to clocksource gp timer
[ 0.155364] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.155731] NET: Registered protocol family 2
[ 0.155914] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.156188] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.156494] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.156677] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.156677] TCP reno registered
[ 0.156707] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.156707] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.156921] NET: Registered protocol family 1
[ 0.157165] RPC: Registered named UNIX socket transport module.
[ 0.157165] RPC: Registered udp transport module.
[ 0.157196] RPC: Registered tcp transport module.
[ 0.157196] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.157440] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.157623] omap-gpmc omap-gpmc: GPMC revision 6.0
[ 0.157653] Registering NAND on CS0
[ 0.176208] VFS: Disk quotas dquot_6.5.2
[ 0.176300] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.176788] msgmni has been set to 1002
[ 0.179779] alg: No test for stdrng (krng)
[ 0.180480] io scheduler noop registered
[ 0.180480] io scheduler deadline registered
[ 0.180541] io scheduler cfq registered (default)
[ 0.182342] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.628814] console [ttyO0] enabled
[ 0.633056] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.640869] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.648620] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.656402] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.664184] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.672424] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[ 0.688446] brd: module loaded
[ 0.696380] loop: module loaded
[ 0.699829] i2c-core: driver [tsl2550] using legacy suspend method
[ 0.706298] i2c-core: driver [tsl2550] using legacy resume method
[ 0.714416] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 0.721679] omap2-nand driver initializing
[ 0.726287] ONFI flash detected
[ 0.729675] ONFI param page 0 valid
[ 0.733367] NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD S34ML08G2)
[ 0.741027] Creating 8 MTD partitions on "omap2-nand.0":
[ 0.746582] 0x000000000000-0x000000020000 : "SPL"
[ 0.752929] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 0.759826] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 0.766693] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 0.773590] 0x000000080000-0x000000260000 : "U-Boot"
[ 0.780731] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 0.787506] 0x000000280000-0x000000780000 : "Kernel"
[ 0.795989] 0x000000780000-0x00001a780000 : "File System"
[ 0.975250] OneNAND driver initializing
[ 0.979919] UBI: attaching mtd7 to ubi0
[ 0.983947] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 0.990478] UBI: logical eraseblock size: 126976 bytes
[ 0.996124] UBI: smallest flash I/O unit: 2048
[ 1.001037] UBI: VID header offset: 2048 (aligned 2048)
[ 1.007293] UBI: data offset: 4096
[ 4.518218] UBI: max. sequence number: 59
[ 4.539916] UBI: attached mtd7 to ubi0
[ 4.543914] UBI: MTD device name: "File System"
[ 4.549621] UBI: MTD device size: 416 MiB
[ 4.554809] UBI: number of good PEBs: 3328
[ 4.559692] UBI: number of bad PEBs: 0
[ 4.564331] UBI: number of corrupted PEBs: 0
[ 4.568969] UBI: max. allowed volumes: 128
[ 4.573791] UBI: wear-leveling threshold: 4096
[ 4.578704] UBI: number of internal volumes: 1
[ 4.583343] UBI: number of user volumes: 1
[ 4.587951] UBI: available PEBs: 0
[ 4.592590] UBI: total number of reserved PEBs: 3328
[ 4.597778] UBI: number of PEBs reserved for bad PEB handling: 33
[ 4.604125] UBI: max/mean erase counter: 2/0
[ 4.608581] UBI: image sequence number: 881409791
[ 4.613708] UBI: background thread "ubi_bgt0d" started, PID 548
[ 4.620544] CAN device driver interface
[ 4.624572] CAN bus driver for Bosch D_CAN controller 1.0
[ 4.631042] usbcore: registered new interface driver zd1201
[ 4.637054] usbcore: registered new interface driver cdc_ether
[ 4.643310] usbcore: registered new interface driver cdc_eem
[ 4.649353] usbcore: registered new interface driver dm9601
[ 4.655212] cdc_ncm: 04-Aug-2011
[ 4.658752] usbcore: registered new interface driver cdc_ncm
[ 4.664672] Initializing USB Mass Storage driver...
[ 4.669921] usbcore: registered new interface driver usb-storage
[ 4.676208] USB Mass Storage support registered.
[ 4.681488] mousedev: PS/2 mouse device common for all mice
[ 4.688323] omap_rtc am33xx-rtc: rtc core: registered am33xx-rtc as rtc0
[ 4.695526] i2c /dev entries driver
[ 4.699310] Linux video capture interface: v2.00
[ 4.704467] usbcore: registered new interface driver uvcvideo
[ 4.710449] USB Video Class driver (1.1.1)
[ 4.715637] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 4.722167] _regulator_get: deviceless supply vdd_mpu not found, using dummy regulator
[ 4.730895] cpuidle: using governor ladder
[ 4.735656] cpuidle: using governor menu
[ 4.740325] omap4_aes_mod_init: loading AM33X AES driver
[ 4.746002] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[ 4.752502] omap4_aes_probe: probe() done
[ 4.756896] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[ 4.763031] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[ 4.774414] omap4_sham_probe: probe() done
[ 4.781036] usbcore: registered new interface driver usbhid
[ 4.786834] usbhid: USB HID core driver
[ 4.791564] usbcore: registered new interface driver snd-usb-audio
[ 4.799377] ALSA device list:
[ 4.802520] No soundcards found.
[ 4.806060] oprofile: hardware counters not available
[ 4.811340] oprofile: using timer interrupt.
[ 4.815795] nf_conntrack version 0.5.0 (8018 buckets, 32072 max)
[ 4.822601] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 4.828247] TCP cubic registered
[ 4.831634] NET: Registered protocol family 17
[ 4.836303] can: controller area network core (rev 20090105 abi 8)
[ 4.842834] NET: Registered protocol family 29
[ 4.847473] can: raw protocol (rev 20090105)
[ 4.851928] can: broadcast manager protocol (rev 20090105 t)
[ 4.857849] Registering the dns_resolver key type
[ 4.862854] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 4.870849] ThumbEE CPU extension supported.
[ 4.875366] mux: Failed to setup hwmod io irq -22
[ 4.880950] Power Management for AM33XX family
[ 4.885772] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 4.892456] Copied the M3 firmware to UMEM
[ 4.896789] Cortex M3 Firmware Version = 0x181
[ 4.901947] sr_init: platform driver register failed
[ 4.910339] clock: disabling unused clocks to save power
[ 4.928771] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[ 5.002716] UBIFS: recovery needed
[ 5.143127] UBIFS: recovery completed
[ 5.146972] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 5.153259] UBIFS: file system size: 416481280 bytes (406720 KiB, 397 MiB, 3280 LEBs)
[ 5.161621] UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
[ 5.169250] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 5.175323] UBIFS: default compressor: lzo
[ 5.179595] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 5.187103] VFS: Mounted root (ubifs filesystem) on device 0:12.
[ 5.193817] Freeing init memory: 236K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
[ 5.990295] udevd (842): /proc/842/oom_adj is deprecated, please use /proc/842/oom_score_adj instead.
[ 8.333618] alignment: ignoring faults is unsafe on this CPU. Defaulting to fixup mode.
Root filesystem already rw, not remounting
Caching udev devnodes
Populating dev cache
root: mount: mounting rootfs on / failed: No such file or directory
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCGIFFLAGS: No such device
done.
Setting up IP spoofing protection: rp_filter.
Wed Mar 12 02:00:00 UTC 2014
INIT: Entering runlevel: 5
Starting syslogd/klogd: done
getty:
.-------.
| | .-.
| | |-----.-----.-----.| | .----..-----.-----.
| | | __ | ---'| '--.| .-'| | |
| | | | | |--- || --'| | | ' | | | |
'---'---'--'--'--. |-----''----''--' '-----'-'-'-'
-' |
'---'
The Angstrom Distribution narc ttyO0
Angstrom 2010.7-test-20110220 narc ttyO0
.-------.
| | .-.
| | |-----.-----.-----.| | .----..-----.-----.
| | | __ | ---'| '--.| .-'| | |
| | | | | |--- || --'| | | ' | | | |
'---'---'--'--'--. |-----''----''--' '-----'-'-'-'
-' |
'---'
The Angstrom Distribution narc ttyO0
Angstrom 2010.7-test-20110220 narc ttyO0
narc login: narc login:
CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.4 | VT102 | Offline