ODROID-C5: fix build error when 'AML_V3_FACTORY_BURN' is missing

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I66f93cf21313ca20a11d94af587819d41d68c954
diff --git a/cmd/amlogic/bootloader_status.c b/cmd/amlogic/bootloader_status.c
index d78c529..e89d16c 100644
--- a/cmd/amlogic/bootloader_status.c
+++ b/cmd/amlogic/bootloader_status.c
@@ -365,12 +365,14 @@
 	}
 
 #ifdef CONFIG_MESON_S7D
+#ifdef CONFIG_AML_V3_FACTORY_BURN
 	iret = update_boot_hdr_4_s7d_reva(buffer, BOOTLOADER_MAX_SIZE - BOOTLOADER_OFFSET, 0);
 	if (iret) {
 		printf("Failed to write s7d reva boot0\n");
 		free(buffer);
 		return -1;
 	}
+#endif
 #endif//#ifdef CONFIG_MESON_S7D
 
 	iret = store_boot_write("bootloader", i, BOOTLOADER_MAX_SIZE - BOOTLOADER_OFFSET, buffer);
diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
index 5650311..870fc45 100644
--- a/drivers/fastboot/fb_command.c
+++ b/drivers/fastboot/fb_command.c
@@ -611,12 +611,14 @@
 		char partname[32] = {0};
 
 #ifdef CONFIG_MESON_S7D
+#ifdef CONFIG_AML_V3_FACTORY_BURN
 		ret = update_boot_hdr_4_s7d_reva(fastboot_buf_addr, image_size, 0);
 		if (ret) {
 			printf("Failed to write s7d reva boot0\n");
 			fastboot_fail("Failed to write s7d reva boot0", response);
 			return;
 		}
+#endif
 #endif//#ifdef CONFIG_MESON_S7D
 
 		slot_name = env_get("active_slot");
@@ -659,10 +661,12 @@
 			if (erase_flag == 1) {
 				printf("partition changes, erase emmc\n");
 				//run_command("store erase.chip 0;", 0);
+#ifdef CONFIG_AML_V3_FACTORY_BURN
 				if (usb_burn_erase_data(0x3)) {
 					printf("partition erase failed!\n");
 					return;
 				}
+#endif
 			}
 
 			if (write_mbr_and_gpt_partitions(dev_desc, fastboot_buf_addr + 0x3DFE00)) {
@@ -687,10 +691,12 @@
 			if (mem_addr && erase_flag == 1) {
 				printf("partition changes, erase emmc\n");
 				//run_command("store erase.chip 0;", 0);
+#ifdef CONFIG_AML_V3_FACTORY_BURN
 				if (usb_burn_erase_data(0x3)) {
 					printf("partition erase failed!\n");
 					return;
 				}
+#endif
 				printf("write _aml_dtb\n");
 				addr = (void *)simple_strtoul(mem_addr, NULL, 16);
 				ret = dtb_write(addr);
@@ -810,12 +816,14 @@
 	} else if (!strcmp(cmd_parameter, "bootloader-boot0") ||
 		!strcmp(cmd_parameter, "bootloader-boot1")) {
 #ifdef CONFIG_MESON_S7D
+#ifdef CONFIG_AML_V3_FACTORY_BURN
 		ret = update_boot_hdr_4_s7d_reva(fastboot_buf_addr, image_size, 0);
 		if (ret) {
 			printf("Failed to write s7d reva boot0\n");
 			fastboot_fail("Failed to write s7d reva boot0-1", response);
 			return;
 		}
+#endif
 #endif//#ifdef CONFIG_MESON_S7D
 		strlcpy(name, cmd_parameter, 31);
 	} else {