This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
How can I get the Linux Synthetic Target to use DHCP?
- From: Michael Bergandi <mbergandi at gmail dot com>
- To: eCos Developer List <ecos-devel at ecos dot sourceware dot org>
- Date: Tue, 4 Jan 2011 16:32:56 -0500
- Subject: How can I get the Linux Synthetic Target to use DHCP?
Hi all,
I am doing trying to do some testing and development on a network
application with the synthetic Linux target. I have managed to get the
network interface working with a static IP, but not with DHCP. DHCP
eventually just times out. I built the host tools and ecos on Ubuntu
10.04.1 LTS.
For reference, the following are the commands I used to build the
synthetic target:
$ mkdir synthbuild
$ cd synthbuild
$ ecosconfig new linux
$ ecosconfig add fileio net freebsd_net eth_drivers
$ ecosconfig tree
$ make
Here is a simple hello world network app that I am using to get it working:
/* this is a simple hello world program */
#include "stdio.h"
#include "network.h"
#include "cyg/kernel/kapi.h"
int main(void)
{
init_all_network_interfaces();
printf("Hello, eCos world!\n");
while (1) {
printf ("Sleeping\n");
cyg_thread_delay (200);
}
return 0;
}
You can replace the hello.c in examples and build it like you would
the examples. The command line I am using to run it is:
$ ./hello-net -io -t
/usr/local/libexec/ecos/devs/eth/synth/ecosynth/current/ethernet.tdf
I eventually get a "BOOTP/DHCP failed on eth0" message.
Can someone help me fill in the missing pieces?
Thanks,
--
Mike