Merge branch '2021-10-12-assorted-fixes-and-updates'
[platform/kernel/u-boot.git] / lib / hang.c
index c5a7869..2735774 100644 (file)
@@ -9,6 +9,8 @@
 
 #include <common.h>
 #include <bootstage.h>
+#include <hang.h>
+#include <os.h>
 
 /**
  * hang - stop processing by staying in an endless loop
@@ -22,10 +24,12 @@ void hang(void)
 {
 #if !defined(CONFIG_SPL_BUILD) || \
                (CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \
-                CONFIG_IS_ENABLED(SERIAL_SUPPORT))
+                CONFIG_IS_ENABLED(SERIAL))
        puts("### ERROR ### Please RESET the board ###\n");
 #endif
        bootstage_error(BOOTSTAGE_ID_NEED_RESET);
+       if (IS_ENABLED(CONFIG_SANDBOX))
+               os_exit(1);
        for (;;)
                ;
 }