adb: Don't force -O2

Don't force -O2 over -O3 -- the O2 hardcode is there to force
optimizations, not to reduce them...

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
core: Increase the size of variable for the uevent.<hardware>.rc file name.

    The size of hardware is 32 bytes and the tmp variable should fit
    'uevent.' and '.rc' as well. In some cases like for the ST-Ericsson
    Snowball the 32 bytes were not enouth.
    hardware = "st-ericssonsnowballplatform"

Signed-off-by: Patrik Ryd <patrik.ryd@linaro.org>
core: Increase the size of variable for the init.<hardware>.rc file name.

The size of hardware is 32 bytes and the tmp variable should fit
'init.' and '.rc' as well. In some cases like for the ST-Ericsson
Snowball the 32 bytes were not enouth.
hardware = "st-ericssonsnowballplatform"

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
rootdir: init.rc: Restore all Linaro changes

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
rootdir: init.rc: Update init.rc for wifi

Update init.rc for wifi to create sockets folder wifi

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
rootdir: init.rc: Start gatord running at boot

This is a the daemon that the Streamline tool talks to
from ARM Development Studio 5 (DS-5)

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
sync_test: Use -fno-strict-aliasing

Use -fno-strict-aliasing here so we don't have to use it globally.
Performance on tests isn't important anyway.

Change-Id: I92ae7209ced60176cc5608f32b8ff6a911c09f10
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Allow adb shell to run as root in tests variant

Linaro is starting to use the TARGET_BUILD_VARIANT=tests, slowly
transitioning from the traditional TARGET_BUILD_VARIANT=eng builds.
Testing has found that LAVA (specifically the lava-android-test project)
expects adb shell to offer full root access. This is not the case in
'tests' builds where adb shell drops privileges and runs as the 'shell'
user.

Since it does not decrease security in any way (tests builds are marked
as insecure) would like to have adb root shell access in
TARGET_BUILD_VARIANT=tests as well.

Change-Id: I20cbe3f32385162f9dc2b6b71c47ad22b9a0924f
filesystem_config: Allow executables in /system/libexec

Files in $PREFIX/libexec, such as gcc's cc1, need to be executable.
Don't let make_ext4fs strip executable permissions from them.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
corkscrew-x86: Fix build with some glibc versions

Make sure __USE_GNU is actually set before ucontext.h is included
(even implicitly).
This should fix the build inside android-build (wasn't broken locally
in the first place).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
adb: Link to libdl manually to avoid build failure on android-build

An outdated build environment results in a host adb build failure
because libcrypto needs libdl, but libdl isn't linked explicitly:
out/host/linux-x86/obj/STATIC_LIBRARIES/libcrypto_static_intermediates/libcrypto_static.a(dso_dlfcn.o):
In function `dlfcn_globallookup':
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:474:
undefined reference to `dlopen'
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:478:
undefined reference to `dlsym'
/mnt/jenkins/workspace/linaro-android_galaxynexus-jb-gcc47-aosp-blob/build/external/openssl/crypto/dso/dso_dlfcn.c:479:
undefined reference to `dlclose'
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
init: Allow for arbitrary long /proc/cpuinfo output

get_hardware_name() uses a fixed size buffer to slurp the contents of
/proc/cpuinfo into and with newer multicore systems this is not big
enough, leading to the inability to pick up the hardware name.

Fix this by using a dynamically allocated, exponentially growing buffer.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
corkscrew: Fix build with gcc 4.8

gcc 4.8 has a new warning for unused parameters - we need to override
-Werror on that.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
rootdir: init.rc: Fix for "add_tid_to_cgroup failed to write" warnings

Logcat is full of warnings like:

 W/SchedPolicy( 2013): add_tid_to_cgroup failed to write '2371' (Permission denied); policy=1

This is fixed by giving /dev/cpuctl group write permissions, which was
surely the original intention of the init.rc setup as this is done for
the sub-directories it creates.

This fixes bug launchpad bug #1037611

Change-Id: I47ff539ef4dd9922aba0be67dbf8bd4f0a234163
Signed-off-by: Jon Medhurst <tixy@linaro.org>
rootdir: init.rc: Make gatord a oneshot service

A common scenario is for developers and testers to build custom kernels
for use with Android images and forget or not know to also rebuild then
install the gator module. This leads to a kernel version mismatch in the
gator module preventing it from loading and causing the user-side gator
daemon to fail to start. When this occurs, the gatord service is
repeatedly restarted every five seconds and this background activity can
affect any profiling and benchmarking activity being undertaken.

We can prevent this situation by marking gatord as a 'oneshot' service
so there is only one attempt to start it at boot.

Change-Id: I824b306f7b6618ce210bc44843dd2e1730ce8304
Signed-off-by: Jon Medhurst <tixy@linaro.org>
rootdir: init.rc Revert Linaro changes adding /mnt/sdcard

The legacy mount point for sdcards conflicts with current AOSP examples
and is no longer useful, so remove this and let init.<hardware>.rc be
responsible for defining the mount point and creating the /sdcard
symlink.

Change-Id: I45d9aec68b24f4fd975a35342a22777220e9460e
Signed-off-by: Jon Medhurst <tixy@linaro.org>
healtd: Send messages to Android log, not the kernel log

If the system doesn't have the expected battery configuration then
healthd is quite noisy with it's log messages during boot and every
minute thereafter. Rather than have this spamming the kernels serial
console, direct this instead to Android's logging system.

This also has the effect of working around a serial port bug on
vexpress: https://bugs.launchpad.net/linaro-android/+bug/1254738
but reducing mostly spurious serial port noise is a good aim in itself.

Change-Id: I0eff5637009cfee47891a9c2363145634cbf0ae1
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Merge remote-tracking branch 'linaro/linaro_android_4.4.2' into HEAD