[Feature][ZXW-136]merge P50U04 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I7b6a8e22777591bc7a9ede91d6695d9415116f81
diff --git a/ap/app/nvro_tool/main.c b/ap/app/nvro_tool/main.c
index 681e236..35f6fd3 100755
--- a/ap/app/nvro_tool/main.c
+++ b/ap/app/nvro_tool/main.c
@@ -14,6 +14,7 @@
         printf("%s backup\n", argv[0]);
         printf("%s restore\n", argv[0]);
         printf("%s check\n", argv[0]);
+        printf("%s getflag\n", argv[0]);
         return -1;
     }
     if (argc > 1 && (strcmp("backup", argv[1])==0))
@@ -63,6 +64,26 @@
             return -1;
         }
     }
+    if (argc > 1 && (strcmp("getflag", argv[1])==0))
+    {
+        nvro_flag = flags_get_nvroflag();
+        switch (nvro_flag)
+        {
+        case NVRO_INIT:
+            printf("nvro_flag init:%08x\n", nvro_flag);
+            break;
+        case NVRO_BACKED_UP:
+            printf("nvro_flag backed up:%08x\n", nvro_flag);
+            break;
+        case NVRO_RESTORING:
+            printf("nvro_flag restoring:%08x\n", nvro_flag);
+            break;
+        default:
+            printf("nvro_flag invalid:%08x\n", nvro_flag);
+            break;
+        }
+        return 0;
+    }
 
     return -1;
 }