成功编译2.6.14 并在skyeye1.2.4上运行的步骤--并成功 mount nfs
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文件
#ifndef _INCLUDE_SMDK2410_H_
#define _INCLUDE_SMDK2410_H_
#include <linux/config.h>
#define pSMDK2410_ETH_IO 0x19000000
#define vSMDK2410_ETH_IO 0xE0000000
#define SMDK2410_ETH_IRQ IRQ_EINT9
#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/pipermail/skyeye-developer/attachments/20070922/171dae34/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 上写一个小程序
#include<stdio.h>
int main()
{
printf("hello world\n");
return 0
}
编译
/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 编辑 ] 可以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 编辑 ] 猜测是内核配置的问题
在nfs上加入
x x[*] Provide NFSv3 client support x x
x x[*] Provide client support for the NFSv3 ACL protocol extensionx x
x x[*] Provide NFSv4 client support (EXPERIMENTAL) x x
x x[*] Allow direct I/O on NFS files (EXPERIMENTAL)
后编译
mount 不提示失败了~~ 是定在那里不动了 mont -o nolock 10.0.0.1/home /mnt
成功挂接上了
ls时也 数据包也发到host 上了~~
但是不能显示
如果直接用cd 进入目录的话是可以的
打开文件和ls不能成功
[ 本帖最后由 zbluecn 于 2008-1-31 02:56 编辑 ] 请使用 skyeye 1.2.4
1.2.2 版本的网络延时部分有问题。 用skyeye 1.2.4 网络不通
我模拟的是s3c2410
[ 本帖最后由 zbluecn 于 2008-1-31 10:42 编辑 ] 你用的是cs8900网卡么?可否写一个详细步骤给大家?
另外你可以尝试一下下面的patch,或许能够解决你的问题。这个patch我目前还没有合并到skyeye的代码中。
http://lists.gro.clinux.org/pipermail/skyeye-developer/2007-September/001534.html ok le
在skyeye-1.2.4上打完补丁
http://lists.gro.clinux.org/pipermail/skyeye-developer/attachments/20070922/171dae34/skyeye.cs8900.bin
然后mount就可以了 谢谢!!!
skyeye-1.2.4打完补丁的文件在附件里
覆盖device/net/dev_net_cs8900a.c 就可以了
[ 本帖最后由 zbluecn 于 2008-1-31 16:54 编辑 ] 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. 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:-D Now the cs8900 driver for smdn2410 is committed to skyeye source repository. You can get it from :http://skyeye.svn.sourceforge.net/viewvc/skyeye/skyeye-v1/trunk/misc/linux_driver/cs8900a/linux_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. 我模拟的44box加rt8019,openvpn也装上了,跑起来显示也连接上了,可ping都ping不通,
在pc上不需要对openvpn做什么配置吗,
回复 #10 socoola 的帖子
是bbs的问题 现在可了 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 anewbie:)
Unable to handle kernel paging request at virtual address e000030a
pgd = c0004000
*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 : c028bf30ip : c01d83bcfp : c028bf58
r10: 00000000r9 : 00000000r8 : e0000300
r7 : 00000002r6 : 00000000r5 : c01e4820r4 : c0219e7c
r3 : e000030ar2 : 00000000r1 : c1c5d960r0 : e000030a
Flags: NzCvIRQs onFIQs onMode SVC_32Segment kernel
Control: 317FTable: C0004000DAC: 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/0x338) from [<c01499e0>] (register_netdevice+0xe0/0x390)
r8 = 00000000r7 = C001D7C4r6 = 00000000r5 = 00000000
r4 = C01E4820
[<c0149900>] (register_netdevice+0x0/0x390) from [<c0149d04>] (register_netdev+0x74/0x88)
r6 = 00000000r5 = C01E4820r4 = 00000000
[<c0149c90>] (register_netdev+0x0/0x88) from [<c00198ac>] (cs8900_init+0x24/0x30)
r5 = C028A000r4 = C01E4820
[<c0019888>] (cs8900_init+0x0/0x30) from [<c0008a24>] (do_initcalls+0x60/0xd8)
r4 = C001D770
[<c00089c4>] (do_initcalls+0x0/0xd8) from [<c0008ac0>] (do_basic_setup+0x24/0x28)
r7 = 00000000r6 = 00000001r5 = C020A74Cr4 = 00000000
[<c0008a9c>] (do_basic_setup+0x0/0x28) from [<c00200b4>] (init+0x44/0x144)
[<c0020070>] (init+0x0/0x144) from [<c0031d64>] (do_exit+0x0/0x2fc)
r6 = 00000000r5 = 00000000r4 = 00000000
Code: e288000a e3500201 e1a03000 328334f2 (e1c360b0)
the log file refer to the attachment 你是不是没有加这个或者是网卡的IO地址搞错了
{vSMDK2410_ETH_IO,pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE}