diff options
Diffstat (limited to 'scripts/update-linux-headers.sh')
-rwxr-xr-x | scripts/update-linux-headers.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 947dec2852..feb75390aa 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -51,7 +51,8 @@ cp_portable() { fi header=$(basename "$f"); - sed -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \ + sed -e 's/__aligned_u64/__u64 __attribute__((aligned(8)))/g' \ + -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \ -e 's/u\([0-9][0-9]*\)/uint\1_t/g' \ -e 's/__s\([0-9][0-9]*\)/int\1_t/g' \ -e 's/__le\([0-9][0-9]*\)/uint\1_t/g' \ @@ -141,6 +142,20 @@ else cp "$linux/COPYING" "$output/linux-headers" fi +# Recent kernel sources split the copyright/license info into multiple +# files, which we need to copy. This set of licenses is the set that +# are referred to by SPDX lines in the headers we currently copy. +# We don't copy the Documentation/process/license-rules.rst which +# is also referred to by COPYING, since it's explanatory rather than license. +if [ -d "$linux/LICENSES" ]; then + mkdir -p "$output/linux-headers/LICENSES/preferred" \ + "$output/linux-headers/LICENSES/exceptions" + for l in preferred/GPL-2.0 preferred/BSD-2-Clause preferred/BSD-3-Clause \ + exceptions/Linux-syscall-note; do + cp "$linux/LICENSES/$l" "$output/linux-headers/LICENSES/$l" + done +fi + cat <<EOF >$output/linux-headers/linux/virtio_config.h #include "standard-headers/linux/virtio_config.h" EOF |