summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Swetland <swetland@google.com>2010-09-19 04:35:19 -0700
committerBrian Swetland <swetland@google.com>2010-09-19 04:35:19 -0700
commitd06df51bcd7bcc2656089a529fa6a455bad00d37 (patch)
tree66f3896bd96c96669c9b2914186cd5d67cf9de8e
parent1f7bc6d1a94d36547a7f5bbd5e039fffc37e9629 (diff)
parent3b5214a67f43e2e4f69428e98d3a2c130c7c87d8 (diff)
downloadsystem_core-d06df51bcd7bcc2656089a529fa6a455bad00d37.zip
system_core-d06df51bcd7bcc2656089a529fa6a455bad00d37.tar.gz
system_core-d06df51bcd7bcc2656089a529fa6a455bad00d37.tar.bz2
resolved conflicts for merge of 3b5214a6 to master
Change-Id: Id73c53c6c2e9c21eb9b1d1e624aaeb25097ea7a4
-rw-r--r--include/private/android_filesystem_config.h2
-rw-r--r--init/devices.c27
-rw-r--r--rootdir/init.rc7
3 files changed, 25 insertions, 11 deletions
diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
index 2a60475..2cbe767 100644
--- a/include/private/android_filesystem_config.h
+++ b/include/private/android_filesystem_config.h
@@ -142,6 +142,7 @@ static struct fs_path_config android_dirs[] = {
{ 00771, AID_SYSTEM, AID_SYSTEM, "data" },
{ 00750, AID_ROOT, AID_SHELL, "sbin" },
{ 00755, AID_ROOT, AID_SHELL, "system/bin" },
+ { 00755, AID_ROOT, AID_SHELL, "system/vendor" },
{ 00755, AID_ROOT, AID_SHELL, "system/xbin" },
{ 00755, AID_ROOT, AID_ROOT, "system/etc/ppp" },
{ 00777, AID_ROOT, AID_ROOT, "sdcard" },
@@ -191,6 +192,7 @@ static struct fs_path_config android_files[] = {
{ 06750, AID_ROOT, AID_SHELL, "system/bin/run-as" },
{ 00755, AID_ROOT, AID_SHELL, "system/bin/*" },
{ 00755, AID_ROOT, AID_SHELL, "system/xbin/*" },
+ { 00755, AID_ROOT, AID_SHELL, "system/vendor/bin/*" },
{ 00750, AID_ROOT, AID_SHELL, "sbin/*" },
{ 00755, AID_ROOT, AID_ROOT, "bin/*" },
{ 00750, AID_ROOT, AID_SHELL, "init*" },
diff --git a/init/devices.c b/init/devices.c
index 5a580fa..595f968 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -39,7 +39,8 @@
#include "list.h"
#define SYSFS_PREFIX "/sys"
-#define FIRMWARE_DIR "/etc/firmware"
+#define FIRMWARE_DIR1 "/etc/firmware"
+#define FIRMWARE_DIR2 "/vendor/firmware"
static int device_fd = -1;
@@ -532,7 +533,7 @@ out:
static void process_firmware_event(struct uevent *uevent)
{
- char *root, *loading, *data, *file;
+ char *root, *loading, *data, *file1 = NULL, *file2 = NULL;
int l, loading_fd, data_fd, fw_fd;
log_event_print("firmware event { '%s', '%s' }\n",
@@ -550,7 +551,11 @@ static void process_firmware_event(struct uevent *uevent)
if (l == -1)
goto loading_free_out;
- l = asprintf(&file, FIRMWARE_DIR"/%s", uevent->firmware);
+ l = asprintf(&file1, FIRMWARE_DIR1"/%s", uevent->firmware);
+ if (l == -1)
+ goto data_free_out;
+
+ l = asprintf(&file2, FIRMWARE_DIR2"/%s", uevent->firmware);
if (l == -1)
goto data_free_out;
@@ -562,14 +567,17 @@ static void process_firmware_event(struct uevent *uevent)
if(data_fd < 0)
goto loading_close_out;
- fw_fd = open(file, O_RDONLY);
- if(fw_fd < 0)
- goto data_close_out;
+ fw_fd = open(file1, O_RDONLY);
+ if(fw_fd < 0) {
+ fw_fd = open(file2, O_RDONLY);
+ if(fw_fd < 0)
+ goto data_close_out;
+ }
if(!load_firmware(fw_fd, loading_fd, data_fd))
- log_event_print("firmware copy success { '%s', '%s' }\n", root, file);
+ log_event_print("firmware copy success { '%s', '%s' }\n", root, uevent->firmware);
else
- log_event_print("firmware copy failure { '%s', '%s' }\n", root, file);
+ log_event_print("firmware copy failure { '%s', '%s' }\n", root, uevent->firmware);
close(fw_fd);
data_close_out:
@@ -577,7 +585,8 @@ data_close_out:
loading_close_out:
close(loading_fd);
file_free_out:
- free(file);
+ free(file1);
+ free(file2);
data_free_out:
free(data);
loading_free_out:
diff --git a/rootdir/init.rc b/rootdir/init.rc
index e894135..29f672a 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -11,8 +11,8 @@ sysclktz 0
loglevel 3
# setup the global environment
- export PATH /sbin:/system/sbin:/system/bin:/system/xbin
- export LD_LIBRARY_PATH /system/lib
+ export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
+ export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
@@ -25,6 +25,9 @@ loglevel 3
symlink /system/etc /etc
symlink /sys/kernel/debug /d
+# Right now vendor lives on the same filesystem as system,
+# but someday that may change.
+ symlink /system/vendor /vendor
# Create cgroup mount point for cpu accounting
mkdir /acct