system/dhcpc: The DHCPC renew command did not build correctly due to naming problems. Noted by Masayuki Ishikawa,
This commit is contained in:
parent
a3ac695f17
commit
54d55cb307
@ -3,7 +3,7 @@
|
|||||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||||
#
|
#
|
||||||
|
|
||||||
config SYSTEM_DHCPC
|
config SYSTEM_DHCPC_RENEW
|
||||||
bool "DHCP Address Renewal"
|
bool "DHCP Address Renewal"
|
||||||
default n
|
default n
|
||||||
select NETUTILS_DHCPC
|
select NETUTILS_DHCPC
|
||||||
@ -11,9 +11,9 @@ config SYSTEM_DHCPC
|
|||||||
---help---
|
---help---
|
||||||
Enble the DHCP client 'renew' command
|
Enble the DHCP client 'renew' command
|
||||||
|
|
||||||
if SYSTEM_DHCPC
|
if SYSTEM_DHCPC_RENEW
|
||||||
|
|
||||||
config SYSTEM_DHCPC_PROGNAME
|
config DHCPC_RENEW_PROGNAME
|
||||||
string "Program name"
|
string "Program name"
|
||||||
default "renew"
|
default "renew"
|
||||||
depends on BUILD_KERNEL
|
depends on BUILD_KERNEL
|
||||||
@ -21,11 +21,11 @@ config SYSTEM_DHCPC_PROGNAME
|
|||||||
This is the name of the program that will be use when the NSH ELF
|
This is the name of the program that will be use when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
|
||||||
config SYSTEM_DHCPC_PRIORITY
|
config DHCPC_RENEW_PRIORITY
|
||||||
int "DHCPC task priority"
|
int "DHCPC task priority"
|
||||||
default 100
|
default 100
|
||||||
|
|
||||||
config SYSTEM_DHCPC_STACKSIZE
|
config DHCPC_RENEW_STACKSIZE
|
||||||
int "DHCPC stack size"
|
int "DHCPC stack size"
|
||||||
default 2048
|
default 2048
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
ifeq ($(CONFIG_SYSTEM_DHCPC),y)
|
ifeq ($(CONFIG_SYSTEM_DHCPC_RENEW),y)
|
||||||
CONFIGURED_APPS += system/dhcpc
|
CONFIGURED_APPS += system/dhcpc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -39,31 +39,31 @@ include $(APPDIR)/Make.defs
|
|||||||
|
|
||||||
# DHCPC address renewal built-in application info
|
# DHCPC address renewal built-in application info
|
||||||
|
|
||||||
CONFIG_SYSTEM_DHCPC_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
CONFIG_DHCPC_RENEW_PRIORITY ?= SCHED_PRIORITY_DEFAULT
|
||||||
CONFIG_SYSTEM_DHCPC_STACKSIZE ?= 2048
|
CONFIG_DHCPC_RENEW_STACKSIZE ?= 2048
|
||||||
|
|
||||||
APPNAME = renew
|
RENEW_APPNAME = renew
|
||||||
PRIORITY = $(CONFIG_SYSTEM_DHCPC_PRIORITY)
|
RENEW_PRIORITY = $(CONFIG_DHCPC_RENEW_PRIORITY)
|
||||||
STACKSIZE = $(CONFIG_SYSTEM_DHCPC_STACKSIZE)
|
RENEW_STACKSIZE = $(CONFIG_DHCPC_RENEW_STACKSIZE)
|
||||||
|
|
||||||
CONFIG_SYSTEM_DHCPC_PROGNAME ?= renew$(EXEEXT)
|
CONFIG_DHCPC_RENEW_PROGNAME ?= renew$(EXEEXT)
|
||||||
PROGNAME = $(CONFIG_SYSTEM_DHCPC_PROGNAME)
|
RENEW_PROGNAME = $(CONFIG_DHCPC_RENEW_PROGNAME)
|
||||||
|
|
||||||
# DHCPC address renewal
|
# DHCPC address renewal
|
||||||
|
|
||||||
ASRCS =
|
RENEW_SRCS =
|
||||||
CSRCS =
|
RENEW_MAINSRC = renew_main.c
|
||||||
MAINSRC = dhcpc_main.c
|
|
||||||
|
|
||||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
RENEW_OBJS = $(RENEW_SRCS:.c=$(OBJEXT))
|
||||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
RENEW_MAINOBJ = $(RENEW_MAINSRC:.c=$(OBJEXT))
|
||||||
MAINOBJ = $(MAINSRC:.c=$(OBJEXT))
|
|
||||||
|
|
||||||
SRCS = $(ASRCS) $(CSRCS) $(MAINSRC)
|
# Other DHCPC commands go here
|
||||||
OBJS = $(AOBJS) $(COBJS)
|
|
||||||
|
SRCS = $(RENEW_SRCS) $(RENEW_MAINSRC)
|
||||||
|
OBJS = $(RENEW_OBJS)
|
||||||
|
|
||||||
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
ifneq ($(CONFIG_BUILD_KERNEL),y)
|
||||||
OBJS += $(MAINOBJ)
|
OBJS += $(RENEW_MAINOBJ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
@ -91,10 +91,7 @@ VPATH =
|
|||||||
all: .built
|
all: .built
|
||||||
.PHONY: clean depend distclean
|
.PHONY: clean depend distclean
|
||||||
|
|
||||||
$(AOBJS): %$(OBJEXT): %.S
|
$(OBJS) $(RENEW_MAINOBJ): %$(OBJEXT): %.c
|
||||||
$(call ASSEMBLE, $<, $@)
|
|
||||||
|
|
||||||
$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
|
||||||
$(call COMPILE, $<, $@)
|
$(call COMPILE, $<, $@)
|
||||||
|
|
||||||
.built: $(OBJS)
|
.built: $(OBJS)
|
||||||
@ -102,12 +99,12 @@ $(COBJS) $(MAINOBJ): %$(OBJEXT): %.c
|
|||||||
@touch .built
|
@touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
ifeq ($(CONFIG_BUILD_KERNEL),y)
|
||||||
$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ)
|
$(BIN_DIR)$(DELIM)$(RENEW_PROGNAME): $(OBJS) $(RENEW_MAINOBJ)
|
||||||
@echo "LD: $(PROGNAME)"
|
@echo "LD: $(RENEW_PROGNAME)"
|
||||||
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS)
|
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(RENEW_PROGNAME) $(ARCHCRT0OBJ) $(RENEW_MAINOBJ) $(LDLIBS)
|
||||||
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME)
|
$(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(RENEW_PROGNAME)
|
||||||
|
|
||||||
install: $(BIN_DIR)$(DELIM)$(PROGNAME)
|
install: $(BIN_DIR)$(DELIM)$(RENEW_PROGNAME)
|
||||||
|
|
||||||
else
|
else
|
||||||
install:
|
install:
|
||||||
@ -115,10 +112,10 @@ install:
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(RENEW_APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(RENEW_APPNAME),$(RENEW_PRIORITY),$(RENEW_STACKSIZE),$(RENEW_APPNAME)_main)
|
||||||
|
|
||||||
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
|
context: $(BUILTIN_REGISTRY)$(DELIM)$(RENEW_APPNAME)_main.bdat
|
||||||
else
|
else
|
||||||
context:
|
context:
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* system/dhcpc/dhcpc_main.c
|
* system/dhcpc/renew_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@ -66,13 +66,13 @@ static void dhcpc_showusage(FAR const char *progname, int exitcode)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* dhcpc_main
|
* renew_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_KERNEL
|
#ifdef CONFIG_BUILD_KERNEL
|
||||||
int main(int argc, FAR char *argv[])
|
int main(int argc, FAR char *argv[])
|
||||||
#else
|
#else
|
||||||
int dhcpc_main(int argc, char *argv[])
|
int renew_main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FAR const char *devname;
|
FAR const char *devname;
|
Loading…
Reference in New Issue
Block a user