1 /* 2 * Copyright (C) 2015-2021 Alibaba Group Holding Limited 3 */ 4 5 #include <aos/mtdpart.h> 6 #include <aos/mtd.h> 7 8 /* Logic partition on flash devices */ 9 const mtd_partition_t mtd_partitions[] = 10 { 11 { 12 .partition_name = "boot1", 13 .partition_name_std = MTD_PART_NAME_BOOTLOADER, 14 .partition_start_addr = 0x0, 15 .partition_length = 0x10000, //64KB 16 .partition_options = 0, 17 }, 18 { 19 .partition_name = "boot_info", 20 .partition_name_std = MTD_PART_NAME_ENV2, 21 .partition_start_addr = 0x10000, //boot information need protect 22 .partition_length = 0x2000, //8KB 23 .partition_options = 0, 24 }, 25 { 26 .partition_name = "boot2A", 27 .partition_name_std = MTD_PART_NAME_2ND_BOOTLOADER, 28 .partition_start_addr = 0x12000, 29 .partition_length = 0x18000, //64KB 30 .partition_options = 0, 31 }, 32 { 33 .partition_name = "RTOSA", 34 .partition_name_std = MTD_PART_NAME_KERNEL, 35 .partition_start_addr = 0x2A000, 36 .partition_length = 0x578000, //5.5MB 37 .partition_options = 0, 38 }, 39 { 40 .partition_name = "boot2B", 41 .partition_name_std = MTD_PART_NAME_2ND_BOOTLOADER2, 42 .partition_start_addr = 0x5A2000, 43 .partition_length = 0x18000, //64KB 44 .partition_options = 0, 45 }, 46 { 47 .partition_name = "RTOSB", 48 .partition_name_std = MTD_PART_NAME_KERNEL2, 49 .partition_start_addr = 0x5BA000, 50 .partition_length = 0x578000, //5.5MB 51 .partition_options = 0, 52 }, 53 { 54 .partition_name = "littleFS", 55 .partition_name_std = MTD_PART_NAME_LITTLEFS, 56 .partition_start_addr = 0xB32000, 57 .partition_length = 0x4AE000, //4792KB 58 .partition_options = 0, 59 }, 60 { 61 .partition_name = "boot1_sec", 62 .partition_name_std = MTD_PART_NAME_BOOTLOADER_SEC, 63 .partition_start_addr = 0xFE0000, 64 .partition_length = 0x10000, //64KB 65 .partition_options = 0, 66 }, 67 { 68 .partition_name = "boot2_info", 69 .partition_name_std = MTD_PART_NAME_ENV, 70 .partition_start_addr = 0xFF0000, 71 .partition_length = 0x1000, //4KB 72 .partition_options = 0, 73 }, 74 { 75 .partition_name = "KV", 76 .partition_name_std = MTD_PART_NAME_KV, 77 .partition_start_addr = 0xFF1000, 78 .partition_length = 0xD000, //52KB 79 .partition_options = 0, 80 }, 81 { 82 .partition_name = "factory", 83 .partition_name_std = MTD_PART_NAME_FACTORY, 84 .partition_start_addr = 0xFFE000, 85 .partition_length = 0x2000, //8KB 86 .partition_options = 0, 87 } 88 }; 89 90 /* Declare a constant to indicate the defined partitions amount */ 91 const int mtd_partitions_amount = (sizeof(mtd_partitions) / sizeof(mtd_partition_t)); 92