Commit graph

447 commits

Author SHA1 Message Date
Christopher Ferris
5956b4e314 More kernel header cleanup.
Modify the generate script to add a new option and copy the types.h
arm header file since it's not currently being created properly. Also
manually generate the arm types.h uapi header since it's not being
properly generated right now.

Modify both generate scripts to delete the target directories before
adding the files to handle moved/deleted header files.

Move the common/scsi headers into android and delete the common
directory. Change the scripts to reflect this change.

Update the scsi headers since they've been modified in upstream kernels.

Bug: 30072483

Change-Id: Ia43d4b238b6a041350d60cc30184ecbd4829d7d5
2016-07-22 12:21:25 -07:00
Christopher Ferris
d6e8b8ca56 Move/remove android only kernel uapi headers.
Move all of the uapi kernel headers that are only found in the android
kernel, and are still used by the tree into their own directory.

Delete all of these files that are not used.

Also, delete binder.h from the linux directory since it already exists
in the linux/android directory.

Bug: 30072483
Change-Id: I879f16e366f7670b8be3546b0a9cf9567fce6526
2016-07-19 12:43:56 -07:00
Christopher Ferris
2974eeca4c Update the kernel header documentation.
Change the references to using the android kernel source, to use
the linux stable source code repository.

Change-Id: Ibc6c90fc67c80bef235459bb3af31656f4d403ac
2016-07-08 15:29:51 -07:00
Christopher Ferris
82ef6a19cb Updated to v4.4.11 kernel headers.
Change-Id: I6b55a921670d32d7bfff3c304d8001058409d3f7
2016-05-19 17:03:14 -07:00
Christopher Ferris
05d08e9716 Updated to v4.4.1 kernel headers.
Small modifications needed to allow compilation with the new headers:

- Manually modify bionic/libc/kernel/uapi/asm-mips/asm/siginfo.h to
  remove the uapi from the include.
- PR_XXX defines are now available for mips, so remove the definition
  from linker_mips.cpp.

Bug: 23789423
Change-Id: I6dc8a03b012426d3a937db15cb24d3a50fab5a8c
2016-02-05 16:03:55 -08:00
Elliott Hughes
f8a2243ebe <netinet/udp.h> should include <linux/udp.h>.
The comment about "other stuff" referred to pre-uapi headers. Everything
in the current <linux/udp.h> should be exposed to userspace. The only
problem is that BSD and Linux use different names for the members of
struct udphdr. We can move the Linux udphdr out of the way and use an
anonymous union to get the best of both worlds. (Though unfortunately
this means that code that includes <linux/udp.h> directly instead of
using <netinet/udp.h> now won't have any definition of struct udphdr.
We've taken the stance in the past that you shouldn't include a linux/
header if there's a standard equivalent --- you should rely on us
transitively including it for you.)

Change-Id: Ie625892441b0edd8df3b76d3fcf2cbe299077bc4
2015-09-22 12:34:13 -07:00
Christopher Ferris
6048173b36 Import scsi headers.
Linux's scsi headers are a mix of userspace-facing and kernel-facing
declarations that can't be directly used by userspace.  The glibc
maintainers manually copy-and-pasted these definitions into their own
scsi headers and haven't substantially updated them in 15 years.  musl
has a similar set of definitions in its scsi headers.

This change generates the scsi headers from external/kernel-headers,
using the updated generation script so that the single modified scsi.h
takes the place of the non-modified one.

Change-Id: Ic14d155aa534b0edc1ee686d61113ce5cdf0e6af
2015-09-17 21:22:44 -07:00
Christopher Ferris
d12c332018 Add support for manually modified kernel headers.
This changes the scripts so that if some kernel files exists
in external/kernel-headers/modified, that they will be preferred
over the same files found in original. This is to support the case
where the kernel headers cannot be taken without some small modifications.

Included with this change, is a general cleanup of the python scripts.

This also modifies the generate uapi headers script to indicate if the
source of the modified headers has changed.

Change-Id: Id13523b244ced52a2ecd9f1399c43996dd8296fa
2015-09-17 21:02:52 -07:00
Christopher Ferris
915bf813ad Update to v3.18.21 kernel headers.
Change-Id: I4ade68d62981c7f6f361750cc811e8d84be9d5b9
2015-09-02 17:23:31 -07:00
Christopher Ferris
dda4fd4644 Update to v3.18.18 kernel headers.
Change-Id: I0a0f423bda89500ad8e13a80582f05ec8bc756ea
2015-07-13 17:21:18 -07:00
Tao Bao
7592008030 Update the search path for libclang.so
Prebuilt shared libraries (libclang.so, libLLVM.so and etc) have been
moved to prebuilts/sdk/tools/linux/lib64. Update the search path in
cpp.py to match the change.

Bug: 20485471
Change-Id: Ib7784db4d5529d16a1e2bfc07cb0237929bc5a64
2015-04-22 10:47:01 -07:00
Christopher Ferris
e01d32f802 Upgrade kernel headers to 3.18.10.
Change-Id: Iff1f1c830780585990856a5114b559c61282dcd6
2015-03-31 14:57:48 -07:00
Yabin Cui
2d8f9b5aea Define MAXHOSTNAMELEN explicitly in source files.
Bug: 19093777
Bug: 19092844
Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
2015-02-09 19:56:47 -08:00
Tao Bao
d7db594b8d Switch kernel header parsing to python libclang
Replace the tokenizer in cpp.py with libclang.

Bug: 18937958
Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
2015-02-06 14:48:41 -08:00
Christopher Ferris
82d7504cd7 Update kernel headers to v3.18.3.
Bug: 19127803
Change-Id: I67fa0832322ddd0032d909476047578be052bcf2
2015-01-26 10:57:07 -08:00
Kyunam Jo
fa343e630d fix runtime issues for scripts
now, some script to update kernel-headers is not working.
because of wrong variable value and test codes.
so this issue is fixed.

Change-Id: Iffae9607858cc3c1c58fa24244be217b5a1ab06e
2014-12-10 07:53:07 +00:00
Christopher Ferris
cbf33a9988 am d5e1c583: Merge "Move to v3.16.3 kernel headers."
* commit 'd5e1c583a66a821c7d7e8f43e1238a4569981b90':
  Move to v3.16.3 kernel headers.
2014-09-18 21:48:49 +00:00
Christopher Ferris
653676dde8 Move to v3.16.3 kernel headers.
Change-Id: Ife491bd7630b853a78532dd74e4644438256a3a1
2014-09-18 13:14:58 -07:00
Christopher Ferris
aac37784df am 0bd28a43: Merge "Update kernel uapi headers to v3.16.1."
* commit '0bd28a43dae87c808f6af61ad3dba042b35be7e7':
  Update kernel uapi headers to v3.16.1.
2014-09-18 00:41:24 +00:00
Christopher Ferris
ba8d4f460b Update kernel uapi headers to v3.16.1.
Other changes to support the new headers:

- Remove the flock64 structure it is defined in the new headers.
- Update the syscalls to correspond with the headers.

Change-Id: I49a6b07e8b2bfffb67be71b07b58e4e6848fcc09
2014-09-17 17:05:17 -07:00
Christopher Ferris
e2d86feb7b Pull input.h from v3.16.1 kernel headers.
(cherry-pick of 027d2717d067c3706f22bf84dc1226ede7c1566d.)

Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51
2014-09-17 15:18:21 -07:00
Christopher Ferris
07ce976788 am 027d2717: Pull input.h from v3.16.1 kernel headers.
* commit '027d2717d067c3706f22bf84dc1226ede7c1566d':
  Pull input.h from v3.16.1 kernel headers.
2014-09-14 19:51:38 +00:00
Christopher Ferris
027d2717d0 Pull input.h from v3.16.1 kernel headers.
Bug: 17407564
Change-Id: Idcfc40a7254605280e3d5474c61ae1ab7b2b7b51
2014-09-14 12:08:37 -07:00
Elliott Hughes
28bd4fd080 am 3bcd414b: Merge "Clean up some of our python scripts."
* commit '3bcd414b78e515482139c7dc3dad8cad3357b374':
  Clean up some of our python scripts.
2014-08-20 20:49:21 +00:00
Elliott Hughes
dc1fb7000a Clean up some of our python scripts.
Change-Id: Ifa75345db43434298cfb6113fbe2f7a33b88c79d
2014-08-20 11:16:11 -07:00
Christopher Ferris
013c9b8035 Add gen syscalls step to instructions.
Also, fix incorrect path to some tools.

(cherry picked from commit ea271fdf26)

Change-Id: Ie93cbc84b9a46d622b0b462a33bed0ee129992cb
2014-07-18 16:56:33 -07:00
Christopher Ferris
f64411e7a8 am 64035c4a: Merge "Add gen syscalls step to instructions."
* commit '64035c4a4b52ce87398e3a5945ad6b755c8f35b1':
  Add gen syscalls step to instructions.
2014-07-16 02:56:22 +00:00
Christopher Ferris
ea271fdf26 Add gen syscalls step to instructions.
Also, fix incorrect path to some tools.

Change-Id: I409fc02d7077f0d2811d90be19550e70f5d73c0e
2014-07-15 19:02:33 -07:00
Christopher Ferris
18a25078f0 am c6bc0017: Merge "Update kernel headers to v3.14."
* commit 'c6bc001776931fd1c8583df2b8948dcb8bf61007':
  Update kernel headers to v3.14.
2014-07-12 01:41:50 +00:00
Christopher Ferris
38062f954c Update kernel headers to v3.14.
Other changes:
- Modify update_all.py to skip ion header files when importing into aosp.
- Fix generate_uapi_headers.sh to handle imports from a linux-stable kernel.

Change-Id: I1ad81b9ccb063c21740f9875f2cc1238052cd4b3
2014-07-10 13:32:32 -07:00
Christopher Ferris
92f979725f am 6131798e: am ac86f994: Merge "[MIPS64] Regenerate mips kernel headers with fixed tool"
* commit '6131798e574d85200053d93bc2673ab5a0f715fe':
  [MIPS64] Regenerate mips kernel headers with fixed tool
2014-06-21 01:06:58 +00:00
Christopher Ferris
4a96c1b216 am 40b85d34: am eee5f173: Merge "[MIPS64] Adjust kernel/tools for mips32,mips64 headers"
* commit '40b85d34e0f87bdb0ede4c36d6389a7af9c6548c':
  [MIPS64] Adjust kernel/tools for mips32,mips64 headers
2014-06-21 01:06:57 +00:00
Duane Sand
2300332596 [MIPS64] Regenerate mips kernel headers with fixed tool
Change-Id: I530891123cba78edbea4aa8af88390213711ab16
2014-06-20 11:08:49 -07:00
Duane Sand
a69eaec4d4 [MIPS64] Adjust kernel/tools for mips32,mips64 headers
Define CONFIG_32BIT as _ABIO32 rather than as 1;
it needs to be undefined for calls from mips64.
We need  defined(CONFIG_32BIT) == !defined(CONFIG_64BIT),
and get that via  defined(_ABIO32) == !defined(__LP64__).

Define CONFIG_CPU_LITTLE_ENDIAN to get correctly-placed
struct msqid64_ds fillers on ipc calls from mips32.
Without this, big-endian fillers were erroneously used.
This bug exists in prior mips32 Android releases.

Define __SANE_USERSPACE_TYPES__ to use int_ll64.h
rather than int_ll64.h on mips64.
This depends on external/kernel-headers patch
 https://android-review.googlesource.com/#/c/98915/
 http://patchwork.linux-mips.org/patch/6890/

Change-Id: If65fa80746533723cdf46eebe95733bea7ce24ba
2014-06-20 10:46:28 -07:00
Christopher Ferris
28f321aa0f am 1b8163f5: am 1cada9b3: Merge "Remove unused scripts."
* commit '1b8163f5e686bc2405731d529c684c06bae65f17':
  Remove unused scripts.
2014-06-07 02:11:49 +00:00
Christopher Ferris
4ff5aa3568 am 5261fd2c: am b837767a: Merge "Update kernel header generation docs."
* commit '5261fd2cacc8a53643089cab9fbbeb8142f98dea':
  Update kernel header generation docs.
2014-06-06 22:35:55 +00:00
Christopher Ferris
ab39aba70e Remove unused scripts.
Change-Id: I3391d6c903f710b45e62bcf01058cf3ad9abe399
2014-06-06 15:28:42 -07:00
Christopher Ferris
08b60747fe Update kernel header generation docs.
Also move the description of the cleanup data to the cleanup script.

Bug: 15433575
Change-Id: I21e2cbbfab55da483af1bbe36bbe59126b518e3c
2014-06-06 13:54:36 -07:00
Elliott Hughes
c571c26820 am 9eb2d38d: am b9fdad77: am ec81b4a3: Merge "Scrub uapi headers slightly harder."
* commit '9eb2d38d53b2d00a9b5bd189a34f51afb7c385bf':
  Scrub uapi headers slightly harder.
2014-05-15 23:12:23 +00:00
Elliott Hughes
8ed7a23309 Scrub uapi headers slightly harder.
There's no point having always-false tests. It just makes the headers
harder to read.

Bug: 11560081
Change-Id: I6187755e1514ca9ff5642b3c1b0489f22edddaf5
2014-05-15 12:01:11 -07:00
Elliott Hughes
834c136cec am 0d443726: am d2623501: am 8979cfe1: Merge "Keep the kernel header scrubber\'s data structures in sync."
* commit '0d4437263e65b7acc4546753ac79577b94ccc6ba':
  Keep the kernel header scrubber's data structures in sync.
2014-05-01 17:36:06 +00:00
Elliott Hughes
fddbafdc0a Keep the kernel header scrubber's data structures in sync.
If you rewrite the tokens of a #if you need to rewrite the expression to match
because either might be used later. This was showing up as SIGRTMAX being
rewritten in a #define but not in the #ifndef that guarded it, for which case
I've added a unit test.

Change-Id: I6929675461a1afe272edd667594529fd84a3dc4d
2014-05-01 10:27:49 -07:00
Elliott Hughes
fc4d9263a3 am 01dc4152: am 4a41581a: am 9fb53dd4: Merge "Make SIGRTMIN hide the real-time signals we use internally."
* commit '01dc4152b736c822a11cbbff3240eec7143659e3':
  Make SIGRTMIN hide the real-time signals we use internally.
2014-04-30 18:48:56 +00:00
Elliott Hughes
0990d4fda8 Make SIGRTMIN hide the real-time signals we use internally.
__SIGRTMIN will continue to tell the truth. This matches glibc's
behavior (as evidenced by the fact that we don't need a special case
in the strsignal test now).

Change-Id: I1abe1681d516577afa8cd39c837ef12467f68dd2
2014-04-30 10:06:09 -07:00
Ruchi Kandoi
eba6501c20 am 88920300: am aa3d46a4: Merge "prctl: Adds the PR_SET_TIMERSLACK_PID option"
* commit '889203005b62f0c2124a7fcae12f9824cbc78868':
  prctl: Adds the PR_SET_TIMERSLACK_PID option
2014-04-23 19:29:32 +00:00
Ruchi Kandoi
b84926b95c prctl: Adds the PR_SET_TIMERSLACK_PID option
Allows software to set timer clack for other thread.

Change-Id: Ifa9d2cc7844ec581356bce15434609242fd898a8
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2014-04-23 19:13:15 +00:00
Elliott Hughes
fc38de6b0d am fc50845e: am 0b0387c9: Merge "Fix kernel header scrubbing for LP64."
* commit 'fc50845e7d921763152753b60417ece57158cf2e':
  Fix kernel header scrubbing for LP64.
2014-04-08 18:05:33 +00:00
Elliott Hughes
9195a258ee Fix kernel header scrubbing for LP64.
Change-Id: I4caf44d41edd1b03a20d4c565e169c2b7a2f3686
2014-04-08 10:15:06 -07:00
Greg Hackmann
ff14a40c80 am 9b0fa57c: am e2a0f15c: Merge "Regenerate adf header"
* commit '9b0fa57cb1e9722a07d601db9520cebaa04d743c':
  Regenerate adf header
2014-04-03 02:11:16 +00:00
Greg Hackmann
8061facb7c Regenerate adf header
Fixes 64-bit related alignment issues

Change-Id: Ie90b920a7489e807e953f45a6db72350b80f6f22
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-04-02 16:07:32 -07:00