Mstar648修改user分区大小
1.emmc自适应
MstarApp/src/bootlogo/MsBootLogo.c | 28 ++++++++++++++++++++++++++++
sboot/Config.in | 6 ++++++
2 files changed, 34 insertions(+)
diff --git a/MstarApp/src/bootlogo/MsBootLogo.c b/MstarApp/src/bootlogo/MsBootLogo.c
index bbb004a..d9794a0 100644
--- a/MstarApp/src/bootlogo/MsBootLogo.c
+++ b/MstarApp/src/bootlogo/MsBootLogo.c
@@ -162,6 +162,8 @@ int do_dbtable_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int dbtable = 0;
U32 u32LogoOffset = 0;
char * p_str = NULL;
+ char * first_setup = NULL;
+ int firstSetup = 0;
UBOOT_TRACE("IN\n");
ret = raw_io_config(FLASH_DEFAULT_TARGET,FLASH_DEFAULT_PARTITION,FLASH_DEFAULT_VOLUME);
@@ -213,6 +215,32 @@ int do_dbtable_init(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ret = write_dbtable(u32LogoOffset);
}
}
+
+#ifdef ENABLE_EMMC_AUTO_ADJUST
+ first_setup = getenv ("first_setup");
+ if(first_setup == NULL)
+ {
+ run_command("recovery_wipe_partition data",0);
+ setenv("first_setup","1");
+ saveenv();
+ }
+ else
+ {
+ firstSetup = (int)simple_strtol(first_setup, NULL, 10);
+ UBOOT_DEBUG("firstSetup=%d\n",dbtable);
+ if(firstSetup == 0)
+ {
+ run_command("recovery_wipe_partition data",0);
+ setenv("first_setup","1");
+ saveenv();
+ }
+ else
+ {
+
+ }
+ }
+#endif
+
if(ret!=0)
{
bdbtableReady=FALSE;
diff --git a/sboot/Config.in b/sboot/Config.in
index 67128f0..da4e92d 100644
--- a/sboot/Config.in
+++ b/sboot/Config.in
@@ -1094,6 +1094,12 @@ config PM_SIZE_KB_FORCED
Force PM Size to be the configured value (KB).
Should be between 0 to 64
+config EMMC_AUTO_ADJUST
+ bool "Enable EMMC auto Adjust"
+ default n
+ help
+ Enable EMMC auto Adjust
+
config MSTAR_SBOOT_WDT_ENABLE
bool "Enable Watchdog Timer in SBoot"
default n
--
2.固定大小
device目录下BoardConfig.mk
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x40000000