QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 25821|回复: 59

成功编译2.6.14 并在skyeye1.2.4上运行的步骤--并成功 mount nfs

[复制链接]
发表于 2008-1-31 02:16:15 | 显示全部楼层 |阅读模式
1.
        从http://www.at.kernel.org/pub/linux/kernel/v2.6/下载2.6.14
2.
        解压arm-linux-gcc-3.4.1.tar.gz到/usr/local/arm/中
       
3.1指定目标平台。
        移植前:ARCH?= $(SUBARCH)
        移植后:ARCH :=arm
3.2指定交叉编译器。
        移植前:CROSS_COMPILE ?=
        移植后:CROSS_COMPILE   =/usr/local/arm/3.4.1/bin/arm-linux-
3.3
        make s3c2410_defconfig
4.复制cs8900
        #cp cs8900.c ./drivers/net/arm/
        #cp cs8900.h ./drivers/net/arm/
5.修改drivers/net/arm/目录下的Kconfig文件
        在最后添加如下内容:
config ARM_CS8900
        tristate "CS8900 support"
        depends on NET_ETHERNET && ARM && ARCH_SMDK2410
        help
          Support for CS8900A chipset based Ethernet cards. If you have a network
          (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available
          from as well as .To compile this driver as a module, choose M here and read.
          The module will be called cs8900.o.

在运行make menuconfig或者make xconfig命令的时候就会出现:[ ] CS8900 support
这一选项。

6. 参照http://skyeye.wiki.sourceforge.net/Linux 修改内核文件
修改include/asm-arm/arch-s3c2410/map.h
#define S3C2410_CS6 (0x30000000)
to
#define S3C2410_CS6 (0xC0000000)
修改include/asm-arm/arch-s3c2410/memory.h
#define PHYS_OFFSET UL(0x30000000)
to
#define PHYS_OFFSET UL(0xC0000000)

7.
        修改drivers/net/arm/目录下的Makefile文件,在最后添加如下内容:
        obj-$(CONFIG_ARM_CS8900) += cs8900.o
        注:2.6版本内核的Makefile文件也与2.4版本的有所不同。添加以上语句,就会使内核在
        编译的时候根据配置将cs8900A的驱动程序以模块或静态的方式编译到内核当中。
8. 修改/arch/arm/mach-s3c2410/mach-smdk2410.c文件
        在/arch/arm/mach-s3c2410/mach-smdk2410.c文件中,找到
        smdk2410_iodesc[]结构数组,添加如下如下内容:
        {vSMDK2410_ETH_IO,pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE}
        修改之后变成了:
static struct map_desc smdk2410_iodesc[] __initdata = {
/* nothing here yet */
/* Map the ethernet controller CS8900A */
{vSMDK2410_ETH_IO,pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE}
};

并且添加一个头文件引用
#include <asm-arm/arch-s3c2410/smdk2410.h>

9. 在include/asm-arm/arch-s3c2410/目录下创建smdk2410.h文件

  1. #ifndef _INCLUDE_SMDK2410_H_
  2. #define _INCLUDE_SMDK2410_H_
  3. #include <linux/config.h>
  4. #define pSMDK2410_ETH_IO 0x19000000
  5. #define vSMDK2410_ETH_IO 0xE0000000
  6. #define SMDK2410_ETH_IRQ IRQ_EINT9
  7. #endif // _INCLUDE_SMDK2410_H_
复制代码

10、配置、编译内核。在内核顶层目录当中键入:
#make smdk2410_defconfig
由于2.6的内核默认就支持了S3C2410,所以就有一个默认的内核配置文件。里面只是包
括了一个简单的配置,要使网卡编译进内核,还要进行手工配置。
#make menuconfig
根目录文件使用skyeye-testsuite-2.3.tar.bz2 中s3c2410的镜像
设置内核启动参数mem=32M console=ttySAC0 root=/dev/ram initrd=0xc0800000,0x00800000 ramdisk_size=2048 rw
设置CS8900的支持
Networking support --->
Ethernet (10 or 100Mbit) --->
  • CS8900 support
    在FS中还要选中
  •    Provide NFSv3 client support  才能mount nfs
    将刚才添加的网卡驱动程序静态添加到内核当中。
    最后进行内核编译。
    #make


    10 修改skyeye 1.2.4 的device/net/dev_net_cs8900a.c 文件
    参照http://lists.gro.clinux.org/pipe ... 4/skyeye.cs8900.bin

    修改后的附件在附件里

    编译好内核后
    运行
    #mkdir mnt
    #mount -o nolock 10.0.0.1:/home/arm /mnt 挂接上

    测试

    mount -o nolock 10.0.0.1:/usr/local/arm/3.4.1/arm-linux/lib /lib

    在host 上写一个小程序

    1. #include<stdio.h>
    2. int main()
    3. {
    4.   printf("hello world\n");
    5.   return 0
    6. }
    复制代码

    编译
    /usr/local/arm/3.4.1/bin/arm-linux-gcc hello.c -o hello

    这样机就可以在skyeye 上运行我们写个程序了

    根目录文件 使用2.3 的s3c2401-2.6.14下的跟目录文件就可以了

    [ 本帖最后由 zbluecn 于 2008-2-28 10:03 编辑 ]
  • 本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?注册

    ×
     楼主| 发表于 2008-1-31 02:17:38 | 显示全部楼层
    可以ping同了~~
    但是mount失败

    ping host时在host 上 用tcpdump -i tap0 抓包可以抓到

    mount时 用tcpdump -i tap0也有有数据包到达

    但是显示
    mount: mounting 10.0.0.1:/home/eye on /mnt failed

    [ 本帖最后由 zbluecn 于 2008-1-31 02:36 编辑 ]
    回复

    使用道具 举报

     楼主| 发表于 2008-1-31 02:41:59 | 显示全部楼层
    猜测是内核配置的问题

    在nfs上加入

      x x
  •    Provide NFSv3 client support                                   x x
      x x
  •      Provide client support for the NFSv3 ACL protocol extension  x x
      x x
  •    Provide NFSv4 client support (EXPERIMENTAL)                    x x
      x x
  •    Allow direct I/O on NFS files (EXPERIMENTAL)

    后编译
    mount 不提示失败了~~ 是定在那里不动了
  • 回复

    使用道具 举报

     楼主| 发表于 2008-1-31 02:47:33 | 显示全部楼层
    mont -o nolock 10.0.0.1/home /mnt
    成功挂接上了
    ls时也 数据包也发到host 上了~~
    但是不能显示


    如果直接用cd 进入目录的话是可以的

    打开文件和ls不能成功

    [ 本帖最后由 zbluecn 于 2008-1-31 02:56 编辑 ]
    回复

    使用道具 举报

    发表于 2008-1-31 04:40:54 | 显示全部楼层
    请使用 skyeye 1.2.4
    1.2.2 版本的网络延时部分有问题。
    回复

    使用道具 举报

     楼主| 发表于 2008-1-31 10:22:15 | 显示全部楼层
    用skyeye 1.2.4 网络不通

    我模拟的是s3c2410

    [ 本帖最后由 zbluecn 于 2008-1-31 10:42 编辑 ]
    回复

    使用道具 举报

    发表于 2008-1-31 12:52:49 | 显示全部楼层
    你用的是cs8900网卡么?可否写一个详细步骤给大家?
    另外你可以尝试一下下面的patch,或许能够解决你的问题。这个patch我目前还没有合并到skyeye的代码中。
    http://lists.gro.clinux.org/pipe ... ptember/001534.html
    回复

    使用道具 举报

     楼主| 发表于 2008-1-31 16:51:20 | 显示全部楼层
    ok le  
    在skyeye-1.2.4上打完补丁
    http://lists.gro.clinux.org/pipe ... 4/skyeye.cs8900.bin

    然后mount就可以了 谢谢!!!

    skyeye-1.2.4打完补丁的文件在附件里

    覆盖device/net/dev_net_cs8900a.c 就可以了

    [ 本帖最后由 zbluecn 于 2008-1-31 16:54 编辑 ]

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?注册

    ×
    回复

    使用道具 举报

    发表于 2008-2-1 00:07:02 | 显示全部楼层
    Good. Now I have merge cs8900 related patch to skyeye resource repository. So anybody who like to run cs8900 netcard can check out the source from svn repository.
    回复

    使用道具 举报

    发表于 2008-2-1 11:55:30 | 显示全部楼层
    9. 在include/asm-arm/arch-s3c2410/目录下创建smdk2410.h文件

    #ifndef _INCLUDE_SMDK2410_H_
    #define _INCLUDE_SMDK2410_H_
    #include
    #define pSMDK2410_ETH_IO 0x19000000
    #define vSMDK2410_ETH_IO 0xE0000000
    #define SMDK2410_ETH_IRQ IRQ_EINT9
    #endif // _INCLUDE_SMDK2410_H_

    there is an error when compile
    回复

    使用道具 举报

    发表于 2008-2-1 14:18:24 | 显示全部楼层
    Now the cs8900 driver for smdn2410 is committed to skyeye source repository. You can get it from :http://skyeye.svn.sourceforge.ne ... _2_6_14_cs8900.diff

    That means you just apply this patch on your linux-2.6.14 source tree. And use the lastest source in skyeye-v1/trunk/ , then you can run cs8900 driver directly.
    回复

    使用道具 举报

    发表于 2008-2-1 14:40:01 | 显示全部楼层
    我模拟的44box加rt8019,openvpn也装上了,跑起来显示也连接上了,可ping都ping不通,
    在pc上不需要对openvpn做什么配置吗,
    回复

    使用道具 举报

     楼主| 发表于 2008-2-1 15:22:22 | 显示全部楼层

    回复 #10 socoola 的帖子

    是bbs的问题 现在可了
    回复

    使用道具 举报

    发表于 2008-2-1 20:18:27 | 显示全部楼层
    I follow your instructions except using the kernel 2.6.15, when run the vmlinux on skyeye1.2.4(patch the cs8900 driver),
    an error occur, would you please help me, i am a  newbie  

    Unable to handle kernel paging request at virtual address e000030a

    pgd = c0004000

    [e000030a] *pgd=00000000

    Internal error: Oops: 807 [#1]

    CPU: 0

    PC is at cs8900_probe+0x110/0x338

    LR is at 0xc0264014

    pc : [<c0019660>]    lr : [<c0264014>]    Not tainted

    sp : c028bf30  ip : c01d83bc  fp : c028bf58

    r10: 00000000  r9 : 00000000  r8 : e0000300

    r7 : 00000002  r6 : 00000000  r5 : c01e4820  r4 : c0219e7c

    r3 : e000030a  r2 : 00000000  r1 : c1c5d960  r0 : e000030a

    Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment kernel

    Control: 317F  Table: C0004000  DAC: 00000017

    Process swapper (pid: 1, stack limit = 0xc028a194)

    Stack: (0xc028bf30 to 0xc028c000)

    bf20:                                     c002c64c c01e4820 c01e4820 00000000

    bf40: 00000000 c001d7c4 00000000 c028bf78 c028bf5c c01499e0 c001955c c01e4820

    bf60: 00000000 c01e4820 00000000 c028bf90 c028bf7c c0149d04 c014990c c01e4820

    bf80: c028a000 c028bfa4 c028bf94 c00198ac c0149c9c c001d770 c028bfc4 c028bfa8

    bfa0: c0008a24 c0019894 00000000 c020a74c 00000001 00000000 c028bfd4 c028bfc8

    bfc0: c0008ac0 c00089d0 c028bff4 c028bfd8 c00200b4 c0008aa8 00000001 00000000

    bfe0: 00000000 00000000 00000000 c028bff8 c0031d64 c002007c 00000000 00000000

    Backtrace:

    [<c0019550>] (cs8900_probe+0x0/0x33 from [<c01499e0>] (register_netdevice+0xe0/0x390)

    r8 = 00000000  r7 = C001D7C4  r6 = 00000000  r5 = 00000000

    r4 = C01E4820

    [<c0149900>] (register_netdevice+0x0/0x390) from [<c0149d04>] (register_netdev+0x74/0x8

    r6 = 00000000  r5 = C01E4820  r4 = 00000000

    [<c0149c90>] (register_netdev+0x0/0x8 from [<c00198ac>] (cs8900_init+0x24/0x30)

    r5 = C028A000  r4 = C01E4820

    [<c0019888>] (cs8900_init+0x0/0x30) from [<c0008a24>] (do_initcalls+0x60/0xd

    r4 = C001D770

    [<c00089c4>] (do_initcalls+0x0/0xd from [<c0008ac0>] (do_basic_setup+0x24/0x2

    r7 = 00000000  r6 = 00000001  r5 = C020A74C  r4 = 00000000

    [<c0008a9c>] (do_basic_setup+0x0/0x2 from [<c00200b4>] (init+0x44/0x144)

    [<c0020070>] (init+0x0/0x144) from [<c0031d64>] (do_exit+0x0/0x2fc)

    r6 = 00000000  r5 = 00000000  r4 = 00000000

    Code: e288000a e3500201 e1a03000 328334f2 (e1c360b0)

    the log file refer to the attachment

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?注册

    ×
    回复

    使用道具 举报

    发表于 2008-2-2 11:31:57 | 显示全部楼层
    你是不是没有加这个或者是网卡的IO地址搞错了
    {vSMDK2410_ETH_IO,pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE}
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    GMT+8, 2024-3-29 21:45 , Processed in 0.118168 second(s), 16 queries .

    © 2021 Powered by Discuz! X3.5.

    快速回复 返回顶部 返回列表