Welcome
Welcome to a320

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Kexec and ethernet gadget for dingoo linux

Only for posting new Dingux software releases.

Moderator: Moderators

Kexec and ethernet gadget for dingoo linux

Postby cyberic99 on Sun Jun 28, 2009 5:54 pm

Hello

I have compiled a static version of kexec

When using a kexec-enabled kernel, it enables me to load a kernel from another kernel
It is working, but for some reason, it cannot load the 'zImage' files, but the vmlinux ones.

It may be useful for debugging purpose or to pass extra arguments to the kernel. We could also imagine having different kernels for different applications.

You can get vmlinux and kexec_static from:
http://cyberic.free.fr/Dingoo

I also have a kernel with ethernet gadeget compiled in, and the dingoo now has a USB0'' network interface.

But when I plug it on my PC, I cannot see any USB0 on this side...

Has somebody already experienced that?

PS: is is the correct subforum or should I use 'linux development' ?
cyberic99
 
Posts: 36
Joined: Sat Jun 27, 2009 2:44 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby SiENcE on Mon Jun 29, 2009 12:12 pm

Nice Idea with the USB-Network Interface.
SiENcE
 
Posts: 67
Joined: Wed Apr 29, 2009 9:19 am
Location: Berlin/Germany

Re: Kexec and ethernet gadget for dingoo linux

Postby cyberic99 on Mon Jun 29, 2009 12:37 pm

The problem is that I can't make it work...
cyberic99
 
Posts: 36
Joined: Sat Jun 27, 2009 2:44 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby ezelkow1 on Mon Jun 29, 2009 4:16 pm

First make sure its loading up all the modules you need. Ill give you some examples from our boxes at work since we do alot of our development using either serial or a usb->ethernet adapter to telnet into a box.

First thing we do is load up the kernel modules, so if you dont have them compiled in you'll need to load them up with an insmod, ours is just usbnet.ko

Once thats loaded up we have a script that we run with udhcpc. You'll probably first have to have your adapter plugged into a router, and then let it acquire an address with udhcpc. If your going straight to a pc then you gotta have a crossover cable and/or a dhcp server running on your pc to handle the request.

You may want to just run ifconfig at this point to see if you can see your usb ethernet device and figure out what dev name it is. You can try running udhcpc -i device_name, but you may need a script to go with it which I can probably post somewhere, but we just use a generic once that is probably out everywhere on the internet.

Some of this may be a bit different since we use an actual adapter and not the gadget interface, but its the same general idea. Here is the usb gadget api and they discuss some of the basics of setting up the usb-ethernet gadget, so it may be of some use, If you notice they do have to do some configuration on the device side to give it a MAC and an IP.
http://www.lrr.in.tum.de/Par/arch/usb/linux-usb/gadget/
ezelkow1
 
Posts: 84
Joined: Tue Apr 28, 2009 11:58 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby cyberic99 on Mon Jun 29, 2009 4:34 pm

Hello ezelkow1 and thanks for your reply.

Were you able to use g_ether on the dingoo?

Could you please be a bit more precise, and precise for each step, about what side you are talking about?

The problem I got seem to be host (ie PC) related...

I have usbnet loaded, but no usb0 interface at all.

On the dingoo, I see usb0 with ifconfig, and can assign an IP, a MAC, and so on.

The problem is (I think) on the PC side...

I'll try with windows to see what I get...
cyberic99
 
Posts: 36
Joined: Sat Jun 27, 2009 2:44 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby ezelkow1 on Mon Jun 29, 2009 4:42 pm

Ahh, ok, it is most likely a pc side issue then as long as you can see the device on the dingoo itself. Are you trying this with a linux or windowss pc? You may want to take a look at that link I posted since they have a brief description of what you need to do for each one. Apparently there is a specific driver for windows that the dingoo should get recognized as when it loads up the ethernet gadget, so if your on windows you should make sure its using that. I think they have links to the driver file if you need it as well.

If your on linux it looks like you just need to bridge the connections together and use some linux utilities.

I dont really have much experience with the usb ethernet gadget, just with usb-ethernet adapters, but as you said it definitely looks like its just a pc side issue since you do see the device and have assigned it a mac
ezelkow1
 
Posts: 84
Joined: Tue Apr 28, 2009 11:58 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby cyberic99 on Mon Jun 29, 2009 6:08 pm

I use linux, will try it on windows.
In order to bridge the connections, I HAVE to get an USB interface first, on the PC side... but I got nothing...
In fact, I have this in my logs, on the PC side:

[33992.192040] usb 4-6: new high speed USB device using ehci_hcd and address 3
[33992.324788] usb 4-6: config 1 has 0 interfaces, different from the descriptor's value: 1

lsusb gives me (on the PC side):
Bus 004 Device 003: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

Hints anybody?
cyberic99
 
Posts: 36
Joined: Sat Jun 27, 2009 2:44 pm

Re: Kexec and ethernet gadget for dingoo linux

Postby ezelkow1 on Mon Jun 29, 2009 6:43 pm

it looks like you do already have a usb interface on the pc side, at least your pc recognizes that it has been connected and it does know exactly what it is. You may need to check that you have the necessary module on your host system though since it looks like from the dmesgs it only knows it has a new device but hasnt registered it as a usbnet device. On the usb module it knows it has a new device and knows the reported name, but it may not have assigned a device to it.

Just looking at this, http://www.linux-usb.org/usbnet/ that you may need to install the proper kernel module on your pc side so that eventually it will register it as a new device and know the MAC, at that point you should just have to configure it on the pc side.
ezelkow1
 
Posts: 84
Joined: Tue Apr 28, 2009 11:58 pm


Return to Dingux Releases

Who is online

Users browsing this forum: No registered users and 0 guests