aboutsummaryrefslogtreecommitdiffstats
path: root/libc/kernel/tools
Commit message (Collapse)AuthorAgeFilesLines
* Update the search path for libclang.soTao Bao2015-04-221-1/+4
| | | | | | | | | 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
* Define MAXHOSTNAMELEN explicitly in source files.Yabin Cui2015-02-091-4/+2
| | | | | | Bug: 19093777 Bug: 19092844 Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
* Switch kernel header parsing to python libclangTao Bao2015-02-062-1106/+1061
| | | | | | | Replace the tokenizer in cpp.py with libclang. Bug: 18937958 Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d
* fix runtime issues for scriptsKyunam Jo2014-12-102-6/+3
| | | | | | | | 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
* Clean up some of our python scripts.Elliott Hughes2014-08-203-91/+18
| | | | Change-Id: Ifa75345db43434298cfb6113fbe2f7a33b88c79d
* Update kernel headers to v3.14.Christopher Ferris2014-07-102-12/+32
| | | | | | | | 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
* [MIPS64] Adjust kernel/tools for mips32,mips64 headersDuane Sand2014-06-201-1/+5
| | | | | | | | | | | | | | | | | | | | 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
* Remove unused scripts.Christopher Ferris2014-06-062-233/+0
| | | | Change-Id: I3391d6c903f710b45e62bcf01058cf3ad9abe399
* Update kernel header generation docs.Christopher Ferris2014-06-061-0/+73
| | | | | | | Also move the description of the cleanup data to the cleanup script. Bug: 15433575 Change-Id: I21e2cbbfab55da483af1bbe36bbe59126b518e3c
* Scrub uapi headers slightly harder.Elliott Hughes2014-05-151-2/+2
| | | | | | | | There's no point having always-false tests. It just makes the headers harder to read. Bug: 11560081 Change-Id: I6187755e1514ca9ff5642b3c1b0489f22edddaf5
* Keep the kernel header scrubber's data structures in sync.Elliott Hughes2014-05-012-9/+23
| | | | | | | | | 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
* Make SIGRTMIN hide the real-time signals we use internally.Elliott Hughes2014-04-301-0/+3
| | | | | | | | __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
* Fix kernel header scrubbing for LP64.Elliott Hughes2014-04-081-9/+5
| | | | Change-Id: I4caf44d41edd1b03a20d4c565e169c2b7a2f3686
* Fix NSIG.Elliott Hughes2014-02-112-2/+7
| | | | | | | | | | | Our sigset_t definition hasn't been tied to our NSIG definition since we switched to uapi headers, so we can now fix it without breaking the LP32 ABI. The kernel uapi headers define and use _NSIG, so we need to have our scripts rename the kernel's definitions out of the way, then we can define _NSIG and NSIG in terms of the kernel's off-by-one value. Bug: 12938442 Change-Id: Ic7c86fd5be5ad1d822f7b2b1d88c8a0d70a1ac0f
* bionic: rename aarch64 target to arm64Colin Cross2014-01-232-17/+11
| | | | | | | Rename aarch64 build targets to arm64. The gcc toolchain is still aarch64. Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3
* Update script to copy in extra generated files.Christopher Ferris2013-11-221-2/+29
| | | | | | | There are files in generated/asm that simply include asm-generic files. The script now copies any file in generated/asm that also exists in asm-generic. Change-Id: I075161c68624e9e9e81797224831988ce02220eb
* Merge "Script to grab uapi headers from android kernel."Christopher Ferris2013-11-211-0/+180
|\
| * Script to grab uapi headers from android kernel.Christopher Ferris2013-11-211-0/+180
| | | | | | | | Change-Id: Ia140e3ab27fbfee6b02f04c085f3e0e351bbe68d
* | Add support for the ternary operator to the header scrubber.Elliott Hughes2013-11-211-14/+20
|/ | | | | | Used in various uapi headers. Change-Id: Id0f862d2adc7ddc9727e8a29160d5435f8d547c3
* Make cpp.py less braindead.Elliott Hughes2013-11-062-704/+269
| | | | | | | | | | | | | | | | | | The old code ignored operator precedence (!), despite having two tables of operator precedence. The code's still pretty awful, but I've cleaned it up enough to fix this, the most important bug. This patch lets us correctly clean the uapi unistd.h, stat.h, and swab.h files, and also fixes the mess we were already making of various old kernel header files. I've added a bunch more tests, fixed the existing tests that the existing script was already failing (!), and changed the script so that the tests are run every time the script is run. We can probably remove some of the old kernel header files that we were parsing incorrectly, but we can worry about that later. Bug: 11253477 Change-Id: Ie66c65b3a7ae13b4e98ed8038a6a534f06eae0e5
* Add __EXPORTED_HEADERS__ as predefined macro.Ben Cheng2013-10-231-0/+1
| | | | | | | | | | | To weed out stuff like this in uapi/linux/types.h ifndef __EXPORTED_HEADERS__ warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" endif /* __EXPORTED_HEADERS__ */ Change-Id: I6506cea6248f7a3b44a839b98e91bdd0d3a6c4cd
* Tweaked the cleanup scripts to handle uapi and aarch64 headers.Ben Cheng2013-10-162-4/+23
| | | | | | | | The processed uapi directory is now placed at libc/kernel/uapi as opposed to libc/kernel/common/uapi as it contains architectural-dependent headers now. Change-Id: I53f814704a4d231b452fde398cd94257a0fb2eea
* Add x86_64 to the bionic headers.Elliott Hughes2013-09-302-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | Manual changes: cpp.py: cope with macros that refer to other macros. defaults.py: x86 no longer always implies __i386__; use __i386__ to replace the kernel CONFIG_X86_32 flag. asm/page.h: the upstream page.h isn't a uapi header and no longer includes the stuff we were using it for. Let's just have our own static file, since it's the same for all our architectures (both 32- and 64-bit). sys/select.h: we used to use the various FD_SET-related macros from the kernel header files, but they've gone. Adjust by adding trivial equivalent definitions. Automated changes: libc/kernel/arch-x86, libc/kernel/common: regenerated from external/kernel-headers. Change-Id: I84fc0ed52dc742e043b4ae300fd3b58ee99b7fcd
* Slight script cleanup; make gensyscalls work from any directory.Elliott Hughes2013-06-171-55/+0
| | | | | | Also remove a ton of dead code. Change-Id: I1315623695a004f643b155f121cbafe24b715b8a
* Remove some dead script code and fix a script comment.Elliott Hughes2013-03-251-111/+0
| | | | Change-Id: I91ca466d1b6f8a39da50ce61acebc268d0daab3a
* Clean up trailing whitespace in the kernel headers.Elliott Hughes2013-01-303-53/+3
| | | | | | And fix the scripts so they stop letting trailing whitespace through. Change-Id: Ie109fbe1f63321e565ba0fa60fee8e9cf3a61cfc
* Add functionlity to the scripts to replace tokens in kernel headersRaghu Gandham2013-01-172-0/+8
| | | | based on architecture.
* Replace __unused in kernel headers with __linux_unused to avoidRaghu Gandham2012-09-251-0/+1
| | | | | | conflicts with __unused macro in sys/cdefs.h Change-Id: Ice664397e0b7c7a90795012f30be5e43a9675525
* [MIPS] Add CONFIG_32BIT to kernel_default_arch_macros for MIPS.Raghu Gandham2012-09-211-0/+1
| | | | | | Some of the required structure definitons are defined under this macro. Change-Id: I7a9a986e371381697dcb56bd8ea362856ffa7509
* am ea76f414: am d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers ↵Elliott Hughes2012-03-272-5/+11
|\ | | | | | | | | | | | | are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture." * commit 'ea76f4147825cc39d9aa91230cd863ed29f28e27': [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.
| * [MIPS] Clean Kernel headers are generated by runningRaghu Gandham2012-03-272-5/+11
| | | | | | | | | | | | | | | | | | | | libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture. Change-Id: I2c9e461dccb7c33eb4420be2db1a562f45137c8d Signed-off-by: Raghu Gandham <raghu@mips.com> Signed-off-by: Chris Dearman <chris@mips.com>
* | Fixed to #include correct 32-bit headers; Refreshed libc/kernel headersAndrew Hsieh2012-03-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue where 64-bit hreaders are incorrectly included in kernel headers. For example, file "libc/kernel/arch-x86/asm/io.h" incorreclty includes "io_64.h" (missing, BTW) instead of "io_32.h". The reason is because CONFIG_X86_32 isn't considered pre-defined in "kernel_default_arch_macros" for x86, and clean_header.py doesn't look at it at all anyway (ie. __i386__ is also ignored, but it's okay since x86 cross compiler defines it back) Fixed 2 tools/*py, README.TXT, and refreshed libc/kernel headers Change-Id: Iac834cc8b3548f055d3f2a214af36072dd679fe8
* | Merge c4cb87f3Jean-Baptiste Queru2012-02-011-11/+1
|\| | | | | | | Change-Id: I4cc14eba43fde75a7702fdc7ad07d3d949e9c092
| * remove obsolete SuperH supportDavid 'Digit' Turner2012-01-311-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have a toolchain anymore, we don't have working original kernel headers, and nobody is maintaining this so there is really no point in keeping this here. Details of the patch: - removed code paths from Android.mk files related to the SuperH architecture ("sh") - removed libc/arch-sh, linker/arch-sh, libc/kernel/arch-sh - simplified libc/SYSCALLS.TXT - simplified the scripts in libc/tools/ and libc/kernel/tools Change-Id: I26b0e1422bdc347489e4573e2fbec0e402f75560 Signed-off-by: David 'Digit' Turner <digit@android.com>
* | Fix misspelled Python variable name and typosGlenn Kasten2012-01-132-4/+4
|/ | | | | | | | Typos: - Update pathname in README.txt - Fix missing newlines in header update script. Change-Id: Ib0e053f92a27ff10071b9805fa64e5653ab31b0c
* Fixed bug where -k option would not be passed to cleanupFile functionFrank Maker2011-05-251-3/+3
| | | | Changed cleanupFile to have no default original path, forcing it to be passed instead, thereby conforming to the Google Python style guide.
* libc: Update auto-gen scriptsDavid 'Digit' Turner2011-02-037-177/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the scripts use external/kernel-headers/original by default. clean_header.py: Document -k<path>, add -d<path> find_headers.py: Make kernel config files optional update_all.py: Allow setting the path to kernel headers on the command-line update_all.py: Better formatting of output on ttys update_all.py: Automatically perform "git add/rm" on affected files. SYSCALLS.TXT: Fix typo in __socketcall definition. checksyscalls.py: Add support for superH architecture in the checks. gensyscalls.py: Automatically perform "git add/rm" on affected files. cpp.py: Fixed a bug that prevented certain type definitions to be kept in the generated clean header (e.g. struct ethtool_drvinfo in <linux/ethtool.h>) All scripts will use the content of external/kernel-headers/original by default now. The generated code removes all empty lines and trailing whitespace. This is useful to ensure a unified output even if we change the parser again in the future. The top-level disclaimer has been edited with update instructions to regenerate the headers when needed. Also, a warning is now inserted every 8th line in the final output: /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ Changes under kernel/arch-arm and kernel/arch-x86 should correspond to whitespace differences and additionnal struct definitions that were missed by the previous parser implementation. Change-Id: Icd1c056bacd766759f3e9b7bb5d63a246f3d656a WARNING: If you run these script, do not submit the result to gerrit for now. It seems there are discrepancies between the content of original headers and those currently commited under bionic/libc/kernel/. (This problem is the main motivation to insert the warning repeatedly). Current list of issues: - Missing SuperH headers (i.e. external/kernel-headers/original/asm-sh)
* libc: fix kernel cleanup script typo.David 'Digit' Turner2011-01-111-1/+1
| | | | Change-Id: I5fc119be535ed47dadc780234665335efa6b9ac5
* Replace all occurrances of asm with __asm__ in the output headersMartin Storsjo2010-12-082-0/+6
| | | | | | | | | | asm() conflicts with userland code compiled with -std=c99, the userland libc should only use __asm__() instead. Therefore, this transformation has to be applied to all exported headers. This only changes arch-arm/asm/byteorder.h. Change-Id: I1cf88c37201c3a91668d387293a18885c316d53c
* Add a method for replacing tokens in the preprocessed headersMartin Storsjo2010-12-081-0/+10
| | | | Change-Id: I14cf6337945560b012732ae0fe7a247074810678
* Regenerate linux/netfilter_ipv6/ip6_tables.h.Vilmos Nebehaj2010-06-281-0/+1
| | | | | | | Add ip6t_get_target() to kernel_known_generic_statics in libc/kernel/tools/defaults.py to be able to build ip6tables. Change-Id: Iadb885db3faa85b2d0070dc2e0ac493af6e62bb6
* merge from open-source masterJean-Baptiste Queru2009-10-141-2/+12
|\
| * Merge change 10539Android Code Review2009-09-171-2/+12
| |\ | | | | | | | | | | | | * changes: modified kernel headers re-generate tools to support SuperH architecture
| | * modified kernel headers re-generate tools to support SuperH architectureShin-ichiro KAWASAKI2009-07-011-2/+12
| | |
* | | libc: kernel: let clean_header tool take path to kernel originals as argumentDima Zavin2009-08-051-1/+3
|/ / | | | | | | Signed-off-by: Dima Zavin <dima@android.com>
* | Add <linux/ipsec.h> and <linux/if_pppolac.h> for VPN support.David 'Digit' Turner2009-05-201-1/+3
| | | | | | | | Also update tools/update_all.py to not use perforce add/edit/delete commands automatically now that we're using git
* | auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-038-0/+3485
| |
* | auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-038-3485/+0
|/
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-093-0/+33
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-173-9/+40
|