Explorar o código

Make MD5 check configurable via Kconfig

Jiacheng Guo %!s(int64=3) %!d(string=hai) anos
pai
achega
81d28ed085
Modificáronse 2 ficheiros con 9 adicións e 2 borrados
  1. 2 2
      CMakeLists.txt
  2. 7 0
      Kconfig

+ 2 - 2
CMakeLists.txt

@@ -46,6 +46,6 @@ else()
 
 endif()
 
-if(DEFINED MD5_ENABLED)
-    target_compile_definitions(${target} PRIVATE -DMD5_ENABLED=${MD5_ENABLED})
+if(DEFINED MD5_ENABLED OR CONFIG_SERIAL_FLASHER_MD5_ENABLED)
+    target_compile_definitions(${target} PUBLIC -DMD5_ENABLED=1)
 endif()

+ 7 - 0
Kconfig

@@ -0,0 +1,7 @@
+menu "ESP serial flasher"
+    config SERIAL_FLASHER_MD5_ENABLED
+        bool "Enable MD5 check"
+        default y
+        help
+            Select this option to enable MD5 hashsum check after flashing.
+endmenu