This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git
The following commit(s) were added to refs/heads/master by this push:
new f6d58e2 Use syscfg settings for sysinit stage numbers This allows the
app or target to rearrange package initialziation order via syscfg overrides
f6d58e2 is described below
commit f6d58e20bd07162912fa75e7877cc4d35106b210
Author: Philip Burkhardt <[email protected]>
AuthorDate: Tue Jan 31 13:56:38 2023 -0800
Use syscfg settings for sysinit stage numbers
This allows the app or target to rearrange package initialziation order via
syscfg overrides
---
cmd/img_mgmt/port/mynewt/pkg.yml | 2 +-
cmd/img_mgmt/port/mynewt/syscfg.yml | 3 +++
cmd/log_mgmt/port/mynewt/pkg.yml | 2 +-
cmd/log_mgmt/port/mynewt/syscfg.yml | 5 +++++
cmd/os_mgmt/pkg.yml | 2 +-
cmd/os_mgmt/syscfg.yml | 5 +++++
cmd/stat_mgmt/port/mynewt/pkg.yml | 2 +-
.../mynewt/pkg.yml => stat_mgmt/port/mynewt/syscfg.yml} | 17 +++++------------
8 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/cmd/img_mgmt/port/mynewt/pkg.yml b/cmd/img_mgmt/port/mynewt/pkg.yml
index abe4c81..171743e 100644
--- a/cmd/img_mgmt/port/mynewt/pkg.yml
+++ b/cmd/img_mgmt/port/mynewt/pkg.yml
@@ -29,4 +29,4 @@ pkg.deps:
- '@apache-mynewt-core/sys/log/modlog'
pkg.init:
- img_mgmt_module_init: 501
+ img_mgmt_module_init: 'MYNEWT_VAL(IMG_MGMT_SYSINIT_STAGE)'
diff --git a/cmd/img_mgmt/port/mynewt/syscfg.yml
b/cmd/img_mgmt/port/mynewt/syscfg.yml
index 4d09eba..35c68ce 100644
--- a/cmd/img_mgmt/port/mynewt/syscfg.yml
+++ b/cmd/img_mgmt/port/mynewt/syscfg.yml
@@ -23,6 +23,9 @@ syscfg.defs:
IMG_MGMT_LOG_LVL:
description: 'Minimum level for the image management structured log.'
value: 15 # Log disabled by default.
+ IMG_MGMT_SYSINIT_STAGE:
+ description: System initalization stage for IMG_MGMT package
+ value: 501
syscfg.logs:
IMG_MGMT_LOG:
diff --git a/cmd/log_mgmt/port/mynewt/pkg.yml b/cmd/log_mgmt/port/mynewt/pkg.yml
index 6996e7d..0fded13 100644
--- a/cmd/log_mgmt/port/mynewt/pkg.yml
+++ b/cmd/log_mgmt/port/mynewt/pkg.yml
@@ -28,4 +28,4 @@ pkg.deps:
- '@apache-mynewt-mcumgr/mgmt'
pkg.init:
- log_mgmt_module_init: 501
+ log_mgmt_module_init: 'MYNEWT_VAL(LOG_MGMT_SYSINIT_STAGE)'
diff --git a/cmd/log_mgmt/port/mynewt/syscfg.yml
b/cmd/log_mgmt/port/mynewt/syscfg.yml
index 7ab39d9..c155b2b 100644
--- a/cmd/log_mgmt/port/mynewt/syscfg.yml
+++ b/cmd/log_mgmt/port/mynewt/syscfg.yml
@@ -37,6 +37,11 @@ syscfg.defs:
management commands.
value: 64
+ LOG_MGMT_SYSINIT_STAGE:
+ description: >
+ System Initalization stage for LOG MGMT package
+ value: 501
+
# For backwards compatibility with log nmgr
syscfg.vals.LOG_NMGR_MAX_RSP_LEN:
LOG_MGMT_MAX_RSP_SIZE: MYNEWT_VAL(LOG_NMGR_MAX_RSP_LEN)
diff --git a/cmd/os_mgmt/pkg.yml b/cmd/os_mgmt/pkg.yml
index 7e79da1..9c2d16a 100644
--- a/cmd/os_mgmt/pkg.yml
+++ b/cmd/os_mgmt/pkg.yml
@@ -33,4 +33,4 @@ pkg.ign_files:
- "stubs.c"
pkg.init:
- os_mgmt_module_init: 501
+ os_mgmt_module_init: 'MYNEWT_VAL(OS_MGMT_SYSINIT_STAGE)'
diff --git a/cmd/os_mgmt/syscfg.yml b/cmd/os_mgmt/syscfg.yml
index ef6bb0b..4707559 100644
--- a/cmd/os_mgmt/syscfg.yml
+++ b/cmd/os_mgmt/syscfg.yml
@@ -34,3 +34,8 @@ syscfg.defs:
description: >
Enable support for echo command.
value: 1
+
+ OS_MGMT_SYSINIT_STAGE:
+ description: >
+ System Initialization stage for OS_MGMT package
+ value: 501
diff --git a/cmd/stat_mgmt/port/mynewt/pkg.yml
b/cmd/stat_mgmt/port/mynewt/pkg.yml
index fc9e87d..23bbc5e 100644
--- a/cmd/stat_mgmt/port/mynewt/pkg.yml
+++ b/cmd/stat_mgmt/port/mynewt/pkg.yml
@@ -28,4 +28,4 @@ pkg.deps:
- '@apache-mynewt-mcumgr/mgmt'
pkg.init:
- stat_mgmt_module_init: 501
+ stat_mgmt_module_init: 'MYNEWT_VAL(STAT_MGMT_SYSINIT_STAGE)'
diff --git a/cmd/log_mgmt/port/mynewt/pkg.yml
b/cmd/stat_mgmt/port/mynewt/syscfg.yml
similarity index 70%
copy from cmd/log_mgmt/port/mynewt/pkg.yml
copy to cmd/stat_mgmt/port/mynewt/syscfg.yml
index 6996e7d..7b704ed 100644
--- a/cmd/log_mgmt/port/mynewt/pkg.yml
+++ b/cmd/stat_mgmt/port/mynewt/syscfg.yml
@@ -17,15 +17,8 @@
# under the License.
#
-pkg.name: cmd/log_mgmt/port/mynewt
-pkg.description: 'Log management command handlers for mcumgr.'
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-
-pkg.deps:
- - '@apache-mynewt-mcumgr/cmd/log_mgmt'
- - '@apache-mynewt-mcumgr/mgmt'
-
-pkg.init:
- log_mgmt_module_init: 501
+syscfg.defs:
+ STAT_MGMT_SYSINIT_STAGE:
+ description: >
+ System Initialization stage for STAT_MGMT package
+ value: 501