帮助

内容读取中…

内容读取中…

首页  |  相册  |  共享  |  群组
搜索

正文

skyeye运行ucLinux (2008-07-05 18:41)

 

终于搞定在skyeye里面运行uclinux

今天成功安装了skyeye,并且在里面运行起来了uclinux

贴出来庆祝下:

内核包:uClinux-dist-20040408.tar.gz

操作系统:SuseLinux10.1

Skyeye的包:skyeye-1.2-RC8-3.tar.bz2

编译uclinux的步骤:

1./arm-elf-tools-20030314.sh(安装交叉编译环境)

安装完成后可以采用arm-elf-gcc –v来察看版本号。

2、修改 vmlinux-armv.lds.in 文件,
        vi linux-2.4.x/arch/armnommu/vmlinux-armv.lds.in
  

 *(got)  /* Global Offset table */
 
之后添加如下语句:
 romfs_data = .;
 romfs.o
 romfs_data_end = .;
  
即修改为:
     65                 *(.got)                 /* Global offset table          */
     66
     68                 romfs_data = .;
     69                 romfs.o
     70                 romfs_data_end = .;

注意在等号的前后要空格。

3make menuconfig (选择GDBlinux-2.4.x uclibc

4make dep   //进行编译链接

5make lib_only  //编译uClibc。以后我们编译用户程序的时候需要这个运行库

6make user_only  //编译用户的应用程序,包括初始化进程init,和用户交互的bash,以及集成了很多程序的busybox,还有一些服务,如boa(一个在嵌入式领域用的很多的Web 服务器)和telnetdtelnet 服务器,我们可以通过网络来登录我们的uClinux 而不一定使用串口)。

7make romfs

8make image//报错了这里,说没有linux的东西,先不管,然后会生成一个romfs.o的文件在后面用到。

9make linux //出现error:cannot open romfs.o

解决办法:cp ./linux-2.4.x/fs/romfs/romfs.o ./linux-2.4.x/

再编译下make linux

发现还有错误

    fs/fs.o(.data+0x1378): multiple definition of `romfs_file_operations'

    romfs.o(.data+0x80): first defined here

    make[1]: *** [linux] Error 1

    make[1]: Leaving directory `/root/uClinux-dist/linux-2.4.x'

    make: *** [linux] Error 1

解决办法:vi ~/uClinux-dist/linux-2.4.x/fs/romfs/inode.c

    /* Mapping from our types to the kernel */

 

    static struct address_space_operations romfs_aops = {

    readpage: romfs_readpage

    };

 

    static struct file_operations romfs_dir_operations = {

    read: generic_read_dir,

    readdir: romfs_readdir,

    };

 

    static struct file_operations romfs_file_operations = {

    read: generic_file_read,

    mmap: generic_file_mmap,

    #ifdef MAGIC_ROM_PTR

    romptr: romfs_romptr,

    #endif

再进行make linux

这一次ok

10make image下,这下是ok的了

这下是ok

11、在uc-linux-dist目录下新建一个skyeye.conf

cpu: arm7tdmi

 mach: at91

 mem_bank: map="M", type="RW", addr="0x00000000", size="0x00004000"

 mem_bank: map="M", type="RW", addr="0x01000000", size="0x00400000"

 mem_bank: map="M", type="R", addr="0x01400000", size="0x00400000", file="images/romfs".img

 mem_bank: map="M", type="RW", addr="0x02000000", size="0x00400000"

 mem_bank: map="M", type="RW", addr="0x02400000", size="0x00008000"

 mem_bank: map="M", type="RW", addr="0x04000000", size="0x00400000"

 mem_bank: map="I", type="RW", addr="0xf0000000", size="0x10000000"

12.运行skyeye –e linux-2.4.x/linux

这个东西就出来了。

 

参考文章:

1http://www.linuxfans.org/bbs/viewthread.php?tid=151812&extra=page%3D1%26amp%3Bfilter%3Ddigest

2http://blog.ednchina.com/yuliang0321/120554/message.aspx

评论 (0) | 阅读 (63)

评论
    内容读取中…
发表评论

你还没有登录,现在登录

个人档案

内容读取中…

博客公告

内容读取中…

博客日历

内容读取中…

文章分类

内容读取中…

文章存档

    内容读取中…

最新发表

    内容读取中…

最新评论

内容读取中…

博主留言

内容读取中…

博主好友

内容读取中…

最新访客

内容读取中…

博客统计

    内容读取中…

友情链接

新闻订阅