diff options
| author | Rashed Abdel-Tawab <rashed@linux.com> | 2015-09-08 14:54:30 -0400 |
|---|---|---|
| committer | Michael Bestas <mikeioannina@gmail.com> | 2017-04-28 20:47:54 +0300 |
| commit | 669428f3498c0c19af0b557a873e2d553fa97937 (patch) | |
| tree | b31263c2c79c4e227abc0b29dd6ce7e270eefd7e | |
| parent | 1876f22a1cfe8d29250f0f2664d67442f8d2d465 (diff) | |
recovery: Add support for bootdevice symlinks
* Recent devices use /dev/block/bootdevice/by-name symlinks instead
of /dev/block/platform/msm_sdcc.1/by-name so enable support for the
new path in the assert.
Change-Id: Ida3ff1df72cfe1a807b1fcdeb06404ce2b1149af
| -rw-r--r-- | recovery/Android.mk | 5 | ||||
| -rw-r--r-- | recovery/recovery_updater.cpp | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/recovery/Android.mk b/recovery/Android.mk index 9dbf5a1..445642c 100644 --- a/recovery/Android.mk +++ b/recovery/Android.mk @@ -1,6 +1,11 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) + +ifneq ($(TARGET_PLATFORM_DEVICE_BASE),) +LOCAL_CFLAGS += -DUSES_BOOTDEVICE_PATH +endif + LOCAL_C_INCLUDES := bootable/recovery LOCAL_SRC_FILES := recovery_updater.cpp LOCAL_MODULE := librecovery_updater_cm diff --git a/recovery/recovery_updater.cpp b/recovery/recovery_updater.cpp index 8008faa..fcf04d8 100644 --- a/recovery/recovery_updater.cpp +++ b/recovery/recovery_updater.cpp @@ -34,13 +34,21 @@ #define ALPHABET_LEN 256 #define KB 1024 +#ifdef USES_BOOTDEVICE_PATH +#define BASEBAND_PART_PATH "/dev/block/bootdevice/by-name/modem" +#else #define BASEBAND_PART_PATH "/dev/block/platform/7824900.sdhci/by-name/modem" +#endif #define BASEBAND_VER_STR_START "QC_IMAGE_VERSION_STRING=MPSS.DPM." #define BASEBAND_VER_STR_START_LEN 33 #define BASEBAND_VER_BUF_LEN 255 #define BASEBAND_SZ 64000 * KB /* MMAP 64M of BASEBAND, BASEBAND partition is 64M */ +#ifdef USES_BOOTDEVICE_PATH +#define TZ_PART_PATH "/dev/block/bootdevice/by-name/tz" +#else #define TZ_PART_PATH "/dev/block/platform/7824900.sdhci/by-name/tz" +#endif #define TZ_VER_STR "QC_IMAGE_VERSION_STRING=" #define TZ_VER_STR_LEN 24 #define TZ_VER_BUF_LEN 255 |
