Chinaunix首页 | 论坛 | 博客
  • 博客访问: 532735
  • 博文数量: 150
  • 博客积分: 5010
  • 博客等级: 大校
  • 技术积分: 1861
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-17 00:19
文章分类

全部博文(150)

文章存档

2011年(1)

2009年(14)

2008年(135)

我的朋友

分类: LINUX

2008-05-21 21:58:34

内核移植时,设定的nand分区有用,在内核配置时设定了

Boot options  ---> Default kernel command string: 

         noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200

文件系统建立时,设定linuxrc就可,mtdblock2的设定在这是64M的分区信息,我们用的是32M的

要修改:

static struct mtd_partition partition_info[] ={ 

        { /* 1MB  */ 

                 name: "bootloader", 

                 size:  0x00100000, 

                 offset: 0x0, 

        },{ /* 3MB */ 

                 name: "kernel", 

                 size:  0x00300000, 

                 offset: 0x00100000, 

        }, { /* 40MB */

                 name: "root", 

                 size:  0x02800000, 

                 offset: 0x00400000, 

        }, { /* 20MB */ 

                 name: "user", 

                 size: 0x00f00000, 

                 offset: 0x02d00000, 

        } 

}; 

struct s3c2410_nand_set nandset ={ 

        nr_partitions: 4,           /* the number of partitions */ 

        partitions: partition_info, /* partition table          */ 

}; 


name: 代表分区名字
size: 代表flash 分区大小(单位:字节)
offset: 代表flash 分区的起始地址(相对于0x0 的偏移)

 目标板计划分4 个区,分别存放bootloader, kernel, rootfs 以及以便以后扩展使用的用户文件系统空间。
各分区在Nand flash 中起始地址. 分区大小.
修改

static struct mtd_partition partition_info[] ={ 

        { /* 1MB  */ 

                 name: "bootloader", 

                 size:  0x00100000, 

                 offset: 0x0, 

        },{ /* 3MB */ 

                 name: "kernel", 

                 size:  0x00300000, 

                 offset: 0x00100000, 

        }, { /* 24MB */ 

                 name: "root", 

                 size:  0x01800000, 

                 offset: 0x00400000, 

        }, { /* 4MB */ 

                 name: "user", 

                 size: 0x00400000, 

                 offset: 0x01d00000, 

        } 

}; 

根文件,不用老师说的写rc.S之类的,这个问题要问一下。
阅读(1328) | 评论(0) | 转发(0) |
0

上一篇:qt宿主机移植

下一篇:QT读写文件

给主人留下些什么吧!~~