From 2e13a7c48a35ec14098fcbc321ac77161dd7904f Mon Sep 17 00:00:00 2001 From: hzy Date: Mon, 17 Oct 2022 01:00:28 +0800 Subject: [PATCH] Reduce reserved size for bootloader --- arch/arm/cpu/aml_meson/common/firmware/magic.S | 4 ++-- board/amlogic/m8b_onecloud/firmware/storage.c | 2 +- include/emmc_partitions.h | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/aml_meson/common/firmware/magic.S b/arch/arm/cpu/aml_meson/common/firmware/magic.S index b2621fca152e..912352b990c1 100755 --- a/arch/arm/cpu/aml_meson/common/firmware/magic.S +++ b/arch/arm/cpu/aml_meson/common/firmware/magic.S @@ -29,8 +29,8 @@ __magic_word: .short 0 // Partition 1 - PARTATION(ACTIVE, FAT16LBA, 352256, 524288) - PARTATION(ACTIVE, LINUX, 892928, 14376960) + PARTATION(ACTIVE, FAT16LBA, 32768, 524288) + PARTATION(ACTIVE, LINUX, 557056, 14712832) .space (0x1FE - 0x1B0) - (. - __magic_word) diff --git a/board/amlogic/m8b_onecloud/firmware/storage.c b/board/amlogic/m8b_onecloud/firmware/storage.c index fe911965a94e..8c630cfd9f16 100644 --- a/board/amlogic/m8b_onecloud/firmware/storage.c +++ b/board/amlogic/m8b_onecloud/firmware/storage.c @@ -6,7 +6,7 @@ struct partitions partition_table[]={ { .name = "resource", - .size = 32 * SZ_1M, + .size = 4 * SZ_1M, .mask_flags = STORE_DATA, }, { diff --git a/include/emmc_partitions.h b/include/emmc_partitions.h index f9e80777ec08..8d7315b62115 100755 --- a/include/emmc_partitions.h +++ b/include/emmc_partitions.h @@ -27,20 +27,20 @@ #define MAX_MMC_PART_NUM 16 #define MAX_MMC_PART_NAME_LEN 16 -#define PARTITION_RESERVED (8*SZ_1M) // 8MB -#define MMC_BOOT_PARTITION_RESERVED (32*SZ_1M) // 32MB +#define PARTITION_RESERVED (0 * SZ_1M) +#define MMC_BOOT_PARTITION_RESERVED (0 * SZ_1M) #define MMC_BOOT_NAME "bootloader" -#define MMC_BOOT_DEVICE_SIZE (0x4*SZ_1M) +#define MMC_BOOT_DEVICE_SIZE (4 * SZ_1M) #define MMC_RESERVED_NAME "reserved" -#define MMC_RESERVED_SIZE (64*SZ_1M) +#define MMC_RESERVED_SIZE (4 * SZ_1M) #define MMC_CACHE_NAME "cache" // #define MMC_CACHE_SIZE (512*SZ_1M) // this is not used and should be get from spl #define MMC_ENV_NAME "env" -#define MMC_ENV_SIZE (8*SZ_1M) +#define MMC_ENV_SIZE (4*SZ_1M) // #define MMC_KEY_NAME "key" // #define MMC_KEY_SIZE (0x1*SZ_1M)