diff options
author | Chris Johns <chrisj@rtems.org> | 2023-04-19 15:22:43 +1000 |
---|---|---|
committer | Kinsey Moore <kinsey.moore@oarcorp.com> | 2023-04-19 15:33:42 -0500 |
commit | 6a6704c96d164460b683cf670eebcf6f86bf3e4d (patch) | |
tree | 97a8276ecb37df72793999e0b4cc1752a61a59d7 | |
parent | libbsd: Get telnet functional (diff) | |
download | rtems-net-services-6a6704c96d164460b683cf670eebcf6f86bf3e4d.tar.bz2 |
legacy: Builds with the latest legacy stack
-rw-r--r-- | include/net_adapter.h (renamed from stack/common/include/net_adapter.h) | 0 | ||||
-rw-r--r-- | net/legacy/include/machine/rtems-bsd-user-space.h (renamed from stack/legacy/include/machine/rtems-bsd-user-space.h) | 0 | ||||
-rw-r--r-- | net/legacy/include/net_adapter_extra.h (renamed from stack/legacy/include/net_adapter_extra.h) | 0 | ||||
-rw-r--r-- | net/legacy/net_adapter.c (renamed from stack/legacy/net_adapter.c) | 4 | ||||
-rw-r--r-- | net/legacy/ntp/config.h (renamed from stack/legacy/include/ntp/config.h) | 2 | ||||
-rw-r--r-- | net/libbsd/include/net_adapter_extra.h (renamed from stack/libbsd/include/net_adapter_extra.h) | 0 | ||||
-rw-r--r-- | net/libbsd/net_adapter.c (renamed from stack/libbsd/net_adapter.c) | 0 | ||||
-rw-r--r-- | net/libbsd/ntp/config.h (renamed from stack/libbsd/include/ntp/config.h) | 0 | ||||
-rw-r--r-- | net/lwip/include/net_adapter_extra.h (renamed from stack/lwip/include/net_adapter_extra.h) | 0 | ||||
-rw-r--r-- | net/lwip/net_adapter.c (renamed from stack/lwip/net_adapter.c) | 0 | ||||
-rw-r--r-- | net/lwip/ntp/config.h (renamed from stack/lwip/include/ntp/config.h) | 0 | ||||
-rw-r--r-- | netservices.py | 76 |
12 files changed, 43 insertions, 39 deletions
diff --git a/stack/common/include/net_adapter.h b/include/net_adapter.h index 340d7dd..340d7dd 100644 --- a/stack/common/include/net_adapter.h +++ b/include/net_adapter.h diff --git a/stack/legacy/include/machine/rtems-bsd-user-space.h b/net/legacy/include/machine/rtems-bsd-user-space.h index 15486dd..15486dd 100644 --- a/stack/legacy/include/machine/rtems-bsd-user-space.h +++ b/net/legacy/include/machine/rtems-bsd-user-space.h diff --git a/stack/legacy/include/net_adapter_extra.h b/net/legacy/include/net_adapter_extra.h index 61972d3..61972d3 100644 --- a/stack/legacy/include/net_adapter_extra.h +++ b/net/legacy/include/net_adapter_extra.h diff --git a/stack/legacy/net_adapter.c b/net/legacy/net_adapter.c index f1cf221..b622895 100644 --- a/stack/legacy/net_adapter.c +++ b/net/legacy/net_adapter.c @@ -34,3 +34,7 @@ */ #include <net_adapter.h> + +int net_start(void) { + return 1; +} diff --git a/stack/legacy/include/ntp/config.h b/net/legacy/ntp/config.h index fe7090c..e378912 100644 --- a/stack/legacy/include/ntp/config.h +++ b/net/legacy/ntp/config.h @@ -953,7 +953,7 @@ /* #undef HAVE_SYNCH_H */ /* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ +#define HAVE_SYSCONF 1 /* Define to 1 if you have the <sysexits.h> header file. */ /* #undef HAVE_SYSEXITS_H */ diff --git a/stack/libbsd/include/net_adapter_extra.h b/net/libbsd/include/net_adapter_extra.h index e01a53f..e01a53f 100644 --- a/stack/libbsd/include/net_adapter_extra.h +++ b/net/libbsd/include/net_adapter_extra.h diff --git a/stack/libbsd/net_adapter.c b/net/libbsd/net_adapter.c index 3760c89..3760c89 100644 --- a/stack/libbsd/net_adapter.c +++ b/net/libbsd/net_adapter.c diff --git a/stack/libbsd/include/ntp/config.h b/net/libbsd/ntp/config.h index d0251a1..d0251a1 100644 --- a/stack/libbsd/include/ntp/config.h +++ b/net/libbsd/ntp/config.h diff --git a/stack/lwip/include/net_adapter_extra.h b/net/lwip/include/net_adapter_extra.h index 61972d3..61972d3 100644 --- a/stack/lwip/include/net_adapter_extra.h +++ b/net/lwip/include/net_adapter_extra.h diff --git a/stack/lwip/net_adapter.c b/net/lwip/net_adapter.c index 09f50bb..09f50bb 100644 --- a/stack/lwip/net_adapter.c +++ b/net/lwip/net_adapter.c diff --git a/stack/lwip/include/ntp/config.h b/net/lwip/ntp/config.h index d0251a1..d0251a1 100644 --- a/stack/lwip/include/ntp/config.h +++ b/net/lwip/ntp/config.h diff --git a/netservices.py b/netservices.py index 4e25d51..e0166b7 100644 --- a/netservices.py +++ b/netservices.py @@ -55,11 +55,11 @@ def check_net_lib(conf, lib, name): ldflags=['-lrtemsdefaultconfig'], uselib_store=net_name, mandatory=False) if 'LIB_' + net_name in conf.env: + conf.env.NET_NAME = name + # clean up the check conf.env['LDFLAGS_' + net_name] = [] - conf.env.STACK_NAME = name + conf.env['LIB_' + net_name] += ['m'] return True - if 'LIB_NET_LIBBSD' in conf.env: - conf.env.LIB_NET_LIBBSD = ['bsd', 'm'] return False @@ -82,18 +82,18 @@ def bsp_configure(conf, arch_bsp): def build(bld): - stack_name = bld.env.STACK_NAME - stack_use = 'NET_' + stack_name.upper() - stack_def = 'RTEMS_NET_' + stack_name.upper() - stack_root = 'stack/' + stack_name - stack_inc = str(bld.path.find_node(stack_root + '/include')) - stack_common_inc = 'stack/common/include' - stack_adapter_source = stack_root + '/net_adapter.c' + net_name = bld.env.NET_NAME + net_use = 'NET_' + net_name.upper() + net_def = 'RTEMS_NET_' + net_name.upper() + net_root = os.path.join('net', net_name) + net_inc = str(bld.path.find_node(os.path.join(net_root, 'include'))) + net_adapter_source = net_root + '/net_adapter.c' - ns_cflags = ['-g', '-Wall', bld.env.OPTIMIZATION] + inc = [str(bld.path.find_node('include')), net_inc] + cflags = ['-g', bld.env.OPTIMIZATION] ntp_source_files = [] - ntp_incl = [stack_inc, stack_common_inc] + ntp_incl = inc arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP) @@ -108,13 +108,13 @@ def build(bld): bld.stlib(features='c', target='ntp', source=ntp_source_files, - includes=ntp_incl + [stack_inc + '/ntp'], - cflags=ns_cflags, - defines=[stack_def, 'HAVE_CONFIG_H=1'], - use=[stack_use]) + includes=ntp_incl + [os.path.join(net_root, 'ntp')], + cflags=cflags, + defines=[net_def, 'HAVE_CONFIG_H=1'], + use=[net_use]) bld.install_files("${PREFIX}/" + arch_lib_path, ["libntp.a"]) - ttcp_incl = [stack_inc, stack_common_inc, 'ttcp/include'] + ttcp_incl = inc + ['ttcp/include'] ttcp_source_files = ['ttcp/ttcp.c'] @@ -122,9 +122,9 @@ def build(bld): target='ttcp', source=ttcp_source_files, includes=ttcp_incl, - cflags=ns_cflags, - defines=[stack_def], - use=[stack_use]) + cflags=cflags, + defines=[net_def], + use=[net_use]) bld.install_files("${PREFIX}/" + arch_lib_path, ["libttcp.a"]) def install_headers(root_path): @@ -147,41 +147,41 @@ def build(bld): libs = ['rtemstest'] - ntp_test_incl = ntp_incl + ['testsuites', stack_common_inc] + ntp_test_incl = ntp_incl + ['testsuites'] ntp_test_sources = ['testsuites/ntp01/test_main.c', - stack_adapter_source] + net_adapter_source] bld.program(features='c', target='ntp01.exe', - source=' '.join(ntp_test_sources), - cflags=ns_cflags, + source=ntp_test_sources, + cflags=cflags, includes=ntp_test_incl, - defines=[stack_def], + defines=[net_def], lib=libs, - use=['ntp', stack_use]) + use=['ntp', net_use]) - ttcp_test_incl = ttcp_incl + ['testsuites', stack_common_inc] + ttcp_test_incl = ttcp_incl + ['testsuites'] ttcp_test_sources = ['testsuites/ttcpshell01/test_main.c'] - ttcp_test_sources += [stack_adapter_source] + ttcp_test_sources += [net_adapter_source] bld.program(features='c', target='ttcpshell01.exe', - source=' '.join(ttcp_test_sources), - cflags=ns_cflags, - defines=[stack_def], + source=ttcp_test_sources, + cflags=cflags, + defines=[net_def], includes=ttcp_test_incl, lib=libs, - use=['ttcp', stack_use]) + use=['ttcp', net_use]) - tlnt_test_incl = [stack_inc, stack_common_inc, 'testsuites'] + tlnt_test_incl = inc + ['testsuites'] tlnt_test_sources = ['testsuites/telnetd01/init.c'] - tlnt_test_sources += [stack_adapter_source] + tlnt_test_sources += [net_adapter_source] bld.program(features='c', target='telnetd01.exe', - source=' '.join(tlnt_test_sources), - cflags=ns_cflags, - defines=[stack_def], + source=tlnt_test_sources, + cflags=cflags, + defines=[net_def], includes=tlnt_test_incl, lib=['telnetd'] + libs, - use=[stack_use]) + use=[net_use]) |