Forums » Software Development »
Ethernet over usb
Added by Krishna Vallabhaneni about 12 years ago
Am using MityDSP L138F board.
Ethernet over USB driver is missing from your distribution.
It is supposed to be included in ubuntu distribution by default.
g_ether.ko is missing.
Would appreciate if you can you send me a new kernel with g_ether.ko included.
Replies (15)
RE: Ethernet over usb - Added by Tim Iskander about 12 years ago
USB gadgets are built as modules.
Here's a link to a TI page on building the usb ethernet gadget module
http://processors.wiki.ti.com/index.php/UsbConfigDevRNDIS
cheers
/Tim
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Followed ths teps in the above document. The gadget options under usb are missing. attached is a screen shot.
Cannot generate the gadget if the option is are not availbale. Downloaded the latest version of mitydsp kernel.
Menuconfig.docx (294 KB) Menuconfig.docx |
RE: Ethernet over usb - Added by Michael Williamson about 12 years ago
If you have the latest version of the kernel, then do a
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- industrialio_defconfig
Gadget support should be enabled by default for this configuration in the mitydsp-linux-v3.2 branch of the kernel.
-Mike
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Downloaded the latest Linux-DaVinci v fce1b66 from Critical Link website. The kernel is n2.26.32, not version 3.2.
How Do I get the v3,2 kernel from your web site ? Do I get the generice v3.2 from source forge etc. ?
Krishna
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Downloaded the latest Linux-DaVinci v fce1b66 from Critical Link website. The kernel is n2.26.32, not version 3.2.
How Do I get the v3,2 kernel from your web site ? Do I get the generice v3.2 from source forge etc. ?
Krishna
RE: Ethernet over usb - Added by Michael Williamson about 12 years ago
You need to checkout the mitydsp-linux-v3.2 branch. (the master branch is the older branch).
git checkout -b mitydsp-linux-v3.2 mitydsp-linux-v3.2
-Mike
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
was able to download kernel v3.2. from the mitydsp site.
Was able to generate the usb gadget, when the usb gadget was selected, it put out a message that it will be generated as a module.
defaults were chosen for all other options.
attempting to insert puts out this message:
insmod g_ether.ko
insmod: error inserting 'g_ether.ko': -1 Invalid module format
root@mityomapl138:/#
what is wrong?
Does the kernel need to be reflashed?
Krishna
RE: Ethernet over usb - Added by Tim Iskander about 12 years ago
That error typically means you are trying to load a module built against a different version of the kernel.
Verify that the module was built against the same version of kernel you are running.
cheers
/Tim
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
The kernel version on the board is 2.6.34rc1:
root@mityomapl138:/# uname -r
2.6.34-rc1
The USB gadgets are available on 3.2 kernels or later.
I used the version linux-davinci-b0045c9.
Does it mean the booard has to be reflashed?
How do you generate a new bootable image from the new kernel?
How do you flash it?
For safety, whereis the current image available?
Thanks
Krishna
RE: Ethernet over usb - Added by Michael Williamson about 12 years ago
Hi Krishna,
I would recommend using an NFS mount or TFTP server for loading up a new kernel and/or filesystem.
See "boot from an NFS server" on this page:
http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Linux_Root_File_System
This page also covers setting up an NFS shared filesystem.
Normally, we develop using an NFS mounted filesystem and once we're happy with the kernel and performance we then prep to FLASH the device SPI-NOR or NAND FLASH.
-Mike
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Built the uImage, downloaded, and boot.
It does nor complete boot process. It hangs
In the configuration, the only change was adding usb gadget for ethernet.
Took the defaults for make.
How Do I diagnose the problem?
Krishna
Using device
TFTP from server 192.168.1.11; our IP address is 192.168.1.10
Filename '/uImage'.
Load address: 0xc0700000
Loading: ################################################################# ################################################################# ##############################################
done
Bytes transferred = 2575096 (274af8 hex)
U-Boot > bootm
- Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2575032 Bytes = 2.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Generated a new kernel as per instructions. The meuconfig and make uImage were uneventful - normal. The kernel version is 3.2.0, It was flashed on to to the board.
However the ethernet gadget is missing. Copied g_ether.ko from the host - same version it was built from.
Attempted to install it. Same error as before:
root@mityomapl138:/# ls
bin ftditset linuxrc sbin tmp var
boot g_ether.ko media sys udpclient
dev home mnt tcpclient udpserver
etc lib proc tcpserver usr
root@mityomapl138:/# uname -r
3.2.0
root@mityomapl138:/# lsmode
-sh: lsmode: not found
root@mityomapl138:/# lsmod
Module Size Used by
root@mityomapl138:/# insmod g_ether.ko
insmod: error inserting 'g_ether.ko': -1 Invalid module format
root@mityomapl138:/#
What could be the problem this time?
RE: Ethernet over usb - Added by Michael Williamson about 12 years ago
The only way to get an invalid module format is if the kernel and modules aren't build from the same source / configuration / tree.
You might be explicit with your module load, e.g.
insmod ./g_ether.ko
You might also md5sum the uImage you are booting and building, as well as the g_ether.ko you copied and the one you are insmod'ing.
Did you do a:
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage modules
in order to ensure that the uImage and modules were built? You might even do a
make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- clean uImage modules
to be completely sure that everything is being build correctly.
Ideally, you should be installing the modules in the /lib/modules/`uname -r`/ path and doing to depmod -a followed by a modprobe in order to ensure that all the module dependencies are being picked up.
-Mike
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Succussfully generated and installed g_ether.ko on the mitydsp board, and configured the usb0 withe an ip adrees. Thanks.
Attempted to do the sam thing on the host. It is missing the driver.
mitydsp@mitydsp-dev:/lib/modules/2.6.32-42-generic/kernel/drivers/usb/gadget$ uname -r
2.6.32-42-generic
mitydsp@mitydsp-dev:/lib/modules/2.6.32-42-generic/kernel/drivers/usb/gadget$ sudo insmod g_ether.ko
insmod: error inserting 'g_ether.ko': -1 Unknown symbol in module
mitydsp@mitydsp-dev:/lib/modules/2.6.32-42-generic/kernel/drivers/usb/gadget$
Attempted generate the module:
make oldconfig
make menuconfig
mitydsp@mitydsp-dev:/usr/src/linux-headers-2.6.32-42-generic$ sudo make ARCH=x86 modules CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
make1: * No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'. Stop.
make: * [prepare0] Error 2
Are the paths wrong ? Are the modules missing ?
Krishna
RE: Ethernet over usb - Added by Krishna Vallabhaneni about 12 years ago
Need help with the Linux kernel:
Generated the usb gadget, but cannot install it.
mitydsp@mitydsp-dev:~/workspace/craigs-lib$ uname -r
2.6.32-45-generic
make oldconfig
Make newconfig generated usb gadget for ethernet.
sudo insmod -f g_ether.ko
insmod: error inserting 'g_ether.ko': -1 Unknown symbol in module
How do you boot from a different Linux kernel in VM box?
Grub folder does not have any options.
There is no grub.conf in /etc either.
Response to file, and ldd:
mitydsp@mitydsp-dev:/linux-2.6.32/drivers/usb/gadget$ file g_ether.ko
g_ether.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
mitydsp@mitydsp-dev:/linux-2.6.32/drivers/usb/gadget$ ldd g_ether.ko
not a dynamic executable
mitydsp@mitydsp-dev:/linux-2.6.32/drivers/usb/gadget$