Преглед изворни кода

lk: disable debug/pal log

Signed-off-by: svoboda18 <dev.svoboda18@gmail.com>
svoboda18 пре 2 година
родитељ
комит
7bcb307ecf
4 измењених фајлова са 13 додато и 11 уклоњено
  1. 8 6
      include/debug.h
  2. 1 1
      platform/mt6580/rules.mk
  3. 3 3
      platform/pal/inc/pal_log.h
  4. 1 1
      target/X5/rules.mk

+ 8 - 6
include/debug.h

@@ -33,11 +33,7 @@
 extern "C" {
 #endif
 
-#if defined(DEBUG)
-#define DEBUGLEVEL DEBUG
-#else
-#define DEBUGLEVEL 2
-#endif
+#define DEBUGLEVEL 0
 
 /* debug levels */
 #define CRITICAL 0
@@ -51,11 +47,17 @@ int _dputs(const char *str);
 int _dprintf(const char *fmt, ...) __PRINTFLIKE(1, 2);
 int _dvprintf(const char *fmt, va_list ap);
 
+#if DEBUGLEVEL
 #define dputc(level, str) do { if ((level) <= DEBUGLEVEL) { _dputc(str); } } while (0)
 #define dputs(level, str) do { if ((level) <= DEBUGLEVEL) { _dputs(str); } } while (0)
 #define dprintf(level, x...) do { if ((level) <= DEBUGLEVEL) { _dprintf(x); } } while (0)
 #define dvprintf(level, x...) do { if ((level) <= DEBUGLEVEL) { _dvprintf(x); } } while (0)
-
+#else
+#define dputc(level, str)
+#define dputs(level, str)
+#define dprintf(level, x...)
+#define dvprintf(level, x...)
+#endif
 /* input */
 int dgetc(char *c, bool wait);
 

+ 1 - 1
platform/mt6580/rules.mk

@@ -259,4 +259,4 @@ MTK_RC_TO_VENDOR ?= yes
 
 LINKER_SCRIPT += $(BUILDDIR)/system-onesegment.ld
 
-CFG_LOG_STORE_SUPPORT := yes
+CFG_LOG_STORE_SUPPORT := no

+ 3 - 3
platform/pal/inc/pal_log.h

@@ -47,9 +47,9 @@
 #define LOG_LEVEL_INFO       (3)
 #define LOG_LEVEL_DEBUG      (4)
 
-#define BUILD_ERR_LOG        (1)
-#define BUILD_WARN_LOG       (1)
-#define BUILD_INFO_LOG       (1)
+#define BUILD_ERR_LOG        (0)
+#define BUILD_WARN_LOG       (0)
+#define BUILD_INFO_LOG       (0)
 #define BUILD_DEBUG_LOG      (0)
 
 /* macros */

+ 1 - 1
target/X5/rules.mk

@@ -44,7 +44,7 @@ SCRATCH_SIZE     := 0x08000000 # 128MB
 HAVE_CACHE_PL310 := no
 MTK_LM_MODE := no
 MTK_FASTBOOT_SUPPORT := yes
-LK_PROFILING := yes
+LK_PROFILING := no
 DEVICE_TREE_SUPPORT := yes
 MTK_JTAG_SWITCH_SUPPORT := yes