第一次玩arm和linux,9261移植2.6.39无法挂载jiffys2文件系统,谁能指点一下
启动log如下:帮忙分析一下
RomBOOT
U-Boot 2008.10 (Oct 31 2011 - 22:38:25)
DRAM:64 MB
NAND:1024 MiB
DataFlash:AT45DB321
Nb pages: 8192
Page Size: 528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C00041FF (RO) Bootstrap
Area 1: C0004200 to C00083FF Environment
Area 2: C0008400 to C0041FFF (RO) U-Boot
Area 3: C0042000 to C0251FFF Kernel
Area 4: C0252000 to C041FFFF FS
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
dm9000 i/o: 0x30000000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:00:00:00:00:00
could not establish link
Hit any key to stop autoboot:0
## Booting kernel from Legacy Image at 22000000 ...
Image Name: Linux-2.6.39.4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1876724 Bytes =1.8 MB
Load Address: 20008000
Entry Point:20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39.4 (root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #2 Sun Nov 6 17:48:42 CST 2011
CPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9261-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on.Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=at91_nand:-(root) rw rootfstype=jffs2
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61096k/61096k available, 4440k reserved, 0K highmem
Virtual kernel memory layout:
vector: 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap: 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc4800000 - 0xfee00000 ( 934 MB)
lowmem: 0xc0000000 - 0xc4000000 (64 MB)
modules : 0xbf000000 - 0xc0000000 (16 MB)
.init : 0xc0008000 - 0xc0027000 ( 124 kB)
.text : 0xc0027000 - 0xc0388000 (3460 kB)
.data : 0xc0388000 - 0xc03ab040 ( 141 kB)
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
Console: colour dummy device 80x30
console enabled
Calibrating delay loop... 98.71 BogoMIPS (lpj=493568)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)? 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered (default)
atmel_lcdfb atmel_lcdfb.0: 160KiB frame buffer at 00300000 (mapped at c48c0000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c4818000), irq 21
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc4820000 (irq 15)
atmel_nand atmel_nand: No DMA support for NAND access.
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 256 at 0x000002000000
........擦除坏块省略...............
Bad eraseblock 6119 at 0x00002fce0000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000800000 : "Partition 1 jiffs2 rootfs"
0x000000800000-0x000040000000 : "Partition 2 not used"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
mtd_dataflash spi0.0: AT45DB321x (4224 KBytes) pagesize 528 bytes (OTP)
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000a at c481c000,c482e044 IRQ 107 MAC: e6:03:d3:b4:4c:1f (random)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS7843 Touchscreen as /devices/platform/atmel_spi.0/spi0.2/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
at73c213 spi0.3: at73c213: supported bitrate is 48500 (64 divider)
usb 1-2: new full speed USB device number 2 using at91_ohci
ALSA device list:
#0: AT91SAM9261-EK external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
VFS: Mounted root (jffs2 filesystem) on device 31:0.
Freeing init memory: 124K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c0030a70>] (dump_backtrace+0x0/0x114) from [<c02c6760>] (dump_stack+0x18/0x1c)
r7:c3815d60 r6:c3815d60 r5:c381bee4 r4:c03ab3f8
[<c02c6748>] (dump_stack+0x0/0x1c) from [<c02c67c4>] (panic+0x60/0x188)
[<c02c6764>] (panic+0x0/0x188) from [<c003feec>] (do_exit+0xbc/0x64c)
r3:c0390c84 r2:c381be58 r1:c3815e48 r0:c0343cc6
[<c003fe30>] (do_exit+0x0/0x64c) from [<c0040510>] (do_group_exit+0x94/0xc4)
[<c004047c>] (do_group_exit+0x0/0xc4) from [<c004b6ec>] (get_signal_to_deliver+0x2f8/0x330)
r4:00000004
[<c004b3f4>] (get_signal_to_deliver+0x0/0x330) from [<c002fab4>] (do_notify_resume+0xc4/0x614)
[<c002f9f0>] (do_notify_resume+0x0/0x614) from [<c002dd74>] (work_pending+0x24/0x28)
从dev/mtdblock0 挂载文件系统的,jffs2,分区大小8M
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=at91_nand
:-(root) rw rootfstype=jffs2
NAND分区如下:
mtdblock0 为rootfs, 8M
0x000000000000-0x000000800000 : "Partition 1 jiffs2 rootfs"
0x000000800000-0x000040000000 : "Partition 2 not used"
UBOOT环境变量:
U-Boot> printenv
bootargs=console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=at91_nand:-(root) rw
rootfstype=jffs2
kernel中的分区信息:
static struct mtd_partition __initdata ek_nand_partition[] = {
{
.name = "Partition 1 jiffs2 rootfs",
.offset = 0,
.size = SZ_8M,
},
......
......
rootfs镜像文件的大小8M,
烧写nand位置,从0开始的8M
应该没有问题啊 VFS: Mounted root (jffs2 filesystem) on device 31:0.
Freeing init memory: 124K
Kernel panic - not syncing: Attempted to kill init!
很明显,rootfs已经挂上了,但是里面的/init跑不起来。 回复【1楼】rtems
vfs: mounted root (jffs2 filesystem) on device 31:0.
freeing init memory: 124k
kernel panic - not syncing: attempted to kill init!
很明显,rootfs已经挂上了,但是里面的/init跑不起来。
-----------------------------------------------------------------------
就是自启动的脚本出问题了?? VFS: Mounted root (jffs2 filesystem) on device 31:0
这个31是代表什么东东?0应该是partition0 回复【3楼】ciddy
vfs: mounted root (jffs2 filesystem) on device 31:0
这个31是代表什么东东?0应该是partition0
-----------------------------------------------------------------------
这个31应该是内核的什么东西吧, 回复【4楼】abnerle
-----------------------------------------------------------------------
31 是mtdblock的主设备号.
nand上跑jffs很少见,用yaffs2或者ubifs吧 你这个分区比较奇怪啊,你的uboot在哪个分区,kernel在哪个分区? 回复【6楼】andysh
你这个分区比较奇怪啊,你的uboot在哪个分区,kernel在哪个分区?
-----------------------------------------------------------------------
uboot ,kernel放在data flash中,data flash是4M的,放这些足够了
根文件系统在NAND 已经搞定了,哈哈,不错
RomBOOT
U-Boot 2008.10 (Oct 31 2011 - 22:38:25)
DRAM:64 MB
NAND:1024 MiB
DataFlash:AT45DB321
Nb pages: 8192
Page Size: 528
Size= 4325376 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C00041FF (RO) Bootstrap
Area 1: C0004200 to C00083FF Environment
Area 2: C0008400 to C0041FFF (RO) U-Boot
Area 3: C0042000 to C0251FFF Kernel
Area 4: C0252000 to C041FFFF FS
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
dm9000 i/o: 0x30000000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:00:00:00:00:00
operating at 100M full duplex mode
Hit any key to stop autoboot:0
## Booting kernel from Legacy Image at 22000000 ...
Image Name: Linux-2.6.39.4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1993300 Bytes =1.9 MB
Load Address: 20008000
Entry Point:20008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39.4 (root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #6 Wed Nov 9 23:30:51 CST 2011
CPU: ARM926EJ-S revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9261-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on.Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mtdblock0 mtdparts=at91_nand:-(root) rw rootfstype=jffs2
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60940k/60940k available, 4596k reserved, 0K highmem
Virtual kernel memory layout:
vector: 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap: 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc4800000 - 0xfee00000 ( 934 MB)
lowmem: 0xc0000000 - 0xc4000000 (64 MB)
modules : 0xbf000000 - 0xc0000000 (16 MB)
.init : 0xc0008000 - 0xc0026000 ( 120 kB)
.text : 0xc0026000 - 0xc03ac2bc (3609 kB)
.data : 0xc03ae000 - 0xc03d1d60 ( 144 kB)
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
Console: colour dummy device 80x30
console enabled
Calibrating delay loop... 98.71 BogoMIPS (lpj=493568)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) (SUMMARY)? 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered (default)
atmel_lcdfb atmel_lcdfb.0: 160KiB frame buffer at 00300000 (mapped at c48c0000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c4818000), irq 21
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc4820000 (irq 15)
atmel_nand atmel_nand: No DMA support for NAND access.
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000800000 : "Partition 1 jiffs2 rootfs"
0x000000800000-0x000040000000 : "Partition 2 not used"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
mtd_dataflash spi0.0: AT45DB321x (4224 KBytes) pagesize 528 bytes (OTP)
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000a at c481c000,c482e044 IRQ 107 MAC: c6:7c:95:c9:32:33 (random)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mousedev: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS7843 Touchscreen as /devices/platform/atmel_spi.0/spi0.2/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
at73c213 spi0.3: at73c213: supported bitrate is 48500 (64 divider)
usb 1-2: new full speed USB device number 2 using at91_ohci
ALSA device list:
#0: AT91SAM9261-EK external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
jffs2_scan_dirent_node(): Name CRC failed on node at 0x006a07d8: Read 0x564ee2de, calculated 0x00be2612
Empty flash at 0x006a0804 ends at 0x006a1000
VFS: Mounted root (jffs2 filesystem) on device 31:0.
Freeing init memory: 120K
JFFS2 notice: (1) check_node_data: wrong data CRC in data node at 0x006b66b0: read 0x6ca34cc6, calculated 0x66c5129d.
/etc/init.d/rcS: line 2: echo<------------------------>: not found
----------munt all----------------
mount: mounting none on /tmp failed: No such file or directory
***********************************************
****************frist use ARM*********************
Kernel version:linux-2.6.39.4
author:abner li
Date:2011.11.09
***********************************************
config IP ADD ...
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
Please press Enter to activate this console.
[\u@\h=W]#ifconfig
eth0 Link encap:EthernetHWaddr C6:7C:95:C9:32:33
inet addr:192.168.1.100Bcast:192.168.1.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:928 (928.0 B)TX bytes:0 (0.0 B)
Interrupt:107 Base address:0xc000
[\u@\h=W]#ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: seq=0 ttl=128 time=4.377 ms
64 bytes from 192.168.1.10: seq=1 ttl=128 time=0.747 ms
64 bytes from 192.168.1.10: seq=2 ttl=128 time=0.760 ms
64 bytes from 192.168.1.10: seq=3 ttl=128 time=0.755 ms
64 bytes from 192.168.1.10: seq=4 ttl=128 time=0.749 ms
64 bytes from 192.168.1.10: seq=5 ttl=128 time=0.865 ms
64 bytes from 192.168.1.10: seq=6 ttl=128 time=0.750 ms
64 bytes from 192.168.1.10: seq=7 ttl=128 time=0.749 ms
64 bytes from 192.168.1.10: seq=8 ttl=128 time=0.753 ms
64 bytes from 192.168.1.10: seq=9 ttl=128 time=0.756 ms
64 bytes from 192.168.1.10: seq=10 ttl=128 time=0.756 ms
64 bytes from 192.168.1.10: seq=11 ttl=128 time=0.750 ms
64 bytes from 192.168.1.10: seq=12 ttl=128 time=0.741 ms
^C
--- 192.168.1.10 ping statistics ---
13 packets transmitted, 13 packets received, 0% packet loss
round-trip min/avg/max = 0.741/1.039/4.377 ms 你是有dataflash吗?,能给个方式联系交流下吗?
页:
[1]