support devices without bootpartition
if device has no /boot partition, then add the following flag in BoardConfig.mk TW_HAS_NO_BOOT_PARTITION Signed-off-by: ChampionSwimmer <android@championswimmer.tk> Change-Id: I92b36b2e6ca690e2422b36004ae9bb315d24a7c2
This commit is contained in:
committed by
Dees_Troy
parent
2c57d789df
commit
cf33e4dbcd
@@ -141,6 +141,9 @@ endif
|
||||
ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true)
|
||||
LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION
|
||||
endif
|
||||
ifeq ($(TW_HAS_NO_BOOT_PARTITION), true)
|
||||
LOCAL_CFLAGS += -DTW_HAS_NO_BOOT_PARTITION
|
||||
endif
|
||||
ifeq ($(TW_NO_REBOOT_BOOTLOADER), true)
|
||||
LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER
|
||||
endif
|
||||
|
||||
@@ -704,6 +704,7 @@ int TWPartitionManager::Run_Backup(void) {
|
||||
DataManager::SetValue(TW_BACKUP_RECOVERY_VAR, 0);
|
||||
}
|
||||
}
|
||||
#ifndef TW_HAS_NO_BOOT_PARTITION
|
||||
DataManager::GetValue(TW_BACKUP_BOOT_VAR, check);
|
||||
if (check) {
|
||||
backup_boot = Find_Partition_By_Path("/boot");
|
||||
@@ -718,6 +719,7 @@ int TWPartitionManager::Run_Backup(void) {
|
||||
DataManager::SetValue(TW_BACKUP_BOOT_VAR, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DataManager::GetValue(TW_BACKUP_ANDSEC_VAR, check);
|
||||
if (check) {
|
||||
backup_andsec = Find_Partition_By_Path("/and-sec");
|
||||
@@ -962,6 +964,7 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
|
||||
partition_count++;
|
||||
}
|
||||
}
|
||||
#ifndef TW_HAS_NO_BOOT_PARTITION
|
||||
DataManager::GetValue(TW_RESTORE_BOOT_VAR, check);
|
||||
if (check > 0) {
|
||||
restore_boot = Find_Partition_By_Path("/boot");
|
||||
@@ -971,6 +974,7 @@ int TWPartitionManager::Run_Restore(string Restore_Name) {
|
||||
partition_count++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DataManager::GetValue(TW_RESTORE_ANDSEC_VAR, check);
|
||||
if (check > 0) {
|
||||
restore_andsec = Find_Partition_By_Path("/and-sec");
|
||||
|
||||
Reference in New Issue
Block a user