OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> How To Load G_file_storage.ko? Error Occus
andyzn
post Jul 3 2006, 06:21 AM
Post #1





Group: Members
Posts: 13
Joined: 3-July 06
Member No.: 10,306



I have a board with USB slave 1.1, and Linux installed on it.

I have connected it with a PC through a USB cable.

And I want to make the PC "know" the device?

on the board(the kernel is 2.6.11):

1. start Linux

2. dd bs=1M count=8 if=/dev/zero /root/data (FAT32)

3. modprobe g_file_storage file=/root/data

HERE IS THE ERROR MESSAGE:
*****************************************
Using /lib/modules/2.6.11-XSBase27x/kernel/drivers/usb/gadget/g_file_storage.ko
insmod: cannot insert `/lib/modules/2.6.11-XSBase27x/kernel/drivers/usb/gadget/g
_file_storage.ko': Device or resource busy (-1): Device or resource busy
modprobe: failed to load module g_file_storage
*****************************************

which device is busy?

Or
what should I do before I "modprobe g_file_storage..."?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
lardman
post Jul 10 2006, 03:25 AM
Post #2





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



What does filp indicate the error is?

Your file may need a filesystem, though I'm not altogether sure about that. In fact, it looks like the code doesn't even get this far.

[root@Bill ~]fdisk -S 8 -H 16 -C 128 /root/disk

/root/disk is not the backing file afaict...


Si
Go to the top of the page
 
+Quote Post
andyzn
post Jul 10 2006, 08:06 PM
Post #3





Group: Members
Posts: 13
Joined: 3-July 06
Member No.: 10,306



I have checked the error, error = PTR_ERR(filp)
error = -2

IN Linux/include/asm-generic/errno-base.h
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H

#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */

So why no such file or directory ??



QUOTE(lardman @ Jul 10 2006, 03:25 AM)
What does filp indicate the error is?

*
Go to the top of the page
 
+Quote Post
andyzn
post Jul 10 2006, 08:19 PM
Post #4





Group: Members
Posts: 13
Joined: 3-July 06
Member No.: 10,306



after dmesg,below is the information while rebooting.

Built 1 zonelists
Kernel command line: console=ttyS0,115200 mem=64M root=1F02 rw
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62080KB available (2213K code, 391K data, 108K init)
Calibrating delay loop... 519.37 BogoMIPS (lpj=2596864)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. © 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
Console: switching to colour frame buffer device 80x30
IRQ54 (GPIO22): falling edges
ads7843: touch screen driver initialized
SA1100 Real Time Clock driver v1.00
ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
ttyS1 at MMIO 0x40700000 (irq = 20) is a STUART
ttyS2 at MMIO 0x40200000 (irq = 21) is a BTUART
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PP_addr=0x1300
eth0: cs8900 rev K found at 0xf0000300 no EEPROM
cs89x0: No EEPROM, relying on command line....
cs89x0 media RJ-45, IRQ 41, programmed I/O, MAC 00:0b:f4:2f:9b:e5
Probing flash0 at physical address 0x00000000 (32-bit bankwidth)
flash0: Found 2 x16 devices at 0x0 in 32-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
0: offset=0x0,size=0x10000,blocks=4
1: offset=0x40000,size=0x40000,blocks=255
flash0: 1 set(s) of 2 interleaved chips --> 16 partitions of 4096 KiB
Using static partitions on flash0
Creating 3 MTD partitions on "flash0":
0x00000000-0x00040000 : "boot"
0x00040000-0x001c0000 : "kernel"
0x001c0000-0x04000000 : "rootfs"
pxa27x-ohci pxa27x-ohci: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
pxa27x_udc: version 23-Sep-2004
***************andy_error = -2********* /*this is the error=PTR_ERR(filp)*/
g_file_storage gadget-lun0: unable to open backing file: /root/back_file
mice: PS/2 mouse device common for all mice
ac97_codec: AC97 Audio codec, id: CRY52 (Cirrus Logic CS4299 rev D)
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
NET: Registered protocol family 1
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 108K
IRQ41 (GPIO9): rising edges
VFS: Can't find an ext2 filesystem on dev ram0.
ads7843 : open [pid=834]
[root@emdoor ~]#
Go to the top of the page
 
+Quote Post

Posts in this topic
andyzn   How To Load G_file_storage.ko? Error Occus   Jul 3 2006, 06:21 AM
lardman   How do you get a terminal prompt, not over a usb e...   Jul 3 2006, 06:27 AM
andyzn   Today I found g_ether is builded in. SO I recompil...   Jul 5 2006, 12:14 AM
andyzn   Here is sth after dmesg: [root@emdoor bin]# dmesg...   Jul 5 2006, 12:35 AM
lardman   I don't know, but a quick google turned up som...   Jul 5 2006, 03:03 AM
andyzn   Thanks for that. But the patch dosen't work. ...   Jul 6 2006, 10:14 PM
lardman   What does filp indicate the error is? Your file m...   Jul 10 2006, 03:25 AM
andyzn   Oh, sorry. Actually it is [root@Bill ~]fdisk -S...   Jul 10 2006, 04:18 AM
andyzn   I have checked the error, error = PTR_ERR(filp) ...   Jul 10 2006, 08:06 PM
andyzn   after dmesg,below is the information while rebooti...   Jul 10 2006, 08:19 PM
andyzn   rootfs is not mounted while open /root/back_file,a...   Jul 10 2006, 10:44 PM
lardman   I didn't notice it before, but this can't ...   Jul 10 2006, 02:57 PM
andyzn   In gadget/gadget_chips.h #ifdef CONFIG_USB_GADGET...   Jul 10 2006, 07:29 PM
lardman   I was going to suggest that. Have you tried using...   Jul 11 2006, 01:05 AM
andyzn   I am happy to say, my windows host could recognize...   Jul 11 2006, 01:13 AM
lardman   Glad you've got it sorted Si   Jul 11 2006, 01:28 AM
andyzn   The host(windows XP) always says "it should b...   Jul 11 2006, 05:54 AM
lardman   I'm not sure. You could always format it using...   Jul 11 2006, 06:05 AM
andyzn   That is interesting. I changed the partition type ...   Jul 11 2006, 09:58 PM
andyzn   Goal: To simulate the flash of the board to be a U...   Jul 11 2006, 10:39 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st October 2014 - 05:58 PM