xref: /aosp_15_r20/external/kernel-headers/README.md (revision f80ad8b4341604f5951dab671d41019a6d7087ce)
1*f80ad8b4SAndroid Build Coastguard Worker# Android kernel headers
2*f80ad8b4SAndroid Build Coastguard Worker
3*f80ad8b4SAndroid Build Coastguard WorkerThis project contains the original kernel headers that are used to generate
4*f80ad8b4SAndroid Build Coastguard WorkerBionic's "cleaned-up" user-land headers.
5*f80ad8b4SAndroid Build Coastguard Worker
6*f80ad8b4SAndroid Build Coastguard WorkerThey are mostly covered by the GPLv2 + exception, and thus cannot be
7*f80ad8b4SAndroid Build Coastguard Workerdistributed as part of the platform itself.  The cleaned up headers do not
8*f80ad8b4SAndroid Build Coastguard Workercontain copyrightable information and are distributed with bionic.
9*f80ad8b4SAndroid Build Coastguard Worker
10*f80ad8b4SAndroid Build Coastguard Worker## Regenerating the bionic headers
11*f80ad8b4SAndroid Build Coastguard Worker
12*f80ad8b4SAndroid Build Coastguard WorkerNote that if you're actually just trying to expose device-specific headers
13*f80ad8b4SAndroid Build Coastguard Workerto build your device drivers, you shouldn't modify these headers or bionic.
14*f80ad8b4SAndroid Build Coastguard WorkerInstead use `TARGET_DEVICE_KERNEL_HEADERS` and friends as described in
15*f80ad8b4SAndroid Build Coastguard Worker[config.mk](https://android.googlesource.com/platform/build/+/master/core/config.mk#186).
16*f80ad8b4SAndroid Build Coastguard Worker
17*f80ad8b4SAndroid Build Coastguard WorkerOtherwise see the
18*f80ad8b4SAndroid Build Coastguard Worker[bionic/libc/kernel docs](https://android.googlesource.com/platform/bionic/+/master/libc/kernel/)
19*f80ad8b4SAndroid Build Coastguard Workerfor how to actually take an update.
20*f80ad8b4SAndroid Build Coastguard Worker
21*f80ad8b4SAndroid Build Coastguard Worker
22*f80ad8b4SAndroid Build Coastguard Worker## Manually modified headers
23*f80ad8b4SAndroid Build Coastguard Worker
24*f80ad8b4SAndroid Build Coastguard WorkerThe `modified/scsi` directory contains a set of manually updated headers.
25*f80ad8b4SAndroid Build Coastguard WorkerThe scsi kernel headers were never properly made to into uapi versions,
26*f80ad8b4SAndroid Build Coastguard Workerso this directory contains the unmodified scsi headers that are imported
27*f80ad8b4SAndroid Build Coastguard Workerinto bionic. The generation script will indicate if these files have
28*f80ad8b4SAndroid Build Coastguard Workerchanged and require another manual update.
29*f80ad8b4SAndroid Build Coastguard Worker
30*f80ad8b4SAndroid Build Coastguard WorkerThe files from the scsi directory will be copied into bionic after
31*f80ad8b4SAndroid Build Coastguard Workerbeing processed as is, unless there exists a file of the same name in
32*f80ad8b4SAndroid Build Coastguard Worker`../modified/scsi`. Any files found in the modified directory completely
33*f80ad8b4SAndroid Build Coastguard Workerreplace the ones in the scsi directory.
34