Allow 'system' user to modify cpufreq control files

This is needed by new CPU Settings in CMParts

Change-Id: I0ec4e0b1705670034a433df549b2895985c476af
rootdir: Change sysfs permissions to allow user control ksm

Change-Id: I8a57a3d3bb7b5cd34d58416ca8778dfd6df3111b
set /system/etc/init.d/* permissions

ported from CM7

Change-Id: I279d78679f7d779d6cd6bbc6c834d94706937ae8
run sysinit during boot

ported from CM7

Change-Id: I08f8e23d83ce45366ff2a994d110dd3431efa017
init: Don't confuse do_exec with other exiting processes.

The waitpid call in do_exec may return early with EINTR when init receives
a signal, e.g., a SIGCHLD from an exiting service process.  do_exec should
check waitpid for an EINTR "error", to ensure that it returns only after
waiting on its child process.
core: allow radio users to access all rmnet* interface

Change-Id: Ibc3bf9654cf68362369422f82afe53ef86e3e710
Increase CMD_ARGS_MAX in FrameworkListener

This increases the maximum number of arguments for a framework command
from 16 to 32. 16 arguments are already used by NetworkManagementService
.startTethering().

Change-Id: I0b369889f7f790f43f9c89da0c4e133a342debd7
init: Add an emmc-specific configuration file

 * Load init.emmc.rc if emmc_boot is set
 * This makes startup much cleaner for devices with a mess of vendor RC
   configurations.

Change-Id: Ifa6d0ca104c11e037740690da0ff6284c2f4a3ca
Add required permissions and files for data

 - Add /data/radio
 - Set gateway property after DNS
 - Allow radio users to set properties associated with
   all rmnet interfaces. Not just rmnet0

Change-Id: Ia60fcb8f90aa73ffd40e839b93356ee50a9e5072
init: Properly detect hardware revision

 * get_hardware_name was returning early if the hardware type was set on
   the command line, and not proceeding to parse it from /proc/cpuinfo
 * Fix it so that it always parses ro.revision :)

Change-Id: Ib5d31d536066fc6829db756cb6e5f003a05bf440
init: Add option to disable the initlogo

 * It looks like crap on some hardware due to different framebuffer
   formats. Just disable it if the option is set.

Change-Id: Iad8ca25072fd16ca984050c6605bc1646821bee1
charger: Add support for non-standard charging interfaces

 * Certain devices may have multiple battery devices or broken uevent
   reporting when a power supply is disconnected.
 * Add a new BOARD_BATTERY_DEVICE_NAME to force which device to monitor.

Change-Id: I3045bf17a4d962cc5f0e6a951472916412ac0d0d
charger: allow custom charger res

Example: BOARD_CHARGER_RES := device/samsung/galaxys2/res/charger

Change-Id: I4cf359974475c06d219cb92c38efa2b8223ae367
init: Check for symlinks with lstat() not open()

Using open() with an O_NOFOLLOW flag will result in a file falsely
being determined to be a symlink if the open fails for another
reason.

For example, a character device that isn't ready due to the
underlying hardware not being initialized yet will fail to open()

An example of this are any CG2900 device files prior to
execution of ste-cg29xx_ctrl

This uses lstat() instead of open() with O_NOFOLLOW to check
whether a file is a symlink or not.

Change-Id: Ie0d8d94b426c84c29b1b04d41a4cc15536cb307c
Update unpackbootimg to verify the Android boot image magic value. It will also search the first 512 bytes for padding.

Change-Id: I490cba05f2bb616a3f64e3271ecaa61eb9e64be8
unpackbootimg: Fix up the padding search in case the magic does not fall on a 8 byte boundary.

Change-Id: I57471f9c2117cd7965b6958ea0aa88e356436da6
unpackbootimg: Fix magic search.

Change-Id: I68470b637556a08e48ff72b7ef8811cba13b04ad
unpackbootimg: apparently mkbootimg no longer accepts hex values

Change-Id: I95a33f7b40470e4500d418d863a65a75e7aa8499
unpackbootimg: Need to also update the written file.

Change-Id: I45faddbae85273c79b2837f97933634b6e70546f
init: Add a mechanism to extend the property service in device configs

Instead of every so often adding a new set of stuff here for a specific
device, let the device includes overload the property arrays. The
new device_perms.h header documents it

Change-Id: I477e27abebeb4b85abe5fcaf19333999b1625417