当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 做过usbnet功能实现的大虾请进,有问题请教。。。
帖子发表于 : 2009-09-01 10:25 

注册: 2009-09-01 10:22
帖子: 2
送出感谢: 0 次
接收感谢: 0 次
我现在想实现vmware虚拟机跟6410开发板通过usbnet连接,遇到一些问题,请各位帮忙:

我的linux系统是虚拟机vmware,linux版本是2.6.27-14-generic ,开发板用的是三星的6410芯片,linux内核版本号是2.6.24.y。
我的配置过程如下:

1。开发板端配置:
首先配置linux内核支持usbnet:

<*> Support for USB Gadgets
USB Peripheral Controller (S3C high speed(2.0, dual-speed) USB OTG device) --->
S3C high speed(2.0, dual-speed) USB OTG device
<M> USB Gadget Drivers
<M> Ethernet Gadget (with CDC Ethernet support)
[*] RNDIS support

交叉编译后生成g_ether.ko传到6410开发板上,通过insmod加载该模块,开发板命令行显示信息:

:/mnt/mmc> insmod g_ether.ko
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using s3c-udc, OUT ep1-bulk IN ep2-bulk STATUS ep3-int
usb0: MAC f2:b8:16:03:9d:de
usb0: HOST MAC ba:49:bd:ab:56:87
usb0: RNDIS ready
Registered gadget driver 'ether'

通过ifconfig usb0 192.168.1.121 netmask 255.255.248.0配置好usb0,再用ifconfig -a查看,开发板端可以看到关于usb0的信息
:/mnt/mmc> ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:09:C0:FF:EC:48
inet addr:192.168.3.126 Bcast:192.168.7.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79775 errors:0 dropped:0 overruns:0 frame:0
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5984010 (5.7 MiB) TX bytes:2898 (2.8 KiB)
Interrupt:74 Base address:0x300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr F2:B8:16:03:9D:DE
inet addr:192.168.1.121 Bcast:192.168.7.255 Mask:255.255.248.0
UP BROADCAST 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)


2。主机端配置:
主机的linux内核里已经选上并编译生成了usbnet,cdc_ether,zaurus等模块,所以直接modprobe
sudo modprobe usbnet
sudo modprobe cdc_ether
sudo modprobe zaurus
然后插上usb线与开发板相连,dmesg命令查看:
dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.27-14-generic (buildd@vernadsky) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11) ) #1 SMP Tue Aug 18 16:25:45 UTC 2009 (Ubuntu 2.6.27-14.39-generic)
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
[ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
[ 0.000000] BIOS-e820: 00000000000dc000 - 00000000000e0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000001fef0000 (usable)
[ 0.000000] BIOS-e820: 000000001fef0000 - 000000001feff000 (ACPI data)
[ 0.000000] BIOS-e820: 000000001feff000 - 000000001ff00000 (ACPI NVS)
[ 0.000000] BIOS-e820: 000000001ff00000 - 0000000020000000 (usable)
[ 0.000000] BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
[ 0.000000] BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[ 0.000000] BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)
[ 0.000000] DMI present.
[ 0.000000] Phoenix BIOS detected: BIOS may corrupt low RAM, working it around.
[ 0.000000] last_pfn = 0x20000 max_arch_pfn = 0x100000
[ 0.000000] kernel direct mapping tables up to 20000000 @ 10000-15000
[ 0.000000] RAMDISK: 1f70a000 - 1fedf018
[ 0.000000] ACPI: RSDP 000F6A30, 0024 (r2 PTLTD )
[ 0.000000] ACPI: XSDT 1FEFA146, 003C (r1 INTEL 440BX 6040000 VMW 1324272)
[ 0.000000] ACPI: FACP 1FEFEE98, 00F4 (r4 INTEL 440BX 6040000 PTL F4240)
[ 0.000000] ACPI: DSDT 1FEFA22A, 4C6E (r1 PTLTD Custom 6040000 MSFT 3000001)
[ 0.000000] ACPI: FACS 1FEFFFC0, 0040
[ 0.000000] ACPI: BOOT 1FEFA202, 0028 (r1 PTLTD $SBFTBL$ 6040000 LTP 1)
[ 0.000000] ACPI: APIC 1FEFA1B2, 0050 (r1 PTLTD APIC 6040000 LTP 0)
[ 0.000000] 0MB HIGHMEM available.
[ 0.000000] 512MB LOWMEM available.
[ 0.000000] mapped low ram: 0 - 20000000
[ 0.000000] low ram: 00000000 - 20000000
[ 0.000000] bootmap 00011000 - 00015000
[ 0.000000] (9 early reservations) ==> bootmem [0000000000 - 0020000000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] #1 [0000001000 - 0000002000] EX TRAMPOLINE ==> [0000001000 - 0000002000]
[ 0.000000] #2 [0000006000 - 0000007000] TRAMPOLINE ==> [0000006000 - 0000007000]
[ 0.000000] #3 [0000100000 - 00005c59e0] TEXT DATA BSS ==> [0000100000 - 00005c59e0]
[ 0.000000] #4 [001f70a000 - 001fedf018] RAMDISK ==> [001f70a000 - 001fedf018]
[ 0.000000] #5 [00005c6000 - 00005c9000] INIT_PG_TABLE ==> [00005c6000 - 00005c9000]
[ 0.000000] #6 [000009f800 - 0000100000] BIOS reserved ==> [000009f800 - 0000100000]
[ 0.000000] #7 [0000010000 - 0000011000] PGTABLE ==> [0000010000 - 0000011000]
[ 0.000000] #8 [0000011000 - 0000015000] BOOTMAP ==> [0000011000 - 0000015000]
[ 0.000000] found SMP MP-table at [c00f6aa0] 000f6aa0
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000010 -> 0x00001000
[ 0.000000] Normal 0x00001000 -> 0x00020000
[ 0.000000] HighMem 0x00020000 -> 0x00020000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[3] active PFN ranges
[ 0.000000] 0: 0x00000010 -> 0x0000009f
[ 0.000000] 0: 0x00000100 -> 0x0001fef0
[ 0.000000] 0: 0x0001ff00 -> 0x00020000
[ 0.000000] On node 0 totalpages: 130943
[ 0.000000] free_area_init_node: node 0, pgdat c048d700, node_mem_map c1000240
[ 0.000000] DMA zone: 3947 pages, LIFO batch:0
[ 0.000000] Normal zone: 125844 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0x1008
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Enabling APIC mode: Flat. Using 1 I/O APICs
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] mapped APIC to ffffb000 (fee00000)
[ 0.000000] mapped IOAPIC to ffffa000 (fec00000)
[ 0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000ca000
[ 0.000000] PM: Registered nosave memory: 00000000000ca000 - 00000000000cc000
[ 0.000000] PM: Registered nosave memory: 00000000000cc000 - 00000000000dc000
[ 0.000000] PM: Registered nosave memory: 00000000000dc000 - 00000000000e0000
[ 0.000000] PM: Registered nosave memory: 00000000000e0000 - 00000000000e4000
[ 0.000000] PM: Registered nosave memory: 00000000000e4000 - 0000000000100000
[ 0.000000] PM: Registered nosave memory: 000000001fef0000 - 000000001feff000
[ 0.000000] PM: Registered nosave memory: 000000001feff000 - 000000001ff00000
[ 0.000000] Allocating PCI resources starting at 30000000 (gap: 20000000:dec00000)
[ 0.000000] PERCPU: Allocating 41628 bytes of per cpu data
[ 0.000000] NR_CPUS: 64, nr_cpu_ids: 1, nr_node_ids 1
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129791
[ 0.000000] Kernel command line: root=UUID=971343c0-7204-4645-984a-1437bd4a122b ro locale=zh_CN quiet splash
[ 0.000000] Enabling fast FPU save and restore... done.
[ 0.000000] Enabling unmasked SIMD FPU exception support... done.
[ 0.000000] Initializing CPU#0
[ 0.000000] PID hash table entries: 2048 (order: 11, 8192 bytes)
[ 0.000000] Extended CMOS year: 2000
[ 0.000000] TSC: Frequency read from the hypervisor
[ 0.000000] Detected 2194.550 MHz processor.
[ 0.004000] Console: colour VGA+ 80x25
[ 0.004000] console [tty0] enabled
[ 0.004000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.004000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.004000] Memory: 505472k/524288k available (2581k kernel code, 18008k reserved, 1163k data, 428k init, 0k highmem)
[ 0.004000] virtual kernel memory layout:
[ 0.004000] fixmap : 0xffc77000 - 0xfffff000 (3616 kB)
[ 0.004000] pkmap : 0xff400000 - 0xff800000 (4096 kB)
[ 0.004000] vmalloc : 0xe0800000 - 0xff3fe000 ( 491 MB)
[ 0.004000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.004000] .init : 0xc04af000 - 0xc051a000 ( 428 kB)
[ 0.004000] .data : 0xc038570a - 0xc04a8680 (1163 kB)
[ 0.004000] .text : 0xc0100000 - 0xc038570a (2581 kB)
[ 0.004000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[ 0.004000] CPA: page pool initialized 1 of 1 pages preallocated
[ 0.004000] SLUB: Genslabs=12, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.004000] Calibrating delay loop (skipped), value calculated using timer frequency.. 4389.10 BogoMIPS (lpj=8778200)
[ 0.004000] Security Framework initialized
[ 0.004000] SELinux: Disabled at boot.
[ 0.004000] AppArmor: AppArmor initialized
[ 0.004000] Mount-cache hash table entries: 512
[ 0.011608] Initializing cgroup subsys ns
[ 0.011768] Initializing cgroup subsys cpuacct
[ 0.011801] Initializing cgroup subsys memory
[ 0.012729] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.012777] CPU: L2 cache: 1024K
[ 0.013584] Checking 'hlt' instruction... OK.
[ 0.032743] SMP alternatives: switching to UP code
[ 0.097671] Freeing SMP alternatives: 11k freed
[ 0.098164] ACPI: Core revision 20080609
[ 0.102586] ACPI: Checking initramfs for custom DSDT
[ 0.434955] ENABLING IO-APIC IRQs
[ 0.436753] ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.476841] CPU0: Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz stepping 0d
[ 0.480030] APIC calibration not consistent with PM Timer: 101ms instead of 100ms
[ 0.480030] APIC delta adjusted to PM-Timer: 412502 (420366)
[ 0.483364] Brought up 1 CPUs
[ 0.483432] Total of 1 processors activated (4389.10 BogoMIPS).
[ 0.484813] CPU0 attaching NULL sched-domain.
[ 0.496556] net_namespace: 840 bytes
[ 0.496858] Booting paravirtualized kernel on bare hardware
[ 0.498459] Time: 1:14:27 Date: 09/01/09
[ 0.500271] NET: Registered protocol family 16
[ 0.505998] EISA bus registered
[ 0.506323] ACPI: bus type pci registered
[ 0.508820] PCI: PCI BIOS revision 2.10 entry at 0xfd8a0, last bus=2
[ 0.508870] PCI: Using configuration type 1 for base access
[ 0.519813] ACPI: EC: Look up EC in DSDT
[ 0.548685] ACPI: BIOS _OSI(Linux) query ignored
[ 0.548707] ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org
[ 0.550836] ACPI: Interpreter enabled
[ 0.550879] ACPI: (supports S0 S1 S4 S5)
[ 0.551236] ACPI: Using IOAPIC for interrupt routing
[ 0.586021] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 0.589711] PCI: 0000:00:07.1 reg 20 io port: [1400, 140f]
[ 0.590572] PCI: 0000:00:07.2 reg 20 io port: [1060, 107f]
[ 0.591293] pci 0000:00:07.3: quirk: region 1000-103f claimed by PIIX4 ACPI
[ 0.591357] pci 0000:00:07.3: quirk: region 1040-104f claimed by PIIX4 SMB
[ 0.592388] PCI: 0000:00:0f.0 reg 10 io port: [1410, 141f]
[ 0.592469] PCI: 0000:00:0f.0 reg 14 32bit mmio: [f0000000, f7ffffff]
[ 0.592510] PCI: 0000:00:0f.0 reg 18 32bit mmio: [e8000000, e87fffff]
[ 0.592659] PCI: 0000:00:0f.0 reg 30 32bit mmio: [0, 7fff]
[ 0.593114] PCI: 0000:00:10.0 reg 10 io port: [1080, 10ff]
[ 0.593418] PCI: 0000:00:10.0 reg 14 32bit mmio: [e8800000, e8800fff]
[ 0.593602] PCI: 0000:00:10.0 reg 30 32bit mmio: [0, 3fff]
[ 0.594032] PCI: 0000:00:11.0 reg 10 64bit mmio: [e8801000, e8801fff]
[ 0.595780] PCI: 0000:02:00.0 reg 10 io port: [2000, 207f]
[ 0.596126] PCI: 0000:02:00.0 reg 30 32bit mmio: [0, ffff]
[ 0.596814] PCI: 0000:02:01.0 reg 10 io port: [2080, 20bf]
[ 0.597414] PCI: 0000:02:03.0 reg 10 32bit mmio: [e8900000, e8900fff]
[ 0.597960] pci 0000:00:11.0: transparent bridge
[ 0.598017] PCI: bridge 0000:00:11.0 io port: [2000, 2fff]
[ 0.598058] PCI: bridge 0000:00:11.0 32bit mmio: [e8900000, e89fffff]
[ 0.598261] bus 00 -> node 0
[ 0.598626] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 0.605850] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 11 14 15) *0, disabled.
[ 0.606214] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 *11 14 15)
[ 0.606413] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 *10 11 14 15)
[ 0.606586] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 14 15)
[ 0.607334] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 0.607457] pnp: PnP ACPI init
[ 0.607545] ACPI: bus type pnp registered
[ 0.654706] pnp: PnP ACPI: found 12 devices
[ 0.654763] ACPI: ACPI bus type pnp unregistered
[ 0.654832] PnPBIOS: Disabled by ACPI PNP
[ 0.657415] PCI: Using ACPI for IRQ routing
[ 0.660475] NET: Registered protocol family 8
[ 0.660502] NET: Registered protocol family 20
[ 0.660784] NetLabel: Initializing
[ 0.660799] NetLabel: domain hash size = 128
[ 0.660811] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.661639] NetLabel: unlabeled traffic allowed by default
[ 0.662248] tracer: 772 pages allocated for 65536 entries of 48 bytes
[ 0.662260] actual entries 65620
[ 0.663669] AppArmor: AppArmor Filesystem Enabled
[ 0.665040] Switched to high resolution mode on CPU 0
[ 0.665872] system 00:01: ioport range 0x1000-0x103f has been reserved
[ 0.665891] system 00:01: ioport range 0x1040-0x104f has been reserved
[ 0.665897] system 00:01: ioport range 0xcf0-0xcf1 has been reserved
[ 0.705162] pci 0000:00:01.0: PCI bridge, secondary bus 0000:01
[ 0.705187] pci 0000:00:01.0: IO window: disabled
[ 0.705270] pci 0000:00:01.0: MEM window: disabled
[ 0.705330] pci 0000:00:01.0: PREFETCH window: disabled
[ 0.705458] pci 0000:00:11.0: PCI bridge, secondary bus 0000:02
[ 0.705512] pci 0000:00:11.0: IO window: 0x2000-0x2fff
[ 0.705562] pci 0000:00:11.0: MEM window: 0xe8900000-0xe89fffff
[ 0.705606] pci 0000:00:11.0: PREFETCH window: 0x00000030000000-0x000000300fffff
[ 0.705827] pci 0000:00:01.0: setting latency timer to 64
[ 0.706044] bus: 00 index 0 io port: [0, ffff]
[ 0.706063] bus: 00 index 1 mmio: [0, ffffffff]
[ 0.706081] bus: 01 index 0 mmio: [0, 0]
[ 0.706085] bus: 01 index 1 mmio: [0, 0]
[ 0.706088] bus: 01 index 2 mmio: [0, 0]
[ 0.706091] bus: 01 index 3 mmio: [0, 0]
[ 0.706105] bus: 02 index 0 io port: [2000, 2fff]
[ 0.706109] bus: 02 index 1 mmio: [e8900000, e89fffff]
[ 0.706113] bus: 02 index 2 mmio: [30000000, 300fffff]
[ 0.706116] bus: 02 index 3 io port: [0, ffff]
[ 0.706120] bus: 02 index 4 mmio: [0, ffffffff]
[ 0.706309] NET: Registered protocol family 2
[ 0.708240] IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.708461] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.708682] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.708904] TCP: Hash tables configured (established 65536 bind 65536)
[ 0.708981] TCP reno registered
[ 0.709410] NET: Registered protocol family 1
[ 0.712244] checking if image is initramfs... it is
[ 1.416244] Freeing initrd memory: 8020k freed
[ 1.416835] Simple Boot Flag at 0x36 set to 0x1
[ 1.420738] audit: initializing netlink socket (disabled)
[ 1.420959] type=2000 audit(1251767667.420:1): initialized
[ 1.424947] HugeTLB registered 4 MB page size, pre-allocated 0 pages
[ 1.433351] VFS: Disk quotas dquot_6.5.1
[ 1.433648] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 1.434160] msgmni has been set to 1003
[ 1.434669] io scheduler noop registered
[ 1.434717] io scheduler anticipatory registered
[ 1.434743] io scheduler deadline registered
[ 1.434826] io scheduler cfq registered (default)
[ 1.435048] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 1.435402] pci 0000:00:0f.0: Boot video device
[ 1.437637] isapnp: Scanning for PnP cards...
[ 1.791515] isapnp: No Plug & Play device found
[ 1.859079] Serial: 8250/16550 driver4 ports, IRQ sharing enabled
[ 1.860115] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.860372] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.860990] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.861271] 00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.864782] brd: module loaded
[ 1.864934] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 1.865200] PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:MOUS] at 0x60,0x64 irq 1,12
[ 2.367114] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.367199] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.368156] mice: PS/2 mouse device common for all mice
[ 2.368512] rtc_cmos 00:04: rtc core: registered rtc_cmos as rtc0
[ 2.368607] rtc0: alarms up to one month, y3k
[ 2.369257] EISA: Probing bus 0 at eisa.0
[ 2.369351] Cannot allocate resource for EISA slot 1
[ 2.369372] Cannot allocate resource for EISA slot 2
[ 2.369419] EISA: Detected 0 cards.
[ 2.369467] cpuidle: using governor ladder
[ 2.369514] cpuidle: using governor menu
[ 2.369781] TCP cubic registered
[ 2.369828] Using IPI No-Shortcut mode
[ 2.370146] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 2.370378] registered taskstats version 1
[ 2.370426] Magic number: 9:362:204
[ 2.370473] tty ttyt2: hash matches
[ 2.390545] rtc_cmos 00:04: setting system clock to 2009-09-01 01:14:29 UTC (1251767669)
[ 2.390592] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 2.390615] EDD information not available.
[ 2.416072] Freeing unused kernel memory: 428k freed
[ 2.416120] Write protecting the kernel text: 2584k
[ 2.416167] Write protecting the kernel read-only data: 940k
[ 2.908168] fuse init (API version 7.9)
[ 2.940866] processor ACPI0007:00: registered as cooling_device0
[ 2.940912] ACPI: Processor [CPU0] (supports 8 throttling states)
[ 3.308946] Floppy drive(s): fd0 is 1.44M
[ 3.324484] FDC 0 is a post-1991 82077
[ 3.336402] No dock devices found.
[ 3.384143] SCSI subsystem initialized
[ 3.412244] usbcore: registered new interface driver usbfs
[ 3.412301] usbcore: registered new interface driver hub
[ 3.412470] usbcore: registered new device driver usb
[ 3.432481] USB Universal Host Controller Interface driver v3.0
[ 3.432537] uhci_hcd 0000:00:07.2: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[ 3.432594] uhci_hcd 0000:00:07.2: UHCI Host Controller
[ 3.432651] uhci_hcd 0000:00:07.2: new USB bus registered, assigned bus number 1
[ 3.432770] uhci_hcd 0000:00:07.2: irq 19, io base 0x00001060
[ 3.432827] usb usb1: configuration #1 chosen from 1 choice
[ 3.432883] hub 1-0:1.0: USB hub found
[ 3.432940] hub 1-0:1.0: 2 ports detected
[ 3.468177] libata version 3.00 loaded.
[ 3.484387] Fusion MPT base driver 3.04.07
[ 3.484401] Copyright (c) 1999-2008 LSI Corporation
[ 3.504381] Fusion MPT SPI Host driver 3.04.07
[ 3.508971] Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
[ 3.512301] pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
[ 3.536990] mptspi 0000:00:10.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 3.537356] mptbase: ioc0: Initiating bringup
[ 3.608092] ioc0: LSI53C1030 B0: Capabilities={Initiator}
[ 3.736908] scsi0 : ioc0: LSI53C1030 B0, FwRev=00000000h, Ports=1, MaxQ=128, IRQ=17
[ 3.848530] ehci_hcd 0000:02:03.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 3.848614] ehci_hcd 0000:02:03.0: EHCI Host Controller
[ 3.848730] ehci_hcd 0000:02:03.0: new USB bus registered, assigned bus number 2
[ 3.848814] ehci_hcd 0000:02:03.0: cache line size of 32 is not supported
[ 3.848898] ehci_hcd 0000:02:03.0: irq 17, io mem 0xe8900000
[ 3.856106] scsi 0:0:0:0: Direct-Access VMware, VMware Virtual S 1.0 PQ: 0 ANSI: 2
[ 3.856190] scsi target0:0:0: Beginning Domain Validation
[ 3.856274] scsi target0:0:0: Domain Validation skipping write tests
[ 3.856302] scsi target0:0:0: Ending Domain Validation
[ 3.856386] scsi target0:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
[ 3.860123] ehci_hcd 0000:02:03.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[ 3.860207] usb usb2: configuration #1 chosen from 1 choice
[ 3.860265] hub 2-0:1.0: USB hub found
[ 3.860349] hub 2-0:1.0: 6 ports detected
[ 3.869334] scsi 0:0:0:0: Attached scsi generic sg0 type 0
[ 3.880744] Driver 'sd' needs updating - please use bus_type methods
[ 3.880828] sd 0:0:0:0: [sda] 33554432 512-byte hardware sectors (17180 MB)
[ 3.880911] sd 0:0:0:0: [sda] Write Protect is off
[ 3.880943] sd 0:0:0:0: [sda] Mode Sense: 5d 00 00 00
[ 3.881027] sd 0:0:0:0: [sda] Cache data unavailable
[ 3.881056] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 3.881139] sd 0:0:0:0: [sda] 33554432 512-byte hardware sectors (17180 MB)
[ 3.881194] sd 0:0:0:0: [sda] Write Protect is off
[ 3.881205] sd 0:0:0:0: [sda] Mode Sense: 5d 00 00 00
[ 3.881289] sd 0:0:0:0: [sda] Cache data unavailable
[ 3.881295] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 3.881378] sda: sda1 sda2
[ 3.884190] sd 0:0:0:0: [sda] Attached SCSI disk
[ 3.964576] pcnet32 0000:02:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 3.964700] pcnet32: PCnet/PCI II 79C970A at 0x2000, 00:0c:29:0f:29:cd assigned IRQ 18.
[ 3.964823] eth0: registered as PCnet/PCI II 79C970A
[ 3.964947] pcnet32: 1 cards_found.
[ 3.972895] ata_piix 0000:00:07.1: version 2.12
[ 3.973389] scsi1 : ata_piix
[ 3.974193] scsi2 : ata_piix
[ 3.974317] ata1: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0x1400 irq 14
[ 3.974354] ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0x1408 irq 15
[ 3.974686] ata1: port disabled. ignoring.
[ 4.152863] ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
[ 4.153518] ata2.00: configured for UDMA/33
[ 4.154102] scsi 2:0:0:0: CD-ROM NECVMWar VMware IDE CDR10 1.00 PQ: 0 ANSI: 5
[ 4.154350] scsi 2:0:0:0: Attached scsi generic sg1 type 5
[ 4.180984] Driver 'sr' needs updating - please use bus_type methods
[ 4.182101] sr0: scsi3-mmc drive: 1x/1x xa/form2 cdda tray
[ 4.182225] Uniform CD-ROM driver Revision: 3.20
[ 4.182349] sr 2:0:0:0: Attached scsi CD-ROM sr0
[ 9.321247] EXT3-fs: INFO: recovery required on readonly filesystem.
[ 9.321280] EXT3-fs: write access will be enabled during recovery.
[ 9.396146] kjournald starting. Commit interval 5 seconds
[ 9.396477] EXT3-fs: sda1: orphan cleanup on readonly fs
[ 9.396669] ext3_orphan_cleanup: deleting unreferenced inode 98362
[ 9.396935] ext3_orphan_cleanup: deleting unreferenced inode 163699
[ 9.396993] EXT3-fs: sda1: 2 orphan inodes deleted
[ 9.397024] EXT3-fs: recovery complete.
[ 9.402420] EXT3-fs: mounted filesystem with ordered data mode.
[ 15.928168] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 18.228323] ACPI: AC Adapter [ACAD] (on-line)
[ 19.072455] EXT3 FS on sda1, internal journal
[ 19.349365] parport_pc 00:08: reported by Plug and Play ACPI
[ 19.349887] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[ 19.450919] lp0: using parport0 (interrupt-driven).
[ 20.339077] udevd version 124 started
[ 20.994531] Linux agpgart interface v0.103
[ 21.044503] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 21.082226] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 21.094685] agpgart-intel 0000:00:00.0: Intel 440BX Chipset
[ 21.097640] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0x0
[ 21.261737] ACPI: I/O resource piix4_smbus [0x1040-0x1047] conflicts with ACPI region SMB_ [0x1040-0x104b]
[ 21.261749] ACPI: Device needs an ACPI driver
[ 21.261841] piix4_smbus 0000:00:07.3: Host SMBus controller not enabled!
[ 21.321580] input: Power Button (FF) as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[ 21.341297] ACPI: Power Button (FF) [PWRF]
[ 22.032915] vmxnet: module license 'unspecified' taints kernel.
[ 22.040735] VMware vmxnet virtual NIC driver
[ 22.773660] input: PC Speaker as /devices/platform/pcspkr/input/input3
[ 22.886644] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input4
[ 23.339237] ENS1371 0000:02:01.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 26.780079] eth0: link up
[ 28.267335] NET: Registered protocol family 10
[ 28.272034] lo: Disabled Privacy Extensions
[ 28.977456] type=1505 audit(1251767695.320:2): operation="profile_load" name="/usr/share/gdm/guest-session/Xsession" name2="default" pid=3956
[ 29.170679] type=1505 audit(1251767695.513:3): operation="profile_load" name="/usr/lib/cups/backend/cups-pdf" name2="default" pid=3961
[ 29.171746] type=1505 audit(1251767695.513:4): operation="profile_load" name="/usr/sbin/cupsd" name2="default" pid=3961
[ 29.910881] ACPI: WMI: Mapper loaded
[ 33.226640] apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
[ 33.226734] apm: overridden by ACPI.
[ 33.331829] warning: `avahi-daemon' uses 32-bit capabilities (legacy support in use)
[ 33.932512] Bluetooth: Core ver 2.13
[ 33.936437] NET: Registered protocol family 31
[ 33.936458] Bluetooth: HCI device and connection manager initialized
[ 33.936596] Bluetooth: HCI socket layer initialized
[ 33.961581] Bluetooth: L2CAP ver 2.11
[ 33.961601] Bluetooth: L2CAP socket layer initialized
[ 33.979900] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 33.979921] Bluetooth: BNEP filters: protocol multicast
[ 34.046107] Bluetooth: RFCOMM socket layer initialized
[ 34.047278] Bluetooth: RFCOMM TTY layer initialized
[ 34.047300] Bluetooth: RFCOMM ver 1.10
[ 34.055347] Bridge firewalling registered
[ 34.089825] Bluetooth: SCO (Voice Link) ver 0.6
[ 34.089846] Bluetooth: SCO socket layer initialized
[ 35.796768] ppdev: user-space parallel port driver
[ 39.145580] eth0: no IPv6 routers present
[ 54.208406] UDF-fs: No VRS found
[ 54.216031] ISO 9660 Extensions: RRIP_1991A
[ 125.930257] ppdev0: registered pardevice
[ 125.981633] ppdev0: unregistered pardevice
[ 126.112921] ppdev0: registered pardevice
[ 126.161245] ppdev0: unregistered pardevice
[ 126.177194] type=1503 audit(1251767811.073:5): operation="inode_permission" requested_mask="::x" denied_mask="::x" fsuid=7 name="/usr/lib/vmware-tools/bin32/vmware-tpvmlp" pid=5254 profile="/usr/sbin/cupsd"
[ 128.584616] ppdev0: registered pardevice
[ 128.633212] ppdev0: unregistered pardevice
[ 964.116602] usbcore: registered new interface driver cdc_ether
[ 986.517171] usbcore: registered new interface driver zaurus
[ 1013.171162] usbcore: registered new interface driver cdc_acm
[ 1013.174100] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters

没有看到usb0 相关信息,用ifconfig -a 查看:

wzf@wzf-desktop:~$ ifconfig -a
eth0 Link encap:以太网 硬件地址 00:0c:29:0f:29:cd
inet 地址:192.168.1.126 广播:192.168.7.255 掩码:255.255.248.0
inet6 地址: fe80::20c:29ff:fe0f:29cd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:82065 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:732 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:6024625 (6.0 MB) 发送字节:229323 (229.3 KB)
中断:18 基本地址:0x2000

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)

pan0 Link encap:以太网 硬件地址 42:da:eb:70:f1:30
BROADCAST MULTICAST MTU:1500 跃点数:1
接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:0 (0.0 B) 发送字节:0 (0.0 B)

也没有usb0 或 eth1信息。以上pan0信息网上查是关于蓝牙的,usb线没插入的时候就有pan0,当usb线插入后,用ifconfig -a 看,并没有出现多余的设备。

用lsusb来看,也没有出现RNDIS/Ethernet gadget设备信息:
wzf@wzf-desktop:~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

我在/etc/init.d/interface也增加了关于usb0信息:
#freerunner
allow-hotplug usb0
iface usb0 inet static
address 192.168.0.120
netmask 255.255.248.0
network 192.168.0.0
up iptables -A POSTROUTING -t nat -s 192.168.0.2/24 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -D POSTROUTING -t nat -s 192.168.0.2/24 -j MASQUERADE

问题是,为什么虚拟机上已经加载了模块,配置了/etc/init.d/interface端口,但是插入usb线与开发板相连,ifconfig却没有相关的usb0(或eth1)设备?希望大虾们指导


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 做过usbnet功能实现的大虾请进,有问题请教。。。
帖子发表于 : 2009-09-03 10:11 

注册: 2009-09-01 10:22
帖子: 2
送出感谢: 0 次
接收感谢: 0 次
原因是虚拟机的问题。在普通linux机子上试,usb0是可以出来的 :em02


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译