免费注册 查看新帖 |

Chinaunix

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

请做过内核移植的朋友进来看一下,ARM+linux的问题。。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-12-17 12:07 |只看该作者 |倒序浏览
本帖最后由 jackyard 于 2010-12-17 12:23 编辑

boot 1.1 Modified by jackyard<jackyard88@gmail.com> (Jan  1 2006 - 14:24:4


Uncompressing image...




U-Boot 1.1.4 (Dec 30 2005 - 00:54:4

U-Boot code: 21F00000 -> 21F176D4  BSS: -> 21F34004
RAM Configuration:
Bank #0: 20000000 32 MB
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 10060000 ...
   Image Name:   Linux-2.6.22-jackyard
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1202192 Bytes =  1.1 MB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................................. done, booting the kernel.
Linux version 2.6.22-jackyard (root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #7 Thu Dec 2 23:18:00 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Atmel AT91RM9200-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 179 MHz, master 59 MHz, main 18.432 MHz
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.  Total pages: 8128
Kernel command line: mem=32M console=ttyS0,115200 root=1f02 mtdparts=phys_mapped_flash:384k(UBOOT),1920k(KERNEL),2816K(Cramfs),3072k(JFFS2)
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29948KB available (2180K code, 207K data, 104K init)
Mount-acche hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
Epson S1D13XXX FB Driver
s1d13xxxfb: chip not found: 0
at91_spi: Baud rate set to 5990400
AT91 SPI driver loaded
AT91 Watchdog Timer enabled (5 seconds, nowayout)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
at91_ether: Your bootloader did not configure a MAC address.
eth0: Link down.
eth0: AT91 ethernet at 0xfefbc000 int=24 10-HalfDuplex (00:00:00:00:00:00)
eth0: Intel LXT971A PHY
physmap platform flash device: 00200000 at 10000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Reducing visibility of 8192KiB chip to 2048KiB
RedBoot partition parsing not available
kobject_add failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.
[<c002765c>] (dump_stack+0x0/0x14) from [<c00f6818>] (kobject_shadow_add+0x164/0x1ac)
[<c00f66b4>] (kobject_shadow_add+0x0/0x1ac) from [<c00f6874>] (kobject_add+0x14/0x1
r8:c02dc000 r7:c0254860 r6:c02547b4 r5:c02547bc r4:0000001c
[<c00f6860>] (kobject_add+0x0/0x1 from [<c0122d8c>] (device_add+0x84/0x530)
[<c0122d08>] (device_add+0x0/0x530) from [<c0126d54>] (platform_device_add+0x100/0x14c)
[<c0126c54>] (platform_device_add+0x0/0x14c) from [<c0126dc0>] (platform_device_register+0x20/0x24)
r7:00000000 r6:c001e3ec r5:00000000 r4:c02547b4
[<c0126da0>] (platform_device_register+0x0/0x24) from [<c0019af4>] (physmap_init+0x20/0x30)
r4:00000000
[<c0019ad4>] (physmap_init+0x0/0x30) from [<c000861c>] (kernel_init+0xc8/0x29
r4:00000000
[<c0008554>] (kernel_init+0x0/0x29 from [<c0039b04>] (do_exit+0x0/0x7a
Generic platform RAM MTD, (c) 2004 Simtec Electronics
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 23, io mem 0x00300000
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.22-jackyard ohci_hcd
usb usb1: SerialNumber: at91
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
at91_udc: probe of at91_udc failed with error -16
mice: PS/2 mouse device common for all mice
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
i2c /dev entries driver
at91_i2c at91_i2c: AT91 i2c bus driver.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
at91_rtc at91_rtc: setting the system clock to 1998-01-01 00:00:11 (883612811)
VFS: Cannot open root device "1f02" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00       2048 mtdblock0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
===========================================================
以上是我把linux  2.6.22移植到at91rm9200上时的问题,文件系统我也烧写进去了,不是文件系统的问题,因为我把一个以前做好的内容核是2.6.12的烧进去,没有问题,可是把刚做的2.6.22的烧进去,就会出现上面的问题。我的启动参数是
setenv bootargs mem=32M console=ttyS0,115200 root=1f02 mtdparts=phys_mapped_flash:384k(UBOOT),1920k(KERNEL),2816K(Cramfs),3072k(JFFS2)

论坛徽章:
0
2 [报告]
发表于 2010-12-28 12:22 |只看该作者
我多次在自己的PC机器上相将2.4.8的内核升级到2.6.30版本,但是结果都是失败,和你的问题差不多 都是挂在不了文件系统,后来用同样的方法从2.4.8升级到2.6.18就成功了。
网上说要升级到2.6.18以后的版本就会有问题 最近没有解决,于是放弃了。。。。

论坛徽章:
0
3 [报告]
发表于 2010-12-28 12:30 |只看该作者
兄弟,刚才我突发奇想。希望能给你一点线索,我在2.6.30的内核中找到了打印这句错误的代码 你看看:内核我还没有看到这个地方所以也帮不了你啊
void __init mount_block_root(char *name, int flags)
{
        char *fs_names = __getname();
        char *p;
#ifdef CONFIG_BLOCK
        char b[BDEVNAME_SIZE];
#else
        const char *b = name;
#endif

        get_fs_names(fs_names);
retry:
        for (p = fs_names; *p; p += strlen(p)+1) {
                int err = do_mount_root(name, p, flags, root_mount_data);
                switch (err) {
                        case 0:
                                goto out;
                        case -EACCES:
                                flags |= MS_RDONLY;
                                goto retry;
                        case -EINVAL:
                                continue;
                }
                /*
                 * Allow the user to distinguish between failed sys_open
                 * and bad superblock on root device.
                 * and give them a list of the available devices
                 */
#ifdef CONFIG_BLOCK
                __bdevname(ROOT_DEV, b);
#endif
                printk("VFS: Cannot open root device \"%s\" or %s\n",
                                root_device_name, b);
                printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");

                printk_all_partitions();
#ifdef CONFIG_DEBUG_BLOCK_EXT_DEVT
                printk("DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify "
                       "explicit textual name for \"root=\" boot option.\n");
#endif
                panic("VFS: Unable to mount root fs on %s", b);
        }

        printk("List of all partitions:\n");
        printk_all_partitions();
        printk("No filesystem could mount root, tried: ");
        for (p = fs_names; *p; p += strlen(p)+1)
                printk(" %s", p);
        printk("\n");
#ifdef CONFIG_BLOCK
        __bdevname(ROOT_DEV, b);
#endif
        panic("VFS: Unable to mount root fs on %s", b);
out:
        putname(fs_names);

论坛徽章:
0
4 [报告]
发表于 2010-12-28 12:36 |只看该作者
uboot没配好
Please append a correct "root=" boot option; here are the available partitions:

论坛徽章:
0
5 [报告]
发表于 2010-12-28 12:41 |只看该作者
从程序来看 肯定是do_mount_root函数返回了-EINVAL导致的。
static int __init do_mount_root(char *name, char *fs, int flags, void *data)
{
        int err = sys_mount(name, "/root", fs, flags, data);
        if (err)
                return err;

        sys_chdir("/root");
        ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
        printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
               current->fs->pwd.mnt->mnt_sb->s_type->name,
               current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ?
               " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
        return 0;
}
从上面来看肯定是sys_mount返回了-EINVAL导致的。呵呵 你就继续往下找 肯定能找到你的问题出在哪里,至少可以找出出现-EINVAL错误的情况有哪几种,然后再去查你的文件系统或者设置有没有错误。。。。希望对你有帮助...

论坛徽章:
0
6 [报告]
发表于 2011-01-03 17:34 |只看该作者
VFS: Cannot open root device "1f02" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:

论坛徽章:
0
7 [报告]
发表于 2011-01-13 17:31 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
8 [报告]
发表于 2012-03-08 11:21 |只看该作者
发现一个好网站,购物拿回扣 tradehue.com
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP