返回信息流三星2410开发板 原来板子上编译的是2.6.8.1的内核 现在想把2.6.14的内核移植到板子上 make zImage之后将镜像下载到板子上启动, 提示错误:
VFS: Cannot open root device "1f02" or unknown-block(31,2)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
无法挂载文件系统,在网上搜了搜说是传递系统参数出错了,系统启动参数里root=***这个应该等于你的根文件系统所在的设备名,但我的开发板以前就是root=1f02,不知道现在是不是需要改动?
启动信息如下
Power on reset
Env.Os_Auto_Flag=1
<*******************************************>
<* *>
<* S3C2410 Board BIOS V2006 *>
<* *>
<* Http://www.ucdragon.com *>
<* *>
<* 深圳市帕萍加邢薰? *>
<* *>
<* 版 ? 所 ? *>
<* *>
<*******************************************>
NAND Flash Boot
Please select function :
0 : USB download file
1 : Uart download file
2 : Write Nand flash with download file
3 : Load Pragram from Nand flash and run
4 : Erase Nand flash regions
5 : Write NOR flash with download file
6 : Set boot params
7 : Set AutoBoot parameter,1:linux 2:wince
6
root=1f02 init=/linuxrc console=ttyS0,115200 devfs=mount display=sam240
Set boot params, press Enter to finish, Esc to abort
root=1f02 init=/linuxrc console=ttySAC0,115200 devfs=mount display=sam240.
Please select function :
0 : USB download file
1 : Uart download file
2 : Write Nand flash with download file
3 : Load Pragram from Nand flash and run
4 : Erase Nand flash regions
5 : Write NOR flash with download file
6 : Set boot params
7 : Set AutoBoot parameter,1:linux 2:wince
3
Set boot params = root=1f02 init=/linuxrc console=ttySAC0,115200 devfs=mount display=sam240
Uncompressing Linux........................................................................ done, booting the kernel.
Linux version 2.6.14 (root@localhost.localdomain) (gcc version 3.4.1) #1 Sat Oct 25 11:32:02 CST 2008
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: root=1f02 init=/linuxrc console=ttySAC0,115200 devfs=mount display=sam240
irq: clearing pending ext status 00006000
irq: clearing pending status 00002000
irq: clearing subpending status 00000093
irq: clearing subpending status 00000092
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00090d09, tcnt a2c1, tcfg 0000020f,00001032, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62464KB available (1813K code, 386K data, 88K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
s3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attach
s3c2410-lcd: probe of s3c2410-lcd failed with error -22
Real Time Clock Driver v1.12
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
dm9000 Ethernet Driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide-floppy driver 0.99.newide
mice: PS/2 mouse device common for all mice
md: md driver 0.90.2 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 3.39
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 8
NET: Registered protocol family 20
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
VFS: Cannot open root device "1f02" or unknown-block(31,2)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
这是一条镜像帖。来源:北邮人论坛 / embedded-system / #2115同步于 2008/10/31
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Embedded_System机器人发帖
开发板启动遇到问题 求高人指点
pirate1
2008/10/31镜像同步20 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
Kernel command line: root=1f02 init=/linuxrc console=ttySAC0,115200 devfs=mount display=sam240
root怎么能等于1f02呢?注意一下启动参数
看使用手册或者打电话问卖给你的人
【 在 pirate1 (像罗米一样踢球) 的大作中提到: 】
: 不过我板子买回来的时候启动信息就是root=1f02 这个需要改吗
看提示信息的话,就是你设置的文件系统不对吧(要是你还啥都没改,可能是它板子本来的问题?这个有点儿匪夷所思啊)
Boot的程序也换了是吗?
可以把以前的Boot拿过来用
【 在 hobby 的大作中提到: 】
: 看提示信息的话,就是你设置的文件系统不对吧(要是你还啥都没改,可能是它板子本来的问题?这个有点儿匪夷所思啊)
: Boot的程序也换了是吗?
: 可以把以前的Boot拿过来用
板子里是2.6.8.1的内核 现在想移植2.6.14的内核 照着网上一篇文章做了一下 改了以下这些地方
修改 linux-2.6.14 的根目录下的 makfile 文件:
注释掉以下内容:
#ARCH ?= $(SUBARCH)
#CROSS_COMPILE ?=
增加如下内容:
ARCH : = arm
CROSS_COMPILE =/usr/local/arm/3.4.1/bin/arm-linux-
修改 arch\arm\mach-s3c2410\devs.c 文件:
增加头文件定义
/***********add here***********/
#include <linux/mtd/partitions.h>
#include <asm/arch/nand.h>
#include <linux/mtd/nand.h>
/**************end add********/
增加 nand flash 分区信息
/***********add here***********/
static struct mtd_partition partition_info[] ={
{
name: "loader",
size: 0x00020000,
offset: 0,
}, {
name: "param",
size: 0x00010000,
offset: 0x00020000,
}, {
name: "kernel",
size: 0x001c0000,
offset: 0x00030000,
}, {
name: "root",
size: 0x00200000,
offset: 0x00200000,
mask_flags: MTD_WRITEABLE,
}, {
name: "user",
size: 0x03af8000,
offset: 0x00400000,
}
};
struct s3c2410_nand_set nandset ={
nr_partitions: 5 ,
partitions: partition_info ,
};
struct s3c2410_platform_nand superlpplatform={
tacls:0,
twrph0:30,
twrph1:0,
sets: &nandset,
nr_sets: 1,
};
/**************end add********/
struct platform_device s3c_device_nand = {
.name = "s3c2410-nand",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_nand_resource),
.resource = s3c_nand_resource,
/***********add here****************/
.dev = {
.platform_data = &superlpplatform
}
/**************end here************/
};
修改 arch\arm\mach-s3c2410\mach-smdk2410.c 文件:
Startic struct platform_device *smdk2410_devices[] __initdata={
&s3c_device_usb,
&s3c_device_lcd;
&s3c_device_wdt,
&s3c_device_i2c;
&s3c_device_iis,
&s3c_device_nand, /*add here*/
};
然后就是配置内核 生成zImage 下载到板子上 启动时曾有过无法启动内核的问题
Starting kernel ...
Uncompressing Linux.......................................................................................... done, booting the kernel.
到这里之后停住不动,在网上查资料之后说命令行参数中console设定有问题,对2.6的内核应该使用ttySAC0,而不是ttyS0。更改为"console=ttySAC0"可以继续启动,但之后就出现了上面的问题
上次我们聊这个问题后不知道LZ有没有新的进展
我记得上次我们主要说到以下几个方面
1、查看内核的DOC,找找root参数到底怎么配
2、跟购买开发板的公司沟通
3、还有个啥来着,忘了……
谢谢hobby,我已经查看过了/Document/kernel-parameters里的说明 不过只有这样一句话 root=[KNL] Root filesystem...
在网上还搜到有人这样解释:因为2.6.12内核以后取消了devfs的配置选项,缺少了它内核问题抱怨找不到mtdblock设备 来自 http://www.dzkf.cn/html/qianrushixitong/2007/0328/1831.html
我之前贴出的错误信息
VFS: Cannot open root device "1f02" or unknown-block(31,2)
Please append a correct "root=" boot option
其中,31就是mtdblock这个块设备的主设备号,所以我想我的问题应该也是由于2.6.14内核中没有配置对devfs文件系统的支持,就按照上面提到文章中所给的解决办法 从2.6.12的fs/Kconfig中拷贝内核对devfs的几个支持选项到2.6.14的fs/Kconfig中去,然后重新make menuconfig; make zImage, 但是下载到板子上之后还是同样的问题,很郁闷
你给的第三个办法我也忘了。。。 难道只能给工程师打电话了?
用ramdisk吧
【 在 pirate1 (像罗米一样踢球) 的大作中提到: 】
: 谢谢hobby,我已经查看过了/Document/kernel-parameters里的说明 不过只有这样一句话 root=[KNL] Root filesystem...
: 在网上还搜到有人这样解释:因为2.6.12内核以后取消了devfs的配置选项,缺少了它内核问题抱怨找不到mtdblock设备 来自 http://www.dzkf.cn/html/qianrushixitong/2007/0328/1831.html
: 我之前贴出的错误信息
: ...................