From 24215b75537113b5923c2e9a7ad1be17f977bc5e Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 26 Oct 2024 17:43:10 +0800 Subject: [PATCH] uboot-mtk-20230718-09eda825: fix erase ubi env for legacy mtd bootmenu Signed-off-by: Tianling Shen --- .../board/mediatek/common/bootmenu_mtd_legacy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uboot-mtk-20230718-09eda825/board/mediatek/common/bootmenu_mtd_legacy.c b/uboot-mtk-20230718-09eda825/board/mediatek/common/bootmenu_mtd_legacy.c index e8bfd4fc6..c6f6a21ed 100644 --- a/uboot-mtk-20230718-09eda825/board/mediatek/common/bootmenu_mtd_legacy.c +++ b/uboot-mtk-20230718-09eda825/board/mediatek/common/bootmenu_mtd_legacy.c @@ -22,6 +22,7 @@ #else #define UBI_VID_OFFSET QUOTE(CONFIG_ENV_UBI_VID_OFFSET) #endif +int env_ubi_erase(void); #endif /* CONFIG_ENV_IS_IN_UBI */ static struct mtd_info *get_mtd_part(const char *partname) @@ -152,7 +153,7 @@ static int erase_env(void *priv, const struct data_part_entry *dpe, if (ubi_part(CONFIG_ENV_UBI_PART, UBI_VID_OFFSET)) return -EIO; - ubi_remove_vol(CONFIG_ENV_UBI_VOLUME); + env_ubi_erase(); ubi_exit(); #else struct mtd_info *mtd;