QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1682|回复: 3

testsuit与自己编译的内核比较 一点问题

[复制链接]
发表于 2009-4-12 18:34:50 | 显示全部楼层 |阅读模式
以下是自己编译的uClinux内核在skyeye上运行时输出的信息:

[root@localhost uClinux-dist]# skyeye -e linux-2.4.x/linux
Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8071acc
ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Loaded ROM   images/romfs.img
exec file "linux-2.4.x/linux"'s format is elf32-little.
load section .init: addr = 0x01000000  size = 0x0000a000.
load section .text: addr = 0x0100a000  size = 0x000d48f0.
load section .data: addr = 0x010e0000  size = 0x00009b20.
not load section .bss: addr = 0x010e9b20  size = 0x00021f00 .
not load section .debug_abbrev: addr = 0x00000000  size = 0x0003c8a8 .
not load section .debug_info: addr = 0x00000000  size = 0x017f63c7 .
not load section .debug_line: addr = 0x00000000  size = 0x002aba92 .
not load section .debug_pubnames: addr = 0x00000000  size = 0x0000bd82 .
not load section .debug_aranges: addr = 0x00000000  size = 0x000023c8 .
call ARMul_InitSymTable,kernel filename is linux-2.4.x/linux.
start addr is set to 0x01000000 by exec file.
Linux version 2.4.24-uc0 (root@localhost) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #7 Sat Apr 11 11:35:18 CST 2009
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 15.82 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2968KB available (850K code, 180K data, 40K init)
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-14713FF [VIRTUAL 1400000-14713FF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram0 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by <[email protected]>
For further information check:
http://www.uclinux.org/

Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> ifconfig
/>

以下是testsuit中at91文件夹仿真8019的内核在skyeye上的输出信息:

[root@localhost uclinux_rtl8019]# skyeye -e linux
Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8071acc
ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Loaded ROM   ./romfs.img
exec file "linux"'s format is elf32-little.
load section .init: addr = 0x01000000  size = 0x0000b000.
load section .text: addr = 0x0100b000  size = 0x000e3920.
load section .data: addr = 0x010f0000  size = 0x0000a430.
not load section .bss: addr = 0x010fa440  size = 0x00022100 .
call ARMul_InitSymTable,kernel filename is linux.
start addr is set to 0x01000000 by exec file.
Linux version 2.4.27-uc1 (skyeyeuser@debian) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #2 Tue Aug 9 18:45:41 CST 2005
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 15.82 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2900KB available (910K code, 183K data, 44K init)
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
ne.c:v1.10 9/23/94 Donald Becker ([email protected])
Last modified Nov 1, 2000 by Paul Gortmaker
NE*000 ethercard probe at 0xfffa0000: 00 04 03 02 01 0f
eth0: NE2000 found at 0xfffa0000, using IRQ 16.
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-1512BFF [VIRTUAL 1400000-1512BFF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
mount: /etc/mtab: Read-only file system
Command: mount -t ext2 /dev/ram0 /var
mount: /etc/mtab: Read-only file system
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by <[email protected]>
For further information check:
http://www.uclinux.org/

Command: /bin/ifconfig eth0 up 10.0.0.2
Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:03:02:01:0F
          inet addr:10.0.0.2  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16

/>
自己编译的uClinux ping主机不通,主机ping的通  test里的都ping的通
比较后发现自己编译的输出中少了Command: /bin/ifconfig eth0 up 10.0.0.2这一句,那问题应该是虚拟出的eth0没有up   

问题是不是出在内核编译的选项上?因为我都是用的test中的skyeye.conf  输出中还有些地方不一样 也不太理解
自己也在做一个协议方面的项目 了解到有skyeye这样一个环境 非常高兴 希望能通过skyeye实现一个调试的环境
困扰几天了 望高人解答
发表于 2009-4-12 18:50:37 | 显示全部楼层
1. 你的uClinux需要加入rt8019的驱动程序,才可以和 skyeye中的模拟网卡配合使用。你可以参考 wiki上的一篇文档:
http://skyeye.wiki.sourceforge.net/uClinux#tocuClinux4

2. ifconfig命令,在testsuite是内核启动之后自动运行的命令,你可以手动的运行
ifconfig eth0 10.0.0.2
这个应该不是问题。

还有用skyeye-1.2.6版本好一点,1.2.7_rc1是个测试版本,还有一些bug

[ 本帖最后由 ksh 于 2009-4-12 21:55 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2009-4-12 21:34:53 | 显示全部楼层
这么快就有了回答 谢谢
回复

使用道具 举报

 楼主| 发表于 2009-4-13 11:08:14 | 显示全部楼层

回复 2# ksh 的帖子

按照http://skyeye.wiki.sourceforge.net/uClinux#tocuClinux4中所述,在uClinux-dist/linux-2.4.x/driver/net中加入了Rtl8019.c和Rtl8019.h两个文件之后,修改uClinux-dist/linux-2.4.x/driver/net下的Makefile,修改为
ifeq ($(CONFIG_ARCH_ACORN),y)
mod-subdirs     += ../acorn/net
subdir-y        += ../acorn/net
obj-y           += ../acorn/net/acorn-net.o
obj-y           += rtl8019.o(加入的内容)
endif

然后直接make menuconfig,make dep,make
输出信息为:
Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8071acc
ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Loaded ROM   images/romfs.img
exec file "linux-2.4.x/linux"'s format is elf32-little.
load section .init: addr = 0x01000000  size = 0x0000a000.
load section .text: addr = 0x0100a000  size = 0x000d5d90.
load section .data: addr = 0x010e0000  size = 0x00009ce4.
not load section .bss: addr = 0x010e9d00  size = 0x000220e0 .
not load section .debug_abbrev: addr = 0x00000000  size = 0x0003d570 .
not load section .debug_info: addr = 0x00000000  size = 0x0184e129 .
not load section .debug_line: addr = 0x00000000  size = 0x002b42c4 .
not load section .debug_pubnames: addr = 0x00000000  size = 0x0000bde7 .
not load section .debug_aranges: addr = 0x00000000  size = 0x00002450 .
call ARMul_InitSymTable,kernel filename is linux-2.4.x/linux.
start addr is set to 0x01000000 by exec file.
Linux version 2.4.24-uc0 (root@localhost) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from http://www.snapgear.com/)) #10 Mon Apr 13 10:52:08 CST 2009
Processor: Atmel AT91M40xxx revision 0
Architecture: EB01
On node 0 totalpages: 1024
zone(0): 0 pages.
zone(1): 1024 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0
Calibrating delay loop... 15.82 BogoMIPS
Memory: 4MB = 4MB total
Memory: 2968KB available (855K code, 176K data, 40K init)
Dentry cache hash table entries: 512 (order: 0, 4096 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 1024 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Atmel USART driver version 0.99
ttyS0 at 0xfffd0000 (irq = 2) is a builtin Atmel APB USART
ttyS1 at 0xfffcc000 (irq = 3) is a builtin Atmel APB USART
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 1400000-146B7FF [VIRTUAL 1400000-146B7FF] (RO)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Shell invoked to run file: /etc/rc
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
Command: mount -t ext2 /dev/ram0 /var
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: cat /etc/motd
Welcome to
          ____ _  _
         /  __| ||_|
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

GDB/ARMulator support by <[email protected]>
For further information check:
http://www.uclinux.org/

Execution Finished, Exiting

Sash command shell (version 1.1.1)
/> ifconfig eth0 10.0.0.2
SIOCSIFADDR: Unknown error 19
pid 12: failed 256

/> ifconfig eth0 up 10.0.0.2
SIOCGIFFLAGS: Unknown error 19
SIOCSIFADDR: Unknown error 19
pid 13: failed 512

/>

Makefile修改后,是不是要在编译时选一些选项?
在uClinux下 ifconfig eth0 10.0.0.2和ifconfig eth0 up 10.0.0.2的输出结果不一样(结果如上) 提示的两个错误是什么呢?

我用的是uClinux-dist-20040408.tar和arm-elf-tools-20011219.tar
  skyeye版本为1.2.6
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-22 11:07 , Processed in 0.044455 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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