Skip to contentSkip to conversation

add dhcpcd package

Buildroot John Stile 3 participants 4 messages Mar 8, 2013 – Mar 10, 2013

lore
Share & tools
lore

John Stile

author
#0 lore raw

dhcpcd: new package

Dhcpcd is an RFC2131 compliant DHCP client.

---
 package/Config.in        |  1 +
 package/dhcpcd/Config.in |  5 +++++
 package/dhcpcd/dhcpcd.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 package/dhcpcd/Config.in
 create mode 100644 package/dhcpcd/dhcpcd.mk
package/Config.in +1 -0
index 22e64f8..924b464 100644
@@ -633,6 +633,7 @@ source "package/cups/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
 endif
+source "package/dhcpcd/Config.in"
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
package/dhcpcd/Config.in new file +5 -0
new file mode 100644
index 0000000..3855c6a
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_DHCPCD
+	bool "dhcpcd"
+	help
+	  An RFC2131 compliant DHCP client
+	  NOTE: If uClibc, depends on  UCLIBC_SUPPORT_AI_ADDRCONFIG=y
package/dhcpcd/dhcpcd.mk new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.12.4
#1 lore raw

Hi John,

2013/3/8 John Stile <[email protected]>:

Quoted 31 lines

dhcpcd: new package

Dhcpcd is an RFC2131 compliant DHCP client.

---
 package/Config.in        |  1 +
 package/dhcpcd/Config.in |  5 +++++
 package/dhcpcd/dhcpcd.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 package/dhcpcd/Config.in
 create mode 100644 package/dhcpcd/dhcpcd.mk
package/Config.in +1 -0
index 22e64f8..924b464 100644
@@ -633,6 +633,7 @@ source "package/cups/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
 endif
+source "package/dhcpcd/Config.in"
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
package/dhcpcd/Config.in new file +0 -0
new file mode 100644
index 0000000..3855c6a

package/dhcpcd/Config.in line 5

Quoted 5 lines
package/dhcpcd/Config.in new file +5 -0
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_DHCPCD
+       bool "dhcpcd"
+       help
+         An RFC2131 compliant DHCP client
+         NOTE: If uClibc, depends on  UCLIBC_SUPPORT_AI_ADDRCONFIG=y

I am not sure this is needed, as this option is now enabled by default.

Quoted 14 lines
package/dhcpcd/dhcpcd.mk new file +8 -0
new file mode 100644
index 0000000..c7aa82e
@@ -0,0 +1,48 @@
+#############################################################
+#
+# dhcpcd
+#
+#############################################################
+
+DHCPCD_VERSION = 5.6.7
+DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2

package/dhcpcd/dhcpcd.mk line 18

Quoted 10 lines
package/dhcpcd/dhcpcd.mk new file +10 -0
+DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd/
+DHCPCD_LICENSE = BSD-2c
+
+ifeq ($(BR2_USE_MMU),n)
+       DHCPCD_CONFIG_OPT += --disable-fork
+endif
+
+ifeq ($(BR2_INET_IPV6),)
+       DHCPCD_CFLAGS += -UHASIPv6
+endif

What are you trying to achieve here? I am not sure IPv6 can be disabled at compile time in this package.
Have you tried building it with a toolchain that does not support IPv6?

package/dhcpcd/dhcpcd.mk line 31

Quoted 13 lines
package/dhcpcd/dhcpcd.mk new file +13 -0
+
+define DHCPCD_CONFIGURE_CMDS
+       (cd $(@D); \
+       ./configure \
+       --target=$(BR2_GCC_TARGET_ARCH) \
+       --os=linux \
+       $(DHCPCD_CONFIG_OPT) )
+endef
+
+define DHCPCD_BUILD_CMDS
+       $(MAKE) \
+       $(TARGET_CONFIGURE_OPTS) \
+       $(DHCPCD_CFLAGS) \

Shouldn'it it be something like CFLAGS = $(DHCPCD_FLAGS) or "whatever" FLAGS = $(DHCPCD_FLAGS)

Gilles.

#2 lore raw
In reply to John Stile

Dear John Stile,

Quoted 1 line · John Stile

dhcpcd: new package

This line should be the title of the e-mail, as it will become the title of the patch once applied. Please use 'git send-email' to send your patches, it will make sure that everything is done properly, and will save you a lot of issues.

Quoted 29 lines

Dhcpcd is an RFC2131 compliant DHCP client.

---
 package/Config.in        |  1 +
 package/dhcpcd/Config.in |  5 +++++
 package/dhcpcd/dhcpcd.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 package/dhcpcd/Config.in
 create mode 100644 package/dhcpcd/dhcpcd.mk
package/Config.in +1 -0
index 22e64f8..924b464 100644
@@ -633,6 +633,7 @@ source "package/cups/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
 endif
+source "package/dhcpcd/Config.in"
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
package/dhcpcd/Config.in new file +0 -0
new file mode 100644
index 0000000..3855c6a

package/dhcpcd/Config.in line 5

Quoted 5 lines
package/dhcpcd/Config.in new file +5 -0
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_DHCPCD
+	bool "dhcpcd"
+	help
+	  An RFC2131 compliant DHCP client
+	  NOTE: If uClibc, depends on  UCLIBC_SUPPORT_AI_ADDRCONFIG=y

As Gilles said, this note is useless, since AI_ADDRCONFIG is enabled by default.

Also, after this help text, leave one blank line, and add the upstream URL of the project. See all other Config.in files for packages in Buildroot's tree. See also
http://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file

Quoted 8 lines
package/dhcpcd/dhcpcd.mk new file +2 -0
new file mode 100644
index 0000000..c7aa82e
@@ -0,0 +1,48 @@
+#############################################################
+#

package/dhcpcd/dhcpcd.mk line 12

Quoted 10 lines
package/dhcpcd/dhcpcd.mk new file +10 -0
+# dhcpcd
+#
+#############################################################
+
+DHCPCD_VERSION = 5.6.7
+DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2
+DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd/
+DHCPCD_LICENSE = BSD-2c
+
+ifeq ($(BR2_USE_MMU),n)

I already told you this would have no effect. BR2_USE_MMU is either 'y' or empty. So it should be:

ifeq ($(BR2_USE_MMU),)

package/dhcpcd/dhcpcd.mk line 18

Quoted 6 lines
package/dhcpcd/dhcpcd.mk new file +6 -0
+	DHCPCD_CONFIG_OPT += --disable-fork
+endif 
+
+ifeq ($(BR2_INET_IPV6),)
+	DHCPCD_CFLAGS += -UHASIPv6
+endif

I grepped through the entire dhcpcd source tree, and I haven't seen this HASIPv6 thing mentioned anywhere. Where did you get this from?

package/dhcpcd/dhcpcd.mk line 25

Quoted 7 lines
package/dhcpcd/dhcpcd.mk new file +7 -0
+
+define DHCPCD_CONFIGURE_CMDS
+	(cd $(@D); \
+	./configure \
+	--target=$(BR2_GCC_TARGET_ARCH) \
+	--os=linux \
+	$(DHCPCD_CONFIG_OPT) )

We usually indent the subsequent lines with one more tab:

	(cd $(@D); \
		./configure \
		--target=$(BR2_GCC_TARGET_ARCH) \
		--os=linux \
		$(DHCPCD_CONFIG_OPT))

package/dhcpcd/dhcpcd.mk line 32

Quoted 7 lines
package/dhcpcd/dhcpcd.mk new file +7 -0
+endef
+
+define DHCPCD_BUILD_CMDS
+	$(MAKE) \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(DHCPCD_CFLAGS) \
+	-C $(@D) all

Ditto here.

Also, as Gilles noted, if DHPCD_FLAGS expands to -UHASIPv6, then your build will break: -UHASIPv6 is not a valid option for make.

package/dhcpcd/dhcpcd.mk line 37

Quoted 3 lines
package/dhcpcd/dhcpcd.mk new file +3 -0
+define DHCPCD_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
+	$(TARGET_DIR)/usr/bin/dhcpcd

Intend the subsequent line with one tab.

	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
		$(TARGET_DIR)/usr/bin/dhcpcd

package/dhcpcd/dhcpcd.mk line 48

Quoted 11 lines
package/dhcpcd/dhcpcd.mk new file +11 -0
+	$(INSTALL) -D -m 0644 $(@D)/dhcpcd.conf \
+	$(TARGET_DIR)/etc/dhcpcd.conf
+	$(INSTALL) -D -m 0755 $(@D)/dhcpcd-run-hooks \
+	$(TARGET_DIR)/libexec/dhcpcd-run-hooks
+endef
+
+# NOTE: Even though this package has a configure script, it is not generated
+# using the autotools, so we have to use the generic package infrastructure.
+
+$(eval $(call generic-package))
+

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
author
#3 lore raw

Dear Thomas Petazzoni,

Quoted 10 lines · Thomas Petazzoni

Dear John Stile,

Quoted 1 line · John Stile

dhcpcd: new package

This line should be the title of the e-mail, as it will become the title of the patch once applied. Please use 'git send-email' to send your patches, it will make sure that everything is done properly, and will save you a lot of issues.

I wasn't able to figure out how to get this working with my email server, but I'll give it another shot. I simply tried to save the email, and then use my normal client to send it.

Quoted 29 lines
Quoted 29 lines

Dhcpcd is an RFC2131 compliant DHCP client.

---
 package/Config.in        |  1 +
 package/dhcpcd/Config.in |  5 +++++
 package/dhcpcd/dhcpcd.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 package/dhcpcd/Config.in
 create mode 100644 package/dhcpcd/dhcpcd.mk
package/Config.in +1 -0
index 22e64f8..924b464 100644
@@ -633,6 +633,7 @@ source "package/cups/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/dhcp/Config.in"
 endif
+source "package/dhcpcd/Config.in"
 source "package/dhcpdump/Config.in"
 source "package/dnsmasq/Config.in"
 source "package/dropbear/Config.in"
package/dhcpcd/Config.in new file +0 -0
new file mode 100644
index 0000000..3855c6a
@@ -0,0 +1,5 @@
Quoted 9 lines

package/dhcpcd/Config.in line 5

Quoted 5 lines
package/dhcpcd/Config.in new file +5 -0
+config BR2_PACKAGE_DHCPCD
+	bool "dhcpcd"
+	help
+	  An RFC2131 compliant DHCP client
+	  NOTE: If uClibc, depends on  UCLIBC_SUPPORT_AI_ADDRCONFIG=y

As Gilles said, this note is useless, since AI_ADDRCONFIG is enabled by default.

My particular configuration did not have this enabled, and my particular uclibc configuration was simply copied from something I got from an atmel site. Since I tripped over this ladder in a dark room, I thought a note could be enlightening for the next person, since I can't make a dependency in the kconfig.

Should I still remove it?

Quoted 5 lines

Also, after this help text, leave one blank line, and add the upstream URL of the project. See all other Config.in files for packages in Buildroot's tree. See also
http://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file

Sounds good.

Quoted 22 lines
Quoted 8 lines
package/dhcpcd/dhcpcd.mk new file +2 -0
new file mode 100644
index 0000000..c7aa82e
@@ -0,0 +1,48 @@
+#############################################################
+#

package/dhcpcd/dhcpcd.mk line 12

Quoted 10 lines
package/dhcpcd/dhcpcd.mk new file +10 -0
+# dhcpcd
+#
+#############################################################
+
+DHCPCD_VERSION = 5.6.7
+DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2
+DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd/
+DHCPCD_LICENSE = BSD-2c
+
+ifeq ($(BR2_USE_MMU),n)

I already told you this would have no effect. BR2_USE_MMU is either 'y' or empty. So it should be:

Quoted 2 lines

ifeq ($(BR2_USE_MMU),)

Whoops. My regression. Sorry.

Quoted 10 lines

package/dhcpcd/dhcpcd.mk line 18

Quoted 6 lines
package/dhcpcd/dhcpcd.mk new file +6 -0
+	DHCPCD_CONFIG_OPT += --disable-fork
+endif 
+
+ifeq ($(BR2_INET_IPV6),)
+	DHCPCD_CFLAGS += -UHASIPv6
+endif

I grepped through the entire dhcpcd source tree, and I haven't seen this HASIPv6 thing mentioned anywhere. Where did you get this from?

I used the package lsof-4.85 as an example, but I guess it's used of HASIPv6 is isolated, so I will remove it.

Quoted 58 lines

package/dhcpcd/dhcpcd.mk line 25

Quoted 7 lines
package/dhcpcd/dhcpcd.mk new file +7 -0
+
+define DHCPCD_CONFIGURE_CMDS
+	(cd $(@D); \
+	./configure \
+	--target=$(BR2_GCC_TARGET_ARCH) \
+	--os=linux \
+	$(DHCPCD_CONFIG_OPT) )

We usually indent the subsequent lines with one more tab:

	(cd $(@D); \
		./configure \
		--target=$(BR2_GCC_TARGET_ARCH) \
		--os=linux \
		$(DHCPCD_CONFIG_OPT))

package/dhcpcd/dhcpcd.mk line 32

Quoted 7 lines
package/dhcpcd/dhcpcd.mk new file +7 -0
+endef
+
+define DHCPCD_BUILD_CMDS
+	$(MAKE) \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(DHCPCD_CFLAGS) \
+	-C $(@D) all

Ditto here.

Also, as Gilles noted, if DHPCD_FLAGS expands to -UHASIPv6, then your build will break: -UHASIPv6 is not a valid option for make.

package/dhcpcd/dhcpcd.mk line 37

Quoted 3 lines
package/dhcpcd/dhcpcd.mk new file +3 -0
+define DHCPCD_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
+	$(TARGET_DIR)/usr/bin/dhcpcd

Intend the subsequent line with one tab.

	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
		$(TARGET_DIR)/usr/bin/dhcpcd

package/dhcpcd/dhcpcd.mk line 48

Quoted 11 lines
package/dhcpcd/dhcpcd.mk new file +11 -0
+	$(INSTALL) -D -m 0644 $(@D)/dhcpcd.conf \
+	$(TARGET_DIR)/etc/dhcpcd.conf
+	$(INSTALL) -D -m 0755 $(@D)/dhcpcd-run-hooks \
+	$(TARGET_DIR)/libexec/dhcpcd-run-hooks
+endef
+
+# NOTE: Even though this package has a configure script, it is not generated
+# using the autotools, so we have to use the generic package infrastructure.
+
+$(eval $(call generic-package))
+

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com