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
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

Conflicts:
	init/util.c
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

Conflicts:
	init/logo.c
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
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
init: Reintroduce support for the older charger modes

For devices with pre-ICS bootloaders, bring in the support for
arbitrary cmdline charger flags from CM7

Change-Id: Ibf887f6aeca0b68aa38fe035aa586aed502f1662

Conflicts:
	init/init.c
init: Add "export_rc" command to export env from a specified file

New export_rc command to import environment variables from
a specified file at the time the command is executed.

Differences between "import" and "export_rc":
1) export_rc can only import environment vars
2) export_rc is performed when the command
   is executed rather than at the time the
   command is parsed (i.e. "import")

Example:
in /init.rc:
    on post-fs
        export_rc /system/etc/init.xyz.rc

in /system/etc/init.xyz.rc:
    export LD_PRELOAD /system/lib/libxyz.so

Change-Id: If616dea5b508c27e9f7a95b5e9db696ecea2fdee
init: Add support for properties expansion in exec command

Add Android properties expansion to 'exec' arguments.
E.g.  exec /system/bin/log ${sys.usb.config}

CRs-Fixed: 390942
Change-Id: Ie520396d951e578bd9f591734a45d2f460b8f51d
init: Set the "ro.boot.emmc" property

 * QC switched to this from the old "ro.emmc" property.
 * Set both values since many things depend on this.

Change-Id: I958dbb13b08bd576ad16318683a0eac45dfc6fee
Provide permission for graphics to set service.bootanim.exit prop

Change-Id: If23d14172022907fcefdcf7430904eb560d4d64c
init: Allow device-specific appends to the property service permission structs

Extends device_perms.h API to allow property_perms and control_perms to be
appended on a device-specific basis, without needing to redefine the entire
struct contents.
Allow a device to define the max number of service groups in init.h

Certain proprieatary binaries (such as tcmd for instance) require
more than 12 supplementary service groups.  By definiing:
TARGET_NR_SVC_SUPP_GIDS := in BoardConfig this can now be changed
per device.

Change-Id: I8f968adc21768ca90232ded7b7e1ffa68dc7ea78
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
Deprecate distinct boot paths for androidboot.emmc

Qualcomm used to require a "on emmc-fs" to distinguish multi-boot
devices, in replacement of the usual "on fs". This distinction has
been deprecated in jb, and it's breaking mako

Change-Id: I8ef5c932efcd5e7f8d6f6fce0915683d84c3ee11

Conflicts:
	init/init.c
init: Bring back support for arbitrary chargermode cmdlines

This was accidentally removed while debugging the init breakage
fixed in change I8ef5c932efcd5e7f8d6f6fce0915683d84c3ee11. Put
it back

Change-Id: If35b9d5db281f8aab6de26f2bb63717d28b2db30
Set ANDROID_PROPERTY_WORKSPACE in exec.

Change-Id: Ib827bf14b4463ca6277b79256bcc4cd70f63fc31
Init: Allow building of init that is compatible with second init boot

When using second init init has already set up /dev /proc, etc
this will prevent duplicate mount points for those
Define BOARD_USE_NO_DEVFS_SETUP := true to use

Change-Id: I5620664b32e08f39da7ef7c7f9c3824d01f930d6
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
init: fix indentation and tab

Change-Id: Ia832ab4df5d955b2fa2b791baf9444aca21c2571
init: Allow basic environment variable expansion in env assignment

Allow environment variable expansion in 'export' command if the
value begins with "${_var_}" (where "${_var_}" will be replaced
with the current value of environment variable _var_).  Expansion
will only occur one time.

e.g.
export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/abc.jar
(cherry picked from commit 7940299507f15055851a6e8b61ae8d8a7d7f3484)

Change-Id: If9e4adfa1aba2c7a4ca243978ced3c46c2cb4d73
libion: Support for old ION API

 * Kernel 3.0 doesn't have heap_mask or SYNC ioctl, so add a board flag
   so that proprietary code that uses the old kernel API directly still
   works.

Change-Id: I4227c79a5de46c60eeebd2e16ca88dd6d580916a