History log of /bionic/libc/kernel/tools/clean_header.py
Revision Date Author Comments
08b60747fe99623f3ae6d5f351a4c08c7b020207 05-Jun-2014 Christopher Ferris <cferris@google.com> Update kernel header generation docs.

Also move the description of the cleanup data to the cleanup script.

Bug: 15433575
Change-Id: I21e2cbbfab55da483af1bbe36bbe59126b518e3c
fddbafdc0a63a1b4c5e9252719a913197a4eecfa 01-May-2014 Elliott Hughes <enh@google.com> 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
8bea2b6faca554a145bdafc6f3afafec1f3120b6 17-Oct-2013 Ben Cheng <bccheng@google.com> Tweaked the cleanup scripts to handle uapi and aarch64 headers.

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
a864c2c23486e4ab7235829d8c9574426794298a 17-Jan-2013 Raghu Gandham <raghu@mips.com> Add functionlity to the scripts to replace tokens in kernel headers
based on architecture.
126601dd3f5303b50033dcb88945d928aa764aa4 23-Mar-2012 Andrew Hsieh <andrewhsieh@google.com> Fixed to #include correct 32-bit headers; Refreshed libc/kernel headers

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
c61f99056634119806916d5dfb58505d432e6732 19-Dec-2011 Glenn Kasten <gkasten@google.com> Fix misspelled Python variable name and typos

Typos:
- Update pathname in README.txt
- Fix missing newlines in header update script.

Change-Id: Ib0e053f92a27ff10071b9805fa64e5653ab31b0c
7b6795dad91988d76a282fc2b033f0cc5585ee65 25-May-2011 Frank Maker <ffrank@google.com> Fixed bug where -k option would not be passed to cleanupFile function
Changed cleanupFile to have no default original path, forcing it to be passed instead, thereby conforming to the Google Python style guide.
fc2693110ee8a2ba22a445ad9855fbe9e118d439 11-Oct-2010 David 'Digit' Turner <digit@google.com> libc: Update auto-gen scripts

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)
c9205dba43c45dc5a185aa26e1160c3f62e9b471 08-Dec-2010 Martin Storsjo <martin@martin.st> Replace all occurrances of asm with __asm__ in the output headers

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
194d3fa048cf909ca592dd56fa538dc9cd3f5ddb 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
4c4a9632bdb5189011b74d63847ee4bbd6daea4b 06-Aug-2009 Dima Zavin <dima@android.com> libc: kernel: let clean_header tool take path to kernel originals as argument

Signed-off-by: Dima Zavin <dima@android.com>
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
6d6c82c7a0a6b9a89f61b61c66f9b90d9c7177dc 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution