Commit graph

73 commits

Author SHA1 Message Date
Nick Kralevich
e3ab424570 am a7cf7ed9: am 282c2ab4: Merge "Fold uevent message origin checking from init into libcutils."
* commit 'a7cf7ed93486240ca48a407e67c7c3683a3b93aa':
  Fold uevent message origin checking from init into libcutils.
2011-04-27 09:59:14 -07:00
Vernon Tang
8405ec0e75 Fold uevent message origin checking from init into libcutils.
Change-Id: I1a38e611a7ad990f74306ce453740a1eeed2416d
2011-04-27 14:17:15 +10:00
Olivier Bailly
b93e5812fa Add missing headers for compilation on x86 targets
Change-Id: I5f4dc797b353a0f01fa00d38375ec303bf863254
2010-11-17 11:47:23 -08:00
Benoit Goby
609d8828d3 init: Abort firmware transfer if firmware is missing
If firmware is not found, write -1 /sys/$DEVPATH/loading to cancel the
firmware load. Otherwise the driver has to wait for the 60s timeout.

Change-Id: Id2787cda9b2be45b9adea41f6f161cd54cda212e
Signed-off-by: Benoit Goby <benoit@android.com>
2010-11-09 18:49:40 -08:00
Brian Swetland
7ca8f1243b am 439b4dfb: am bc57d4ce: init: support owner/permission setting for sysfs attributes of devices 2010-10-26 15:42:22 -07:00
Brian Swetland
bc57d4ce92 init: support owner/permission setting for sysfs attributes of devices
This should be much nicer than peppering init.rc with chown/chmod
directives.

Also, remove some dead code and obsolete comments.

Change-Id: I10895f10a9cf2f1226c8d12976cd3db3743da9ec
2010-10-26 15:37:06 -07:00
Brian Swetland
d06df51bcd resolved conflicts for merge of 3b5214a6 to master
Change-Id: Id73c53c6c2e9c21eb9b1d1e624aaeb25097ea7a4
2010-09-19 04:35:19 -07:00
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
3eaa4e52d3 am 49b8124a: am 17dcc5c5: Use makedev helper for device major and minor numbers
Merge commit '49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19'

* commit '49b8124a1759cb8b27e0c21a1a5a54b8a81bdb19':
  Use makedev helper for device major and minor numbers
2010-09-03 14:13:05 -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
Benoit Goby
d2278638d6 init: Add symlinks to USB character devices
Since we now support USB host mode, devices might get a different device
file depending if other devices are connected on the host port. This
patch creates symlinks to USB character devices that depend on the port
devices are connected to, but not on the order they have been probed.
(e.g. /dev/usb/tty2-1:1.0 -> /dev/ttyUSB0)

Change-Id: I285bcc2d59446fbff8a7abbe39c21781f3bb4bd3
2010-08-10 15:13:07 -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
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
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
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
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
Colin Cross
0dd7ca6e87 init: Move device_fd to devices.c
Change-Id: I11ed0f3e1b95d2cff4fdbd80b915c01572f76b0e
2010-04-13 22:47:08 -07: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
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
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
Brian Swetland
2552402f9a am 69551d85: Merge change 23557 into eclair
Merge commit '69551d85e95d2ba712f083b39f3ff0b32f865e34' into eclair-plus-aosp

* commit '69551d85e95d2ba712f083b39f3ff0b32f865e34':
  init: add some more audio devices
2009-09-02 16:29:19 -07:00
Brian Swetland
c822213603 init: add some more audio devices
Signed-off-by: Brian Swetland <swetland@google.com>
2009-09-01 17:23:48 -07:00
Jean-Baptiste Queru
8c92ba1921 merge from open-source master 2009-09-01 08:28:21 -07:00
Dima Zavin
c84016778f init: add vdec device node
Change-Id: I7e83b99111adfb2b10ee91b78f922864999d4b9d
Signed-off-by: Dima Zavin <dima@android.com>
2009-08-31 13:40:28 -07:00
Chuck Tuffli
1e070846f8 Fix incorrect check for LOG_UEVENTS
LOG_UEVENTS is a boolean value as defined in system/core/init/init.h.
Therefore, code should use an #if check and not an #ifdef check as the
macro will always be defined.
2009-08-26 09:26:46 -07:00
Iliyan Malchev
3bc1e9cd7b devices: set permissions for lightsensor
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-08-20 08:52:56 -07:00
Dima Zavin
37b210f560 init: set the correct kgsl device node permissions 2009-08-11 16:19:52 -07:00
Iliyan Malchev
6ed11ebecd init: /dev/diag, /dev/diag_arm9 now owned by AID_RADIO
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-08-05 09:50:12 -07:00
Dima Zavin
46e8863d77 init: Add hw3d master/client nodes to device list.
Signed-off-by: Dima Zavin <dima@android.com>
2009-08-03 23:05:29 -07:00
Iliyan Malchev
ce62102feb init: add permissions for /dev/diag and /dev/diag_arm9
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-08-03 20:22:55 -07:00
Jean-Baptiste Queru
96d58f4f52 Merge korg/donut into korg/master 2009-07-25 18:07:41 -07:00
Ken Schultz
be65da47e6 init: Change owner of /dev/uinput to system
This will allow the the uinput driver to be used by the system process
as well as bluetooth, which is needed for sensors.

Signed-off-by: Ken Schultz <kschultz@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-15 19:00:00 -04:00
Iliyan Malchev
3306e0678c set permissions for capella cm3602 proximity sensor
Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-07-08 20:37:43 -07:00
repo sync
60a4cd5e34 resolved conflicts for merge of abb08550 to master 2009-06-30 11:09:06 +08:00