Commit graph

114 commits

Author SHA1 Message Date
Brian Swetland
02863b957c add /vendor support
- look in /vendor/firmware/... in addition to /system/etc/firmware/... for firmware loading
- add /vendor/bin to path before /system/bin
- add /vendor/lib to ldpath before /system/lib
- configure appropriate permissions for /system/vendor/bin
- symlink /vendor -> /system/vendor

Change-Id: I0c06ca1e38a44f0c7024cee6cea8907aa93a4532
2010-09-19 03:36:39 -07:00
Colin Cross
17dcc5c57d Use makedev helper for device major and minor numbers
Major and minor numbers can be greater than 255.  Major numbers
are 12 bits, and minor numbers are 20 bits.  Supporting major
and minor numbers > 255 allows the use of the extended block
device for extra mmc partitions.

Change-Id: I4c42bfe0781069e8e4cb13ebe26e860cdc03f866
2010-09-03 12:27:01 -07:00
Nick Kralevich
fad7204e9e resolved conflicts for merge of 5f5d5c8c to gingerbread
Change-Id: Ieee2cd67d33f3e774fcfd96f8a5f67a0374aa873
2010-07-19 15:53:05 -07:00
Nick Kralevich
5f5d5c8cef validate the source of uevent messages
Bug: 2844206
Change-Id: If2eee54181abfc6c7fda0232f98fa6bb5d12c60c
2010-07-19 14:54:50 -07:00
Brian Swetland
25b15be912 init: use tmpfs/ftruncate for properties backing store instead of ashmem
This removes the need for ashmem for early bringup and avoids an issue
with permissions enforcement.

Change-Id: I405b080660934d73048c79d614b6b2ebc43ab182
Signed-off-by: Brian Swetland <swetland@google.com>
2010-07-13 16:43:56 -07:00
Colin Cross
982a815c10 Reap firmware child processes to prevent zombies
Change-Id: Ic6c50b929a025f05450cd309238e60a857690d9b
2010-06-03 12:21:01 -07:00
Mike Lockwood
c0d8fb5842 DO NOT MERGE resolved conflicts for merge of e95aad61 to kraken
this change is already in master

Change-Id: Ica43eae28b50d89d50217851aff7e62978abfa27
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-17 14:24:36 -04:00
The Android Open Source Project
e95aad61d8 merge from open-source master
Change-Id: I414c9479f4f913c777ef18b7ff27e410f49d35b9
2010-05-17 08:54:31 -07:00
Mike Lockwood
93ac1559b8 init: Add support for /dev/bus/usb/ file system and add new unix group AID_USB.
init now creates files in /dev/bus/usb/ for user access to USB devices.
Files are chmod 660 with group AID_USB.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-16 16:04:51 -04:00
Colin Cross
33680b106d init: Use a relative symlink for ueventd to init
make doesn't seem to handle the absolute symlink from
$OUT/root/sbin/ueventd to /init well - it follows the link during
dependency resolution, decides $OUT/root/sbin/ueventd doesn't exist
because /init doesn't exist, and relinks it every time.

Change-Id: I9ca1c14fe5fa80634f51ffc51a7c73146d29d42e
2010-04-22 13:34:16 -07:00
Colin Cross
ebd4613bfc init: Fix init spinning once init.rc is complete
When the init process ran out of actions to execute, cur_action was
NULL and action_queue_empty() was true, but cur_command was still
set.  This patch clears cur_command when a new action is retreived,
and only depends on cur_action and action_queue_empty() to determine
the poll timeout.

Change-Id: Iaa95063c8c267a5b1ada9f20363b99c433e61ac4
2010-04-22 11:52:23 -07:00
Colin Cross
44b65d047c init: Add ueventd.rc parsing to ueventd
Change-Id: Iea53050d6c10e8cabf563e5d80e84eaf78873695
2010-04-21 20:59:42 -07:00
Colin Cross
f83d0b9af5 init: Move uevent handling to an external ueventd process
Change-Id: Iea6c56013062ade633a1754f7bcf8cf09b3dedc1
2010-04-21 20:59:38 -07:00
Colin Cross
6310a8261c init: Split parser into generic parser and init parser
Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
2010-04-21 19:43:40 -07:00
Colin Cross
3294bbbad9 init: Allow services to start before property triggers are up
Change-Id: I4f87657123bea88b7b5c537781868908d8d66b01
2010-04-21 19:43:35 -07:00
Colin Cross
cd0f173e27 init: Add wait command and mount wait flag
Change-Id: I6b4c10f8f246095a7fb7342388ec4f6ff97d5733
2010-04-21 19:43:35 -07:00
Colin Cross
ed8a7d8442 init: Move list and log handling to list.h and log.h
Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
2010-04-21 19:43:35 -07:00
Colin Cross
12541c6131 init: reap exited child processes on signal_init
If any child processes exit before signal_init, they won't get reaped
unless another child process exits after signal_init.  Calling
handle_signal from signal_init forces them to be reaped immediately.

Change-Id: I459cfbfe6cf00f29454c62a8c840baf21cb1fb03
2010-04-21 19:43:35 -07:00
Colin Cross
b0ab94b7d5 init: create symlinks to block device nodes
eMMC block device names may change based on the detection order of
the eMMC device and any other SD bus devices, such as a removable SD
card.

This patch adds support to init for:
  * Symlinks to block devices.  When a block device uevent is
    processed, if it starts with "/devices/platform", the platform
    driver name is parsed out, and symlinks to the block device are
    created in /dev/block/platform/<platform driver>/
  * Symlinks based on partition name and number.  If the uevent for
    a block device contains information on the partition name or
    number, symlinks are created under
    /dev/block/platform/<platform driver>/by-num/p<partition>
    and
    /dev/block/platform/<platform driver>/by-name/<partition name>

init.rc can then use a device path like the following to mount an
eMMC device:
/dev/block/platform/<platform>/by-name/system /system ro

Change-Id: Id11bb7cdf1e2ada7752a5bd671cbf87237b34ae2
2010-04-21 19:43:28 -07:00
Jay Freeman (saurik)
ed33625a4a Added a move flag for init's mount command that maps to MS_MOVE.
Change-Id: I7bc1a8ac5f73a34c101247f984cbf9ff29e02e7f
2010-04-20 15:21:35 -07:00
Colin Cross
ebc6ff105a init: Handle commands in event queue loop
Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
2010-04-16 19:02:32 -07:00
Colin Cross
3899e9fc01 init: Move prototypes for util.c into util.h
Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
2010-04-13 22:52:10 -07:00
Colin Cross
9c5366ba55 init: Move signal handling to signal_handler.c
Change-Id: I3a24afa28a1cd279c749d6f384f687b8de56067e
2010-04-13 22:52:10 -07:00
Colin Cross
504bc5175a init: Move gettime() to util.c
Change-Id: I1df96964763f8baedbc1cea6875d3dfc5e48c065
2010-04-13 22:52:10 -07:00
Colin Cross
d11beb2b15 init: Move property_set_fd to property_service.c
Change-Id: Ic7a19073eae8f353d48cabee80fa9722b35a82b5
2010-04-13 22:52:10 -07:00
Colin Cross
ca7648ddfb init: Move parser prototypes to parser.h
Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41
2010-04-13 22:51:12 -07:00
Colin Cross
0dd7ca6e87 init: Move device_fd to devices.c
Change-Id: I11ed0f3e1b95d2cff4fdbd80b915c01572f76b0e
2010-04-13 22:47:08 -07:00
Colin Cross
a866695ebe init: Move keychords to keychords.c
Change-Id: I8fba9f5f73439a451fc961f8111612dff4fb5dfd
2010-04-13 22:46:44 -07:00
Colin Cross
f24ed8ca0a init: Move mtd functions from init.c to util.c
Change-Id: I04e8f0ae6cc88af974372872e5617d16e0b1a2c8
2010-04-13 20:07:22 -07:00
Colin Cross
31712beaf7 Move filesystem mounting into a new "fs" init level
Devices with non-MTD storage need to override the filesystem mounting
commands in init.rc.  Moving them to a new "fs" init level allows a
custom init.<device>.rc to handle the mounting.

Change-Id: If0e655139b9734650fb798b6eb0a90e2241fc29b
2010-04-13 20:06:03 -07:00
Nick Pelly
830abe0424 MOAR GROUPS
We were hitting the old limit with mediaserver.

Change-Id: Ia8217a9f2a1076fa247d7f5ed5159e3c91244d78
2010-03-23 20:39:05 -07:00
San Mehat
4e221f0077 init: Add support for specifying a services i/o priority
Signed-off-by: San Mehat <san@google.com>
2010-02-26 10:05:20 -08:00
Iliyan Malchev
32f51664c8 am 4f4ccaa1: am 1404c27b: Merge "system/core/init: set proper permissions for tpa2018d1 (CDMA)" into eclair
Merge commit '4f4ccaa1bd079ebc67a97709bbb7ab5ada7449d5'

* commit '4f4ccaa1bd079ebc67a97709bbb7ab5ada7449d5':
  system/core/init: set proper permissions for tpa2018d1 (CDMA)
2010-02-02 14:25:55 -08:00
Iliyan Malchev
4f4ccaa1bd am 1404c27b: Merge "system/core/init: set proper permissions for tpa2018d1 (CDMA)" into eclair
Merge commit '1404c27bff1499dae9b640870ce2251d78cdc5ef' into eclair-plus-aosp

* commit '1404c27bff1499dae9b640870ce2251d78cdc5ef':
  system/core/init: set proper permissions for tpa2018d1 (CDMA)
2010-02-02 14:20:30 -08:00
Iliyan Malchev
1340a095ac system/core/init: set proper permissions for tpa2018d1 (CDMA)
Signed-off-by: Iliyan Malchev <malchev@google.com>
2010-02-02 13:57:12 -08:00
Nick Pelly
6405c6953f Clean fix for the chown race condition on new input devices.
Drop init's egid to AID_INPUT while creating the device node, so that it is
created with the correct gid. This eliminates the
possibility of system_server opening the device node before its permissions
are set correctly.

Using setegid() allows us to swap back to AID_ROOT immediately after mknod().

Bug: 2375632
2010-01-22 11:50:49 -08:00
Mike Lockwood
7a36210cdb init: Support bugreports to SD card in user builds if adb is enabled.
The rationale being that we do not want this enabled by default, but
tying it to adb being enabled allows convenient bugreport collection
for savvy users and developers using production devices.

Change-Id: I71535b33f0774faf1975c98d106080f2ff12e349
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-01-19 14:41:40 -05:00
Oscar Montemayor
ef4e21520c Encrypted File SYstems project. Enabling EFS security properties.
This change enables persist.security.* flags in the device, allowing oly the system to modify them.
Change is necessary to allow for further progress in the project, as this is an ideal location for access both from the
framework as well as from the recovery mode / transition.
2009-11-12 12:02:24 -08:00
Dima Zavin
5c204f59f7 am 7789f4cc: am 065694b3: init: devices: Remove pmem_gpu regions as they are not needed since we have an mmu
Merge commit '7789f4cc4b712f15e0e5306a874ad6f47dc8c5c0' into eclair-mr2-plus-aosp

* commit '7789f4cc4b712f15e0e5306a874ad6f47dc8c5c0':
  init: devices: Remove pmem_gpu regions as they are not needed since we have an mmu
2009-10-15 02:43:55 -07:00
Dima Zavin
68b88de455 am 68221b91: am 8234aa37: init: Add qdsp6 video encoder, q6venc, device owned by system.audio
Merge commit '68221b91b13b174c9bc14c43f2d88bada0fa9546' into eclair-mr2-plus-aosp

* commit '68221b91b13b174c9bc14c43f2d88bada0fa9546':
  init: Add qdsp6 video encoder, q6venc, device owned by system.audio
2009-10-15 02:43:51 -07:00
Dima Zavin
c459372bc7 am 065694b3: init: devices: Remove pmem_gpu regions as they are not needed since we have an mmu
Merge commit '065694b32e481a50e57a793d61181494fbf6ef04' into eclair-plus-aosp

* commit '065694b32e481a50e57a793d61181494fbf6ef04':
  init: devices: Remove pmem_gpu regions as they are not needed since we have an mmu
2009-10-15 02:36:09 -07:00
Dima Zavin
d818938280 am 8234aa37: init: Add qdsp6 video encoder, q6venc, device owned by system.audio
Merge commit '8234aa375896718e19b4450bcb44fa4376f53486' into eclair-plus-aosp

* commit '8234aa375896718e19b4450bcb44fa4376f53486':
  init: Add qdsp6 video encoder, q6venc, device owned by system.audio
2009-10-15 02:36:05 -07:00
Dima Zavin
065694b32e init: devices: Remove pmem_gpu regions as they are not needed since we have an mmu
Change-Id: I2f8f0440d9a21230c7711cb6d9a20ec6887b7cb9
Signed-off-by: Dima Zavin <dima@android.com>
2009-10-15 02:24:06 -07:00
Dima Zavin
8234aa3758 init: Add qdsp6 video encoder, q6venc, device owned by system.audio
Change-Id: I86173e07163b70ce8990b8508afba44729c0d8ca
Signed-off-by: Dima Zavin <dima@android.com>
2009-10-15 02:18:57 -07:00
Tom Zhu
4d0b21f4ac am 4833d9f4: init: builtins: trancate target file in do_copy
Merge commit '4833d9f4986d6dafacff841beb3bf93172c84bdc' into eclair-plus-aosp

* commit '4833d9f4986d6dafacff841beb3bf93172c84bdc':
  init: builtins: trancate target file in do_copy
2009-09-30 14:25:47 -07:00
Tom Zhu
4833d9f498 init: builtins: trancate target file in do_copy
add O_TRUNC flag in open(), which will truncate the target file,
otherwise, copy will keep the old content of the target file.

Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
2009-09-30 14:15:49 -07:00
Jean-Baptiste Queru
7547955375 merge from open-source master 2009-09-16 16:22:22 -07:00
Sean McNeil
102f6d2c64 Set permissions properly for any ALSA device under /dev/snd 2009-09-15 10:17:35 -07:00
Dima Zavin
27b8b3a1aa am e67eff1c: Merge change 24564 into eclair
Merge commit 'e67eff1c615c98bf9ad51be9e474ef9ee82b6565' into eclair-plus-aosp

* commit 'e67eff1c615c98bf9ad51be9e474ef9ee82b6565':
  init: Make /dev/pmem_gpu* be writable by all
2009-09-10 14:26:16 -07:00
Dima Zavin
c2d8e0e701 init: Make /dev/pmem_gpu* be writable by all
STOPSHIP: The actual device entry needs to be removed once the products
that use this switch on the mmu.

Change-Id: I10afea36c8731d845382665ed3db7647f68d1276
Signed-off-by: Dima Zavin <dima@android.com>
2009-09-10 12:34:32 -07:00