You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/12/03 01:02:25 UTC

incubator-mynewt-core git commit: MYNEWT-491 Fix boot loader

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 63ce485ff -> a3830e2b4


MYNEWT-491 Fix boot loader

The boot loader was always crashing on start up.

The previous commit for this ticket
(259c670486422dd9beb891d403e700af08189eb6) assumed sysinit would always
run.  This assumption is wrong in the case of the boot loader.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a3830e2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a3830e2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a3830e2b

Branch: refs/heads/develop
Commit: a3830e2b4b8e17e527b7a2b984bcc98764c59939
Parents: 63ce485
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Dec 2 17:00:42 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Fri Dec 2 17:00:42 2016 -0800

----------------------------------------------------------------------
 apps/boot/syscfg.yml                  | 3 +++
 sys/sysinit/include/sysinit/sysinit.h | 4 ++++
 sys/sysinit/syscfg.yml                | 4 ++++
 3 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a3830e2b/apps/boot/syscfg.yml
----------------------------------------------------------------------
diff --git a/apps/boot/syscfg.yml b/apps/boot/syscfg.yml
index c9e25ed..b8ce81d 100644
--- a/apps/boot/syscfg.yml
+++ b/apps/boot/syscfg.yml
@@ -25,3 +25,6 @@ syscfg.defs:
     BOOT_SERIAL:
         description: 'TBD'
         value: 0
+
+syscfg.vals:
+    SYSINIT_CONSTRAIN_INIT: 0

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a3830e2b/sys/sysinit/include/sysinit/sysinit.h
----------------------------------------------------------------------
diff --git a/sys/sysinit/include/sysinit/sysinit.h b/sys/sysinit/include/sysinit/sysinit.h
index 5eb915b..32839aa 100644
--- a/sys/sysinit/include/sysinit/sysinit.h
+++ b/sys/sysinit/include/sysinit/sysinit.h
@@ -62,7 +62,11 @@ void MYNEWT_VAL(SYSINIT_PANIC_FN)(const char *file, int line);
  * ensure packages don't get initialized a second time after system
  * initialization has completed.
  */
+#if MYNEWT_VAL(SYSINIT_CONSTRAIN_INIT)
 #define SYSINIT_ASSERT_ACTIVE() assert(sysinit_active)
+#else
+#define SYSINIT_ASSERT_ACTIVE()
+#endif
 
 #if MYNEWT_VAL(SPLIT_LOADER)
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a3830e2b/sys/sysinit/syscfg.yml
----------------------------------------------------------------------
diff --git a/sys/sysinit/syscfg.yml b/sys/sysinit/syscfg.yml
index a94b8fd..09ece65 100644
--- a/sys/sysinit/syscfg.yml
+++ b/sys/sysinit/syscfg.yml
@@ -22,3 +22,7 @@ syscfg.defs:
     SYSINIT_PANIC_FN:
         description: 'TBD'
         value:
+
+    SYSINIT_CONSTRAIN_INIT:
+        description: Only allow packages to be initialized by sysinit.
+        value: 1