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
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
The 64-bit uapi headers don't define FD_CLR and friends, so this
patch updates libc/kernel/common/linux/time.h after the change
b934bbec145e9e084bf48149a3a94ae3dd132157 in external/kernel-headers,
then fixes <sys/select.h> to work in this new world, and removes
some now-unnecessary duplication from <time.h> (with other cruft
cleaned up while I'm here).
Change-Id: Ifd26f901b4d200c65065b3e6ef1b74055127e052
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
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
Copyright headers shouldn't contain the filename (and especially
shouldn't contain a different file's filename).
Change-Id: I82690a3bf371265402bc16f5d2fbb9299c3a1926
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
This file was generated using bionic/libc/kernel/tools/update_all.py
The only change is a new netlink.h file, from external/kernel-headers.
Please see the commit message there for details.
Change-Id: I83645b88f0baff838131197913ebd70be69abd3f
This picks up the source kernel header change
I984154487c38f6fa827bd78234f7fc2e4e1c383f .
Bug: 9469682
Change-Id: I3b57517cc6442ba4d0b8003d7398617e8226233f
Pick up Linux kernel patch 2748e5dec7ca8a3804852c7c4171f9156384d15c
from 2007
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2748e5dec7ca8a3804852c7c4171f9156384d15c
[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
With the introduction of x_tables we accidentally broke compatibility
by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
XT_TABLE_MAXNAMELEN, which is two bytes larger.
On most architectures it doesn't really matter since we don't have
any tables with names that long in the kernel and the structure
layout didn't change because of alignment requirements of following
members. On CRIS however (and other architectures that don't align
data) this changed the structure layout and thus broke compatibility
with old iptables binaries.
Changing it back will break compatibility with binaries compiled
against recent kernels again, but since the breakage has only been
there for three releases this seems like the better choice.
Change-Id: Ie9552b25892109c7042b9752132dc8ebd3552dc3
Added the following headers for ALSA compressed
user space API:
- sound/compress_offload.h
- sound/compress_params.h
Change-Id: I9584c12acdadf31546d2921393b93d491e54a8d3
Need to get the defintion of the FITRIM ioctl(). Also need
to update the blk_types.h header file as fs.h includes it.
Change-Id: I617622b620925942dc5aead9e49f8e17d17e5d74
Need to get the defintion of the FITRIM ioctl(). Also need
to update the blk_types.h header file as fs.h includes it.
Change-Id: I617622b620925942dc5aead9e49f8e17d17e5d74
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a990cf5b3392c5aef767aee1e67b4d7ef651afc6':
Clean up trailing whitespace in the kernel headers.
Replace a kernel header file dependency with files from NetBSD.
They're more complete, and ELF is ELF, whether you're on Linux or a BSD.
Bug: 7973611
Change-Id: I83ee719e7efdf432ec2ddbe8be271d05b2f558d7
Pull a new version of auxvec.h from the upstream Linux
kernel at commit b719f43059903820c31edb30f4663a2818836e7f
These files were generated using the following commands:
cd bionic/libc/kernel
./tools/clean_header.py -u ../../../external/kernel-headers/original/uapi/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/auxvec.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/asm-x86/auxvec.h
This change is needed to get AT_RANDOM defined.
Change-Id: Ib064649684b17af6ff4b1a31d501a05f78bb81d0
Add signalfd() call to bionic.
Adding the signalfd call was done in 3 steps:
- add signalfd4 system call (function name and syscall
number) to libc/SYSCALLS.TXT
- generate all necessary headers by calling
libc/tools/gensyscalls.py. This patch is adding
the generated files since the build system
does not call gensyscalls.py.
- create the signalfd wrapper in signalfd.cpp and add
the function prototype to sys/signalfd.h
(cherry-pick of 0c11611c11, modified to
work with older versions of GCC still in use on some branches.)
Change-Id: I4c6c3f12199559af8be63f93a5336851b7e63355
Updated kernel headers to support a video encoder ioctl to preprend each IDR
frame with SPS/PPS.
related-to-bug: 7245308
Change-Id: I7244c521690d69a905deb19940a04fd4f2e06935
Signed-off-by: Iliyan Malchev <malchev@google.com>
This change adds msm_mdp.h header changes to bionic.
This IOCTL is a substitute for PAN on external panel. It waits for DMAE to
finish before returning and avoid delays in the PAN path.
Bug: 7249589
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Change-Id: I4b04a4538919ffcb994699a432c4322e9f94e870
Signed-off-by: Iliyan Malchev <malchev@google.com>
* commit '2c29bcf77f0d7dd7fce284ac0c17ff12663413d0':
Replace __unused in kernel headers with __linux_unused to avoid conflicts with __unused macro in sys/cdefs.h
* commit 'baa74eff0dd56b1dbf8e8a233a82e6382828ad72':
[MIPS] Add CONFIG_32BIT to kernel_default_arch_macros for MIPS. Some of the required structure definitons are defined under this macro.
Note that the Linux kernel handed over responsibility for most of the
socket constants to glibc some time ago. Someone had updated our
external/kernel-headers file but not regenerated the bionic headers,
so this change copies the missing stuff from the old bionic <linux/socket.h>
into <sys/socket.h>. This is what glibc does.
I've hacked a few of the other files to #include <sys/socket.h> for
backward compatibility, but even so this requires numerous other
changes to switch people over from direct inclusion of <linux/...> headers.
Change-Id: I0e4af64e631d3cef911a31d90f2f806e058278a0
legacy_ion.h is a pre android-3.4 copy of the ion.h header, for backwards
compatibility
Change-Id: Iaf2f1659f19a3b55334df929d9500069bf8acbdd
Signed-off-by: Iliyan Malchev <malchev@google.com>
The original kernel header was submitted in this change:
commit 45b515c106161bb3b00d2c097504b9d44505f2d9
Author: Scott Anderson <saa@android.com>
Date: Wed Aug 15 14:52:27 2012 -0700
Add uhid original header.
This header was cherry-picked from the upstream series that ends
with patch adefb69b1b94df29ea2df05cd838c0e032b2c473.
Change-Id: If516e41b6b14754e7feebdf062461dd38a31900a
Signed-off-by: Scott Anderson <saa@android.com>
Change-Id: I088a0df4449df859835f8267d0d2e6cd4ed3c478
Signed-off-by: Scott Anderson <saa@android.com>
Update headers for MSM MDP, MSM KGSL and MSM
rotator to match the version in the Linux
3.4 kernel baseline
Change-Id: I37052486be8c8862e65cac1f6934368ecc055a76
Pull in an updated version of filter.h / prctl.h / seccomp.h
from the linux kernel. Pulled from upstream kernel at
94fa83c424321189ca24fb6cb4c0d224cdedc72d
This file was generated using the following command:
cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/seccomp.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/filter.h
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/prctl.h
Change-Id: I1ca996541d05b0d5927ab828a6ce49c09877ea01
gensyscalls.py run from external/kernel-headers at commit
efab8f3e49f7f36ef0354b0996ecd5f3fa031e52
Change-Id: I959b64280e184655ef8c713aa79f9e23cb1f7df4
From Change I526b5fce: Add NETLINK_IDLETIMER msg type and include the corresponding header file.
Change-Id: I24bffc11394c8664e4d7d7f439b0600545f07536
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
* 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.
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>
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
These are generated from the matching external/kernel-headers/original
files (from kernel/samsung android-samsung-3.0-wip).
Change-Id: I982ff6a0d522ea250c3a437f5756766fcc6c5c91
This change will automatically post-process kernel headers
specified by device, board, and product. This will allow us
to not check in each kernel header twice, at least for the
device specific headers for now.
Change-Id: I3bb144b6535504b7c26b807daa75de495554356d
Signed-off-by: Dima Zavin <dima@android.com>
This reverts commit 94a85f6636
There is a smoke test failure for Prime but Crespo/Stingray are fine. Will revert the change for now until further investigation is made.
Pull in an updated version of stddef.h from the linux kernel.
Pulled from upstream kernel at 891003abb0db6bfffd61b76ad0ed39bb7c3db8e1
This file was generated using the following command:
cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/stddef.h
Change-Id: I6c29f3fa100c5368da41d0f0da39bc50fa668e9d
Pull in an updated version of stddef.h from the linux kernel.
Pulled from upstream kernel at 891003abb0db6bfffd61b76ad0ed39bb7c3db8e1
This file was generated using the following command:
cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/stddef.h
Change-Id: I6c29f3fa100c5368da41d0f0da39bc50fa668e9d
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>
The x86 asm headers define __u64 regardless of __STRICT_ANSI__.
The linux/videodev2.h header requires __u64 to be defined, thus
this fixes compiling with -std=c99 when including the
linux/videodev2.h header.
In glibc, the asm/types.h header defines __u64 regardless of
__STRICT_ANSI__.
This is the change for the generated arch-arm/asm/types.h
header, as produced by the update_all.py script (without all
the other unrelated changes that the script produces).
FWIW, the same issue also is present in
arch-sh/asm/types.h, but there are no source headers for
arch-sh in external/kernel-headers (and regenerating the
headers simply removes that file).
Change-Id: If05fcc9ed6ff5943602be121c7be140116e361fe
Pull in an updated version of personality.h from the linux
kernel.
This file was generated using the following command:
cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/personality.h
Change-Id: I860ce21110ebf7e7499fb8165584d296a73aa602
Pull in an updated version of capabilities.h from the linux
kernel.
This file was generated using the following command:
cd bionic/libc/kernel/
./tools/clean_header.py -u ../../../external/kernel-headers/original/linux/capability.h
Change-Id: I43c8f014954f543858006f24e60a2e69955349da
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)
This patch moves the definition of struct user_vfp from <asm/ptrace.h>
to <asm/user.h> for the ARM platform, in order to match the original
kernel headers.
See patches 94519 and 94520 for a description of the problem and a
fix for debuggerd that uses the structure.
This prevented us from properly re-running the kernel headers cleanup
scripts.
Change-Id: I43718a59ae49b9d89fc2d1c8affb65973fb2919c