Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 1 | #!/bin/sh -e |
| 2 | # |
| 3 | # Update Linux kernel headers QEMU requires from a specified kernel tree. |
| 4 | # |
| 5 | # Copyright (C) 2011 Siemens AG |
| 6 | # |
| 7 | # Authors: |
| 8 | # Jan Kiszka <jan.kiszka@siemens.com> |
| 9 | # |
| 10 | # This work is licensed under the terms of the GNU GPL version 2. |
| 11 | # See the COPYING file in the top-level directory. |
Peter Maydell | 0166f5c | 2021-12-09 19:45:32 +0000 | [diff] [blame] | 12 | # |
| 13 | # The script will copy the headers into two target folders: |
| 14 | # |
| 15 | # - linux-headers/ for files that are required for compiling for a |
| 16 | # Linux host. Generally we have these so we can use kernel structs |
| 17 | # and defines that are more recent than the headers that might be |
| 18 | # installed on the host system. Usually this script can do simple |
| 19 | # file copies for these headers. |
| 20 | # |
| 21 | # - include/standard-headers/ for files that are used for guest |
| 22 | # device emulation and are required on all hosts. For instance, we |
| 23 | # get our definitions of the virtio structures from the Linux |
| 24 | # kernel headers, but we need those definitions regardless of which |
| 25 | # host OS we are building for. This script has to be careful to |
| 26 | # sanitize the headers to remove any use of Linux-specifics such as |
| 27 | # types like "__u64". This work is done in the cp_portable function. |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 28 | |
Stefan Weil | bbd9080 | 2016-05-16 15:23:33 +0200 | [diff] [blame] | 29 | tmpdir=$(mktemp -d) |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 30 | linux="$1" |
| 31 | output="$2" |
| 32 | |
| 33 | if [ -z "$linux" ] || ! [ -d "$linux" ]; then |
| 34 | cat << EOF |
| 35 | usage: update-kernel-headers.sh LINUX_PATH [OUTPUT_PATH] |
| 36 | |
| 37 | LINUX_PATH Linux kernel directory to obtain the headers from |
| 38 | OUTPUT_PATH output directory, usually the qemu source tree (default: $PWD) |
| 39 | EOF |
| 40 | exit 1 |
| 41 | fi |
| 42 | |
| 43 | if [ -z "$output" ]; then |
| 44 | output="$PWD" |
| 45 | fi |
| 46 | |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 47 | cp_portable() { |
| 48 | f=$1 |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 49 | to=$2 |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 50 | if |
| 51 | grep '#include' "$f" | grep -v -e 'linux/virtio' \ |
| 52 | -e 'linux/types' \ |
Vivek Kasireddy | 4d01086 | 2021-05-26 16:14:17 -0700 | [diff] [blame] | 53 | -e 'linux/ioctl' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 54 | -e 'stdint' \ |
| 55 | -e 'linux/if_ether' \ |
Paolo Bonzini | fff02bc | 2015-12-15 15:00:27 +0100 | [diff] [blame] | 56 | -e 'input-event-codes' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 57 | -e 'sys/' \ |
Marcel Apfelbaum | e1c5f1f | 2018-02-14 19:35:27 +0200 | [diff] [blame] | 58 | -e 'pvrdma_verbs' \ |
Gerd Hoffmann | 8e8ee85 | 2018-03-13 11:17:28 -0600 | [diff] [blame] | 59 | -e 'drm.h' \ |
Jason Baron | d3b7b37 | 2018-03-07 22:25:39 -0500 | [diff] [blame] | 60 | -e 'limits' \ |
Eric Farman | ab5ec23 | 2021-01-04 21:20:55 +0100 | [diff] [blame] | 61 | -e 'linux/const' \ |
Jason Baron | d3b7b37 | 2018-03-07 22:25:39 -0500 | [diff] [blame] | 62 | -e 'linux/kernel' \ |
| 63 | -e 'linux/sysinfo' \ |
Michael S. Tsirkin | ec7b108 | 2018-04-17 21:42:21 +0300 | [diff] [blame] | 64 | -e 'asm-generic/kvm_para' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 65 | > /dev/null |
| 66 | then |
| 67 | echo "Unexpected #include in input file $f". |
| 68 | exit 2 |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 69 | fi |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 70 | |
| 71 | header=$(basename "$f"); |
Peter Maydell | c5022c3 | 2018-05-25 14:27:51 +0100 | [diff] [blame] | 72 | sed -e 's/__aligned_u64/__u64 __attribute__((aligned(8)))/g' \ |
| 73 | -e 's/__u\([0-9][0-9]*\)/uint\1_t/g' \ |
Marcel Apfelbaum | e1c5f1f | 2018-02-14 19:35:27 +0200 | [diff] [blame] | 74 | -e 's/u\([0-9][0-9]*\)/uint\1_t/g' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 75 | -e 's/__s\([0-9][0-9]*\)/int\1_t/g' \ |
| 76 | -e 's/__le\([0-9][0-9]*\)/uint\1_t/g' \ |
| 77 | -e 's/__be\([0-9][0-9]*\)/uint\1_t/g' \ |
Paolo Bonzini | fff02bc | 2015-12-15 15:00:27 +0100 | [diff] [blame] | 78 | -e 's/"\(input-event-codes\.h\)"/"standard-headers\/linux\/\1"/' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 79 | -e 's/<linux\/\([^>]*\)>/"standard-headers\/linux\/\1"/' \ |
Michael S. Tsirkin | ed219c4 | 2017-01-13 18:18:35 +0200 | [diff] [blame] | 80 | -e 's/__bitwise//' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 81 | -e 's/__attribute__((packed))/QEMU_PACKED/' \ |
| 82 | -e 's/__inline__/inline/' \ |
Paolo Bonzini | 9f2d175 | 2018-03-13 09:38:18 +0100 | [diff] [blame] | 83 | -e 's/__BITS_PER_LONG/HOST_LONG_BITS/' \ |
Gerd Hoffmann | 8e8ee85 | 2018-03-13 11:17:28 -0600 | [diff] [blame] | 84 | -e '/\"drm.h\"/d' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 85 | -e '/sys\/ioctl.h/d' \ |
Vivek Kasireddy | 4d01086 | 2021-05-26 16:14:17 -0700 | [diff] [blame] | 86 | -e '/linux\/ioctl.h/d' \ |
Markus Armbruster | ac98fa8 | 2015-10-08 18:11:39 +0200 | [diff] [blame] | 87 | -e 's/SW_MAX/SW_MAX_/' \ |
Marcel Apfelbaum | e1c5f1f | 2018-02-14 19:35:27 +0200 | [diff] [blame] | 88 | -e 's/atomic_t/int/' \ |
Jason Baron | d3b7b37 | 2018-03-07 22:25:39 -0500 | [diff] [blame] | 89 | -e 's/__kernel_long_t/long/' \ |
| 90 | -e 's/__kernel_ulong_t/unsigned long/' \ |
| 91 | -e 's/struct ethhdr/struct eth_header/' \ |
| 92 | -e '/\#define _LINUX_ETHTOOL_H/a \\n\#include "net/eth.h"' \ |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 93 | "$f" > "$to/$header"; |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 94 | } |
| 95 | |
Peter Maydell | 2879636 | 2012-07-18 11:11:09 +0100 | [diff] [blame] | 96 | # This will pick up non-directories too (eg "Kconfig") but we will |
| 97 | # ignore them in the next loop. |
| 98 | ARCHLIST=$(cd "$linux/arch" && echo *) |
| 99 | |
| 100 | for arch in $ARCHLIST; do |
| 101 | # Discard anything which isn't a KVM-supporting architecture |
Peter Maydell | b55f546 | 2012-10-22 12:54:39 +0100 | [diff] [blame] | 102 | if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ] && |
| 103 | ! [ -e "$linux/arch/$arch/include/uapi/asm/kvm.h" ] ; then |
Peter Maydell | 2879636 | 2012-07-18 11:11:09 +0100 | [diff] [blame] | 104 | continue |
| 105 | fi |
| 106 | |
Paolo Bonzini | f717e62 | 2017-02-21 13:29:19 +0100 | [diff] [blame] | 107 | if [ "$arch" = x86 ]; then |
| 108 | arch_var=SRCARCH |
| 109 | else |
| 110 | arch_var=ARCH |
| 111 | fi |
| 112 | |
| 113 | make -C "$linux" INSTALL_HDR_PATH="$tmpdir" $arch_var=$arch headers_install |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 114 | |
| 115 | rm -rf "$output/linux-headers/asm-$arch" |
| 116 | mkdir -p "$output/linux-headers/asm-$arch" |
Zhang Yi | 0289881 | 2019-02-08 18:10:49 +0800 | [diff] [blame] | 117 | for header in kvm.h unistd.h bitsperlong.h mman.h; do |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 118 | cp "$tmpdir/include/asm/$header" "$output/linux-headers/asm-$arch" |
| 119 | done |
Michael S. Tsirkin | 9882d3e | 2018-03-20 23:01:04 +0200 | [diff] [blame] | 120 | |
| 121 | if [ $arch = mips ]; then |
| 122 | cp "$tmpdir/include/asm/sgidefs.h" "$output/linux-headers/asm-mips/" |
Paolo Bonzini | a0a6ef9 | 2019-01-04 09:27:30 +0100 | [diff] [blame] | 123 | cp "$tmpdir/include/asm/unistd_o32.h" "$output/linux-headers/asm-mips/" |
| 124 | cp "$tmpdir/include/asm/unistd_n32.h" "$output/linux-headers/asm-mips/" |
| 125 | cp "$tmpdir/include/asm/unistd_n64.h" "$output/linux-headers/asm-mips/" |
| 126 | fi |
| 127 | if [ $arch = powerpc ]; then |
| 128 | cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-powerpc/" |
| 129 | cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-powerpc/" |
Michael S. Tsirkin | 9882d3e | 2018-03-20 23:01:04 +0200 | [diff] [blame] | 130 | fi |
| 131 | |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 132 | rm -rf "$output/include/standard-headers/asm-$arch" |
| 133 | mkdir -p "$output/include/standard-headers/asm-$arch" |
| 134 | if [ $arch = s390 ]; then |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 135 | cp_portable "$tmpdir/include/asm/virtio-ccw.h" "$output/include/standard-headers/asm-s390/" |
Paolo Bonzini | 9f2d175 | 2018-03-13 09:38:18 +0100 | [diff] [blame] | 136 | cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-s390/" |
| 137 | cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-s390/" |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 138 | fi |
Paolo Bonzini | f717e62 | 2017-02-21 13:29:19 +0100 | [diff] [blame] | 139 | if [ $arch = arm ]; then |
| 140 | cp "$tmpdir/include/asm/unistd-eabi.h" "$output/linux-headers/asm-arm/" |
| 141 | cp "$tmpdir/include/asm/unistd-oabi.h" "$output/linux-headers/asm-arm/" |
| 142 | cp "$tmpdir/include/asm/unistd-common.h" "$output/linux-headers/asm-arm/" |
| 143 | fi |
Cornelia Huck | b1b9e0d | 2019-05-21 16:56:30 +0200 | [diff] [blame] | 144 | if [ $arch = arm64 ]; then |
| 145 | cp "$tmpdir/include/asm/sve_context.h" "$output/linux-headers/asm-arm64/" |
| 146 | fi |
Paolo Bonzini | 73aa529 | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 147 | if [ $arch = x86 ]; then |
Marc-André Lureau | 1842bdf | 2015-10-09 17:17:17 +0200 | [diff] [blame] | 148 | cp "$tmpdir/include/asm/unistd_32.h" "$output/linux-headers/asm-x86/" |
| 149 | cp "$tmpdir/include/asm/unistd_x32.h" "$output/linux-headers/asm-x86/" |
| 150 | cp "$tmpdir/include/asm/unistd_64.h" "$output/linux-headers/asm-x86/" |
Michael S. Tsirkin | ec7b108 | 2018-04-17 21:42:21 +0300 | [diff] [blame] | 151 | cp_portable "$tmpdir/include/asm/kvm_para.h" "$output/include/standard-headers/asm-$arch" |
Li Zhijian | 06e0259 | 2019-01-17 20:49:03 +0800 | [diff] [blame] | 152 | # Remove everything except the macros from bootparam.h avoiding the |
| 153 | # unnecessary import of several video/ist/etc headers |
| 154 | sed -e '/__ASSEMBLY__/,/__ASSEMBLY__/d' \ |
| 155 | "$tmpdir/include/asm/bootparam.h" > "$tmpdir/bootparam.h" |
| 156 | cp_portable "$tmpdir/bootparam.h" \ |
| 157 | "$output/include/standard-headers/asm-$arch" |
Paolo Bonzini | 73aa529 | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 158 | fi |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 159 | done |
| 160 | |
| 161 | rm -rf "$output/linux-headers/linux" |
| 162 | mkdir -p "$output/linux-headers/linux" |
David 'Digit' Turner | 9fc7dd2 | 2023-04-05 19:21:08 +0200 | [diff] [blame] | 163 | for header in const.h stddef.h kvm.h vfio.h vfio_ccw.h vfio_zdev.h vhost.h \ |
| 164 | psci.h psp-sev.h userfaultfd.h memfd.h mman.h nvme_ioctl.h vduse.h; do |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 165 | cp "$tmpdir/include/linux/$header" "$output/linux-headers/linux" |
| 166 | done |
Michael S. Tsirkin | ec7b108 | 2018-04-17 21:42:21 +0300 | [diff] [blame] | 167 | |
Michael S. Tsirkin | 9882d3e | 2018-03-20 23:01:04 +0200 | [diff] [blame] | 168 | rm -rf "$output/linux-headers/asm-generic" |
| 169 | mkdir -p "$output/linux-headers/asm-generic" |
Zhang Yi | 0289881 | 2019-02-08 18:10:49 +0800 | [diff] [blame] | 170 | for header in unistd.h bitsperlong.h mman-common.h mman.h hugetlb_encode.h; do |
Michael S. Tsirkin | 9882d3e | 2018-03-20 23:01:04 +0200 | [diff] [blame] | 171 | cp "$tmpdir/include/asm-generic/$header" "$output/linux-headers/asm-generic" |
| 172 | done |
| 173 | |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 174 | if [ -L "$linux/source" ]; then |
| 175 | cp "$linux/source/COPYING" "$output/linux-headers" |
| 176 | else |
| 177 | cp "$linux/COPYING" "$output/linux-headers" |
| 178 | fi |
| 179 | |
Peter Maydell | f5bba4c | 2018-05-25 14:27:52 +0100 | [diff] [blame] | 180 | # Recent kernel sources split the copyright/license info into multiple |
| 181 | # files, which we need to copy. This set of licenses is the set that |
| 182 | # are referred to by SPDX lines in the headers we currently copy. |
| 183 | # We don't copy the Documentation/process/license-rules.rst which |
| 184 | # is also referred to by COPYING, since it's explanatory rather than license. |
| 185 | if [ -d "$linux/LICENSES" ]; then |
| 186 | mkdir -p "$output/linux-headers/LICENSES/preferred" \ |
| 187 | "$output/linux-headers/LICENSES/exceptions" |
| 188 | for l in preferred/GPL-2.0 preferred/BSD-2-Clause preferred/BSD-3-Clause \ |
| 189 | exceptions/Linux-syscall-note; do |
| 190 | cp "$linux/LICENSES/$l" "$output/linux-headers/LICENSES/$l" |
| 191 | done |
| 192 | fi |
| 193 | |
Michael S. Tsirkin | 05e492b | 2015-02-16 22:36:32 +0100 | [diff] [blame] | 194 | cat <<EOF >$output/linux-headers/linux/virtio_config.h |
| 195 | #include "standard-headers/linux/virtio_config.h" |
| 196 | EOF |
| 197 | cat <<EOF >$output/linux-headers/linux/virtio_ring.h |
| 198 | #include "standard-headers/linux/virtio_ring.h" |
| 199 | EOF |
Paolo Bonzini | a0a6ef9 | 2019-01-04 09:27:30 +0100 | [diff] [blame] | 200 | cat <<EOF >$output/linux-headers/linux/vhost_types.h |
| 201 | #include "standard-headers/linux/vhost_types.h" |
| 202 | EOF |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 203 | |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 204 | rm -rf "$output/include/standard-headers/linux" |
| 205 | mkdir -p "$output/include/standard-headers/linux" |
Marc-André Lureau | 039d7c4 | 2018-08-17 17:59:09 +0200 | [diff] [blame] | 206 | for i in "$tmpdir"/include/linux/*virtio*.h \ |
| 207 | "$tmpdir/include/linux/qemu_fw_cfg.h" \ |
Dr. David Alan Gilbert | a62a9e1 | 2019-09-30 14:01:47 +0100 | [diff] [blame] | 208 | "$tmpdir/include/linux/fuse.h" \ |
Marc-André Lureau | 039d7c4 | 2018-08-17 17:59:09 +0200 | [diff] [blame] | 209 | "$tmpdir/include/linux/input.h" \ |
Paolo Bonzini | fff02bc | 2015-12-15 15:00:27 +0100 | [diff] [blame] | 210 | "$tmpdir/include/linux/input-event-codes.h" \ |
Vivek Kasireddy | 4d01086 | 2021-05-26 16:14:17 -0700 | [diff] [blame] | 211 | "$tmpdir/include/linux/udmabuf.h" \ |
Jason Baron | d3b7b37 | 2018-03-07 22:25:39 -0500 | [diff] [blame] | 212 | "$tmpdir/include/linux/pci_regs.h" \ |
Eric Farman | ab5ec23 | 2021-01-04 21:20:55 +0100 | [diff] [blame] | 213 | "$tmpdir/include/linux/ethtool.h" \ |
| 214 | "$tmpdir/include/linux/const.h" \ |
| 215 | "$tmpdir/include/linux/kernel.h" \ |
Paolo Bonzini | a0a6ef9 | 2019-01-04 09:27:30 +0100 | [diff] [blame] | 216 | "$tmpdir/include/linux/vhost_types.h" \ |
zhenwei pi | fcbd14d | 2022-02-21 20:27:16 +0800 | [diff] [blame] | 217 | "$tmpdir/include/linux/sysinfo.h" \ |
| 218 | "$tmpdir/include/misc/pvpanic.h"; do |
Paolo Bonzini | eddb4de | 2015-09-09 15:25:52 +0200 | [diff] [blame] | 219 | cp_portable "$i" "$output/include/standard-headers/linux" |
| 220 | done |
Gerd Hoffmann | 8e8ee85 | 2018-03-13 11:17:28 -0600 | [diff] [blame] | 221 | mkdir -p "$output/include/standard-headers/drm" |
| 222 | cp_portable "$tmpdir/include/drm/drm_fourcc.h" \ |
| 223 | "$output/include/standard-headers/drm" |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 224 | |
Marcel Apfelbaum | e1c5f1f | 2018-02-14 19:35:27 +0200 | [diff] [blame] | 225 | rm -rf "$output/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma" |
| 226 | mkdir -p "$output/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma" |
| 227 | |
| 228 | # Remove the unused functions from pvrdma_verbs.h avoiding the unnecessary |
| 229 | # import of several infiniband/networking/other headers |
| 230 | tmp_pvrdma_verbs="$tmpdir/pvrdma_verbs.h" |
| 231 | # Parse the entire file instead of single lines to match |
| 232 | # function declarations expanding over multiple lines |
| 233 | # and strip the declarations starting with pvrdma prefix. |
| 234 | sed -e '1h;2,$H;$!d;g' -e 's/[^};]*pvrdma[^(| ]*([^)]*);//g' \ |
| 235 | "$linux/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h" > \ |
| 236 | "$tmp_pvrdma_verbs"; |
| 237 | |
Cornelia Huck | 3aa1b7a | 2021-01-22 19:00:29 +0100 | [diff] [blame] | 238 | for i in "$linux/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h" \ |
Marcel Apfelbaum | e1c5f1f | 2018-02-14 19:35:27 +0200 | [diff] [blame] | 239 | "$tmp_pvrdma_verbs"; do \ |
| 240 | cp_portable "$i" \ |
| 241 | "$output/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/" |
| 242 | done |
| 243 | |
| 244 | rm -rf "$output/include/standard-headers/rdma/" |
| 245 | mkdir -p "$output/include/standard-headers/rdma/" |
| 246 | for i in "$tmpdir/include/rdma/vmw_pvrdma-abi.h"; do |
| 247 | cp_portable "$i" \ |
| 248 | "$output/include/standard-headers/rdma/" |
| 249 | done |
| 250 | |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 251 | cat <<EOF >$output/include/standard-headers/linux/types.h |
Peter Maydell | 8bc92a7 | 2016-02-23 14:18:31 +0000 | [diff] [blame] | 252 | /* For QEMU all types are already defined via osdep.h, so this |
| 253 | * header does not need to do anything. |
| 254 | */ |
Michael S. Tsirkin | 1ff0b55 | 2015-02-16 22:35:25 +0100 | [diff] [blame] | 255 | EOF |
| 256 | cat <<EOF >$output/include/standard-headers/linux/if_ether.h |
| 257 | #define ETH_ALEN 6 |
| 258 | EOF |
| 259 | |
Jan Kiszka | 87fdd47 | 2011-06-08 18:22:17 +0200 | [diff] [blame] | 260 | rm -rf "$tmpdir" |