[Feature][ZXW-179]merge P52U02 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: I4fa8f86757e71388ae88400914dae8b50cd00338
diff --git a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_mdl_ab.c b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_mdl_ab.c
index d06ec00..cb86245 100755
--- a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_mdl_ab.c
+++ b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_mdl_ab.c
@@ -104,6 +104,11 @@
 //unsigned int g_uiDebugLevel = UBOOT_NOTICE;
 extern int copy_ddr_allbin(void);
 
+#define CRC_LE_BITS 64
+#define CRC32_POLY_LE 0xedb88320
+#define LE_TABLE_ROWS (CRC_LE_BITS/8)
+#define LE_TABLE_SIZE 256
+static unsigned int crc32table_le[LE_TABLE_ROWS][256];
 /*******************************************************************************
  * Function:	board_init
  * Description:
@@ -384,6 +389,94 @@
 }
 
 #ifdef CONFIG_ZX297520V3E_MDL_AB
+/*crc32*/
+static void crc32init_le_generic(const unsigned int polynomial, unsigned int (*tab)[256])
+{
+	unsigned i, j;
+	unsigned int crc = 1;
+
+	tab[0][0] = 0;
+
+	for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) {
+		crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
+		for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
+			tab[0][i + j] = crc ^ tab[0][j];
+	}
+	for (i = 0; i < LE_TABLE_SIZE; i++) {
+		crc = tab[0][i];
+		for (j = 1; j < LE_TABLE_ROWS; j++) {
+			crc = tab[0][crc & 0xff] ^ (crc >> 8);
+			tab[j][i] = crc;
+		}
+	}
+}
+
+void crc32init_le(void)
+{
+	crc32init_le_generic(CRC32_POLY_LE, crc32table_le);
+}
+
+static unsigned int crc32_body(unsigned int crc, unsigned char const *buf, size_t len, const unsigned int (*tab)[256])
+{
+#define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
+#define DO_CRC4 (t3[(q) & 255] ^ t2[(q >> 8) & 255] ^ \
+		   t1[(q >> 16) & 255] ^ t0[(q >> 24) & 255])
+#define DO_CRC8 (t7[(q) & 255] ^ t6[(q >> 8) & 255] ^ \
+		   t5[(q >> 16) & 255] ^ t4[(q >> 24) & 255])
+
+	const unsigned int *b;
+	size_t    rem_len;
+
+	const unsigned int *t0=tab[0], *t1=tab[1], *t2=tab[2], *t3=tab[3];
+	const unsigned int *t4 = tab[4], *t5 = tab[5], *t6 = tab[6], *t7 = tab[7];
+	unsigned int q;
+	
+	if ((long)buf & 3 && len)
+	{
+		do
+		{
+			DO_CRC(*buf++);
+		} while ((--len) && ((long)buf)&3);
+	}
+	
+	rem_len = len & 7;
+	len = len >> 3;
+	b = (const unsigned int *)buf;
+	
+	for (--b; len; --len)
+	{
+		q = crc ^ *++b;
+		crc = DO_CRC8;
+		q = *++b;
+		crc ^= DO_CRC4;
+	}
+	
+	len = rem_len;
+	if (len)
+	{
+		unsigned char *p = (unsigned char *)(b + 1) - 1;
+		do
+		{
+			DO_CRC(*++p); /* use pre increment for speed */
+		} while (--len);
+	}
+	
+	return crc;
+#undef DO_CRC
+#undef DO_CRC4
+#undef DO_CRC8
+}
+
+static unsigned int crc32_le_generic(unsigned int crc, unsigned char const *p, size_t len, const unsigned int (*tab)[256])
+{
+	crc = crc32_body(crc, p, len, tab);
+	return crc;
+}
+
+unsigned int crc32_le(unsigned int crc, unsigned char const *p, size_t len)
+{
+	return crc32_le_generic(crc, p, len, (const unsigned int (*)[256])crc32table_le);
+}
 static uint32_t page_align(uint32_t offset)
 {
 	struct flash_ops *flash = NULL;
@@ -414,6 +507,8 @@
 	system_status.status = DUALSYSTEM_STATUS_UNBOOTABLE;
 	u32 fota_size = sizeof(T_FLAGS_INFO);
 	fota_size = page_align(fota_size);
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
 	
 	nand_info_t *nand = &nand_info[nand_curr_device];
 	struct fsl_qspi *nor = &spi_nor_flash;
@@ -444,7 +539,12 @@
 	fotaFlagInfo.boot_fota_flag.system2.status = DUALSYSTEM_STATUS_BOOTABLE;
     fotaFlagInfo.boot_env.dualsys_type = DUALSYSTEM_AB;
 	fotaFlagInfo.magic_end = FLAGS_MAGIC;
-	
+	/*crc32*/
+	fotaFlagInfo.crc32 = 0;
+	crc32init_le();
+	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+	fotaFlagInfo.crc32 = crc;
+
 	/*дÈëflags·ÖÇø*/
 	if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 	{
@@ -571,6 +671,9 @@
 	flash = get_flash_ops();
 	type = read_boot_flashtype();
 
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
+	
 	/* ѰÕÒ·ÖÇø */
 	partition_entry_t * entry = find_partition_para(flags_name);
 	if( entry == NULL )
@@ -595,6 +698,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM2;
 		fotaFlagInfo.boot_fota_flag.system = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
@@ -692,6 +800,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM;
 		fotaFlagInfo.boot_fota_flag.system2 = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
diff --git a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc.c b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc.c
index 79c0241..0e5d5a7 100755
--- a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc.c
+++ b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc.c
@@ -104,6 +104,11 @@
 //unsigned int g_uiDebugLevel = UBOOT_NOTICE;
 extern int copy_ddr_allbin(void);
 
+#define CRC_LE_BITS 64
+#define CRC32_POLY_LE 0xedb88320
+#define LE_TABLE_ROWS (CRC_LE_BITS/8)
+#define LE_TABLE_SIZE 256
+static unsigned int crc32table_le[LE_TABLE_ROWS][256];
 /*******************************************************************************
  * Function:	board_init
  * Description:
@@ -384,6 +389,95 @@
 }
 
 #ifdef CONFIG_ZX297520V3E_VEHICLE_DC
+/*crc32*/
+static void crc32init_le_generic(const unsigned int polynomial, unsigned int (*tab)[256])
+{
+	unsigned i, j;
+	unsigned int crc = 1;
+
+	tab[0][0] = 0;
+
+	for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) {
+		crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
+		for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
+			tab[0][i + j] = crc ^ tab[0][j];
+	}
+	for (i = 0; i < LE_TABLE_SIZE; i++) {
+		crc = tab[0][i];
+		for (j = 1; j < LE_TABLE_ROWS; j++) {
+			crc = tab[0][crc & 0xff] ^ (crc >> 8);
+			tab[j][i] = crc;
+		}
+	}
+}
+
+void crc32init_le(void)
+{
+	crc32init_le_generic(CRC32_POLY_LE, crc32table_le);
+}
+
+static unsigned int crc32_body(unsigned int crc, unsigned char const *buf, size_t len, const unsigned int (*tab)[256])
+{
+#define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
+#define DO_CRC4 (t3[(q) & 255] ^ t2[(q >> 8) & 255] ^ \
+		   t1[(q >> 16) & 255] ^ t0[(q >> 24) & 255])
+#define DO_CRC8 (t7[(q) & 255] ^ t6[(q >> 8) & 255] ^ \
+		   t5[(q >> 16) & 255] ^ t4[(q >> 24) & 255])
+
+	const unsigned int *b;
+	size_t    rem_len;
+
+	const unsigned int *t0=tab[0], *t1=tab[1], *t2=tab[2], *t3=tab[3];
+	const unsigned int *t4 = tab[4], *t5 = tab[5], *t6 = tab[6], *t7 = tab[7];
+	unsigned int q;
+	
+	if ((long)buf & 3 && len)
+	{
+		do
+		{
+			DO_CRC(*buf++);
+		} while ((--len) && ((long)buf)&3);
+	}
+	
+	rem_len = len & 7;
+	len = len >> 3;
+	b = (const unsigned int *)buf;
+	
+	for (--b; len; --len)
+	{
+		q = crc ^ *++b;
+		crc = DO_CRC8;
+		q = *++b;
+		crc ^= DO_CRC4;
+	}
+	
+	len = rem_len;
+	if (len)
+	{
+		unsigned char *p = (unsigned char *)(b + 1) - 1;
+		do
+		{
+			DO_CRC(*++p); /* use pre increment for speed */
+		} while (--len);
+	}
+	
+	return crc;
+#undef DO_CRC
+#undef DO_CRC4
+#undef DO_CRC8
+}
+
+static unsigned int crc32_le_generic(unsigned int crc, unsigned char const *p, size_t len, const unsigned int (*tab)[256])
+{
+	crc = crc32_body(crc, p, len, tab);
+	return crc;
+}
+
+unsigned int crc32_le(unsigned int crc, unsigned char const *p, size_t len)
+{
+	return crc32_le_generic(crc, p, len, (const unsigned int (*)[256])crc32table_le);
+}
+
 static uint32_t page_align(uint32_t offset)
 {
 	struct flash_ops *flash = NULL;
@@ -414,6 +508,8 @@
 	system_status.status = DUALSYSTEM_STATUS_UNBOOTABLE;
 	u32 fota_size = sizeof(T_FLAGS_INFO);
 	fota_size = page_align(fota_size);
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
 	
 	nand_info_t *nand = &nand_info[nand_curr_device];
 	struct fsl_qspi *nor = &spi_nor_flash;
@@ -444,7 +540,12 @@
 	fotaFlagInfo.boot_fota_flag.system2.status = DUALSYSTEM_STATUS_BOOTABLE;
     fotaFlagInfo.boot_env.dualsys_type = DUALSYSTEM_AB;
 	fotaFlagInfo.magic_end = FLAGS_MAGIC;
-	
+	/*crc32*/
+	fotaFlagInfo.crc32 = 0;
+	crc32init_le();
+	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+	fotaFlagInfo.crc32 = crc;
+
 	/*дÈëflags·ÖÇø*/
 	if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 	{
@@ -571,6 +672,9 @@
 	flash = get_flash_ops();
 	type = read_boot_flashtype();
 
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
+	
 	/* ѰÕÒ·ÖÇø */
 	partition_entry_t * entry = find_partition_para(flags_name);
 	if( entry == NULL )
@@ -595,6 +699,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM2;
 		fotaFlagInfo.boot_fota_flag.system = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
@@ -692,6 +801,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM;
 		fotaFlagInfo.boot_fota_flag.system2 = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
diff --git a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc_ref.c b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc_ref.c
index e3004ae..8c0b388 100755
--- a/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc_ref.c
+++ b/boot/common/src/uboot/board/zte/zx297520v3/zx297520v3_vehicle_dc_ref.c
@@ -104,6 +104,11 @@
 //unsigned int g_uiDebugLevel = UBOOT_NOTICE;
 extern int copy_ddr_allbin(void);
 
+#define CRC_LE_BITS 64
+#define CRC32_POLY_LE 0xedb88320
+#define LE_TABLE_ROWS (CRC_LE_BITS/8)
+#define LE_TABLE_SIZE 256
+static unsigned int crc32table_le[LE_TABLE_ROWS][256];
 /*******************************************************************************
  * Function:	board_init
  * Description:
@@ -384,6 +389,95 @@
 }
 
 #ifdef CONFIG_ZX297520V3E_VEHICLE_DC_REF
+/*crc32*/
+static void crc32init_le_generic(const unsigned int polynomial, unsigned int (*tab)[256])
+{
+	unsigned i, j;
+	unsigned int crc = 1;
+
+	tab[0][0] = 0;
+
+	for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) {
+		crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
+		for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
+			tab[0][i + j] = crc ^ tab[0][j];
+	}
+	for (i = 0; i < LE_TABLE_SIZE; i++) {
+		crc = tab[0][i];
+		for (j = 1; j < LE_TABLE_ROWS; j++) {
+			crc = tab[0][crc & 0xff] ^ (crc >> 8);
+			tab[j][i] = crc;
+		}
+	}
+}
+
+void crc32init_le(void)
+{
+	crc32init_le_generic(CRC32_POLY_LE, crc32table_le);
+}
+
+static unsigned int crc32_body(unsigned int crc, unsigned char const *buf, size_t len, const unsigned int (*tab)[256])
+{
+#define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
+#define DO_CRC4 (t3[(q) & 255] ^ t2[(q >> 8) & 255] ^ \
+		   t1[(q >> 16) & 255] ^ t0[(q >> 24) & 255])
+#define DO_CRC8 (t7[(q) & 255] ^ t6[(q >> 8) & 255] ^ \
+		   t5[(q >> 16) & 255] ^ t4[(q >> 24) & 255])
+
+	const unsigned int *b;
+	size_t    rem_len;
+
+	const unsigned int *t0=tab[0], *t1=tab[1], *t2=tab[2], *t3=tab[3];
+	const unsigned int *t4 = tab[4], *t5 = tab[5], *t6 = tab[6], *t7 = tab[7];
+	unsigned int q;
+	
+	if ((long)buf & 3 && len)
+	{
+		do
+		{
+			DO_CRC(*buf++);
+		} while ((--len) && ((long)buf)&3);
+	}
+	
+	rem_len = len & 7;
+	len = len >> 3;
+	b = (const unsigned int *)buf;
+	
+	for (--b; len; --len)
+	{
+		q = crc ^ *++b;
+		crc = DO_CRC8;
+		q = *++b;
+		crc ^= DO_CRC4;
+	}
+	
+	len = rem_len;
+	if (len)
+	{
+		unsigned char *p = (unsigned char *)(b + 1) - 1;
+		do
+		{
+			DO_CRC(*++p); /* use pre increment for speed */
+		} while (--len);
+	}
+	
+	return crc;
+#undef DO_CRC
+#undef DO_CRC4
+#undef DO_CRC8
+}
+
+static unsigned int crc32_le_generic(unsigned int crc, unsigned char const *p, size_t len, const unsigned int (*tab)[256])
+{
+	crc = crc32_body(crc, p, len, tab);
+	return crc;
+}
+
+unsigned int crc32_le(unsigned int crc, unsigned char const *p, size_t len)
+{
+	return crc32_le_generic(crc, p, len, (const unsigned int (*)[256])crc32table_le);
+}
+
 static uint32_t page_align(uint32_t offset)
 {
 	struct flash_ops *flash = NULL;
@@ -414,6 +508,8 @@
 	system_status.status = DUALSYSTEM_STATUS_UNBOOTABLE;
 	u32 fota_size = sizeof(T_FLAGS_INFO);
 	fota_size = page_align(fota_size);
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
 	
 	nand_info_t *nand = &nand_info[nand_curr_device];
 	struct fsl_qspi *nor = &spi_nor_flash;
@@ -444,7 +540,12 @@
 	fotaFlagInfo.boot_fota_flag.system2.status = DUALSYSTEM_STATUS_BOOTABLE;
     fotaFlagInfo.boot_env.dualsys_type = DUALSYSTEM_AB;
 	fotaFlagInfo.magic_end = FLAGS_MAGIC;
-	
+	/*crc32*/
+	fotaFlagInfo.crc32 = 0;
+	crc32init_le();
+	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+	fotaFlagInfo.crc32 = crc;
+
 	/*дÈëflags·ÖÇø*/
 	if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 	{
@@ -571,6 +672,9 @@
 	flash = get_flash_ops();
 	type = read_boot_flashtype();
 
+	unsigned long crc = 0;
+	u32 crc_size = sizeof(T_FLAGS_INFO);
+	
 	/* ѰÕÒ·ÖÇø */
 	partition_entry_t * entry = find_partition_para(flags_name);
 	if( entry == NULL )
@@ -595,6 +699,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM2;
 		fotaFlagInfo.boot_fota_flag.system = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
@@ -692,6 +801,11 @@
     {
         fotaFlagInfo.boot_fota_flag.boot_to = DUAL_SYSTEM;
 		fotaFlagInfo.boot_fota_flag.system2 = system_status;
+		/*crc32*/
+		fotaFlagInfo.crc32 = 0;
+		crc32init_le();
+    	crc = crc32_le(0,(unsigned char*)(&fotaFlagInfo),crc_size);
+		fotaFlagInfo.crc32 = crc;
 
 		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)
 		{
diff --git a/boot/common/src/uboot/drivers/mtd/nand/zxic_spifc.c b/boot/common/src/uboot/drivers/mtd/nand/zxic_spifc.c
index 844b288..7ba60b1 100755
--- a/boot/common/src/uboot/drivers/mtd/nand/zxic_spifc.c
+++ b/boot/common/src/uboot/drivers/mtd/nand/zxic_spifc.c
@@ -1017,17 +1017,17 @@
             continue;   /* ´«Êäʧ°Ü£¬½áÊø±¾´ÎÑ­»·²¢ÖØ´« */
         }
 
+		if(g_nor_flag == 1)
+		{
+			zDrvGpio_SetOutputValue(GPIO86,GPIO_HIGH);
+		}
+		
         ret = spi_fc_read_fifo(len,value);     /* ¶ÁÈ¡Êý¾Ý */
         if( ret != SUCCESS ) 
         {
             //spi_fc_disable();
             continue;   /* ´«Êäʧ°Ü£¬½áÊø±¾´ÎÑ­»·²¢ÖØ´« */
-        }
-		
-		if(g_nor_flag == 1)
-		{
-			zDrvGpio_SetOutputValue(GPIO86,GPIO_HIGH);
-		}
+        }	
 
         break;        
     } while( --retries != 0 );
diff --git a/boot/prj/zx297520v3/bootrom/dl_off/loader2.bin b/boot/prj/zx297520v3/bootrom/dl_off/loader2.bin
new file mode 100755
index 0000000..f9071ec
--- /dev/null
+++ b/boot/prj/zx297520v3/bootrom/dl_off/loader2.bin
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/dl_off/z-load b/boot/prj/zx297520v3/bootrom/dl_off/z-load
index 03ab4e0..86adcf4 100755
--- a/boot/prj/zx297520v3/bootrom/dl_off/z-load
+++ b/boot/prj/zx297520v3/bootrom/dl_off/z-load
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/dl_off/z-load.map b/boot/prj/zx297520v3/bootrom/dl_off/z-load.map
index 620baa6..4266d98 100755
--- a/boot/prj/zx297520v3/bootrom/dl_off/z-load.map
+++ b/boot/prj/zx297520v3/bootrom/dl_off/z-load.map
@@ -300,35 +300,35 @@
 .stabstr        0x0000000000000000       0x67
  .stabstr       0x0000000000000000       0x67 cpu/m0/start.o
 
-.debug_info     0x0000000000000000     0x33aa
- .debug_info    0x0000000000000000      0x5e3 lib/libarm.a(board.o)
- .debug_info    0x00000000000005e3      0x22b lib/libarm.a(string.o)
- .debug_info    0x000000000000080e      0x329 drivers/libdrivers.a(ddr.o)
- .debug_info    0x0000000000000b37      0x2a0 drivers/libdrivers.a(uart.o)
- .debug_info    0x0000000000000dd7      0x6d3 drivers/libdrivers.a(image.o)
- .debug_info    0x00000000000014aa      0x1c3 drivers/libdrivers.a(efuse.o)
- .debug_info    0x000000000000166d      0x62d drivers/libdrivers.a(secure_verify.o)
- .debug_info    0x0000000000001c9a      0xd5f drivers/libdrivers.a(nor.o)
- .debug_info    0x00000000000029f9      0x1e8 drivers/libdrivers.a(drv_hash.o)
- .debug_info    0x0000000000002be1      0x3b4 drivers/libdrivers.a(drv_rsa.o)
- .debug_info    0x0000000000002f95      0x20f drivers/libdrivers.a(flash.o)
- .debug_info    0x00000000000031a4      0x17b cpu/m0/libm0.a(cpu.o)
- .debug_info    0x000000000000331f       0x8b cpu/m0/libm0.a(clk.o)
+.debug_info     0x0000000000000000     0x340d
+ .debug_info    0x0000000000000000      0x646 lib/libarm.a(board.o)
+ .debug_info    0x0000000000000646      0x22b lib/libarm.a(string.o)
+ .debug_info    0x0000000000000871      0x329 drivers/libdrivers.a(ddr.o)
+ .debug_info    0x0000000000000b9a      0x2a0 drivers/libdrivers.a(uart.o)
+ .debug_info    0x0000000000000e3a      0x6d3 drivers/libdrivers.a(image.o)
+ .debug_info    0x000000000000150d      0x1c3 drivers/libdrivers.a(efuse.o)
+ .debug_info    0x00000000000016d0      0x62d drivers/libdrivers.a(secure_verify.o)
+ .debug_info    0x0000000000001cfd      0xd5f drivers/libdrivers.a(nor.o)
+ .debug_info    0x0000000000002a5c      0x1e8 drivers/libdrivers.a(drv_hash.o)
+ .debug_info    0x0000000000002c44      0x3b4 drivers/libdrivers.a(drv_rsa.o)
+ .debug_info    0x0000000000002ff8      0x20f drivers/libdrivers.a(flash.o)
+ .debug_info    0x0000000000003207      0x17b cpu/m0/libm0.a(cpu.o)
+ .debug_info    0x0000000000003382       0x8b cpu/m0/libm0.a(clk.o)
 
-.debug_abbrev   0x0000000000000000     0x1281
- .debug_abbrev  0x0000000000000000      0x277 lib/libarm.a(board.o)
- .debug_abbrev  0x0000000000000277       0xb7 lib/libarm.a(string.o)
- .debug_abbrev  0x000000000000032e      0x12f drivers/libdrivers.a(ddr.o)
- .debug_abbrev  0x000000000000045d      0x19e drivers/libdrivers.a(uart.o)
- .debug_abbrev  0x00000000000005fb      0x212 drivers/libdrivers.a(image.o)
- .debug_abbrev  0x000000000000080d      0x11d drivers/libdrivers.a(efuse.o)
- .debug_abbrev  0x000000000000092a      0x258 drivers/libdrivers.a(secure_verify.o)
- .debug_abbrev  0x0000000000000b82      0x280 drivers/libdrivers.a(nor.o)
- .debug_abbrev  0x0000000000000e02       0xde drivers/libdrivers.a(drv_hash.o)
- .debug_abbrev  0x0000000000000ee0      0x1e2 drivers/libdrivers.a(drv_rsa.o)
- .debug_abbrev  0x00000000000010c2       0xb5 drivers/libdrivers.a(flash.o)
- .debug_abbrev  0x0000000000001177       0xc8 cpu/m0/libm0.a(cpu.o)
- .debug_abbrev  0x000000000000123f       0x42 cpu/m0/libm0.a(clk.o)
+.debug_abbrev   0x0000000000000000     0x1290
+ .debug_abbrev  0x0000000000000000      0x286 lib/libarm.a(board.o)
+ .debug_abbrev  0x0000000000000286       0xb7 lib/libarm.a(string.o)
+ .debug_abbrev  0x000000000000033d      0x12f drivers/libdrivers.a(ddr.o)
+ .debug_abbrev  0x000000000000046c      0x19e drivers/libdrivers.a(uart.o)
+ .debug_abbrev  0x000000000000060a      0x212 drivers/libdrivers.a(image.o)
+ .debug_abbrev  0x000000000000081c      0x11d drivers/libdrivers.a(efuse.o)
+ .debug_abbrev  0x0000000000000939      0x258 drivers/libdrivers.a(secure_verify.o)
+ .debug_abbrev  0x0000000000000b91      0x280 drivers/libdrivers.a(nor.o)
+ .debug_abbrev  0x0000000000000e11       0xde drivers/libdrivers.a(drv_hash.o)
+ .debug_abbrev  0x0000000000000eef      0x1e2 drivers/libdrivers.a(drv_rsa.o)
+ .debug_abbrev  0x00000000000010d1       0xb5 drivers/libdrivers.a(flash.o)
+ .debug_abbrev  0x0000000000001186       0xc8 cpu/m0/libm0.a(cpu.o)
+ .debug_abbrev  0x000000000000124e       0x42 cpu/m0/libm0.a(clk.o)
 
 .debug_loc      0x0000000000000000     0x1c6c
  .debug_loc     0x0000000000000000       0xcc lib/libarm.a(board.o)
@@ -395,32 +395,32 @@
  .debug_line    0x000000000000130b       0xa7 cpu/m0/libm0.a(cpu.o)
  .debug_line    0x00000000000013b2       0x61 cpu/m0/libm0.a(clk.o)
 
-.debug_str      0x0000000000000000      0xe2b
- .debug_str     0x0000000000000000      0x445 lib/libarm.a(board.o)
-                                        0x4b8 (松开之前的大小)
- .debug_str     0x0000000000000445       0x4c lib/libarm.a(string.o)
+.debug_str      0x0000000000000000      0xe62
+ .debug_str     0x0000000000000000      0x47c lib/libarm.a(board.o)
+                                        0x4f6 (松开之前的大小)
+ .debug_str     0x000000000000047c       0x4c lib/libarm.a(string.o)
                                         0x214 (松开之前的大小)
- .debug_str     0x0000000000000491       0xa1 drivers/libdrivers.a(ddr.o)
+ .debug_str     0x00000000000004c8       0xa1 drivers/libdrivers.a(ddr.o)
                                         0x216 (松开之前的大小)
- .debug_str     0x0000000000000532       0x8a drivers/libdrivers.a(uart.o)
+ .debug_str     0x0000000000000569       0x8a drivers/libdrivers.a(uart.o)
                                         0x253 (松开之前的大小)
- .debug_str     0x00000000000005bc      0x229 drivers/libdrivers.a(image.o)
+ .debug_str     0x00000000000005f3      0x229 drivers/libdrivers.a(image.o)
                                         0x4a0 (松开之前的大小)
- .debug_str     0x00000000000007e5       0x7b drivers/libdrivers.a(efuse.o)
+ .debug_str     0x000000000000081c       0x7b drivers/libdrivers.a(efuse.o)
                                         0x255 (松开之前的大小)
- .debug_str     0x0000000000000860      0x177 drivers/libdrivers.a(secure_verify.o)
+ .debug_str     0x0000000000000897      0x177 drivers/libdrivers.a(secure_verify.o)
                                         0x407 (松开之前的大小)
- .debug_str     0x00000000000009d7      0x2c3 drivers/libdrivers.a(nor.o)
+ .debug_str     0x0000000000000a0e      0x2c3 drivers/libdrivers.a(nor.o)
                                         0x5f3 (松开之前的大小)
- .debug_str     0x0000000000000c9a       0x87 drivers/libdrivers.a(drv_hash.o)
+ .debug_str     0x0000000000000cd1       0x87 drivers/libdrivers.a(drv_hash.o)
                                         0x25a (松开之前的大小)
- .debug_str     0x0000000000000d21       0x79 drivers/libdrivers.a(drv_rsa.o)
+ .debug_str     0x0000000000000d58       0x79 drivers/libdrivers.a(drv_rsa.o)
                                         0x29c (松开之前的大小)
- .debug_str     0x0000000000000d9a       0x12 drivers/libdrivers.a(flash.o)
+ .debug_str     0x0000000000000dd1       0x12 drivers/libdrivers.a(flash.o)
                                         0x2a8 (松开之前的大小)
- .debug_str     0x0000000000000dac       0x79 cpu/m0/libm0.a(cpu.o)
+ .debug_str     0x0000000000000de3       0x79 cpu/m0/libm0.a(cpu.o)
                                         0x1f8 (松开之前的大小)
- .debug_str     0x0000000000000e25        0x6 cpu/m0/libm0.a(clk.o)
+ .debug_str     0x0000000000000e5c        0x6 cpu/m0/libm0.a(clk.o)
                                         0x1bd (松开之前的大小)
 
 .debug_frame    0x0000000000000000      0x6a0
diff --git a/boot/prj/zx297520v3/bootrom/z-load2 b/boot/prj/zx297520v3/bootrom/dl_off/z-load2
similarity index 81%
copy from boot/prj/zx297520v3/bootrom/z-load2
copy to boot/prj/zx297520v3/bootrom/dl_off/z-load2
index fcf3f7c..76cc160 100755
--- a/boot/prj/zx297520v3/bootrom/z-load2
+++ b/boot/prj/zx297520v3/bootrom/dl_off/z-load2
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/z-load2.map b/boot/prj/zx297520v3/bootrom/dl_off/z-load2.map
similarity index 89%
rename from boot/prj/zx297520v3/bootrom/z-load2.map
rename to boot/prj/zx297520v3/bootrom/dl_off/z-load2.map
index b848efa..877f07a 100755
--- a/boot/prj/zx297520v3/bootrom/z-load2.map
+++ b/boot/prj/zx297520v3/bootrom/dl_off/z-load2.map
@@ -353,39 +353,39 @@
 .stabstr        0x0000000000000000       0x67
  .stabstr       0x0000000000000000       0x67 cpu/m0/start.o
 
-.debug_info     0x0000000000000000     0x6225
- .debug_info    0x0000000000000000      0x719 lib/libarm.a(board.o)
- .debug_info    0x0000000000000719      0x22b lib/libarm.a(string.o)
- .debug_info    0x0000000000000944      0x2a0 drivers/libdrivers.a(uart.o)
- .debug_info    0x0000000000000be4      0xcd9 drivers/libdrivers.a(image.o)
- .debug_info    0x00000000000018bd      0xb01 drivers/libdrivers.a(secure_verify.o)
- .debug_info    0x00000000000023be     0x1661 drivers/libdrivers.a(spifc_loader2.o)
- .debug_info    0x0000000000003a1f      0x70f drivers/libdrivers.a(bbt.o)
- .debug_info    0x000000000000412e      0x586 drivers/libdrivers.a(sha256.o)
- .debug_info    0x00000000000046b4      0xd5f drivers/libdrivers.a(nor.o)
- .debug_info    0x0000000000005413      0x329 drivers/libdrivers.a(ddr.o)
- .debug_info    0x000000000000573c      0x1e8 drivers/libdrivers.a(drv_hash.o)
- .debug_info    0x0000000000005924      0x3b4 drivers/libdrivers.a(drv_rsa.o)
- .debug_info    0x0000000000005cd8      0x20f drivers/libdrivers.a(flash.o)
- .debug_info    0x0000000000005ee7      0x1c3 drivers/libdrivers.a(efuse.o)
- .debug_info    0x00000000000060aa      0x17b cpu/m0/libm0.a(cpu.o)
+.debug_info     0x0000000000000000     0x62eb
+ .debug_info    0x0000000000000000      0x77c lib/libarm.a(board.o)
+ .debug_info    0x000000000000077c      0x22b lib/libarm.a(string.o)
+ .debug_info    0x00000000000009a7      0x2a0 drivers/libdrivers.a(uart.o)
+ .debug_info    0x0000000000000c47      0xd3c drivers/libdrivers.a(image.o)
+ .debug_info    0x0000000000001983      0xb01 drivers/libdrivers.a(secure_verify.o)
+ .debug_info    0x0000000000002484     0x1661 drivers/libdrivers.a(spifc_loader2.o)
+ .debug_info    0x0000000000003ae5      0x70f drivers/libdrivers.a(bbt.o)
+ .debug_info    0x00000000000041f4      0x586 drivers/libdrivers.a(sha256.o)
+ .debug_info    0x000000000000477a      0xd5f drivers/libdrivers.a(nor.o)
+ .debug_info    0x00000000000054d9      0x329 drivers/libdrivers.a(ddr.o)
+ .debug_info    0x0000000000005802      0x1e8 drivers/libdrivers.a(drv_hash.o)
+ .debug_info    0x00000000000059ea      0x3b4 drivers/libdrivers.a(drv_rsa.o)
+ .debug_info    0x0000000000005d9e      0x20f drivers/libdrivers.a(flash.o)
+ .debug_info    0x0000000000005fad      0x1c3 drivers/libdrivers.a(efuse.o)
+ .debug_info    0x0000000000006170      0x17b cpu/m0/libm0.a(cpu.o)
 
-.debug_abbrev   0x0000000000000000     0x1c41
- .debug_abbrev  0x0000000000000000      0x2ba lib/libarm.a(board.o)
- .debug_abbrev  0x00000000000002ba       0xb7 lib/libarm.a(string.o)
- .debug_abbrev  0x0000000000000371      0x19e drivers/libdrivers.a(uart.o)
- .debug_abbrev  0x000000000000050f      0x298 drivers/libdrivers.a(image.o)
- .debug_abbrev  0x00000000000007a7      0x274 drivers/libdrivers.a(secure_verify.o)
- .debug_abbrev  0x0000000000000a1b      0x48e drivers/libdrivers.a(spifc_loader2.o)
- .debug_abbrev  0x0000000000000ea9      0x281 drivers/libdrivers.a(bbt.o)
- .debug_abbrev  0x000000000000112a      0x20e drivers/libdrivers.a(sha256.o)
- .debug_abbrev  0x0000000000001338      0x280 drivers/libdrivers.a(nor.o)
- .debug_abbrev  0x00000000000015b8      0x12f drivers/libdrivers.a(ddr.o)
- .debug_abbrev  0x00000000000016e7       0xde drivers/libdrivers.a(drv_hash.o)
- .debug_abbrev  0x00000000000017c5      0x1e2 drivers/libdrivers.a(drv_rsa.o)
- .debug_abbrev  0x00000000000019a7       0xb5 drivers/libdrivers.a(flash.o)
- .debug_abbrev  0x0000000000001a5c      0x11d drivers/libdrivers.a(efuse.o)
- .debug_abbrev  0x0000000000001b79       0xc8 cpu/m0/libm0.a(cpu.o)
+.debug_abbrev   0x0000000000000000     0x1c50
+ .debug_abbrev  0x0000000000000000      0x2c9 lib/libarm.a(board.o)
+ .debug_abbrev  0x00000000000002c9       0xb7 lib/libarm.a(string.o)
+ .debug_abbrev  0x0000000000000380      0x19e drivers/libdrivers.a(uart.o)
+ .debug_abbrev  0x000000000000051e      0x298 drivers/libdrivers.a(image.o)
+ .debug_abbrev  0x00000000000007b6      0x274 drivers/libdrivers.a(secure_verify.o)
+ .debug_abbrev  0x0000000000000a2a      0x48e drivers/libdrivers.a(spifc_loader2.o)
+ .debug_abbrev  0x0000000000000eb8      0x281 drivers/libdrivers.a(bbt.o)
+ .debug_abbrev  0x0000000000001139      0x20e drivers/libdrivers.a(sha256.o)
+ .debug_abbrev  0x0000000000001347      0x280 drivers/libdrivers.a(nor.o)
+ .debug_abbrev  0x00000000000015c7      0x12f drivers/libdrivers.a(ddr.o)
+ .debug_abbrev  0x00000000000016f6       0xde drivers/libdrivers.a(drv_hash.o)
+ .debug_abbrev  0x00000000000017d4      0x1e2 drivers/libdrivers.a(drv_rsa.o)
+ .debug_abbrev  0x00000000000019b6       0xb5 drivers/libdrivers.a(flash.o)
+ .debug_abbrev  0x0000000000001a6b      0x11d drivers/libdrivers.a(efuse.o)
+ .debug_abbrev  0x0000000000001b88       0xc8 cpu/m0/libm0.a(cpu.o)
 
 .debug_loc      0x0000000000000000     0x956d
  .debug_loc     0x0000000000000000      0x17b lib/libarm.a(board.o)
@@ -463,36 +463,36 @@
  .debug_line    0x0000000000001dd7      0x118 drivers/libdrivers.a(efuse.o)
  .debug_line    0x0000000000001eef       0xa7 cpu/m0/libm0.a(cpu.o)
 
-.debug_str      0x0000000000000000     0x152e
- .debug_str     0x0000000000000000      0x470 lib/libarm.a(board.o)
-                                        0x4da (松开之前的大小)
- .debug_str     0x0000000000000470       0x3f lib/libarm.a(string.o)
+.debug_str      0x0000000000000000     0x1565
+ .debug_str     0x0000000000000000      0x4a7 lib/libarm.a(board.o)
+                                        0x518 (松开之前的大小)
+ .debug_str     0x00000000000004a7       0x3f lib/libarm.a(string.o)
                                         0x214 (松开之前的大小)
- .debug_str     0x00000000000004af       0xe2 drivers/libdrivers.a(uart.o)
+ .debug_str     0x00000000000004e6       0xe2 drivers/libdrivers.a(uart.o)
                                         0x253 (松开之前的大小)
- .debug_str     0x0000000000000591      0x35b drivers/libdrivers.a(image.o)
-                                        0x7ca (松开之前的大小)
- .debug_str     0x00000000000008ec      0x2f9 drivers/libdrivers.a(secure_verify.o)
+ .debug_str     0x00000000000005c8      0x35b drivers/libdrivers.a(image.o)
+                                        0x808 (松开之前的大小)
+ .debug_str     0x0000000000000923      0x2f9 drivers/libdrivers.a(secure_verify.o)
                                         0x61f (松开之前的大小)
- .debug_str     0x0000000000000be5      0x3cc drivers/libdrivers.a(spifc_loader2.o)
+ .debug_str     0x0000000000000c1c      0x3cc drivers/libdrivers.a(spifc_loader2.o)
                                         0x6c1 (松开之前的大小)
- .debug_str     0x0000000000000fb1      0x103 drivers/libdrivers.a(bbt.o)
+ .debug_str     0x0000000000000fe8      0x103 drivers/libdrivers.a(bbt.o)
                                         0x3fe (松开之前的大小)
- .debug_str     0x00000000000010b4       0xc3 drivers/libdrivers.a(sha256.o)
+ .debug_str     0x00000000000010eb       0xc3 drivers/libdrivers.a(sha256.o)
                                         0x2b7 (松开之前的大小)
- .debug_str     0x0000000000001177      0x1ad drivers/libdrivers.a(nor.o)
+ .debug_str     0x00000000000011ae      0x1ad drivers/libdrivers.a(nor.o)
                                         0x5f3 (松开之前的大小)
- .debug_str     0x0000000000001324       0x54 drivers/libdrivers.a(ddr.o)
+ .debug_str     0x000000000000135b       0x54 drivers/libdrivers.a(ddr.o)
                                         0x216 (松开之前的大小)
- .debug_str     0x0000000000001378       0x87 drivers/libdrivers.a(drv_hash.o)
+ .debug_str     0x00000000000013af       0x87 drivers/libdrivers.a(drv_hash.o)
                                         0x25a (松开之前的大小)
- .debug_str     0x00000000000013ff       0x79 drivers/libdrivers.a(drv_rsa.o)
+ .debug_str     0x0000000000001436       0x79 drivers/libdrivers.a(drv_rsa.o)
                                         0x29c (松开之前的大小)
- .debug_str     0x0000000000001478       0x12 drivers/libdrivers.a(flash.o)
+ .debug_str     0x00000000000014af       0x12 drivers/libdrivers.a(flash.o)
                                         0x2a8 (松开之前的大小)
- .debug_str     0x000000000000148a       0x20 drivers/libdrivers.a(efuse.o)
+ .debug_str     0x00000000000014c1       0x20 drivers/libdrivers.a(efuse.o)
                                         0x255 (松开之前的大小)
- .debug_str     0x00000000000014aa       0x84 cpu/m0/libm0.a(cpu.o)
+ .debug_str     0x00000000000014e1       0x84 cpu/m0/libm0.a(cpu.o)
                                         0x1f8 (松开之前的大小)
 
 .debug_frame    0x0000000000000000      0xa90
diff --git a/boot/prj/zx297520v3/bootrom/loader2.bin b/boot/prj/zx297520v3/bootrom/dl_on/loader2.bin
similarity index 100%
rename from boot/prj/zx297520v3/bootrom/loader2.bin
rename to boot/prj/zx297520v3/bootrom/dl_on/loader2.bin
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/dl_on/z-load b/boot/prj/zx297520v3/bootrom/dl_on/z-load
index f768275..38cb6a9 100755
--- a/boot/prj/zx297520v3/bootrom/dl_on/z-load
+++ b/boot/prj/zx297520v3/bootrom/dl_on/z-load
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/dl_on/z-load.map b/boot/prj/zx297520v3/bootrom/dl_on/z-load.map
index 620baa6..4266d98 100755
--- a/boot/prj/zx297520v3/bootrom/dl_on/z-load.map
+++ b/boot/prj/zx297520v3/bootrom/dl_on/z-load.map
@@ -300,35 +300,35 @@
 .stabstr        0x0000000000000000       0x67
  .stabstr       0x0000000000000000       0x67 cpu/m0/start.o
 
-.debug_info     0x0000000000000000     0x33aa
- .debug_info    0x0000000000000000      0x5e3 lib/libarm.a(board.o)
- .debug_info    0x00000000000005e3      0x22b lib/libarm.a(string.o)
- .debug_info    0x000000000000080e      0x329 drivers/libdrivers.a(ddr.o)
- .debug_info    0x0000000000000b37      0x2a0 drivers/libdrivers.a(uart.o)
- .debug_info    0x0000000000000dd7      0x6d3 drivers/libdrivers.a(image.o)
- .debug_info    0x00000000000014aa      0x1c3 drivers/libdrivers.a(efuse.o)
- .debug_info    0x000000000000166d      0x62d drivers/libdrivers.a(secure_verify.o)
- .debug_info    0x0000000000001c9a      0xd5f drivers/libdrivers.a(nor.o)
- .debug_info    0x00000000000029f9      0x1e8 drivers/libdrivers.a(drv_hash.o)
- .debug_info    0x0000000000002be1      0x3b4 drivers/libdrivers.a(drv_rsa.o)
- .debug_info    0x0000000000002f95      0x20f drivers/libdrivers.a(flash.o)
- .debug_info    0x00000000000031a4      0x17b cpu/m0/libm0.a(cpu.o)
- .debug_info    0x000000000000331f       0x8b cpu/m0/libm0.a(clk.o)
+.debug_info     0x0000000000000000     0x340d
+ .debug_info    0x0000000000000000      0x646 lib/libarm.a(board.o)
+ .debug_info    0x0000000000000646      0x22b lib/libarm.a(string.o)
+ .debug_info    0x0000000000000871      0x329 drivers/libdrivers.a(ddr.o)
+ .debug_info    0x0000000000000b9a      0x2a0 drivers/libdrivers.a(uart.o)
+ .debug_info    0x0000000000000e3a      0x6d3 drivers/libdrivers.a(image.o)
+ .debug_info    0x000000000000150d      0x1c3 drivers/libdrivers.a(efuse.o)
+ .debug_info    0x00000000000016d0      0x62d drivers/libdrivers.a(secure_verify.o)
+ .debug_info    0x0000000000001cfd      0xd5f drivers/libdrivers.a(nor.o)
+ .debug_info    0x0000000000002a5c      0x1e8 drivers/libdrivers.a(drv_hash.o)
+ .debug_info    0x0000000000002c44      0x3b4 drivers/libdrivers.a(drv_rsa.o)
+ .debug_info    0x0000000000002ff8      0x20f drivers/libdrivers.a(flash.o)
+ .debug_info    0x0000000000003207      0x17b cpu/m0/libm0.a(cpu.o)
+ .debug_info    0x0000000000003382       0x8b cpu/m0/libm0.a(clk.o)
 
-.debug_abbrev   0x0000000000000000     0x1281
- .debug_abbrev  0x0000000000000000      0x277 lib/libarm.a(board.o)
- .debug_abbrev  0x0000000000000277       0xb7 lib/libarm.a(string.o)
- .debug_abbrev  0x000000000000032e      0x12f drivers/libdrivers.a(ddr.o)
- .debug_abbrev  0x000000000000045d      0x19e drivers/libdrivers.a(uart.o)
- .debug_abbrev  0x00000000000005fb      0x212 drivers/libdrivers.a(image.o)
- .debug_abbrev  0x000000000000080d      0x11d drivers/libdrivers.a(efuse.o)
- .debug_abbrev  0x000000000000092a      0x258 drivers/libdrivers.a(secure_verify.o)
- .debug_abbrev  0x0000000000000b82      0x280 drivers/libdrivers.a(nor.o)
- .debug_abbrev  0x0000000000000e02       0xde drivers/libdrivers.a(drv_hash.o)
- .debug_abbrev  0x0000000000000ee0      0x1e2 drivers/libdrivers.a(drv_rsa.o)
- .debug_abbrev  0x00000000000010c2       0xb5 drivers/libdrivers.a(flash.o)
- .debug_abbrev  0x0000000000001177       0xc8 cpu/m0/libm0.a(cpu.o)
- .debug_abbrev  0x000000000000123f       0x42 cpu/m0/libm0.a(clk.o)
+.debug_abbrev   0x0000000000000000     0x1290
+ .debug_abbrev  0x0000000000000000      0x286 lib/libarm.a(board.o)
+ .debug_abbrev  0x0000000000000286       0xb7 lib/libarm.a(string.o)
+ .debug_abbrev  0x000000000000033d      0x12f drivers/libdrivers.a(ddr.o)
+ .debug_abbrev  0x000000000000046c      0x19e drivers/libdrivers.a(uart.o)
+ .debug_abbrev  0x000000000000060a      0x212 drivers/libdrivers.a(image.o)
+ .debug_abbrev  0x000000000000081c      0x11d drivers/libdrivers.a(efuse.o)
+ .debug_abbrev  0x0000000000000939      0x258 drivers/libdrivers.a(secure_verify.o)
+ .debug_abbrev  0x0000000000000b91      0x280 drivers/libdrivers.a(nor.o)
+ .debug_abbrev  0x0000000000000e11       0xde drivers/libdrivers.a(drv_hash.o)
+ .debug_abbrev  0x0000000000000eef      0x1e2 drivers/libdrivers.a(drv_rsa.o)
+ .debug_abbrev  0x00000000000010d1       0xb5 drivers/libdrivers.a(flash.o)
+ .debug_abbrev  0x0000000000001186       0xc8 cpu/m0/libm0.a(cpu.o)
+ .debug_abbrev  0x000000000000124e       0x42 cpu/m0/libm0.a(clk.o)
 
 .debug_loc      0x0000000000000000     0x1c6c
  .debug_loc     0x0000000000000000       0xcc lib/libarm.a(board.o)
@@ -395,32 +395,32 @@
  .debug_line    0x000000000000130b       0xa7 cpu/m0/libm0.a(cpu.o)
  .debug_line    0x00000000000013b2       0x61 cpu/m0/libm0.a(clk.o)
 
-.debug_str      0x0000000000000000      0xe2b
- .debug_str     0x0000000000000000      0x445 lib/libarm.a(board.o)
-                                        0x4b8 (松开之前的大小)
- .debug_str     0x0000000000000445       0x4c lib/libarm.a(string.o)
+.debug_str      0x0000000000000000      0xe62
+ .debug_str     0x0000000000000000      0x47c lib/libarm.a(board.o)
+                                        0x4f6 (松开之前的大小)
+ .debug_str     0x000000000000047c       0x4c lib/libarm.a(string.o)
                                         0x214 (松开之前的大小)
- .debug_str     0x0000000000000491       0xa1 drivers/libdrivers.a(ddr.o)
+ .debug_str     0x00000000000004c8       0xa1 drivers/libdrivers.a(ddr.o)
                                         0x216 (松开之前的大小)
- .debug_str     0x0000000000000532       0x8a drivers/libdrivers.a(uart.o)
+ .debug_str     0x0000000000000569       0x8a drivers/libdrivers.a(uart.o)
                                         0x253 (松开之前的大小)
- .debug_str     0x00000000000005bc      0x229 drivers/libdrivers.a(image.o)
+ .debug_str     0x00000000000005f3      0x229 drivers/libdrivers.a(image.o)
                                         0x4a0 (松开之前的大小)
- .debug_str     0x00000000000007e5       0x7b drivers/libdrivers.a(efuse.o)
+ .debug_str     0x000000000000081c       0x7b drivers/libdrivers.a(efuse.o)
                                         0x255 (松开之前的大小)
- .debug_str     0x0000000000000860      0x177 drivers/libdrivers.a(secure_verify.o)
+ .debug_str     0x0000000000000897      0x177 drivers/libdrivers.a(secure_verify.o)
                                         0x407 (松开之前的大小)
- .debug_str     0x00000000000009d7      0x2c3 drivers/libdrivers.a(nor.o)
+ .debug_str     0x0000000000000a0e      0x2c3 drivers/libdrivers.a(nor.o)
                                         0x5f3 (松开之前的大小)
- .debug_str     0x0000000000000c9a       0x87 drivers/libdrivers.a(drv_hash.o)
+ .debug_str     0x0000000000000cd1       0x87 drivers/libdrivers.a(drv_hash.o)
                                         0x25a (松开之前的大小)
- .debug_str     0x0000000000000d21       0x79 drivers/libdrivers.a(drv_rsa.o)
+ .debug_str     0x0000000000000d58       0x79 drivers/libdrivers.a(drv_rsa.o)
                                         0x29c (松开之前的大小)
- .debug_str     0x0000000000000d9a       0x12 drivers/libdrivers.a(flash.o)
+ .debug_str     0x0000000000000dd1       0x12 drivers/libdrivers.a(flash.o)
                                         0x2a8 (松开之前的大小)
- .debug_str     0x0000000000000dac       0x79 cpu/m0/libm0.a(cpu.o)
+ .debug_str     0x0000000000000de3       0x79 cpu/m0/libm0.a(cpu.o)
                                         0x1f8 (松开之前的大小)
- .debug_str     0x0000000000000e25        0x6 cpu/m0/libm0.a(clk.o)
+ .debug_str     0x0000000000000e5c        0x6 cpu/m0/libm0.a(clk.o)
                                         0x1bd (松开之前的大小)
 
 .debug_frame    0x0000000000000000      0x6a0
diff --git a/boot/prj/zx297520v3/bootrom/z-load2 b/boot/prj/zx297520v3/bootrom/dl_on/z-load2
similarity index 81%
rename from boot/prj/zx297520v3/bootrom/z-load2
rename to boot/prj/zx297520v3/bootrom/dl_on/z-load2
index fcf3f7c..b0c9b9a 100755
--- a/boot/prj/zx297520v3/bootrom/z-load2
+++ b/boot/prj/zx297520v3/bootrom/dl_on/z-load2
Binary files differ
diff --git a/boot/prj/zx297520v3/bootrom/z-load2.map b/boot/prj/zx297520v3/bootrom/dl_on/z-load2.map
similarity index 89%
copy from boot/prj/zx297520v3/bootrom/z-load2.map
copy to boot/prj/zx297520v3/bootrom/dl_on/z-load2.map
index b848efa..877f07a 100755
--- a/boot/prj/zx297520v3/bootrom/z-load2.map
+++ b/boot/prj/zx297520v3/bootrom/dl_on/z-load2.map
@@ -353,39 +353,39 @@
 .stabstr        0x0000000000000000       0x67
  .stabstr       0x0000000000000000       0x67 cpu/m0/start.o
 
-.debug_info     0x0000000000000000     0x6225
- .debug_info    0x0000000000000000      0x719 lib/libarm.a(board.o)
- .debug_info    0x0000000000000719      0x22b lib/libarm.a(string.o)
- .debug_info    0x0000000000000944      0x2a0 drivers/libdrivers.a(uart.o)
- .debug_info    0x0000000000000be4      0xcd9 drivers/libdrivers.a(image.o)
- .debug_info    0x00000000000018bd      0xb01 drivers/libdrivers.a(secure_verify.o)
- .debug_info    0x00000000000023be     0x1661 drivers/libdrivers.a(spifc_loader2.o)
- .debug_info    0x0000000000003a1f      0x70f drivers/libdrivers.a(bbt.o)
- .debug_info    0x000000000000412e      0x586 drivers/libdrivers.a(sha256.o)
- .debug_info    0x00000000000046b4      0xd5f drivers/libdrivers.a(nor.o)
- .debug_info    0x0000000000005413      0x329 drivers/libdrivers.a(ddr.o)
- .debug_info    0x000000000000573c      0x1e8 drivers/libdrivers.a(drv_hash.o)
- .debug_info    0x0000000000005924      0x3b4 drivers/libdrivers.a(drv_rsa.o)
- .debug_info    0x0000000000005cd8      0x20f drivers/libdrivers.a(flash.o)
- .debug_info    0x0000000000005ee7      0x1c3 drivers/libdrivers.a(efuse.o)
- .debug_info    0x00000000000060aa      0x17b cpu/m0/libm0.a(cpu.o)
+.debug_info     0x0000000000000000     0x62eb
+ .debug_info    0x0000000000000000      0x77c lib/libarm.a(board.o)
+ .debug_info    0x000000000000077c      0x22b lib/libarm.a(string.o)
+ .debug_info    0x00000000000009a7      0x2a0 drivers/libdrivers.a(uart.o)
+ .debug_info    0x0000000000000c47      0xd3c drivers/libdrivers.a(image.o)
+ .debug_info    0x0000000000001983      0xb01 drivers/libdrivers.a(secure_verify.o)
+ .debug_info    0x0000000000002484     0x1661 drivers/libdrivers.a(spifc_loader2.o)
+ .debug_info    0x0000000000003ae5      0x70f drivers/libdrivers.a(bbt.o)
+ .debug_info    0x00000000000041f4      0x586 drivers/libdrivers.a(sha256.o)
+ .debug_info    0x000000000000477a      0xd5f drivers/libdrivers.a(nor.o)
+ .debug_info    0x00000000000054d9      0x329 drivers/libdrivers.a(ddr.o)
+ .debug_info    0x0000000000005802      0x1e8 drivers/libdrivers.a(drv_hash.o)
+ .debug_info    0x00000000000059ea      0x3b4 drivers/libdrivers.a(drv_rsa.o)
+ .debug_info    0x0000000000005d9e      0x20f drivers/libdrivers.a(flash.o)
+ .debug_info    0x0000000000005fad      0x1c3 drivers/libdrivers.a(efuse.o)
+ .debug_info    0x0000000000006170      0x17b cpu/m0/libm0.a(cpu.o)
 
-.debug_abbrev   0x0000000000000000     0x1c41
- .debug_abbrev  0x0000000000000000      0x2ba lib/libarm.a(board.o)
- .debug_abbrev  0x00000000000002ba       0xb7 lib/libarm.a(string.o)
- .debug_abbrev  0x0000000000000371      0x19e drivers/libdrivers.a(uart.o)
- .debug_abbrev  0x000000000000050f      0x298 drivers/libdrivers.a(image.o)
- .debug_abbrev  0x00000000000007a7      0x274 drivers/libdrivers.a(secure_verify.o)
- .debug_abbrev  0x0000000000000a1b      0x48e drivers/libdrivers.a(spifc_loader2.o)
- .debug_abbrev  0x0000000000000ea9      0x281 drivers/libdrivers.a(bbt.o)
- .debug_abbrev  0x000000000000112a      0x20e drivers/libdrivers.a(sha256.o)
- .debug_abbrev  0x0000000000001338      0x280 drivers/libdrivers.a(nor.o)
- .debug_abbrev  0x00000000000015b8      0x12f drivers/libdrivers.a(ddr.o)
- .debug_abbrev  0x00000000000016e7       0xde drivers/libdrivers.a(drv_hash.o)
- .debug_abbrev  0x00000000000017c5      0x1e2 drivers/libdrivers.a(drv_rsa.o)
- .debug_abbrev  0x00000000000019a7       0xb5 drivers/libdrivers.a(flash.o)
- .debug_abbrev  0x0000000000001a5c      0x11d drivers/libdrivers.a(efuse.o)
- .debug_abbrev  0x0000000000001b79       0xc8 cpu/m0/libm0.a(cpu.o)
+.debug_abbrev   0x0000000000000000     0x1c50
+ .debug_abbrev  0x0000000000000000      0x2c9 lib/libarm.a(board.o)
+ .debug_abbrev  0x00000000000002c9       0xb7 lib/libarm.a(string.o)
+ .debug_abbrev  0x0000000000000380      0x19e drivers/libdrivers.a(uart.o)
+ .debug_abbrev  0x000000000000051e      0x298 drivers/libdrivers.a(image.o)
+ .debug_abbrev  0x00000000000007b6      0x274 drivers/libdrivers.a(secure_verify.o)
+ .debug_abbrev  0x0000000000000a2a      0x48e drivers/libdrivers.a(spifc_loader2.o)
+ .debug_abbrev  0x0000000000000eb8      0x281 drivers/libdrivers.a(bbt.o)
+ .debug_abbrev  0x0000000000001139      0x20e drivers/libdrivers.a(sha256.o)
+ .debug_abbrev  0x0000000000001347      0x280 drivers/libdrivers.a(nor.o)
+ .debug_abbrev  0x00000000000015c7      0x12f drivers/libdrivers.a(ddr.o)
+ .debug_abbrev  0x00000000000016f6       0xde drivers/libdrivers.a(drv_hash.o)
+ .debug_abbrev  0x00000000000017d4      0x1e2 drivers/libdrivers.a(drv_rsa.o)
+ .debug_abbrev  0x00000000000019b6       0xb5 drivers/libdrivers.a(flash.o)
+ .debug_abbrev  0x0000000000001a6b      0x11d drivers/libdrivers.a(efuse.o)
+ .debug_abbrev  0x0000000000001b88       0xc8 cpu/m0/libm0.a(cpu.o)
 
 .debug_loc      0x0000000000000000     0x956d
  .debug_loc     0x0000000000000000      0x17b lib/libarm.a(board.o)
@@ -463,36 +463,36 @@
  .debug_line    0x0000000000001dd7      0x118 drivers/libdrivers.a(efuse.o)
  .debug_line    0x0000000000001eef       0xa7 cpu/m0/libm0.a(cpu.o)
 
-.debug_str      0x0000000000000000     0x152e
- .debug_str     0x0000000000000000      0x470 lib/libarm.a(board.o)
-                                        0x4da (松开之前的大小)
- .debug_str     0x0000000000000470       0x3f lib/libarm.a(string.o)
+.debug_str      0x0000000000000000     0x1565
+ .debug_str     0x0000000000000000      0x4a7 lib/libarm.a(board.o)
+                                        0x518 (松开之前的大小)
+ .debug_str     0x00000000000004a7       0x3f lib/libarm.a(string.o)
                                         0x214 (松开之前的大小)
- .debug_str     0x00000000000004af       0xe2 drivers/libdrivers.a(uart.o)
+ .debug_str     0x00000000000004e6       0xe2 drivers/libdrivers.a(uart.o)
                                         0x253 (松开之前的大小)
- .debug_str     0x0000000000000591      0x35b drivers/libdrivers.a(image.o)
-                                        0x7ca (松开之前的大小)
- .debug_str     0x00000000000008ec      0x2f9 drivers/libdrivers.a(secure_verify.o)
+ .debug_str     0x00000000000005c8      0x35b drivers/libdrivers.a(image.o)
+                                        0x808 (松开之前的大小)
+ .debug_str     0x0000000000000923      0x2f9 drivers/libdrivers.a(secure_verify.o)
                                         0x61f (松开之前的大小)
- .debug_str     0x0000000000000be5      0x3cc drivers/libdrivers.a(spifc_loader2.o)
+ .debug_str     0x0000000000000c1c      0x3cc drivers/libdrivers.a(spifc_loader2.o)
                                         0x6c1 (松开之前的大小)
- .debug_str     0x0000000000000fb1      0x103 drivers/libdrivers.a(bbt.o)
+ .debug_str     0x0000000000000fe8      0x103 drivers/libdrivers.a(bbt.o)
                                         0x3fe (松开之前的大小)
- .debug_str     0x00000000000010b4       0xc3 drivers/libdrivers.a(sha256.o)
+ .debug_str     0x00000000000010eb       0xc3 drivers/libdrivers.a(sha256.o)
                                         0x2b7 (松开之前的大小)
- .debug_str     0x0000000000001177      0x1ad drivers/libdrivers.a(nor.o)
+ .debug_str     0x00000000000011ae      0x1ad drivers/libdrivers.a(nor.o)
                                         0x5f3 (松开之前的大小)
- .debug_str     0x0000000000001324       0x54 drivers/libdrivers.a(ddr.o)
+ .debug_str     0x000000000000135b       0x54 drivers/libdrivers.a(ddr.o)
                                         0x216 (松开之前的大小)
- .debug_str     0x0000000000001378       0x87 drivers/libdrivers.a(drv_hash.o)
+ .debug_str     0x00000000000013af       0x87 drivers/libdrivers.a(drv_hash.o)
                                         0x25a (松开之前的大小)
- .debug_str     0x00000000000013ff       0x79 drivers/libdrivers.a(drv_rsa.o)
+ .debug_str     0x0000000000001436       0x79 drivers/libdrivers.a(drv_rsa.o)
                                         0x29c (松开之前的大小)
- .debug_str     0x0000000000001478       0x12 drivers/libdrivers.a(flash.o)
+ .debug_str     0x00000000000014af       0x12 drivers/libdrivers.a(flash.o)
                                         0x2a8 (松开之前的大小)
- .debug_str     0x000000000000148a       0x20 drivers/libdrivers.a(efuse.o)
+ .debug_str     0x00000000000014c1       0x20 drivers/libdrivers.a(efuse.o)
                                         0x255 (松开之前的大小)
- .debug_str     0x00000000000014aa       0x84 cpu/m0/libm0.a(cpu.o)
+ .debug_str     0x00000000000014e1       0x84 cpu/m0/libm0.a(cpu.o)
                                         0x1f8 (松开之前的大小)
 
 .debug_frame    0x0000000000000000      0xa90
diff --git a/boot/prj/zx297520v3/bootrom/merge_boorom.sh b/boot/prj/zx297520v3/bootrom/merge_boorom.sh
index b961cd1..f925dc6 100755
--- a/boot/prj/zx297520v3/bootrom/merge_boorom.sh
+++ b/boot/prj/zx297520v3/bootrom/merge_boorom.sh
@@ -5,7 +5,8 @@
 
 rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/zloader_tmp.bin
 rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/zloader_tmp.bin
-rm $TOP_DIR/boot/prj/zx297520v3/bootrom/loader2_tmp.bin
+rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/loader2_tmp.bin
+rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/loader2_tmp.bin
 rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/bootrom.bin
 rm $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/bootrom.bin
 
@@ -23,18 +24,19 @@
 
 dd if=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/zloader_tmp.bin bs=8192 conv=sync
 dd if=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/zloader_tmp.bin bs=8192 conv=sync
-dd if=$TOP_DIR/boot/prj/zx297520v3/bootrom/loader2.bin of=$TOP_DIR/boot/prj/zx297520v3/bootrom/loader2_tmp.bin bs=24576 conv=sync
+dd if=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/loader2.bin of=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/loader2_tmp.bin bs=24576 conv=sync
+dd if=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/loader2.bin of=$TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/loader2_tmp.bin bs=24576 conv=sync
 dd if=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_on/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_on/zloader_tmp.bin bs=8192 conv=sync
 dd if=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_on/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_on/zloader_tmp.bin bs=8192 conv=sync
 dd if=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_off/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_off/zloader_tmp.bin bs=8192 conv=sync
 dd if=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_off/zloader.bin of=$TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_off/zloader_tmp.bin bs=8192 conv=sync
 
 
-cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/zloader_tmp.bin $TOP_DIR/boot/prj/zx297520v3/bootrom/loader2_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/bootrom.bin
+cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/zloader_tmp.bin $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/loader2_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/bootrom.bin
 cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/bootrom.bin $TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_on/zloader_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_on/zloader.bin
 cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_on/bootrom.bin $TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_on/zloader_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_on/zloader.bin
 
-cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/zloader_tmp.bin $TOP_DIR/boot/prj/zx297520v3/bootrom/loader2_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/bootrom.bin
+cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/zloader_tmp.bin $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/loader2_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/bootrom.bin
 cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/bootrom.bin $TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_off/zloader_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/vehicle_dc/bin/dl_off/zloader.bin
 cat $TOP_DIR/boot/prj/zx297520v3/bootrom/dl_off/bootrom.bin $TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_off/zloader_tmp.bin > $TOP_DIR/boot/prj/zx297520v3/vehicle_dc_ref/bin/dl_off/zloader.bin