[yocto] [solved] Re: replace udhcpc

Neuer User auslands-kv at gmx.de
Sat May 10 02:01:22 PDT 2014


Found a very simple solution to the original problem (after reading
through the busybox source code). Just add this small recipe to your
layer, and udhcpc will fork in to the background to gain the IP as soon
as the network is available:

diff --git a/recipes-core/busybox/busybox_%.bbappend
b/recipes-core/busybox/busybox_%.bbappend
new file mode 100644
index 0000000..14e4e37
--- /dev/null
+++ b/recipes-core/busybox/busybox_%.bbappend
@@ -0,0 +1,4 @@
+FILESEXTRAPATHS_append := "${THISDIR}/files:"
+
+SRC_URI += "file://udhcpc-opts.cfg \
+           "
diff --git a/recipes-core/busybox/files/udhcpc-opts.cfg
b/recipes-core/busybox/files/udhcpc-opts.cfg
new file mode 100644
index 0000000..d02ba19
--- /dev/null
+++ b/recipes-core/busybox/files/udhcpc-opts.cfg
@@ -0,0 +1 @@
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"


Am 07.05.2014 10:57, schrieb Neuer User:
> Hi
> 
> I encounter a problem with the DHCP network setup during boot:
> 
> System starts. During start ifup is called. ifup calls udhcpc. Network
> is, however, not yet up! udhcpc exits with failure. Then network is up.
> But, of course, no connection, because no IP address.
> 
> In earlier times I used debian based system, which seem to rely on
> dhclient3. My experiences here were that dhclient remained as a deamon
> continuing trying to get a dhcp address.
> 
> What should I do best on Yocto? Replace udhcpc with dhclient? If so, how
> should that be done?
> 
> Or can udhcpc be configured to remain in the background and try to get
> an IP address when network is finally up?
> 
> Thanks for any help
> 
> Michael
> 





More information about the yocto mailing list