You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/09/28 20:11:14 UTC

[mynewt-core] branch master updated: lwip: Move lwipopts.h to separate package

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new d845ed0b8 lwip: Move lwipopts.h to separate package
d845ed0b8 is described below

commit d845ed0b82028c34eba582fb64cdf29eee128c12
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Mon Sep 19 18:46:37 2022 +0200

    lwip: Move lwipopts.h to separate package
    
    lwipopts.h is a header that is included by lwip stack.
    It has various configuration options.
    Repository options may not be best for customer application.
    To allow for configuration option change without having to
    keep lwipopts.h modified it would be nice to eliminate
    default (repository) version. The easiest way for this
    in mynewt is to have this file in separate package (included
    by default). If used wants to have different settings
    it's enough to copy lwipopts.h to application files and
    set STD_LWIPOPTS=0 so default file will not be used
---
 net/ip/lwip_mn/{ => lwipopts}/include/lwipopts.h |  0
 net/ip/lwip_mn/{syscfg.yml => lwipopts/pkg.yml}  | 17 +++++++----------
 net/ip/lwip_mn/pkg.yml                           |  3 +++
 net/ip/lwip_mn/syscfg.yml                        |  5 +++++
 4 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/net/ip/lwip_mn/include/lwipopts.h b/net/ip/lwip_mn/lwipopts/include/lwipopts.h
similarity index 100%
rename from net/ip/lwip_mn/include/lwipopts.h
rename to net/ip/lwip_mn/lwipopts/include/lwipopts.h
diff --git a/net/ip/lwip_mn/syscfg.yml b/net/ip/lwip_mn/lwipopts/pkg.yml
similarity index 75%
copy from net/ip/lwip_mn/syscfg.yml
copy to net/ip/lwip_mn/lwipopts/pkg.yml
index c76bb690f..5d626422a 100644
--- a/net/ip/lwip_mn/syscfg.yml
+++ b/net/ip/lwip_mn/lwipopts/pkg.yml
@@ -1,3 +1,4 @@
+#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -16,13 +17,9 @@
 # under the License.
 #
 
-syscfg.defs:
-    LWIP_CLI:
-        description: 'CLI for interacting with LwIP'
-        value: 1
-        restrictions:
-          - SHELL_TASK
-    IP_SYSINIT_STAGE:
-        description: >
-            Sysinit stage for the IP stack.
-        value: 200
+pkg.name: net/ip/lwip_mn/lwipopts
+pkg.description: Package with default lwipopts.h
+pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
+pkg.homepage:
+pkg.keywords:
+    - lwip
diff --git a/net/ip/lwip_mn/pkg.yml b/net/ip/lwip_mn/pkg.yml
index 6532b7f49..0cc4c9256 100644
--- a/net/ip/lwip_mn/pkg.yml
+++ b/net/ip/lwip_mn/pkg.yml
@@ -32,5 +32,8 @@ pkg.deps:
 pkg.deps.LWIP_CLI:
     - "@apache-mynewt-core/sys/shell"
 
+pkg.deps.STD_LWIPOPTS:
+    - "@apache-mynewt-core/net/ip/lwip_mn/lwipopts"
+
 pkg.init:
     ip_init: 'MYNEWT_VAL(IP_SYSINIT_STAGE)'
diff --git a/net/ip/lwip_mn/syscfg.yml b/net/ip/lwip_mn/syscfg.yml
index c76bb690f..ad74f035a 100644
--- a/net/ip/lwip_mn/syscfg.yml
+++ b/net/ip/lwip_mn/syscfg.yml
@@ -26,3 +26,8 @@ syscfg.defs:
         description: >
             Sysinit stage for the IP stack.
         value: 200
+
+    STD_LWIPOPTS:
+        description: >
+            Adds standard lwipopts.h, suitable for start playing with LWIP.
+        value: 1