Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1084439
  • 博文数量: 646
  • 博客积分: 288
  • 博客等级: 二等列兵
  • 技术积分: 5375
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-08 14:33
个人简介

为了技术,我不会停下学习的脚步,我相信我还能走二十年。

文章分类

全部博文(646)

文章存档

2014年(8)

2013年(134)

2012年(504)

分类:

2012-07-03 15:28:22

虽然作者已经写得很详细了,但我在移植过程中还是遇到了不少问题,嵌入式就是这样,实践才是王道

前期阅读:
嵌入式Linux之我行——u-boot-2009.08在2440上的移植详解(一):http://blog.chinaunix.net/space.php?uid=22174347&do=blog&id=1786933
准备进入u-boot的第二阶段(在u-boot中添加对我们开发板上Nand Flash的支持):http://blog.chinaunix.net/space.php?uid=22174347&do=blog&id=1786935
u-boot对CS8900或者DM9000X网卡的支持:http://blog.chinaunix.net/space.php?uid=22174347&do=blog&id=1786936

上面几篇文章是一个系列,楼主已经介绍的很详细了,我基本上是照着做,并结合自己的开发板进行修改的,很适合初学者的学习,再次表示感谢!

1.u-boot部分的修改(因为这部分没有遇到什么问题,基本上照搬原文的)
注意:此篇对Nand的操作是基于MTD架构方式,在“u-boot-2009.08在2440上的移植详解(三)”中讲到过。

    通常一个Nnad Flash存储设备由若干块组成,1个块由若干页组成。一般128MB以下容量的Nand Flash芯片,一页大小为528B,被依次分为2个256B的主数据区和16B的额外空间;128MB以上容量的Nand Flash芯片,一页大小通常为2KB。由于Nand Flash出现位反转的概率较大,一般在读写时需要使用ECC进行错误检验和恢复。

    Yaffs/yaffs2文件系统的设计充分考虑到Nand Flash以页为存取单位等的特点,将文件组织成固定大小的段(Chunk)。以528B的页为例,Yaffs/yaffs2文件系统使用前512B存储 数据和16B的额外空间存放数据的ECC和文件系统的组织信息等(称为OOB数据)。通过OOB数据,不但能实现错误检测和坏块处理,同时还可以避免加载 时对整个存储介质的扫描,加快了文件系统的加载速度。以下是Yaffs/yaffs2文件系统页的结构说明:

           Yaffs页结构说明
==============================================
   字节                   用途
==============================================
 0 - 511                存储数据(分为两个半部)
512 - 515               系统信息
   516                  数据状态字
   517                  块状态字
518 - 519               系统信息
520 - 522               后半部256字节的ECC
523 - 524               系统信息
525 - 527               前半部256字节的ECC
==============================================


    好了,在了解Nand Flash组成和Yaffs/yaffs2文件系统结构后,我们再回到u-boot中。目前,在u-boot中已经有对Cramfs、Jffs2等文件系 统的读写支持,但与带有数据校验等功能的OOB区的Yaffs/Yaffs2文件系统相比,他们是将所有文件数据简单的以线性表形式组织的。所以,我们只 要在此基础上通过修改u-boot的Nand Flash读写命令,增加处理00B区域数据的功能,即可以实现对Yaffs/Yaffs2文件系统的读写支持。


实现对Yaffs或者Yaffs2文件系统的读写支持步骤如下:
①、在include/configs/my2440.h头文件中定义一个管理对Yaffs2支持的宏和开启u-boot中对Nand Flash默认分区的宏,如下:

#gedit include/configs/my2440.h  //添加到文件末尾即可

#define CONFIG_MTD_NAND_YAFFS2   1 //定义一个管理对Yaffs2支持的宏

//开启Nand Flash默认分区,注意此处的分区要和你的内核中的分区保持一致
#define MTDIDS_DEFAULT "nand0=nandflash0"
#define MTDPARTS_DEFAULT "mtdparts=nandflash0:256k(bootloader)," \
                     "128k(params)," \
                     "2m(kernel)," \
                     
"-(root)"

②、在原来对Nand操作的命令集列表中添加Yaffs2对Nand的写命令,如下:

#gedit common/cmd_nand.c   //在U_BOOT_CMD中添加

U_BOOT_CMD(nand, CONFIG_SYS_MAXARGS, 1, do_nand,
    "NAND sub-system",
    "info - show available NAND devices\n"
    "nand device [dev] - show or set current device\n"
    "nand read - addr off|partition size\n"
    "nand write - addr off|partition size\n"
    " read/write 'size' bytes starting at offset 'off'\n"
    " to/from memory address 'addr', skipping bad blocks.\n"

//注意:这里只添加了yaffs2的写命令,因为我们只用u-boot下载(即写)功能,所以我们没有添加yaffs2读的命令
#if defined(CONFIG_MTD_NAND_YAFFS2)
    "nand write[.yaffs2] - addr off|partition size - write `size' byte yaffs image\n"
    " starting at offset off' from memory address addr' (.yaffs2 for 512+16 NAND)\n"
#endif


    "nand erase [clean] [off size] - erase 'size' bytes from\n"
    " offset 'off' (entire device if not specified)\n"
    "nand bad - show bad blocks\n"
    "nand dump[.oob] off - dump page\n"
    "nand scrub - really clean NAND erasing bad blocks (UNSAFE)\n"
    "nand markbad off [...] - mark bad block(s) at offset (UNSAFE)\n"
    "nand biterr off - make a bit error at offset (UNSAFE)"
#ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
    "\n"
    "nand lock [tight] [status]\n"
    " bring nand to lock state or display locked pages\n"
    "nand unlock [offset] [size] - unlock section"
#endif
);

接着,在该文件中对nand操作的do_nand函数中添加yaffs2对nand的操作,如下:

    if (strncmp(cmd, "read", 4) == 0 || strncmp(cmd, "write", 5) == 0) 
    {
        int read;

        if (argc < 4)
            goto usage;

        addr = (ulong)simple_strtoul(argv[2], NULL, 16);

        read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */
        printf("\nNAND %s: ", read ? "read" : "write");
        if (arg_off_size(argc - 3, argv + 3, nand, &off, &size) != 0)
            return 1;

        s = strchr(cmd, '.');
        if (!s || !strcmp(s, ".jffs2") || !strcmp(s, ".e") || !strcmp(s, ".i")) 
        {
            if (read)
                ret = nand_read_skip_bad(nand, off, &size, (u_char *)addr);
            else
                ret = nand_write_skip_bad(nand, off, &size, (u_char *)addr);
        }

//添加yaffs2相关操作,注意该处又关联到nand_write_skip_bad函数

#if defined(CONFIG_MTD_NAND_YAFFS2)
        else if (s != NULL && (!strcmp(s, ".yaffs2")))
        {
            nand->rw_oob = 1;
            nand->skipfirstblk = 1;
            ret = nand_write_skip_bad(nand,off,&size,(u_char *)addr);
            nand->skipfirstblk = 0;
            nand->rw_oob = 0;
        }
#endif

        else if (!strcmp(s, ".oob")) 
        {
            /* out-of-band data */
            mtd_oob_ops_t ops = 
            {
                .oobbuf = (u8 *)addr,
                .ooblen = size,
                .mode = MTD_OOB_RAW
            };

            if (read)
                ret = nand->read_oob(nand, off, &ops);
            else
                ret = nand->write_oob(nand, off, &ops);
        } 
        else 
        {
            printf("Unknown nand command suffix '%s'.\n", s);
            return 1;
        }

        printf(" %zu bytes %s: %s\n", size, read ? "read" : "written", ret ? "ERROR" : "OK");

        return ret == 0 ? 0 : 1;
    }


③、在include/linux/mtd/mtd.h头文件的mtd_info结构体中添加上面用到rw_oob和skipfirstblk数据成员,如下:

#gedit include/linux/mtd/mtd.h   //在mtd_info结构体中添加

#if defined(CONFIG_MTD_NAND_YAFFS2)
    u_char rw_oob;
    u_char skipfirstblk;
#endif


④、在第二步关联的nand_write_skip_bad函数中添加对Nand OOB的相关操作,如下:

#gedit drivers/mtd/nand/nand_util.c  //在nand_write_skip_bad函数中添加

int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length, u_char *buffer)
{
    int rval;
    size_t left_to_write = *length;
    size_t len_incl_bad;
    u_char *p_buffer = buffer;

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support
    if(nand->rw_oob==1)    
    {
        size_t oobsize = nand->oobsize;
        size_t datasize = nand->writesize;
        int datapages = 0;

        if (((*length)%(nand->oobsize+nand->writesize)) != 0) 
        {
         printf ("Attempt to write error length data!\n");
         return -EINVAL;
     }

        datapages = *length/(datasize+oobsize);
        *length = datapages*datasize;
        left_to_write = *length;
    }
#endif

    /* Reject writes, which are not page aligned */
    if ((offset & (nand->writesize - 1)) != 0 ||
     (*length & (nand->writesize - 1)) != 0) {
        printf ("Attempt to write non page aligned data\n");
        return -EINVAL;
    }

    len_incl_bad = get_len_incl_bad (nand, offset, *length);

    if ((offset + len_incl_bad) >= nand->size) {
        printf ("Attempt to write outside the flash area\n");
        return -EINVAL;
    }

#if !defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support
    if (len_incl_bad == *length) {
        rval = nand_write (nand, offset, length, buffer);
        if (rval != 0)
            printf ("NAND write to offset %llx failed %d\n",
                offset, rval);

        return rval;
    }
#endif

    while (left_to_write > 0) {
        size_t block_offset = offset & (nand->erasesize - 1);
        size_t write_size;

        WATCHDOG_RESET ();

        if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
            printf ("Skip bad block 0x%08llx\n",
                offset & ~(nand->erasesize - 1));
            offset += nand->erasesize - block_offset;
            continue;
        }

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support
        if(nand->skipfirstblk==1)    
        {
            nand->skipfirstblk=0;
            printf ("Skip the first good block %llx\n", offset & ~(nand->erasesize - 1));
            offset += nand->erasesize - block_offset;
            continue;
        }
#endif

        if (left_to_write < (nand->erasesize - block_offset))
            write_size = left_to_write;
        else
            write_size = nand->erasesize - block_offset;

        printf("\rWriting at 0x%llx -- ",offset); //add yaffs2 file system support


        rval = nand_write (nand, offset, &write_size, p_buffer);
        if (rval != 0) {
            printf ("NAND write to offset %llx failed %d\n",
                offset, rval);
            *length -= left_to_write;
            return rval;
        }

        left_to_write -= write_size;
        printf("%d%% is complete.",100-(left_to_write/(*length/100)));
        offset += write_size;

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support
        if(nand->rw_oob==1)    
        {
            p_buffer += write_size+(write_size/nand->writesize*nand->oobsize);
        } 
        else    
        {
            p_buffer += write_size;
        }
#else
        p_buffer += write_size;
#endif

    }

    return 0;
}


⑤、在第四步nand_write_skip_bad函数中我们看到又对nand_write函数进行了访问,所以这一步是到nand_write函数中添加对yaffs2的支持,如下:

#gedit drivers/mtd/nand/nand_base.c  //在nand_write函数中添加

static int nand_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const uint8_t *buf)
{
    struct nand_chip *chip = mtd->priv;
    int ret;

 

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support

    int oldopsmode = 0;

    if(mtd->rw_oob==1)    
    {
        int i = 0;
        int datapages = 0;

        size_t oobsize = mtd->oobsize;
        size_t datasize = mtd->writesize;

        uint8_t oobtemp[oobsize];
        datapages = len / (datasize);

        for(i = 0; i < (datapages); i++)    
        {
            memcpy((void *)oobtemp, (void *)(buf + datasize * (i + 1)), oobsize);
            memmove((void *)(buf + datasize * (i + 1)), (void *)(buf + datasize * (i + 1) + oobsize), (datapages - (i + 1)) * (datasize) + (datapages - 1) * oobsize);
            memcpy((void *)(buf+(datapages) * (datasize + oobsize) - oobsize), (void *)(oobtemp), oobsize);
        }
    }
#endif

 

    /* Do not allow reads past end of device */
    if ((to + len) > mtd->size)
        return -EINVAL;
    if (!len)
        return 0;

    nand_get_device(chip, mtd, FL_WRITING);

    chip->ops.len = len;
    chip->ops.datbuf = (uint8_t *)buf;

 

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support

    if(mtd->rw_oob!=1)    
    {
        chip->ops.oobbuf = NULL;
    } 
    else    
    {
        chip->ops.oobbuf = (uint8_t *)(buf + len);
        chip->ops.ooblen = mtd->oobsize;
        oldopsmode = chip->ops.mode;
        chip->ops.mode = MTD_OOB_RAW;
    }
#else
    chip->ops.oobbuf = NULL;
#endif

 

    ret = nand_do_write_ops(mtd, to, &chip->ops);

    *retlen = chip->ops.retlen;

    nand_release_device(mtd);

 

#if defined(CONFIG_MTD_NAND_YAFFS2) //add yaffs2 file system support

    chip->ops.mode = oldopsmode;
#endif

 

    return ret;
}


OK,对yaffs2支持的代码已修改完毕,重新编译u-boot并下载到nand中,启动开发板,在u-boot的命令行输入:nand help查看nand的命令,可以看到多了一个nand write[.yaffs2]的命令,这个就是用来下载yaffs2文件系统到nand中的命令了。
下面的过程就跟原文有些出入了,事实证明我在这里走了不少的弯路。

1.使用mkyaffs2image工具制作yafs2文件系统的镜像时,需要注意你的nand flash的型号,目前有2种mkyaffs2image,mkyaffs2image-12M,如果你nand flash是128MB的,就得选择后者了,切记!
关于制作yaffs2文件系统,原文附了一个链接,可以直接参考。

⑥、使用nand write[.yaffs2]命令把事前制作好的yaffs2文件系统下载到Nand Flash中(yaffs2文件系统的制作请参考:Linux-2.6.30.4在2440上的移植之文件系统),下载操作步骤和效果图如下:

tftp 0x30000000 root_mini.img //用tftp将yaffs2文件系统下载到内存的0x30000000位置

nand erase 0x04000000 0x04000000 //擦除Nand的文件系统分区

nand write.yaffs2 0x30000000 0x04000000 0x74b140 //将内存中的yaffs2文件系统写入Nand的文件系统分区,注意这里的0x658170是yaffs2文件系统的实际大小(可以在tftp传送完后可以看到),要写正确,否则会形成假坏块


在这里注明下,因为的nand flash有坏块,所以我是从0x04000000也就是64M处开始挂载文件系统。因为这里做了修改,所以,在内核相应的地方也要做必要的修改,这个在后面会提到。



2 烧写内核配置内核,使其对yaffs2文件系统的支持,配置完后编译内核,下载到开发板上。
在烧写内核前,需做如下配置

2.0 准备工作目录和解压内核源码

#mkdir my2440
#cd my2440/
#tar -jxvf linux-2.6.30.4.tar.bz2


2.1 给内核打上补丁,使内核支持yaffs.这里。

#tar -zxvf cvs-root.tar.gz
#cd cvs/yaffs2/
#./patch-ker.sh c /root/my2440/linux-2.6.30.4/


2.2 进入内核根目录修改Makefile使之编译成ARM平台

#cd linux-2.6.30.4
#gedit Makefile

2.3 修改系统平台时钟为12MHz(即:12000000)

#gedit arch/arm/mach-s3c2440/mach-smdk2440.c

2.4. 修改Nand Flash分区。这里只创建4个分区,其他多余的分区屏蔽掉

在arch/arm/plat-s3c24xx/common-smdk.c中

static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "My2440 boot",
.size = 0x00040000,
.offset = 0,
},
[1] = {
.name = "param",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "M2440 kernel",
.offset = 0x00060000,
.size = 0x00200000,
},
[3] = {
.name = "YAFFS2",
.offset = 0x04000000,
.size = 0x04000000,
}
/*,
[4] = {
.name = "S3C2410 flash partition 4",
.offset = SZ_1M * 10,
.size = SZ_4M,
},
[5] = {
.name = "S3C2410 flash partition 5",
.offset = SZ_1M * 14,
.size = SZ_1M * 10,
},
[6] = {
.name = "S3C2410 flash partition 6",
.offset = SZ_1M * 24,
.size = SZ_1M * 24,
},
[7] = {
.name = "S3C2410 flash partition 7",
.offset = SZ_1M * 48,
.size = SZ_16M,
}*/
};

第1个分区放的是给u-boot,第2个分区给环境变量,第3个分区给linux内核,第4个分区是用来挂载yaffs2文件系统的(注意:.offset = 0x04000000这个值要与先前root_mini.img烧写的位置一致)切记!!!

2.5 配置内核选项

#make menuconfig

首先加载s3c24xx系列的通用配置,然后在此基础上修改

各配置选项如下。这里只列出了要修改的项,其他的默认

boot option-->Default kernel command string

这里的挂载点很重要,结合前面的分区情况,我们需将内核启动参数设置为:(noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0)

File systems --->
    < > Second extended fs support 
    < > Ext3 journalling file system support 
    < > The Extended 4 (ext4) filesystem 
    < > Reiserfs support 
    < > JFS filesystem support 
    < > XFS filesystem support 
    < > OCFS2 file system support 
    < > Btrfs filesystem (EXPERIMENTAL) Unstable disk format 
    [*] Enable POSIX file locking API 
    [*] Dnotify support 
    [*] Inotify file change notification support 
    [*] Inotify support for userspace 
    [ ] Quota support 
     Kernel automounter support 
     Kernel automounter version 4 support (also supports v3) 
     FUSE (Filesystem in Userspace) support 
        Caches --->
        CD-ROM/DVD Filesystems ---> 
            <*> ISO 9660 CDROM file system support 
            [ ] Microsoft Joliet CDROM extensions 
            [ ] Transparent decompression extension 
            < > UDF file system support 
        DOS/FAT/NT Filesystems ---> 
            <*> MSDOS fs support 
            <*> VFAT (Windows-95) fs support 
            (437) Default codepage for FAT 
            (iso8859-1) Default iocharset for FAT 
            < > NTFS file system support 
        Pseudo filesystems ---> 
    [*] Miscellaneous filesystems ---> 
        --- Miscellaneous filesystems 
        < > ADFS file system support (EXPERIMENTAL) 
        < > Amiga FFS file system support (EXPERIMENTAL) 
        < > Apple Macintosh file system support (EXPERIMENTAL) 
        < > Apple Extended HFS file system support 
        < > BeOS file system (BeFS) support (read only) (EXPERIMENTAL) 
        < > BFS file system support (EXPERIMENTAL) 
        < > EFS file system support (read only) (EXPERIMENTAL) 
        <*> YAFFS2 file system support 
        -*- 512 byte / page devices 
        [ ] Use older-style on-NAND data format with pageStatus byte 
        [ ] Lets Yaffs do its own ECC 
        -*- 2048 byte (or larger) / page devices 
        [*] Autoselect yaffs2 format 
        [ ] Disable lazy loading 
        [ ] Turn off wide tnodes 
        [ ] Force chunk erase check
        [*] Cache short names in RAM 
        <*> Journalling Flash File System v2 (JFFS2) support 
        (0) JFFS2 debugging verbosity (0 = quiet, 2 = noisy) 
        [*] JFFS2 write-buffering support 
        [ ] Verify JFFS2 write-buffer reads 
        [*] JFFS2 summary support (EXPERIMENTAL) 
        [ ] JFFS2 XATTR support (EXPERIMENTAL) 
        [ ] Advanced compression options for JFFS2 
        <*> Compressed ROM file system support (cramfs) 
         SquashFS 4.0 - Squashed file system support 
        [ ] Additional option for memory-constrained systems 
        < > FreeVxFS file system support (VERITAS VxFS(TM) compatible) 
        < > Minix file system support 
        < > SonicBlue Optimized MPEG File System support 
        < > OS/2 HPFS file system support 
        < > QNX4 file system support (read only) 
        <*> ROM file system support 
        RomFS backing stores (Block device-backed ROM file system support) -- 
        < > System V/Xenix/V7/Coherent file system support 
        < > UFS file system support (read only) 
        < > NILFS2 file system support (EXPERIMENTAL) 
    [*] Network File Systems ---> 
        Partition Types ---> 
    -*- Native language support ---> 
    < > Distributed Lock Manager (DLM) --->


配置完后将配置文件保存为.config,这样方便下次make menuconfig时默认加载上次配置过的文件



2.6 交叉编译内核

#make zImage

如果没有任何错误,编译出来的内核在arch/arm/boot/目录下,文件zImage即是,zImage文件是不能直接被 u--boot引导的,我们还需如下的修改。

2.7 准备能被u-boot直接引导的内核uImage
通常,kernel的启动需要u-boot提供一些参数信息,比如ramdisk在RAM中的地址。经过编译后的u-boot在根目录下的 tools目录中,会有个叫做mkimage的工具,他可以给zImage添加一个header,也就是说使得通常我们编译的内核zImage添加一个数 据头信息部分,我们把添加头后的image通常叫uImage,uImage是可以被u-boot直接引导的内核镜像。

mkimage工具的使用介绍如下:

使用: 中括号括起来的是可选的

mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image

选项:
-A:set architecture to 'arch'       //用于指定CPU类型,比如ARM
-O:set operating system to 'os'     //用于指定操作系统,比如Linux
-T:set image type to 'type'         //用于指定image类型,比如Kernel
-C:set compression type 'comp'      //指定压缩类型
-a:set load address to 'addr' (hex) //指定image的载入地址
-e:set entry point to 'ep' (hex)    //内核的入口地址,一般为image的载入地址+0x40(信息头的大小)
-n:set image name to 'name'         //image在头结构中的命名
-d:use image data from 'datafile'   //无头信息的image文件名
-x:set XIP (execute in place)       //设置执行位置


先将u-boot下的tools中的mkimage复制到主机的/usr/local/bin目录下,这样就可以在主机的任何目录下使用该工具 了。现在我们进入kernel生成目录(一般是arch/arm/boot目录),然后执行如下命令,就会在该目录下生成一个uImage.img的镜像 文件,把他复制到tftp目录下,这就是我们所说的uImage。

mkimage -n 'linux-2.6.30.4' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage uImage.img


2.8 内核已经制作好了,后面就要将其写入nand flash指定地方即可
把uImage.img用tftp下载到内存中,然后再固化到Nand Flash中,操作和执行图如下:

tftp 0x30000000 uImage.img  //将uImage.img下载到内存0x30000000处

nand erase 0x60000 0x200000 //擦除nand的0x60000-0x260000的内容

nand write 0x30000000 0x60000 0x200000 //将内存0x30000000处的内容写入到nand的0x60000处


3. 设置环境变量
设置修改u-boot的启动参数,在u-boot命令行下输入:

//设置启动参数,意思是将nand中0x60000-0x00200000(和kernel分区一致)的内容读到内存0x31000000中,然后用bootm命令来执行

set bootcmd 'nand read 0x31000000 0x60000 0x00200000;bootm 0x31000000'

saveenv  //保存设置


重启开发板,文件系统能够挂载成功了,里面还有些问题,但已无大碍,

显示如下信息:

U-Boot 2009.08 (11鏈?25 2011 - 17:01:47)

DRAM: 64 MB
Flash: 2 MB
NAND: NAND_ECC_NONE selected by board driver. This is not recommended !!
128 MiB
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x60000, size 0x200000
2097152 bytes read: OK
## Booting kernel from Legacy Image at 31000000 ...
Image Name: linux-2.6.30.4
Created: 2011-11-25 1:30:11 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1874936 Bytes = 1.8 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
............................................................ done, booting the k
ernel.
Linux version 2.6.30.4 (root@localhost.localdomain) (gcc version 3.4.5) #1 Fri N
ov 25 09:27:02 CST 2011
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, (c) 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 on. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,
115200
NR_IRQS:85
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 60896KB available (3496K code, 316K data, 136K init, 0K highmem)
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 936 bytes
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
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
NET: Registered protocol family 1
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.
yaffs Nov 25 2011 09:24:38 Installing.
msgmni has been set to 119
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
Scanning device for bad blocks
Bad eraseblock 20 at 0x000000280000
Bad eraseblock 21 at 0x0000002a0000
Bad eraseblock 22 at 0x0000002c0000
Bad eraseblock 23 at 0x0000002e0000
Bad eraseblock 24 at 0x000000300000
Bad eraseblock 25 at 0x000000320000
Bad eraseblock 26 at 0x000000340000
Bad eraseblock 27 at 0x000000360000
Bad eraseblock 28 at 0x000000380000
Bad eraseblock 29 at 0x0000003a0000
Bad eraseblock 30 at 0x0000003c0000
Bad eraseblock 31 at 0x0000003e0000
Bad eraseblock 32 at 0x000000400000
Bad eraseblock 33 at 0x000000420000
Bad eraseblock 34 at 0x000000440000
Bad eraseblock 35 at 0x000000460000
Bad eraseblock 36 at 0x000000480000
Bad eraseblock 37 at 0x0000004a0000
Bad eraseblock 38 at 0x0000004c0000
Bad eraseblock 39 at 0x0000004e0000
Bad eraseblock 40 at 0x000000500000
Bad eraseblock 41 at 0x000000520000
Bad eraseblock 42 at 0x000000540000
Bad eraseblock 43 at 0x000000560000
Bad eraseblock 44 at 0x000000580000
Bad eraseblock 45 at 0x0000005a0000
Bad eraseblock 46 at 0x0000005c0000
Bad eraseblock 47 at 0x0000005e0000
Bad eraseblock 48 at 0x000000600000
Bad eraseblock 49 at 0x000000620000
Bad eraseblock 50 at 0x000000640000
Bad eraseblock 51 at 0x000000660000
Bad eraseblock 52 at 0x000000680000
Bad eraseblock 53 at 0x0000006a0000
Bad eraseblock 54 at 0x0000006c0000
Bad eraseblock 55 at 0x0000006e0000
Bad eraseblock 56 at 0x000000700000
Bad eraseblock 57 at 0x000000720000
Bad eraseblock 58 at 0x000000740000
Bad eraseblock 59 at 0x000000760000
Bad eraseblock 60 at 0x000000780000
Bad eraseblock 61 at 0x0000007a0000
Bad eraseblock 62 at 0x0000007c0000
Bad eraseblock 63 at 0x0000007e0000
Bad eraseblock 64 at 0x000000800000
Bad eraseblock 65 at 0x000000820000
Bad eraseblock 66 at 0x000000840000
Bad eraseblock 67 at 0x000000860000
Bad eraseblock 68 at 0x000000880000
Bad eraseblock 69 at 0x0000008a0000
Bad eraseblock 70 at 0x0000008c0000
Bad eraseblock 71 at 0x0000008e0000
Bad eraseblock 72 at 0x000000900000
Bad eraseblock 73 at 0x000000920000
Bad eraseblock 74 at 0x000000940000
Bad eraseblock 75 at 0x000000960000
Bad eraseblock 76 at 0x000000980000
Bad eraseblock 77 at 0x0000009a0000
Bad eraseblock 78 at 0x0000009c0000
Bad eraseblock 79 at 0x0000009e0000
Bad eraseblock 80 at 0x000000a00000
Bad eraseblock 81 at 0x000000a20000
Bad eraseblock 82 at 0x000000a40000
Bad eraseblock 83 at 0x000000a60000
Bad eraseblock 84 at 0x000000a80000
Bad eraseblock 85 at 0x000000aa0000
Bad eraseblock 86 at 0x000000ac0000
Bad eraseblock 87 at 0x000000ae0000
Bad eraseblock 88 at 0x000000b00000
Bad eraseblock 89 at 0x000000b20000
Bad eraseblock 90 at 0x000000b40000
Bad eraseblock 91 at 0x000000b60000
Bad eraseblock 92 at 0x000000b80000
Bad eraseblock 93 at 0x000000ba0000
Bad eraseblock 94 at 0x000000bc0000
Bad eraseblock 95 at 0x000000be0000
Bad eraseblock 96 at 0x000000c00000
Bad eraseblock 97 at 0x000000c20000
Bad eraseblock 98 at 0x000000c40000
Bad eraseblock 99 at 0x000000c60000
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 101 at 0x000000ca0000
Bad eraseblock 102 at 0x000000cc0000
Bad eraseblock 103 at 0x000000ce0000
Bad eraseblock 104 at 0x000000d00000
Bad eraseblock 105 at 0x000000d20000
Bad eraseblock 106 at 0x000000d40000
Bad eraseblock 107 at 0x000000d60000
Bad eraseblock 108 at 0x000000d80000
Bad eraseblock 109 at 0x000000da0000
Bad eraseblock 110 at 0x000000dc0000
Bad eraseblock 111 at 0x000000de0000
Bad eraseblock 112 at 0x000000e00000
Bad eraseblock 113 at 0x000000e20000
Bad eraseblock 114 at 0x000000e40000
Bad eraseblock 115 at 0x000000e60000
Bad eraseblock 116 at 0x000000e80000
Bad eraseblock 117 at 0x000000ea0000
Bad eraseblock 118 at 0x000000ec0000
Bad eraseblock 119 at 0x000000ee0000
Bad eraseblock 120 at 0x000000f00000
Bad eraseblock 121 at 0x000000f20000
Bad eraseblock 122 at 0x000000f40000
Bad eraseblock 123 at 0x000000f60000
Bad eraseblock 124 at 0x000000f80000
Bad eraseblock 125 at 0x000000fa0000
Bad eraseblock 126 at 0x000000fc0000
Bad eraseblock 127 at 0x000000fe0000
Bad eraseblock 128 at 0x000001000000
Bad eraseblock 129 at 0x000001020000
Bad eraseblock 130 at 0x000001040000
Bad eraseblock 131 at 0x000001060000
Bad eraseblock 132 at 0x000001080000
Bad eraseblock 133 at 0x0000010a0000
Bad eraseblock 134 at 0x0000010c0000
Bad eraseblock 135 at 0x0000010e0000
Bad eraseblock 136 at 0x000001100000
Bad eraseblock 137 at 0x000001120000
Bad eraseblock 138 at 0x000001140000
Bad eraseblock 139 at 0x000001160000
Bad eraseblock 140 at 0x000001180000
Bad eraseblock 141 at 0x0000011a0000
Bad eraseblock 142 at 0x0000011c0000
Bad eraseblock 143 at 0x0000011e0000
Bad eraseblock 144 at 0x000001200000
Bad eraseblock 145 at 0x000001220000
Bad eraseblock 146 at 0x000001240000
Bad eraseblock 147 at 0x000001260000
Bad eraseblock 148 at 0x000001280000
Bad eraseblock 149 at 0x0000012a0000
Bad eraseblock 150 at 0x0000012c0000
Bad eraseblock 151 at 0x0000012e0000
Bad eraseblock 152 at 0x000001300000
Bad eraseblock 464 at 0x000003a00000
Creating 4 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "My2440 boot"
0x000000040000-0x000000060000 : "param"
0x000000060000-0x000000260000 : "M2440 kernel"
0x000004000000-0x000008000000 : "YAFFS2"
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
usb usb1: configuration #1 chosen from 1 choice
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.4.3: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
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
Advanced Linux Sound Architecture Driver Version 1.0.20.
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
uncorrectable error : <3>end_request: I/O error, dev mtdblock3, sector 256
isofs_fill_super: bread failed, dev=mtdblock3, iso_blknum=64, block=128
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 136K
hwclock: Could not access RTC: No such file or directory
mknod: /dev/pts/0: No such file or directory
/etc/init.d/rcS: /etc/init.d/rcS: 44: cannot create /dev/vc/0: Directory nonexis
tent
/etc/init.d/rcS: /etc/init.d/rcS: 45: cannot create /dev/vc/0: Directory nonexis
tent
/etc/rc.d/init.d/httpd: /etc/rc.d/init.d/httpd: 16: /sbin/boa: not found
/etc/init.d/rcS: /etc/init.d/rcS: 48: cannot create /dev/vc/0: Directory nonexis
tent
/etc/init.d/rcS: /etc/init.d/rcS: 49: cannot create /dev/vc/0: Directory nonexis
tent
/etc/init.d/rcS: /etc/init.d/rcS: 52: cannot create /dev/vc/0: Directory nonexis
tent
/etc/init.d/rcS: /etc/init.d/rcS: 53: cannot create /dev/vc/0: Directory nonexis
tent

/etc/rc.d/init.d/leds: /etc/rc.d/init.d/leds: 16: /sbin/led-player: not found
SIOCSIFADDR: No such device
SIOCGIFFLAGS: No such device
/etc/init.d/rcS: /etc/init.d/rcS: 59: /sbin/madplay: not found

Please press Enter to activate this console.
-sh: can't access tty; job control turned off
id: unknown uid 0
[@ajaxhe /]# ls
bin home lost+found sbin var
dev lib mnt tmp www
etc linuxrc proc usr
[@ajaxhe /]#

 

阅读(981) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~