Commit graph

3828 commits

Author SHA1 Message Date
Lukasz Anaczkowski
e6f8d45da8 Char device /dev/dri/card0 was not created during startup.
This device is required by libdrm for GPUs like IvyBridge.

Change-Id: I0ac47056a9cec2100f3e6eaa5591571fe6bbc145
Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2012-07-23 16:08:17 -07:00
Colin Cross
ec7d9dc713 Merge "Avoid zombies on androidscreencast" 2012-07-23 14:16:21 -07:00
Yuriy Zabroda
5a536efa5b Avoid zombies on androidscreencast
When using a third party screen capture program called androidscreencast
(http://code.google.com/p/androidscreencast/) to get the framebuffer of
the device, there are tons of screencap zombie processes got left behind.
The issue is also mentioned here: http://code.google.com/p/android/issues/detail?id=22836.
The cause of the issue is that adbd spawns off screencap processes,
and these child processes were not waited to be finished.
This change fixes the issue.

Change-Id: Ife928d65ecf6a2ff39b8b72ddba930fda6733a00
Signed-off-by: Yuriy Zabroda <yuriy.zabroda@ti.com>
2012-07-23 15:23:20 +03:00
Colin Cross
f694ba5f7f Merge changes I6c59381c,I0da088fc,I883572f5,Idc2cfe20,I1a156d10,I177abdb9,I18707bd9,I26744c74,I266f70e1,I75f10db2,I95aa2317,I2f21355b,I5d4ab07f,Ic138ad58,I012d8a42,If664e4fc
* changes:
  fastboot: add support for auto-resparsing large files
  fastboot: add fb_getvar
  fastboot: use getopt_long
  libsparse: rename symbols that conflict with libext4_utils
  libsparse: add sparse_file_len
  libsparse: add function to resparse a file and a utility to use it
  libsparse: add callback output file type
  libsparse: pseudo-subclass output_file for normal and gz files
  libsparse: add sparse_file read and convert tools to use it
  libsparse: fix windows image writing
  libsparse: merge adjacent blocks of the same type
  libsparse: add error reporting functions
  libsparse: add support for including fds
  libsparse: cleanups
  libsparse: remove static variables
  system/core: move libsparse into system/core
2012-07-17 18:36:41 -07:00
Wink Saville
b3a679386d Add telephony-common and mms-common to BOOTCLASSPATH - DO NOT MERGE
Change-Id: Ib113b8147d20fee1ec69d68cf6a7a02d59ff4df6
2012-07-17 12:23:40 -07:00
Colin Cross
f838788e6a fastboot: add support for auto-resparsing large files
Add support to fastboot for automatically using libsparse to break large
files, whether they are in sparse or normal format, into multiple sparse
files that can each fit into the target's memory.  Allows flashing
images that are larger than the size of the available memory on the
target.

By default, any file over 512MB will be sparsed into 512MB chunks.  The
limit can be modified with the -m argument, or sparsing can be forced
with -S or avoided with -N.  If -m is not specified, the target can
override the default by implementing getvar:max-download-size

Change-Id: I6c59381c3d24475c4f2587ea877200b96971cbd7
2012-07-09 22:17:58 -07:00
Colin Cross
80f2d036a9 fastboot: add fb_getvar
Add an fb_getvar helper that can be used to get values from the
target.

Change-Id: I0da088fcbc8d40076c7bf5ef6e5bbd97fae61471
2012-07-09 22:16:57 -07:00
Colin Cross
8879f988ba fastboot: use getopt_long
Modify the fastboot argument parsing to use getopt_long.  This
simplifies argument parsing, and permutes all the commands to the end of
argv to allow parsing them later.

Also moves usb initailization between argument and command processing,
to allow commands to query parameters over usb.

Change-Id: I883572f52c4190c80ee3b4aa4511ea2061a6b734
2012-07-09 22:16:55 -07:00
Colin Cross
b43828b247 libsparse: rename symbols that conflict with libext4_utils
Until ext4_utils switches to using libsparse, libext4_utils defines some
of the same symbols as libsparse.  Fastboot links statically against
both of them, and there is no easy way to make the symbols hidden, so
just rename them in libsparse.

Change-Id: Idc2cfe20efe3c3a7fb8233f453a89bbbeb0dcc8b
2012-07-09 22:09:37 -07:00
Colin Cross
317a09e2d4 libsparse: add sparse_file_len
Add sparse_file_len, which will compute the size of data that would
be produced if sparse_file_write was called.  Useful combined with
sparse_file_callback.

Change-Id: I1a156d1071760f5559483954a5c62ffc20298703
2012-07-09 22:09:37 -07:00
Colin Cross
bdc6d39ed6 libsparse: add function to resparse a file and a utility to use it
Add sparse_file_repsarse, which splits chunks in an existing sparse
file such that the maximum size of a chunk, plus a header and footer,
is smaller than the given size.  This will allow multiple smaller
sparse files to result in the same data as a large sparse file.

Change-Id: I177abdb958a23d5afd394ff265c5b0c6a3ff22fa
2012-07-09 22:09:37 -07:00
Colin Cross
1e17b313a6 libsparse: add callback output file type
Add a new output file subclass that will call a callback for
each block as it is written.  Will be used to measure the space
used by each sparse block to allow resparsing files.

Also add sparse_file_callback, which will write out a sparse
file by calling the provided write function.

Change-Id: I18707bd9c357b68da319cc07982e93d1c2b2bee2
2012-07-09 22:09:37 -07:00
Colin Cross
b4cd267db3 libsparse: pseudo-subclass output_file for normal and gz files
Create two subclasses of output_file that can handle normal
and gzipped files, and refactor open_output_fd.  Will allow
adding support for an output_file type that is not file
backed.

Change-Id: I26744c74d13f205cf17df1ea9caac1eea9c57357
2012-07-09 22:09:37 -07:00
Colin Cross
0c4c47f88d libsparse: add sparse_file read and convert tools to use it
Abstract the logic from simg2img into libsparse, and add logic
for reading a regular image into libsparse.  simg2img then
becomes a simple wrapper around libsparse.

img2simg was not actually making the file sparse, it was using
sparse files to create multiple files that could be pieced back
together.  Replace it with a simple wrapper around libsparse.
Its functionality will be replaced by an simg2simg that can
resparse a file into smaller chunks.

Change-Id: I266f70e1c750454183ce46c71a7bb66bbb033a26
2012-07-09 22:09:37 -07:00
Colin Cross
13a5606593 libsparse: fix windows image writing
Fix write_fd_chunk on windows.  Uses malloc and read instead of mmap.

Change-Id: I75f10db2e04f19e7f3a6ff46b6978d143cb5254e
2012-07-09 22:09:37 -07:00
Colin Cross
be8ddcb35a libsparse: merge adjacent blocks of the same type
When a block is added that is adjacent to another block and of the same
type, merge it.  This will be useful for converting regular images to
sparse images, allowing the reader to add a single block at a time and
letting libsparse optimize into larger blocks as it goes.

Does not support merge two blocks that are backed by a data pointer,
only blocks that are backed by a file for now.

Change-Id: I95aa231714cbe01ac194e868c21385806c0bdb97
2012-07-09 22:09:37 -07:00
Colin Cross
a21930b6b0 libsparse: add error reporting functions
Change-Id: I2f21355b6c5339d1d724b4c121ea30d575b2d366
2012-07-09 22:09:37 -07:00
Colin Cross
9e1f17e926 libsparse: add support for including fds
Add sparse_file_add_fd to include all or part of the contents
of an fd in the output file.  Will be useful for re-sparsing files
where fd will point to the input sparse file.

Change-Id: I5d4ab07fb37231e8e9c1912f62a2968c8b0a00ef
2012-07-09 22:09:37 -07:00
Colin Cross
b55dceea98 libsparse: cleanups
Move block loops into sparse.c with iterator helpers in backed_block.c.
Simplify chunk writing by moving skip chunk calls from output_file.c to
sparse.c.
Rename variables to be consistent with new naming.
Remove use of u8, u32, u64.

Change-Id: Ic138ad58bef9f96239266ccee12ee83ea285e7eb
2012-07-09 22:09:37 -07:00
Colin Cross
411619e921 libsparse: remove static variables
Removes static variables in backed_block.c to allow multiple
sparse files to be open at the same time.

Change-Id: I012d8a424c6e21a7352408416adb7c72ee8add21
2012-07-09 22:09:36 -07:00
Colin Cross
28fa5bc347 system/core: move libsparse into system/core
This moves an exact copy of libsparse from
system/extras/ext4_utils/libsparse to system/core/libsparse in
preparation for linking tools in system/core against it.

Change-Id: If664e4fcfd6612844ac745589beb1517e7f9fe58
2012-07-09 22:09:36 -07:00
The Android Open Source Project
2177c79bdd Reconcile with jb-release
Change-Id: If15d22c16a727b5a57edb82572fef50bab8f28a3
2012-06-19 06:13:58 -07:00
The Android Automerger
29f26a8dc7 merge in jb-release history after reset to jb-dev 2012-06-13 08:49:09 -07:00
Benoit Goby
504dccec97 am aeceb517: adb: Fix adb tcpip command
* commit 'aeceb5174502659cb4fff6de924b54ef7e6cdae7':
  adb: Fix adb tcpip command
2012-06-12 16:44:11 -07:00
Benoit Goby
aeceb51745 adb: Fix adb tcpip command
When running "adb tcpip 5555", adb create a service socket named
"tcpip:5555". Only compare the 6 first chars "tcpip:" to decide if
we enable exit_on_close.

Bug: 6650130
Change-Id: I0835973de044f1cfde0e859ff0277c0ccc2630a3
2012-06-12 16:14:58 -07:00
Jamie Gennis
1e96e16f81 am 0f3974c3: Merge "Enable tracing on user builds" into jb-dev
* commit '0f3974c3d0ee2ffe5e0cb9a56658ba18d511f6ea':
  Enable tracing on user builds
2012-06-12 12:41:25 -07:00
The Android Automerger
26ef0f99cd merge in jb-release history after reset to jb-dev 2012-06-12 11:25:53 -07:00
Jean-Baptiste Queru
2a2e10fbb3 am 16d2b6ae: am 91e5551f: Merge "toolbox: rmmod: fix module unloading"
* commit '16d2b6ae4050b1232fd164cef1dbade532fe29a4':
  toolbox: rmmod: fix module unloading
2012-06-11 15:25:44 -07:00
Jean-Baptiste Queru
16d2b6ae40 am 91e5551f: Merge "toolbox: rmmod: fix module unloading"
* commit '91e5551f88aea5aa64e1b4f8b4b52d7be2b28b64':
  toolbox: rmmod: fix module unloading
2012-06-11 15:23:56 -07:00
Jean-Baptiste Queru
91e5551f88 Merge "toolbox: rmmod: fix module unloading" 2012-06-11 15:16:07 -07:00
Jamie Gennis
0f3974c3d0 Merge "Enable tracing on user builds" into jb-dev 2012-06-11 12:04:27 -07:00
The Android Open Source Project
a6f4e65bc4 Reconcile with jb-release
Change-Id: Ic8df0fdb3f0a3e9eb54bbd37a929b04c394beb28
2012-06-11 09:22:54 -07:00
The Android Automerger
7452db9890 merge in jb-release history after reset to jb-dev 2012-06-11 07:05:20 -07:00
Jeff Brown
f87d9c8698 am 9cec175c: Remove a stray newline in the backtrace output.
* commit '9cec175c66100d9edbb1054f3f2977a5c3f80af2':
  Remove a stray newline in the backtrace output.
2012-06-08 15:30:33 -07:00
Jeff Brown
536b81afed resolved conflicts for merge of 053b8654 to jb-dev-plus-aosp
Change-Id: Idfef8c26b7a9e1a1a202e21dc5d34022bbaa92cc
2012-06-08 15:27:01 -07:00
Jamie Gennis
1279013dee Enable tracing on user builds
This change adds init.rc steps to:
 * allow kernel tracing to be enabled via adb
 * allow a limited set of kernel trace events to be enabled via adb
 * allow the kernel trace to be read via adb
 * allow all users to write to the kernel trace from userland

Bug: 6513400
Change-Id: Ic3c189b5697aa5edf88d2f507c932971bed6caff
2012-06-08 14:26:29 -07:00
Jeff Brown
9cec175c66 Remove a stray newline in the backtrace output.
Bug: 6615693
Change-Id: I1ac1746286afb77c3f5c4042c4592333ebb08a51
2012-06-08 14:21:51 -07:00
Jeff Brown
053b865412 Enhance native stack dumps.
Provides a new mechanism for dumpstate (while running as root)
to request that debuggerd dump the stacks of native processes that
we care about in bug reports.  In this mode, the backtrace
is formatted to look similar to a Dalvik backtrace.

Moved the tombstone generating code into a separate file to
make it easier to maintain.

Fixed a bug where sometimes the stack traces would be incomplete
because we were not waiting for each thread to stop after issuing
PTRACE_ATTACH, only the main thread.  So sometimes we were missing
traces for some threads.

Refactored the logging code to prevent accidentally writing data
to logcat when explicitly dumping a tombstone or backtrace from the
console.

Only root or system server can request to dump backtraces but
only root can dump tombstones.

Bug: 6615693
Change-Id: Ib3edcc16f9f3a687e414e3f2d250d9500566123b
2012-06-08 13:29:23 -07:00
The Android Open Source Project
d96544ff69 Reconcile with jb-release
Change-Id: Ida4b92a5bf99e33e3162186f823b410317d9f6b1
2012-06-07 07:51:38 -07:00
The Android Automerger
e545c5341f merge in jb-release history after reset to jb-dev 2012-06-05 06:59:47 -07:00
Dima Zavin
779b12fc35 am 5f2d00b0: rootdir: init.rc: remove audio app/sys groups, merge to fg
* commit '5f2d00b0677cbe9ad42ea0394def0a51aef7bdda':
  rootdir: init.rc: remove audio app/sys groups, merge to fg
2012-06-05 00:33:34 -07:00
Dima Zavin
2b628a3c2e am 29319a67: cutils: sched_policy: remove audio app/sys groups, merge into fg
* commit '29319a6753569fb3ef160c2de2f1c4d9d1398178':
  cutils: sched_policy: remove audio app/sys groups, merge into fg
2012-06-05 00:33:33 -07:00
Dima Zavin
38160c06ca am df44b886: core: init.rc: create apps cgroup for fg tasks, move bg under it
* commit 'df44b88621f60e933d7d31090bf0bb892e88142c':
  core: init.rc: create apps cgroup for fg tasks, move bg under it
2012-06-05 00:33:31 -07:00
Dima Zavin
2449c83a09 am 13ed76bf: cutils: sched_policy: make bg group be nested under fg
* commit '13ed76bfbce8e96604e781f88808b4d883891dde':
  cutils: sched_policy: make bg group be nested under fg
2012-06-05 00:33:30 -07:00
Dima Zavin
5f2d00b067 rootdir: init.rc: remove audio app/sys groups, merge to fg
With this change, the audio rr/fifo threads will just run in
the fg cgroup.

Also, the RR budget for the apps fg/bg threads has been bumped
to 80%. Ideally, the bg budget would be much smaller but there
are legacy libraries that seem to be very sensitive to this so
for now keep it at this value.

Bug: 6528015
Change-Id: I08f295e7ba195a449b96cd79d954b0529cee8636
Signed-off-by: Dima Zavin <dima@android.com>
2012-06-04 15:11:33 -07:00
Dima Zavin
29319a6753 cutils: sched_policy: remove audio app/sys groups, merge into fg
Bug: 6528015
Change-Id: I6c2658b62442d811b53c6d18476fbd6cd45f9e3f
Signed-off-by: Dima Zavin <dima@android.com>
2012-06-04 13:20:17 -07:00
Dima Zavin
df44b88621 core: init.rc: create apps cgroup for fg tasks, move bg under it
Bug: 6538553
Change-Id: I7c29975aa376bcdda9d6bbd1fd3e04fdb1c1b1fe
Signed-off-by: Dima Zavin <dima@android.com>
2012-06-04 13:02:44 -07:00
Dima Zavin
13ed76bfbc cutils: sched_policy: make bg group be nested under fg
Adds an apps cgroup which will contain fg tasks. Move the bg group
nested underneath it.

Bug: 6538553
Change-Id: I55279415da625e15a5bb061c2b45fbe7f7a4c047
Signed-off-by: Dima Zavin <dima@android.com>
2012-06-04 10:42:40 -07:00
Robert Greenwalt
6f523cda13 am 7bb1b958: am ff856a2b: Merge "Add error handling to SocketClient::sendData"
* commit '7bb1b9585d2d61beaf05c997971aee27f87ad3f7':
  Add error handling to SocketClient::sendData
2012-05-30 15:29:07 -07:00
Robert Greenwalt
7bb1b9585d am ff856a2b: Merge "Add error handling to SocketClient::sendData"
* commit 'ff856a2b927aaadb189181d2cd9dd08dc98456a4':
  Add error handling to SocketClient::sendData
2012-05-30 15:23:29 -07:00