Add /odm/lib/hw to HAL search path

ODM HALs should be compiled into /odm/lib/hw on the ODM partition.

BUG: 25653199
Change-Id: I23324d8e4dc82301cebd71bc40cdd2b73a678360
This commit is contained in:
Hung-ying Tyan 2015-11-12 11:19:45 +08:00
parent 56941c9a92
commit 48f57ad4f4

View file

@ -31,9 +31,11 @@
#if defined(__LP64__)
#define HAL_LIBRARY_PATH1 "/system/lib64/hw"
#define HAL_LIBRARY_PATH2 "/vendor/lib64/hw"
#define HAL_LIBRARY_PATH3 "/odm/lib64/hw"
#else
#define HAL_LIBRARY_PATH1 "/system/lib/hw"
#define HAL_LIBRARY_PATH2 "/vendor/lib/hw"
#define HAL_LIBRARY_PATH3 "/odm/lib/hw"
#endif
/**
@ -129,6 +131,11 @@ static int load(const char *id,
static int hw_module_exists(char *path, size_t path_len, const char *name,
const char *subname)
{
snprintf(path, path_len, "%s/%s.%s.so",
HAL_LIBRARY_PATH3, name, subname);
if (access(path, R_OK) == 0)
return 0;
snprintf(path, path_len, "%s/%s.%s.so",
HAL_LIBRARY_PATH2, name, subname);
if (access(path, R_OK) == 0)