免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4068 | 回复: 3
打印 上一主题 下一主题

[操作系统] 2440上移植uboot1.3.4+linux-2.6.38挂载不上根文件系统,望大侠指教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-06-01 14:22 |只看该作者 |倒序浏览
最近在2440的板子上面移植了UBOOT1.3.4和linux-2.6.38,碰到了不少的问题,但最终借助于网络,UBOOT和内核部分基本移植OK了,目前的问题出在根文件系统的挂载不上,尝试了好几天,也没有最终解决。现在这里贴出UBOOT和内核启动的一些信息,希望高手能指出问题之所在。

板子的基本配置CPU(2440),nandflash(K9F1G08),网络芯片(DM9000A),64M SDRAM

下面是我的一些UBOOT信息、环境变量信息和分区信息

U-Boot 1.3.4 (Feb 23 2012 - 09:50:02)

DRAM:  64 MB
Flash: 128 MB
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1
128 MiB
In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot:  0

fpi2440 # printenv
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
mtdids=nand0=fpi_nand
filesize=171000
fileaddr=30008000
netmask=255.255.0.0
ipaddr=172.118.5.110
serverip=172.118.5.200
bootdelay=5
partition=nand0,0
mtddevnum=0
mtddevname=boot
mtdparts=mtdparts=fpi_nand:256K@0(boot),256K(params),4M(kernel),16M(cramfs),16M(
jffs2),-(yaffs2)
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200
bootcmd=nand read 0x30008000 kernel;bootm 0x30008000
stdin=serial
stdout=serial
stderr=serial

Environment size: 486/131068 bytes
fpi2440 # mtdparts

device nand0 <fpi_nand>, # parts = 6
#: name                        size            offset          mask_flags
0: boot                0x00040000      0x00000000      0
1: params              0x00040000      0x00040000      0
2: kernel              0x00400000      0x00080000      0
3: cramfs              0x01000000      0x00480000      0
4: jffs2               0x01000000      0x01480000      0
5: yaffs2              0x05b80000      0x02480000      0

active partition: nand0,0 - (boot) 0x00040000 @ 0x00000000

defaults:
mtdids  : nand0=fpi_nand
mtdparts: mtdparts=fpi_nand:256K@0(boot),256K(params),4M(kernel),16M(cramfs),16M
(jffs2),-(yaffs2)

下面是用UBOOT烧写kernel,fs的一些信息


fpi2440 # tftp 0x30008000 uImage
enter dm9000 init func(eth_init())!!!
dm9000 i/o: 0x18000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
TFTP from server 172.118.5.200; our IP address is 172.118.5.110
Filename 'uImage'.
Load address: 0x30008000
Loading: T #################################################################
         #################################################################
         #######
done
Bytes transferred = 2009976 (1eab78 hex)
fpi2440 # nand erase kernel

NAND erase: device 0 offset 0x80000, size 0x400000

Erasing at 0x80000 --   3% complete.

Erasing at 0xa0000 --   6% complete.

Erasing at 0xc0000 --   9% complete.

...(省略若干)

Erasing at 0x400000 --  90% complete.

Erasing at 0x420000 --  93% complete.

Erasing at 0x440000 --  96% complete.

Erasing at 0x460000 -- 100% complete.
OK
fpi2440 # nand write 0x30008000 kernel

NAND write: device 0 offset 0x80000, size 0x400000
4194304 bytes written: OK
fpi2440 # tftp 0x30008000 fpi.cramfs
enter dm9000 init func(eth_init())!!!
dm9000 i/o: 0x18000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
could not establish link
TFTP from server 172.118.5.200; our IP address is 172.118.5.110
Filename 'fpi.cramfs'.
Load address: 0x30008000
Loading: T #################################################################
         ################
done
Bytes transferred = 1183744 (121000 hex)
fpi2440 # nand erase cramfs

NAND erase: device 0 offset 0x480000, size 0x1000000

Erasing at 0x480000 --   0% complete.

Erasing at 0x4a0000 --   1% complete.

Erasing at 0x4c0000 --   2% complete.

Erasing at 0x4e0000 --   3% complete.

... (省略若干)

Erasing at 0x1400000 --  97% complete.

Erasing at 0x1420000 --  98% complete.

Erasing at 0x1440000 --  99% complete.

Erasing at 0x1460000 -- 100% complete.
OK
fpi2440 # nand write 0x30008000 cramfs

NAND write: device 0 offset 0x480000, size 0x1000000
16777216 bytes written: OK

下面是重启系统后的信息

fpi2440 # reset

U-Boot 1.3.4 (Feb 23 2012 - 09:50:02)


DRAM:  64 MB
Flash: 128 MB
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1
128 MiB
In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x80000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 30008000 ...
   Image Name:   linux-2.6.38
   Created:      2012-02-23  19:23:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2009912 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008040
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.38 (root@hjm) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
) #23 Thu Feb 23 14:21:35 EST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: noinitrd init=/linuxrc root=/dev/mtdblock3 console=ttySAC0,
115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 12028k/12028k available, 4356k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc1800000 - 0xf6000000   ( 840 MB)
    lowmem  : 0xc0000000 - 0xc1000000   (  16 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0027000   ( 124 kB)
      .text : 0xc0027000 - 0xc03bd0c0   (3673 kB)
      .data : 0xc03be000 - 0xc03e3520   ( 150 kB)
NR_IRQS:85
irq: clearing pending ext status 00000300
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
i2c-core: driver [pcf50633] using legacy suspend method
i2c-core: driver [pcf50633] using legacy resume method
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
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 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 23
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
nbd: registered device at major 43
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND ECC disabled
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 1 at 0x000000020000
Bad eraseblock 715 at 0x000005960000
cmdlinepart partition parsing not available
Creating 6 MTD partitions on "NAND":
0x000000000000-0x000000040000 : "Boot"
0x000000040000-0x000000080000 : "Boot params"
0x000000080000-0x000000480000 : "Kernel"
0x000000480000-0x000001480000 : "Cramfs"
0x000001480000-0x000002480000 : "Jffs2"
0x000002480000-0x000008000000 : "Yaffs2"
dm9000 Ethernet Driver, V1.31
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mousedev: PS/2 mouse device common for all mice
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
List of all partitions:
1f00             256 mtdblock0  (driver?)
1f01             256 mtdblock1  (driver?)
1f02            4096 mtdblock2  (driver?)
1f03           16384 mtdblock3  (driver?)
1f04           16384 mtdblock4  (driver?)
1f05           93696 mtdblock5  (driver?)
No filesystem could mount root, tried:  ext2 cramfs vfat msdos iso9660 romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[<c0037e44>] (unwind_backtrace+0x0/0xec) from [<c02c4934>] (panic+0x54/0x17
[<c02c4934>] (panic+0x54/0x17 from [<c0008ff0>] (mount_block_root+0x1d0/0x210)

[<c0008ff0>] (mount_block_root+0x1d0/0x210) from [<c00090d0>] (mount_root+0xa0/0
xc0)
[<c00090d0>] (mount_root+0xa0/0xc0) from [<c0009254>] (prepare_namespace+0x164/0
x1c
[<c0009254>] (prepare_namespace+0x164/0x1c from [<c000857c>] (kernel_init+0x10
4/0x144)
[<c000857c>] (kernel_init+0x104/0x144) from [<c0033798>] (kernel_thread_exit+0x0
/0x



本人所使用的文件系统使用的是busybox1.19.2
使用静态编译,另外也直接从Tekkaman Ninja那里下载了一个根文件系统,然后用cramfs的工具制作成cramfs文件系统
结果一样。


论坛徽章:
0
2 [报告]
发表于 2012-06-01 15:02 |只看该作者
没有人回答

版主,指点一下啊

论坛徽章:
0
3 [报告]
发表于 2012-06-01 15:50 |只看该作者
知不道。。。

论坛徽章:
0
4 [报告]
发表于 2012-06-05 12:48 |只看该作者
谁有JFFS2的生成工具,我想试试JFFS2文件系统

另外,谁有可用的已生成好的CRAMFS,JFFS2文件系统,发个给我试试看

QQ:304449722
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP