嵌入式系统移植三步曲 李珂颖

09计算机应用技术1班   李珂颖 0906041048

嵌入式系统移植三步曲

安装SkyEye    skyeye-1.2.8_rc1进行实验时,会出现问题,而采用skyeye-1.2.6_rc1 实验进行的很顺利,因此采用skyeye-1.2.6_rc1 SkyEre的配置文件skyeye.conf在网上直接下载,复制到SkyEre根目录下,不用更改。

BootLoader的移植

1.编辑u-boot目录中的Makefile文件时需要更改文件,所以需要交叉编译环境 安装arm-linux-gcc-2.95.3。如果没安装,就会在后几步中出错。

   2. 需要下载mknandflashdump文件件复制到/bin/下,然后才能执行如下命令

[root@localhost u-boot-1.1.4]# mknandflashdump u-boot.bin nand.dump 0

 

Linux内核的移植

1.下载cs8900.c和cs8900.h两个文件

2.需要启动tftp和nfs服务器

启动tftp服务器和启动NFS服务器

(1).tftp服务器

    [root@localhost Desktop]# service xinetd restart

停止 xinetd:                                              [确定]

启动 xinetd:                                              [确定]

(2).NFS服务器

    [root@localhost Desktop]# service nfs start

启动 NFS 服务:                                            [确定]

关掉 NFS 配额:                                            [确定]

启动 NFS 守护进程:                                        [确定]

启动 NFS mountd:                                          [确定]

3.在第9步 设置Flash分区中编辑devs.c文件

[root@localhost linux-2.6.14.7]# gedit arch/arm/mach-s3c2410/devs.c

添加如下内容:

/*nand */

#include

#include

#include

/* NAND Controller */

/************************ 建立Nand Flash分区表 ************************/

/* 一个Nand Flash总共64MB, 按如下大小进行分区 */

/*

name代表分区名字

size代表Flash分区大小单位:字节

offset代表Flash分区的起始地址相对于0x0的偏移

*/

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,

    }

};

/************************ 加入Nand Flash分区 ************************/

/*

nr_partitions指明partition_info中定义的分区数目

partitions分区信息表

*/

struct s3c2410_nand_set nandset =

{

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

    partitions: partition_info,     /* partition table */

};

/************************ 建立Nand Flash芯片支持 ************************/

/*

tacls, twrph0, twrph1的意思见S3C2410手册的63,

这3个值最后会被设置到NFCONF中,见S3C2410手册66.

sets支持的分区集

nr_set分区集的个数

*/

struct s3c2410_platform_nand superlpplatform=

{

    tacls:0,

    twrph0:30,

    twrph1:0,

    sets: &nandset,

    nr_sets: 1,

};

注意:该内容带有头文件,需添加在文件前面。

4.配置内核

[root@localhost linux-2.6.14.7]# cp arch/arm/configs/smdk2410_defconfig .config

    [root@localhost linux-2.6.14.7]# make menuconfig

 配置内核时,不要把字体调太大,字体太大TUI界面不会弹出。配置内核时需要小心谨慎。

文件系统的移植

1.在第8步创建密码文件时只留下root帐号。

       [root@localhost nfs]# cp /etc/passwd etc/ ;cp /etc/shadow etc/ ;cp /etc/group etc/

[root@localhost nfs]# chmod 600 etc/shadow

[root@localhost nfs]# gedit etc/passwd

内容是:root:x:0:0:root:/root:/bin/sh

[root@localhost nfs]# gedit etc/shadow

内容是:root:$1$zs2zr2N4$15U99ll5tUm3DwOvKnCVV1:14335:0:99999:7:::

[root@localhost nfs]# gedit etc/group

内容是:root:x:0:root

修改时需要把"x"删掉,此时登陆是不要密码的

2.在启动时需要注意防火墙问题

运行时出现 T T T T T T T T   说明防火墙没关  运行下命令关闭防火墙

[root@localhost u-boot-1.1.4]#iptables -F

 

 

 http://blog.chinaunix.net/space.php?uid=14735472&do=blog&id=110947



<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(336) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
posted @ 2016-03-30 10:24  张同光  阅读(65)  评论(0编辑  收藏  举报