1Android kernel headers 2====================== 3 4This project contains the original kernel headers that are used to generate 5Bionic's "cleaned-up" user-land headers. 6 7They are mostly covered by the GPLv2 + exception, and thus cannot be 8distributed as part of the platform itself. The cleaned up headers do not 9contain copyrightable information and are distributed with bionic. 10 11Importing modified kernel headers files is done using scripts found in bionic. 12 13Note that if you're actually just trying to expose device-specific headers 14to build your device drivers, you shouldn't modify bionic. Instead 15use `TARGET_DEVICE_KERNEL_HEADERS` and friends described in 16[config.mk](https://android.googlesource.com/platform/build/+/master/core/config.mk#186). 17 18Regenerating the bionic headers 19------------------------------- 20The uapi directory contains the original kernel UAPI (userspace API) headers 21that are used to generate Bionic's "cleaned-up" user-land headers. The script 22`bionic/libc/kernel/tools/generate_uapi_headers.sh` automatically imports the 23headers from an android kernel repository. 24 25Running the script: 26``` 27generate_uapi_headers.sh --download-kernel 28``` 29 30In order to run the script, you must have properly initialized the build 31environment using the lunch command. The script will automatically retrieve 32an android kernel, generate all include files, and then copy the headers to 33this directory. 34 35Manually modified headers 36------------------------- 37The `modified/scsi` directory contains a set of manually updated headers. 38The scsi kernel headers were never properly made to into uapi versions, 39so this directory contains the unmodified scsi headers that are imported 40into bionic. The generation script will indicate if these files have 41changed and require another manual update. 42 43The files from the scsi directory will be copied into bionic after 44being processed as is, unless there exists a file of the same name in 45`../modified/scsi`. Any files found in the modified directory completely 46replace the ones in the scsi directory. 47