diff --git a/.gitattributes b/.gitattributes index a8c7a5efc..56ad6c8a7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,21 +18,3 @@ *.png binary !eol *.jpg binary !eol *.gif binary !eol - -# Files normalized to always keep Unix line endings -.default-version eol=lf -bootstrap* eol=lf -config.guess eol=lf -config.status eol=lf -configure eol=lf -libtool eol=lf -libtoolize eol=lf -autoreconf eol=lf -mkversion eol=lf -*.sh eol=lf -*-sh eol=lf -*.m4 eol=lf -configure.ac eol=lf -Makefile.am eol=lf -Makefile.in eol=lf -Makefile eol=lf diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f21eb6bf..8a054d018 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -420,12 +420,10 @@ jobs: - name: Bootstrap run: | brew update - brew install automake m4 wget --tries 4 https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip unzip ninja-mac.zip && mv ninja /usr/local/bin/. - name: Build run: | - export PATH=$(brew --prefix m4)/bin:$PATH script/check-posix-build script/check-simulation-build diff --git a/.gitignore b/.gitignore index 3e09b2df6..2dae5d0e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,63 +1,29 @@ *.a *.bak -*.db *.flash *.gcda *.gcno *.log *.o -*.lo -*.la *.ninja* -*.opendb *.orig *.pcap *.pyc -*.suo *.swn *.swo *.swp *.trs -*.user *.bak *~ -.deps -.dirstamp .DS_Store -.local-version -.libs .vagrant -aclocal.m4 -autom4te.cache build CMakeCache.txt CMakeFiles cmake_install.cmake -configure -config.log -config.status doc/Doxyfile doc/html -etc/cmake/openthread-config-generic.h -include/openthread-config.h -include/openthread-config.h.in -include/openthread-config-generic.h -include/openthread-config-generic.h.in -include/stamp-h1 -ipch -libtool -Makefile -Makefile.in output -third_party/nlbuild-autotools/repo/third_party/autoconf/compile -third_party/nlbuild-autotools/repo/third_party/autoconf/depcomp -third_party/nlbuild-autotools/repo/third_party/autoconf/ltmain.sh -third_party/nlbuild-autotools/repo/third_party/autoconf/m4/libtool.m4 -third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltoptions.m4 -third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltsugar.m4 -third_party/nlbuild-autotools/repo/third_party/autoconf/m4/ltversion.m4 -third_party/nlbuild-autotools/repo/third_party/autoconf/m4/lt~obsolete.m4 -third_party/nlbuild-autotools/repo/third_party/autoconf/missing /tmp/ # IDE / editor files diff --git a/etc/docker/Makefile b/etc/docker/Makefile deleted file mode 100644 index 5e83df2a3..000000000 --- a/etc/docker/Makefile +++ /dev/null @@ -1,32 +0,0 @@ - -VERSION=0.1 - -all: arm32v7_linux x86_linux simulation - -arm32v7_linux: arm32v7_ubuntu_wpantund - docker build -t openthread/wpantund_arm32v7_linux arm32v7_ubuntu_wpantund && \ - docker push openthread/wpantund_arm32v7_linux && \ - docker tag openthread/wpantund_arm32v7_linux openthread/wpantund_arm32v7_linux:$(VERSION) && \ - docker push openthread/wpantund_arm32v7_linux:$(VERSION) - -x86_linux: x86_ubuntu_wpantund - docker build -t openthread/wpantund_amd64_linux x86_ubuntu_wpantund && \ - docker push openthread/wpantund_amd64_linux && \ - docker tag openthread/wpantund_amd64_linux openthread/wpantund_amd64_linux:$(VERSION) && \ - docker push openthread/wpantund_amd64_linux:$(VERSION) - -simulation: ot_simulation - docker build -t openthread/simulation ot_sim && \ - docker push openthread/simulation && \ - docker tag openthread/simulation openthread/simulation:$(VERSION) && \ - docker push openthread/simulation:$(VERSION) - -publish_manifest: - docker manifest create openthread/wpantund openthread/wpantund_arm32v7_linux openthread/wpantund_amd64_linux - docker manifest annotate openthread/wpantund openthread/wpantund_arm32v7_linux --os linux --arch arm --variant 7 - docker manifest annotate openthread/wpantund openthread/wpantund_amd64_linux --os linux --arch amd64 - docker manifest push --purge openthread/wpantund - docker manifest create openthread/wpantund:$(VERSION) openthread/wpantund_arm32v7_linux:$(VERSION) openthread/wpantund_amd64_linux:$(VERSION) - docker manifest annotate openthread/wpantund:$(VERSION) openthread/wpantund_arm32v7_linux:$(VERSION) --os linux --arch arm --variant 7 - docker manifest annotate openthread/wpantund:$(VERSION) openthread/wpantund_amd64_linux:$(VERSION) --os linux --arch amd64 - docker manifest push --purge openthread/wpantund:$(VERSION) diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index a7d1acd4f..000000000 --- a/examples/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# Common switches - -OpenThread allows you to [configure](https://openthread.io/guides/build#configuration) the stack for different functionality and behavior. This configuration is based on changing compile-time constants during the build process using common switches listed in `/examples/common-switches.mk`. - -This page lists the available common switches with description. Unless stated otherwise, the switches are set to 0 by default. For build command examples, see [build examples](https://openthread.io/guides/build#build_examples). - -| Makefile switch | CMake switch | Description | -| --- | --- | --- | -| | OT_15_4 | Enables 802.15.4 radio link. | -| ANYCAST_LOCATOR | OT_ANYCAST_LOCATOR | Enables anycast locator functionality. | -| BACKBONE_ROUTER | OT_BACKBONE_ROUTER | Enables Backbone Router functionality for Thread 1.2. | -| BIG_ENDIAN | OT_BIG_ENDIAN | Allows the host platform to use big-endian byte order. | -| BORDER_AGENT | OT_BORDER_AGENT | Enables support for border agent. In most cases, enable this switch if you are building On-mesh Commissioner or Border Router with External Commissioning support. | -| BORDER_ROUTER | OT_BORDER_ROUTER | Enables support for Border Router. This switch is usually combined with the BORDER_AGENT and UDP_FORWARD (or PLATFORM_UDP in case of RCP design) switches to build Border Router device. | -| BORDER_ROUTING | OT_BORDER_ROUTING | Enables bi-directional border routing between Thread and Infrastructure networks for Border Router. | -| BUILTIN_MBEDTLS_MANAGEMENT | OT_BUILTIN_MBEDTLS_MANAGEMENT | Enables the built-in mbedTLS management. Enable this switch if the external mbedTLS is used, but mbedTLS memory allocation and debug config should be managed internally by OpenThread. | -| CHANNEL_MANAGER | OT_CHANNEL_MANAGER | Enables support for channel manager. Enable this switch on devices that are supposed to request a Thread network channel change. This switch should be used only with an FTD build. | -| CHANNEL_MONITOR | OT_CHANNEL_MONITOR | Enables support for channel monitor. Enable this switch on devices that are supposed to determine the cleaner channels. | -| COAP | OT_COAP | Enables support for the CoAP API. Enable this switch if you want to control Constrained Application Protocol communication. | -| COAP_OBSERVE | OT_COAP_OBSERVE | Enables support for CoAP Observe (RFC7641) API. | -| COAPS | OT_COAPS | Enables support for the secure CoAP API. Enable this switch if you want to control Constrained Application Protocol Secure (CoAP over DTLS) communication. | -| COMMISSIONER | OT_COMMISSIONER | Enables support for Commissioner. Enable this switch on device that is able to perform Commissioner role. | -| COVERAGE | OT_COVERAGE | Enables the generation of code-coverage instances. | -| CSL_RECEIVER | OT_CSL_RECEIVER | Enables CSL receiver feature for Thread 1.2. | -| DEBUG | not implemented | Allows building debug instance. Code optimization is disabled. | -| DHCP6_CLIENT | OT_DHCP6_CLIENT | Enables support for the DHCP6 client. The device is able to act as typical DHCP client. Enable this switch on a device that is supposed to request networking parameters from the DHCP server. | -| DHCP6_SERVER | OT_DHCP6_SERVER | Enables support for the DHCP6 server. The device is able to act as typical DHCP server. Enable this switch on a device that is supposed to provide networking parameters to devices with DHCP_CLIENT switch enabled. | -| DIAGNOSTIC | OT_DIAGNOSTIC | Enables diagnostic support. Enable this switch on a device that is tested in the factory production stage. | -| DISABLE_BUILTIN_MBEDTLS | not implemented | Disables OpenThread's mbedTLS build. Enable this switch if you do not want to use the built-in mbedTLS and you do not want to manage mbedTLS internally. Enabling this switch will disable support for such features as memory allocation and debug. | -| DISABLE_DOC | not implemented | Disables building of the documentation. | -| DISABLE_EXECUTABLE | not implemented | Disables building of executables. | -| DISABLE_TOOLS | not implemented | Disables building of tools. | -| DEBUG_UART | not implemented | Enables the Debug UART platform feature. | -| DEBUG_UART_LOG | not implemented | Enables the log output for the debug UART. Requires OPENTHREAD_CONFIG_ENABLE_DEBUG_UART to be enabled. | -| DNS_CLIENT | OT_DNS_CLIENT | Enables support for DNS client. Enable this switch on a device that sends a DNS query for AAAA (IPv6) record. | -| DNS_DSO | OT_DNS_DSO | Enables support for DNS Stateful Operations (DSO). | -| DNS_UPSTREAM_QUERY | OT_DNS_UPSTREAM_QUERY | Enables forwarding DNS queries to upstream DNS server. | -| DNSSD_SERVER | OT_DNSSD_SERVER | Enables support for DNS-SD server. DNS-SD server use service information from local SRP server to resolve DNS-SD query questions. | -| DUA | OT_DUA | Enables the Domain Unicast Address feature for Thread 1.2. | -| DYNAMIC_LOG_LEVEL | not implemented | Enables the dynamic log level feature. Enable this switch if OpenThread log level is required to be set at runtime. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. | -| ECDSA | OT_ECDSA | Enables support for Elliptic Curve Digital Signature Algorithm. Enable this switch if ECDSA digital signature is used by application. | -| EXTERNAL_HEAP | OT_EXTERNAL_HEAP | Enables support for external heap. Enable this switch if the platform uses its own heap. Make sure to specify the external heap Calloc and Free functions to be used by the OpenThread stack. | -| FULL_LOGS | OT_FULL_LOGS | Enables all log levels and regions. This switch sets the log level to OT_LOG_LEVEL_DEBG and turns on all region flags. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. | -| HISTORY_TRACKER | OT_HISTORY_TRACKER | Enables support for History Tracker. | -| IP6_FRAGM | OT_IP6_FRAGM | Enables support for IPv6 fragmentation. | -| JAM_DETECTION | OT_JAM_DETECTION | Enables support for [Jam Detection](https://openthread.io/guides/build/features/jam-detection). Enable this switch if a device requires the ability to detect signal jamming on a specific channel. | -| JOINER | OT_JOINER | Enables [support for Joiner](https://openthread.io/reference/group/api-joiner). Enable this switch on a device that has to be commissioned to join the network. | -| LINK_RAW | OT_LINK_RAW | Enables the Link Raw service. | -| LOG_OUTPUT | not implemented | Defines if the LOG output is to be created and where it goes. There are several options available: `NONE`, `DEBUG_UART`, `APP`, `PLATFORM_DEFINED` (default). See [Logging guide](https://openthread.io/guides/build/logs) to learn more. | -| MAC_FILTER | OT_MAC_FILTER | Enables support for the MAC filter. | -| MLE_LONG_ROUTES | OT_MLE_LONG_ROUTES | Enables the MLE long routes extension. **Note: Enabling this feature breaks conformance to the Thread Specification.** | -| MLR | OT_MLR | Enables Multicast Listener Registration feature for Thread 1.2. | -| MULTIPLE_INSTANCE | OT_MULTIPLE_INSTANCE | Enables multiple OpenThread instances. | -| NAT64_BORDER_ROUTING | OT_NAT64_BORDER_ROUTING | Enables NAT64 border routing support for Border Router. | -| NAT64_TRANSLATOR | OT_NAT64_TRANSLATOR | Enables NAT64 translator for Border Router. | -| NETDATA_PUBLISHER | OT_NETDATA_PUBLISHER | Enables support for Thread Network Data publisher. | -| NETDIAG_CLIENT | OT_NETDIAG_CLIENT | Enables Network Diagnostics client functionality. | -| PING_SENDER | OT_PING_SENDER | Enables support for ping sender. | -| OTNS | OT_OTNS | Enables support for [OpenThread Network Simulator](https://github.com/openthread/ot-ns). Enable this switch if you are building OpenThread for OpenThread Network Simulator. | -| PLATFORM_UDP | OT_PLATFORM_UDP | Enables platform UDP support. | -| REFERENCE_DEVICE | OT_REFERENCE_DEVICE | Enables support for Thread Test Harness reference device. Enable this switch on the reference device during certification. | -| SERVICE | OT_SERVICE | Enables support for injecting Service entries into the Thread Network Data. | -| SETTINGS_RAM | OT_SETTINGS_RAM | Enables volatile-only storage of settings. | -| SLAAC | OT_SLAAC | Enables support for adding auto-configured SLAAC addresses by OpenThread. This feature is enabled by default. | -| SNTP_CLIENT | OT_SNTP_CLIENT | Enables support for SNTP Client. | -| SPINEL_ENCRYPTER_LIBS | not implemented | Specifies library files (absolute paths) for implementing the NCP Spinel Encrypter. | -| SRP_CLIENT | OT_SRP_CLIENT | Enable support for SRP client. | -| SRP_SERVER | OT_SRP_SERVER | Enable support for SRP server. | -| TCP | OT_TCP | Enable support for TCP (based on TCPlp). | -| THREAD_VERSION | OT_THREAD_VERSION | Enables the chosen Thread version (1.1 / 1.2 (default)). For example, set to `1.1` for Thread 1.1. | -| TIME_SYNC | OT_TIME_SYNC | Enables the time synchronization service feature. **Note: Enabling this feature breaks conformance to the Thread Specification.** | -| TREL | OT_TREL | Enables TREL radio link for Thread over Infrastructure feature. | -| UDP_FORWARD | OT_UDP_FORWARD | Enables support for UDP forward. Enable this switch on the Border Router device (running on the NCP design) with External Commissioning support to service Thread Commissioner packets on the NCP side. | -| UPTIME | OT_UPTIME | Enables support for tracking OpenThread instance's uptime. | - -Removed or replaced switches: - -| Makefile switch | CMake switch | Description | -| --- | --- | --- | -| MTD_NETDIAG | OT_MTD_NETDIAG | Use NEDIAG_CLIENT to enable client functionality. Server functionality is always supported. | diff --git a/examples/common-switches.mk b/examples/common-switches.mk deleted file mode 100644 index 36ff95726..000000000 --- a/examples/common-switches.mk +++ /dev/null @@ -1,414 +0,0 @@ -# -# Copyright (c) 2016-2017, The OpenThread Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -# OpenThread Features (Makefile default configuration). - -ANYCAST_LOCATOR ?= 0 -BACKBONE_ROUTER ?= 0 -BIG_ENDIAN ?= 0 -BORDER_AGENT ?= 0 -BORDER_ROUTER ?= 0 -BORDER_ROUTING ?= 0 -COAP ?= 0 -COAP_BLOCK ?= 0 -COAP_OBSERVE ?= 0 -COAPS ?= 0 -COMMISSIONER ?= 0 -COVERAGE ?= 0 -CHANNEL_MANAGER ?= 0 -CHANNEL_MONITOR ?= 0 -DATASET_UPDATER ?= 0 -DEBUG ?= 0 -DHCP6_CLIENT ?= 0 -DHCP6_SERVER ?= 0 -DIAGNOSTIC ?= 0 -DISABLE_DOC ?= 0 -DISABLE_TOOLS ?= 0 -DNS_CLIENT ?= 0 -DNS_DSO ?= 0 -DNS_UPSTREAM_QUERY ?= 0 -DNSSD_SERVER ?= 0 -DUA ?= 0 -DYNAMIC_LOG_LEVEL ?= 0 -ECDSA ?= 0 -EXTERNAL_HEAP ?= 0 -HISTORY_TRACKER ?= 0 -IP6_FRAGM ?= 0 -JAM_DETECTION ?= 0 -JOINER ?= 0 -ifeq ($(REFERENCE_DEVICE),1) -LOG_OUTPUT ?= APP -endif -LINK_RAW ?= 0 -MAC_FILTER ?= 0 -MESH_DIAG ?= 0 -MESSAGE_USE_HEAP ?= 0 -MLE_LONG_ROUTES ?= 0 -MLR ?= 0 -MTD_NETDIAG ?= 0 -MULTIPLE_INSTANCE ?= 0 -NAT64_BORDER_ROUTING ?= 0 -NAT64_TRANSLATOR ?= 0 -NEIGHBOR_DISCOVERY_AGENT ?= 0 -NETDATA_PUBLISHER ?= 0 -NETDIAG_CLIENT ?= 0 -OTNS ?= 0 -PING_SENDER ?= 1 -PLATFORM_UDP ?= 0 -REFERENCE_DEVICE ?= 0 -SERVICE ?= 0 -SETTINGS_RAM ?= 0 -# SLAAC is enabled by default -SLAAC ?= 1 -SNTP_CLIENT ?= 0 -SRP_CLIENT ?= 0 -SRP_SERVER ?= 0 -TCP ?= 0 -THREAD_VERSION ?= 1.3 -TIME_SYNC ?= 0 -TREL ?= 0 -UDP_FORWARD ?= 0 -UPTIME ?= 0 -RCP_RESTORATION_MAX_COUNT ?= 0 - -ifeq ($(ANYCAST_LOCATOR),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE=1 -endif - -ifeq ($(BACKBONE_ROUTER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1 -endif - -ifeq ($(BIG_ENDIAN),1) -COMMONCFLAGS += -DBYTE_ORDER_BIG_ENDIAN=1 -endif - -ifeq ($(BORDER_AGENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1 -endif - -ifeq ($(BORDER_ROUTER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1 -endif - -ifeq ($(BORDER_ROUTING),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1 -endif - -ifeq ($(NAT64_BORDER_ROUTING),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE=1 -endif - -ifeq ($(NAT64_TRANSLATOR),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE=1 -endif - -ifeq ($(COAP),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_API_ENABLE=1 -endif - -ifeq ($(COAPS),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1 -endif - -ifeq ($(COAP_BLOCK),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=1 -endif - -ifeq ($(COAP_OBSERVE),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1 -endif - -ifeq ($(COMMISSIONER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1 -endif - -ifeq ($(COVERAGE),1) -configure_OPTIONS += --enable-coverage -endif - -ifeq ($(CHANNEL_MANAGER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=1 -endif - -ifeq ($(CHANNEL_MONITOR),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=1 -endif - -ifeq ($(CSL_RECEIVER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1 -endif - -ifeq ($(CSL_AUTO_SYNC),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1 -else ifeq ($(CSL_AUTO_SYNC),0) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0 -endif - -ifeq ($(CSL_DEBUG),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=1 -endif - -ifeq ($(DATASET_UPDATER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=1 -endif - -ifeq ($(DEBUG),1) -configure_OPTIONS += --enable-debug --disable-optimization -endif - -ifeq ($(DHCP6_CLIENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1 -endif - -ifeq ($(DHCP6_SERVER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1 -endif - -ifeq ($(DIAGNOSTIC),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DIAG_ENABLE=1 -endif - -ifeq ($(DISABLE_DOC),1) -configure_OPTIONS += --disable-docs -endif - -ifeq ($(DISABLE_TOOLS),1) -configure_OPTIONS += --disable-tools -endif - -ifeq ($(DNS_CLIENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1 -endif - -ifeq ($(DNS_DSO),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNS_DSO_ENABLE=1 -endif - -ifeq ($(DNS_UPSTREAM_QUERY), 1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=1 -endif - -ifeq ($(DNSSD_SERVER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=1 -endif - -ifeq ($(DUA),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_DUA_ENABLE=1 -endif - -ifeq ($(DYNAMIC_LOG_LEVEL),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1 -endif - -ifeq ($(ECDSA),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_ECDSA_ENABLE=1 -endif - -ifeq ($(EXTERNAL_HEAP),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1 -endif - -ifeq ($(HISTORY_TRACKER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=1 -endif - -ifeq ($(IP6_FRAGM),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1 -endif - -ifeq ($(JAM_DETECTION),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1 -endif - -ifeq ($(JOINER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_JOINER_ENABLE=1 -endif - -ifeq ($(LINK_RAW),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_LINK_RAW_ENABLE=1 -endif - -ifeq ($(LINK_METRICS_INITIATOR),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1 -endif - -ifeq ($(LINK_METRICS_SUBJECT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1 -endif - -ifneq ($(LOG_OUTPUT),) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_$(LOG_OUTPUT) -endif - -ifeq ($(MAC_FILTER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1 -endif - -ifeq ($(MESH_DIAG),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MESH_DIAG_ENABLE=1 -endif - -ifeq ($(MESSAGE_USE_HEAP),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1 -endif - -# Enable MLE long routes extension (experimental, breaks Thread conformance) -ifeq ($(MLE_LONG_ROUTES),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=1 -endif - -ifeq ($(MLR),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MLR_ENABLE=1 -endif - -# This config is removed but we still check and add the -# `OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE` so to -# get an error during build if `MTD_NETDIAG` is used. -ifeq ($(MTD_NETDIAG),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1 -endif - -ifeq ($(MULTIPLE_INSTANCE),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1 -endif - -ifeq ($(NEIGHBOR_DISCOVERY_AGENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=1 -endif - -ifeq ($(NETDATA_PUBLISHER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=1 -endif - -ifeq ($(NETDIAG_CLIENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE=1 -endif - -ifeq ($(PING_SENDER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_PING_SENDER_ENABLE=1 -endif - -ifeq ($(PLATFORM_UDP),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1 -endif - -# Enable features only required for reference device during certification. -ifeq ($(REFERENCE_DEVICE),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=1 -endif - -ifeq ($(SERVICE),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1 -endif - -ifeq ($(SLAAC),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1 -endif - -ifeq ($(SNTP_CLIENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1 -endif - -ifeq ($(SRP_CLIENT),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1 -endif - -ifeq ($(SRP_SERVER),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1 -endif - -ifeq ($(TCP),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TCP_ENABLE=1 -endif - -ifeq ($(THREAD_VERSION),1.1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=2 -else ifeq ($(THREAD_VERSION),1.2) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=3 -else ifeq ($(THREAD_VERSION),1.3) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=4 -else ifeq ($(THREAD_VERSION),1.3.1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_THREAD_VERSION=5 -endif - -ifeq ($(TIME_SYNC),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_TIME_SYNC_ENABLE=1 -DOPENTHREAD_CONFIG_MAC_HEADER_IE_SUPPORT=1 -endif - -ifeq ($(TREL),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1 -endif - -ifeq ($(UDP_FORWARD),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1 -endif - -ifeq ($(UPTIME),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_UPTIME_ENABLE=1 -endif - -ifeq ($(DISABLE_BUILTIN_MBEDTLS),1) -configure_OPTIONS += --disable-builtin-mbedtls -endif - -ifneq ($(BUILTIN_MBEDTLS_MANAGEMENT),) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=$(BUILTIN_MBEDTLS_MANAGEMENT) -endif - -ifeq ($(DISABLE_EXECUTABLE),1) -configure_OPTIONS += --enable-executable=no -endif - -ifeq ($(DEBUG_UART),1) -CFLAGS += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1 -CXXFLAGS += -DOPENTHREAD_CONFIG_ENABLE_DEBUG_UART=1 -endif - -ifeq ($(DEBUG_UART_LOG),1) -CFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART -CXXFLAGS += -DOPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_DEBUG_UART -endif - -ifeq ($(SETTINGS_RAM),1) -COMMONCFLAGS += -DOPENTHREAD_SETTINGS_RAM=1 -endif - -ifeq ($(OTNS),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_OTNS_ENABLE=1 -endif - -ifneq ($(SPINEL_ENCRYPTER_LIBS),) -configure_OPTIONS += --with-ncp-spinel-encrypter-libs=$(SPINEL_ENCRYPTER_LIBS) -endif - -COMMONCFLAGS += -DOPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=${RCP_RESTORATION_MAX_COUNT} - -ifeq ($(FULL_LOGS),1) -COMMONCFLAGS += -DOPENTHREAD_CONFIG_LOG_LEVEL=OT_LOG_LEVEL_DEBG -DOPENTHREAD_CONFIG_LOG_PREPEND_LEVEL=1 -endif diff --git a/examples/platforms/Makefile.platform.am b/examples/platforms/Makefile.platform.am deleted file mode 100644 index 71b82b0c2..000000000 --- a/examples/platforms/Makefile.platform.am +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 2017, The OpenThread Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -# -# This utility Makefile is included by the application Makefile.am as follows: -# -# include $(top_srcdir)/examples/platforms/Makefile.platform.am -# -# It will automatically set required flags and libraries to link based on -# the selected platform and feature options set via configure. -# - -CPPFLAGS_COMMON = $(NULL) -LDADD_COMMON = $(NULL) -LDFLAGS_COMMON = $(NULL) -SOURCES_COMMON = $(NULL) -LIBTOOLFLAGS_COMMON = --preserve-dup-deps - -if OPENTHREAD_EXAMPLES_SIMULATION -include $(top_srcdir)/examples/platforms/simulation/Makefile.platform.am -endif diff --git a/examples/platforms/simulation/Makefile.platform.am b/examples/platforms/simulation/Makefile.platform.am deleted file mode 100644 index d2cb725a9..000000000 --- a/examples/platforms/simulation/Makefile.platform.am +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2017, The OpenThread Authors. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -# -# Simulation platform-specific Makefile -# - -LDADD_COMMON += \ - $(top_builddir)/examples/platforms/simulation/libopenthread-simulation.a \ - $(NULL) - -if OPENTHREAD_TARGET_LINUX -LDADD_COMMON += \ - -lrt \ - $(NULL) -endif diff --git a/script/bootstrap b/script/bootstrap index 45f2f7597..c79481744 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -56,7 +56,7 @@ install_packages_apt() # apt-get update and install dependencies sudo apt-get update - sudo apt-get --no-install-recommends install -y automake g++ libtool lsb-release make cmake ninja-build shellcheck + sudo apt-get --no-install-recommends install -y g++ lsb-release cmake ninja-build shellcheck echo 'Installing GNU Arm Embedded Toolchain...' @@ -94,7 +94,7 @@ install_packages_brew() echo 'Installing toolchain dependencies...' # add build tools - brew install automake libtool cmake ninja shfmt shellcheck + brew install cmake ninja shfmt shellcheck echo 'Installing GNU Arm Embedded Toolchain...'