diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-08 11:10:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-08 23:14:51 +0000 |
commit | 4a6a1a8c3c2e300de6f97787033e4263a9c0445f (patch) | |
tree | 119f44307849a01dc5e0f8ef20fa6cd5fb8a2acb /meta | |
parent | f2dcb4938e505002d03414ca61ec9ca124f725b1 (diff) | |
download | poky-4a6a1a8c3c2e300de6f97787033e4263a9c0445f.tar.gz |
kernel-devsrc: Clean up whitespace
This file had a function full of mixed tabs and spaces. Our policy says
tabs, some layers use spaces but this function matched nothing.
It makes sense to clean this up, I'm torn between which to use. I've gone
with the lesser invasive change (despite what the diff looks like) and used
spaces as the code was clearly written with that partly in mind and tabs would
have changed every line. Hopefully this makes future patches a little less
weird looking.
(From OE-Core rev: 34f0b22978a81abe891b00f716a56533504161d7)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/linux/kernel-devsrc.bb | 442 |
1 files changed, 221 insertions, 221 deletions
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb index c39ad7bc18..55cac1fc81 100644 --- a/meta/recipes-kernel/linux/kernel-devsrc.bb +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb | |||
@@ -47,21 +47,21 @@ do_install() { | |||
47 | # create a /usr/src/kernel symlink to /lib/modules/<version>/source | 47 | # create a /usr/src/kernel symlink to /lib/modules/<version>/source |
48 | mkdir -p ${D}/usr/src | 48 | mkdir -p ${D}/usr/src |
49 | ( | 49 | ( |
50 | cd ${D}/usr/src | 50 | cd ${D}/usr/src |
51 | ln -rs ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel | 51 | ln -rs ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}/source kernel |
52 | ) | 52 | ) |
53 | 53 | ||
54 | # for on target purposes, we unify build and source | 54 | # for on target purposes, we unify build and source |
55 | ( | 55 | ( |
56 | cd $kerneldir | 56 | cd $kerneldir |
57 | ln -s build source | 57 | ln -s build source |
58 | ) | 58 | ) |
59 | 59 | ||
60 | # first copy everything | 60 | # first copy everything |
61 | ( | 61 | ( |
62 | cd ${S} | 62 | cd ${S} |
63 | cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build | 63 | cp --parents $(find -type f -name "Makefile*" -o -name "Kconfig*") $kerneldir/build |
64 | cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build | 64 | cp --parents $(find -type f -name "Build" -o -name "Build.include") $kerneldir/build |
65 | ) | 65 | ) |
66 | 66 | ||
67 | # then drop all but the needed Makefiles/Kconfig files | 67 | # then drop all but the needed Makefiles/Kconfig files |
@@ -70,116 +70,116 @@ do_install() { | |||
70 | 70 | ||
71 | # now copy in parts from the build that we'll need later | 71 | # now copy in parts from the build that we'll need later |
72 | ( | 72 | ( |
73 | cd ${B} | 73 | cd ${B} |
74 | 74 | ||
75 | if [ -s Module.symvers ]; then | 75 | if [ -s Module.symvers ]; then |
76 | cp Module.symvers $kerneldir/build | 76 | cp Module.symvers $kerneldir/build |
77 | fi | 77 | fi |
78 | cp System.map* $kerneldir/build | 78 | cp System.map* $kerneldir/build |
79 | if [ -s Module.markers ]; then | 79 | if [ -s Module.markers ]; then |
80 | cp Module.markers $kerneldir/build | 80 | cp Module.markers $kerneldir/build |
81 | fi | 81 | fi |
82 | 82 | ||
83 | cp -a .config $kerneldir/build | 83 | cp -a .config $kerneldir/build |
84 | 84 | ||
85 | # This scripts copy blow up QA, so for now, we require a more | 85 | # This scripts copy blow up QA, so for now, we require a more |
86 | # complex 'make scripts' to restore these, versus copying them | 86 | # complex 'make scripts' to restore these, versus copying them |
87 | # here. Left as a reference to indicate that we know the scripts must | 87 | # here. Left as a reference to indicate that we know the scripts must |
88 | # be dealt with. | 88 | # be dealt with. |
89 | # cp -a scripts $kerneldir/build | 89 | # cp -a scripts $kerneldir/build |
90 | 90 | ||
91 | # although module.lds can be regenerated on target via 'make modules_prepare' | 91 | # although module.lds can be regenerated on target via 'make modules_prepare' |
92 | # there are several places where 'makes scripts prepare' is done, and that won't | 92 | # there are several places where 'makes scripts prepare' is done, and that won't |
93 | # regenerate the file. So we copy it onto the target as a migration to using | 93 | # regenerate the file. So we copy it onto the target as a migration to using |
94 | # modules_prepare | 94 | # modules_prepare |
95 | cp -a --parents scripts/module.lds $kerneldir/build/ 2>/dev/null || : | 95 | cp -a --parents scripts/module.lds $kerneldir/build/ 2>/dev/null || : |
96 | 96 | ||
97 | if [ -d arch/${ARCH}/scripts ]; then | 97 | if [ -d arch/${ARCH}/scripts ]; then |
98 | cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} | 98 | cp -a arch/${ARCH}/scripts $kerneldir/build/arch/${ARCH} |
99 | fi | 99 | fi |
100 | if [ -f arch/${ARCH}/*lds ]; then | 100 | if [ -f arch/${ARCH}/*lds ]; then |
101 | cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH} | 101 | cp -a arch/${ARCH}/*lds $kerneldir/build/arch/${ARCH} |
102 | fi | 102 | fi |
103 | 103 | ||
104 | rm -f $kerneldir/build/scripts/*.o | 104 | rm -f $kerneldir/build/scripts/*.o |
105 | rm -f $kerneldir/build/scripts/*/*.o | 105 | rm -f $kerneldir/build/scripts/*/*.o |
106 | 106 | ||
107 | if [ "${ARCH}" = "powerpc" ]; then | 107 | if [ "${ARCH}" = "powerpc" ]; then |
108 | if [ -e arch/powerpc/lib/crtsavres.S ] || | 108 | if [ -e arch/powerpc/lib/crtsavres.S ] || |
109 | [ -e arch/powerpc/lib/crtsavres.o ]; then | 109 | [ -e arch/powerpc/lib/crtsavres.o ]; then |
110 | cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/ | 110 | cp -a --parents arch/powerpc/lib/crtsavres.[So] $kerneldir/build/ |
111 | fi | 111 | fi |
112 | fi | 112 | fi |
113 | 113 | ||
114 | if [ "${ARCH}" = "arm64" -o "${ARCH}" = "riscv" ]; then | 114 | if [ "${ARCH}" = "arm64" -o "${ARCH}" = "riscv" ]; then |
115 | if [ -e arch/${ARCH}/kernel/vdso/vdso.lds ]; then | 115 | if [ -e arch/${ARCH}/kernel/vdso/vdso.lds ]; then |
116 | cp -a --parents arch/${ARCH}/kernel/vdso/vdso.lds $kerneldir/build/ | 116 | cp -a --parents arch/${ARCH}/kernel/vdso/vdso.lds $kerneldir/build/ |
117 | fi | 117 | fi |
118 | fi | 118 | fi |
119 | if [ "${ARCH}" = "powerpc" ]; then | 119 | if [ "${ARCH}" = "powerpc" ]; then |
120 | cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || : | 120 | cp -a --parents arch/powerpc/kernel/vdso32/vdso32.lds $kerneldir/build 2>/dev/null || : |
121 | cp -a --parents arch/powerpc/kernel/vdso64/vdso64.lds $kerneldir/build 2>/dev/null || : | 121 | cp -a --parents arch/powerpc/kernel/vdso64/vdso64.lds $kerneldir/build 2>/dev/null || : |
122 | # v5.19+ | 122 | # v5.19+ |
123 | cp -a --parents arch/powerpc/kernel/vdso/vdso*.lds $kerneldir/build 2>/dev/null || : | 123 | cp -a --parents arch/powerpc/kernel/vdso/vdso*.lds $kerneldir/build 2>/dev/null || : |
124 | fi | 124 | fi |
125 | 125 | ||
126 | cp -a include $kerneldir/build/include | 126 | cp -a include $kerneldir/build/include |
127 | 127 | ||
128 | # we don't usually copy generated files, since they can be rebuilt on the target, | 128 | # we don't usually copy generated files, since they can be rebuilt on the target, |
129 | # but without this file, we get a forced syncconfig run in v5.8+, which prompts and | 129 | # but without this file, we get a forced syncconfig run in v5.8+, which prompts and |
130 | # breaks workflows. | 130 | # breaks workflows. |
131 | cp -a --parents include/generated/autoconf.h $kerneldir/build 2>/dev/null || : | 131 | cp -a --parents include/generated/autoconf.h $kerneldir/build 2>/dev/null || : |
132 | 132 | ||
133 | if [ -e $kerneldir/include/generated/.vdso-offsets.h.cmd ] || | 133 | if [ -e $kerneldir/include/generated/.vdso-offsets.h.cmd ] || |
134 | [ -e $kerneldir/build/include/generated/.vdso-offsets.h.cmd ] || | 134 | [ -e $kerneldir/build/include/generated/.vdso-offsets.h.cmd ] || |
135 | [ -e $kerneldir/build/include/generated/.vdso32-offsets.h.cmd ] ; then | 135 | [ -e $kerneldir/build/include/generated/.vdso32-offsets.h.cmd ] ; then |
136 | rm -f $kerneldir/include/generated/.vdso-offsets.h.cmd | 136 | rm -f $kerneldir/include/generated/.vdso-offsets.h.cmd |
137 | rm -f $kerneldir/build/include/generated/.vdso-offsets.h.cmd | 137 | rm -f $kerneldir/build/include/generated/.vdso-offsets.h.cmd |
138 | rm -f $kerneldir/build/include/generated/.vdso32-offsets.h.cmd | 138 | rm -f $kerneldir/build/include/generated/.vdso32-offsets.h.cmd |
139 | fi | 139 | fi |
140 | ) | 140 | ) |
141 | 141 | ||
142 | # now grab the chunks from the source tree that we need | 142 | # now grab the chunks from the source tree that we need |
143 | ( | 143 | ( |
144 | cd ${S} | 144 | cd ${S} |
145 | 145 | ||
146 | cp -a scripts $kerneldir/build | 146 | cp -a scripts $kerneldir/build |
147 | 147 | ||
148 | # for v6.1+ (otherwise we are missing multiple default targets) | 148 | # for v6.1+ (otherwise we are missing multiple default targets) |
149 | cp -a --parents Kbuild $kerneldir/build 2>/dev/null || : | 149 | cp -a --parents Kbuild $kerneldir/build 2>/dev/null || : |
150 | 150 | ||
151 | # For v6.6+ the debian packing is moved out to seperate rules file | 151 | # For v6.6+ the debian packing is moved out to seperate rules file |
152 | # Remove as we else would ned to RDEPEND on make | 152 | # Remove as we else would ned to RDEPEND on make |
153 | rm $kerneldir/build/scripts/package/debian/rules 2>/dev/null || : | 153 | rm $kerneldir/build/scripts/package/debian/rules 2>/dev/null || : |
154 | 154 | ||
155 | # if our build dir had objtool, it will also be rebuilt on target, so | 155 | # if our build dir had objtool, it will also be rebuilt on target, so |
156 | # we copy what is required for that build | 156 | # we copy what is required for that build |
157 | if [ -f ${B}/tools/objtool/objtool ]; then | 157 | if [ -f ${B}/tools/objtool/objtool ]; then |
158 | # these are a few files associated with objtool, since we'll need to | 158 | # these are a few files associated with objtool, since we'll need to |
159 | # rebuild it | 159 | # rebuild it |
160 | cp -a --parents tools/build/Build.include $kerneldir/build/ | 160 | cp -a --parents tools/build/Build.include $kerneldir/build/ |
161 | cp -a --parents tools/build/Build $kerneldir/build/ | 161 | cp -a --parents tools/build/Build $kerneldir/build/ |
162 | cp -a --parents tools/build/fixdep.c $kerneldir/build/ | 162 | cp -a --parents tools/build/fixdep.c $kerneldir/build/ |
163 | cp -a --parents tools/scripts/utilities.mak $kerneldir/build/ | 163 | cp -a --parents tools/scripts/utilities.mak $kerneldir/build/ |
164 | 164 | ||
165 | # extra files, just in case | 165 | # extra files, just in case |
166 | cp -a --parents tools/objtool/* $kerneldir/build/ | 166 | cp -a --parents tools/objtool/* $kerneldir/build/ |
167 | cp -a --parents tools/lib/* $kerneldir/build/ | 167 | cp -a --parents tools/lib/* $kerneldir/build/ |
168 | cp -a --parents tools/lib/subcmd/* $kerneldir/build/ | 168 | cp -a --parents tools/lib/subcmd/* $kerneldir/build/ |
169 | 169 | ||
170 | cp -a --parents tools/include/* $kerneldir/build/ | 170 | cp -a --parents tools/include/* $kerneldir/build/ |
171 | 171 | ||
172 | cp -a --parents $(find tools/arch/${ARCH}/ -type f) $kerneldir/build/ | 172 | cp -a --parents $(find tools/arch/${ARCH}/ -type f) $kerneldir/build/ |
173 | fi | 173 | fi |
174 | 174 | ||
175 | if [ "${ARCH}" = "arm64" ]; then | 175 | if [ "${ARCH}" = "arm64" ]; then |
176 | # arch/arm64/include/asm/xen references arch/arm | 176 | # arch/arm64/include/asm/xen references arch/arm |
177 | cp -a --parents arch/arm/include/asm/xen $kerneldir/build/ | 177 | cp -a --parents arch/arm/include/asm/xen $kerneldir/build/ |
178 | # arch/arm64/include/asm/opcodes.h references arch/arm | 178 | # arch/arm64/include/asm/opcodes.h references arch/arm |
179 | cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/ | 179 | cp -a --parents arch/arm/include/asm/opcodes.h $kerneldir/build/ |
180 | 180 | ||
181 | # v6.1+ | 181 | # v6.1+ |
182 | cp -a --parents arch/arm64/kernel/asm-offsets.c $kerneldir/build/ | 182 | cp -a --parents arch/arm64/kernel/asm-offsets.c $kerneldir/build/ |
183 | 183 | ||
184 | cp -a --parents arch/arm64/kernel/vdso/*gettimeofday.* $kerneldir/build/ | 184 | cp -a --parents arch/arm64/kernel/vdso/*gettimeofday.* $kerneldir/build/ |
185 | cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/ | 185 | cp -a --parents arch/arm64/kernel/vdso/sigreturn.S $kerneldir/build/ |
@@ -202,26 +202,26 @@ do_install() { | |||
202 | if [ -e $kerneldir/build/arch/arm64/tools/gen-sysreg.awk ]; then | 202 | if [ -e $kerneldir/build/arch/arm64/tools/gen-sysreg.awk ]; then |
203 | sed -i -e "s,#!.*awk.*,#!${USRBINPATH}/env awk," $kerneldir/build/arch/arm64/tools/gen-sysreg.awk | 203 | sed -i -e "s,#!.*awk.*,#!${USRBINPATH}/env awk," $kerneldir/build/arch/arm64/tools/gen-sysreg.awk |
204 | fi | 204 | fi |
205 | fi | 205 | fi |
206 | 206 | ||
207 | if [ "${ARCH}" = "powerpc" ]; then | 207 | if [ "${ARCH}" = "powerpc" ]; then |
208 | # 5.0 needs these files, but don't error if they aren't present in the source | 208 | # 5.0 needs these files, but don't error if they aren't present in the source |
209 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || : | 209 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscall.tbl $kerneldir/build/ 2>/dev/null || : |
210 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || : | 210 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscalltbl.sh $kerneldir/build/ 2>/dev/null || : |
211 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscallhdr.sh $kerneldir/build/ 2>/dev/null || : | 211 | cp -a --parents arch/${ARCH}/kernel/syscalls/syscallhdr.sh $kerneldir/build/ 2>/dev/null || : |
212 | cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || : | 212 | cp -a --parents arch/${ARCH}/kernel/vdso32/* $kerneldir/build/ 2>/dev/null || : |
213 | cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || : | 213 | cp -a --parents arch/${ARCH}/kernel/vdso64/* $kerneldir/build/ 2>/dev/null || : |
214 | 214 | ||
215 | # v5.19+ | 215 | # v5.19+ |
216 | cp -a --parents arch/powerpc/kernel/vdso/*.S $kerneldir/build 2>/dev/null || : | 216 | cp -a --parents arch/powerpc/kernel/vdso/*.S $kerneldir/build 2>/dev/null || : |
217 | cp -a --parents arch/powerpc/kernel/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || : | 217 | cp -a --parents arch/powerpc/kernel/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || : |
218 | cp -a --parents arch/powerpc/kernel/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || : | 218 | cp -a --parents arch/powerpc/kernel/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || : |
219 | 219 | ||
220 | # v6,1+ | 220 | # v6,1+ |
221 | cp -a --parents arch/powerpc/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || : | 221 | cp -a --parents arch/powerpc/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || : |
222 | cp -a --parents arch/powerpc/kernel/head_booke.h $kerneldir/build/ 2>/dev/null || : | 222 | cp -a --parents arch/powerpc/kernel/head_booke.h $kerneldir/build/ 2>/dev/null || : |
223 | fi | 223 | fi |
224 | if [ "${ARCH}" = "riscv" ]; then | 224 | if [ "${ARCH}" = "riscv" ]; then |
225 | cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/ | 225 | cp -a --parents arch/riscv/kernel/vdso/*gettimeofday.* $kerneldir/build/ |
226 | cp -a --parents arch/riscv/kernel/vdso/note.S $kerneldir/build/ | 226 | cp -a --parents arch/riscv/kernel/vdso/note.S $kerneldir/build/ |
227 | # v6.1+ | 227 | # v6.1+ |
@@ -229,120 +229,120 @@ do_install() { | |||
229 | if [ -e arch/riscv/kernel/vdso/gen_vdso_offsets.sh ]; then | 229 | if [ -e arch/riscv/kernel/vdso/gen_vdso_offsets.sh ]; then |
230 | cp -a --parents arch/riscv/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/ | 230 | cp -a --parents arch/riscv/kernel/vdso/gen_vdso_offsets.sh $kerneldir/build/ |
231 | fi | 231 | fi |
232 | cp -a --parents arch/riscv/kernel/vdso/* $kerneldir/build/ 2>/dev/null || : | 232 | cp -a --parents arch/riscv/kernel/vdso/* $kerneldir/build/ 2>/dev/null || : |
233 | if [ -e arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh ]; then | 233 | if [ -e arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh ]; then |
234 | cp -a --parents arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh $kerneldir/build/ | 234 | cp -a --parents arch/riscv/kernel/compat_vdso/gen_compat_vdso_offsets.sh $kerneldir/build/ |
235 | fi | 235 | fi |
236 | cp -a --parents arch/riscv/kernel/compat_vdso/* $kerneldir/build/ 2>/dev/null || : | 236 | cp -a --parents arch/riscv/kernel/compat_vdso/* $kerneldir/build/ 2>/dev/null || : |
237 | fi | 237 | fi |
238 | 238 | ||
239 | # include the machine specific headers for ARM variants, if available. | 239 | # include the machine specific headers for ARM variants, if available. |
240 | if [ "${ARCH}" = "arm" ]; then | 240 | if [ "${ARCH}" = "arm" ]; then |
241 | cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ | 241 | cp -a --parents arch/${ARCH}/mach-*/include $kerneldir/build/ |
242 | 242 | ||
243 | # include a few files for 'make prepare' | 243 | # include a few files for 'make prepare' |
244 | cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ | 244 | cp -a --parents arch/arm/tools/gen-mach-types $kerneldir/build/ |
245 | cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ | 245 | cp -a --parents arch/arm/tools/mach-types $kerneldir/build/ |
246 | 246 | ||
247 | # 5.19+ | 247 | # 5.19+ |
248 | cp -a --parents arch/arm/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || : | 248 | cp -a --parents arch/arm/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || : |
249 | 249 | ||
250 | # ARM syscall table tools only exist for kernels v4.10 or later | 250 | # ARM syscall table tools only exist for kernels v4.10 or later |
251 | SYSCALL_TOOLS=$(find arch/arm/tools -name "syscall*") | 251 | SYSCALL_TOOLS=$(find arch/arm/tools -name "syscall*") |
252 | if [ -n "$SYSCALL_TOOLS" ] ; then | 252 | if [ -n "$SYSCALL_TOOLS" ] ; then |
253 | cp -a --parents $SYSCALL_TOOLS $kerneldir/build/ | 253 | cp -a --parents $SYSCALL_TOOLS $kerneldir/build/ |
254 | fi | 254 | fi |
255 | 255 | ||
256 | cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/ 2>/dev/null || : | 256 | cp -a --parents arch/arm/kernel/module.lds $kerneldir/build/ 2>/dev/null || : |
257 | # v6.1+ | 257 | # v6.1+ |
258 | cp -a --parents arch/arm/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || : | 258 | cp -a --parents arch/arm/kernel/asm-offsets.c $kerneldir/build/ 2>/dev/null || : |
259 | cp -a --parents arch/arm/kernel/signal.h $kerneldir/build/ 2>/dev/null || : | 259 | cp -a --parents arch/arm/kernel/signal.h $kerneldir/build/ 2>/dev/null || : |
260 | fi | 260 | fi |
261 | 261 | ||
262 | if [ -d arch/${ARCH}/include ]; then | 262 | if [ -d arch/${ARCH}/include ]; then |
263 | cp -a --parents arch/${ARCH}/include $kerneldir/build/ | 263 | cp -a --parents arch/${ARCH}/include $kerneldir/build/ |
264 | fi | 264 | fi |
265 | 265 | ||
266 | cp -a include $kerneldir/build | 266 | cp -a include $kerneldir/build |
267 | 267 | ||
268 | cp -a --parents lib/vdso/* $kerneldir/build/ 2>/dev/null || : | 268 | cp -a --parents lib/vdso/* $kerneldir/build/ 2>/dev/null || : |
269 | 269 | ||
270 | cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/ | 270 | cp -a --parents tools/include/tools/le_byteshift.h $kerneldir/build/ |
271 | cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/ | 271 | cp -a --parents tools/include/tools/be_byteshift.h $kerneldir/build/ |
272 | 272 | ||
273 | # required for generate missing syscalls prepare phase | 273 | # required for generate missing syscalls prepare phase |
274 | cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build | 274 | cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build |
275 | cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build 2>/dev/null || : | 275 | cp -a --parents $(find arch/arm -type f -name "*.tbl") $kerneldir/build 2>/dev/null || : |
276 | 276 | ||
277 | if [ "${ARCH}" = "x86" ]; then | 277 | if [ "${ARCH}" = "x86" ]; then |
278 | # files for 'make prepare' to succeed with kernel-devel | 278 | # files for 'make prepare' to succeed with kernel-devel |
279 | cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build/ 2>/dev/null || : | 279 | cp -a --parents $(find arch/x86 -type f -name "syscall_32.tbl") $kerneldir/build/ 2>/dev/null || : |
280 | cp -a --parents $(find arch/x86 -type f -name "syscalltbl.sh") $kerneldir/build/ 2>/dev/null || : | 280 | cp -a --parents $(find arch/x86 -type f -name "syscalltbl.sh") $kerneldir/build/ 2>/dev/null || : |
281 | cp -a --parents $(find arch/x86 -type f -name "syscallhdr.sh") $kerneldir/build/ 2>/dev/null || : | 281 | cp -a --parents $(find arch/x86 -type f -name "syscallhdr.sh") $kerneldir/build/ 2>/dev/null || : |
282 | cp -a --parents $(find arch/x86 -type f -name "syscall_64.tbl") $kerneldir/build/ 2>/dev/null || : | 282 | cp -a --parents $(find arch/x86 -type f -name "syscall_64.tbl") $kerneldir/build/ 2>/dev/null || : |
283 | cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/ | 283 | cp -a --parents arch/x86/tools/relocs_32.c $kerneldir/build/ |
284 | cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/ | 284 | cp -a --parents arch/x86/tools/relocs_64.c $kerneldir/build/ |
285 | cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/ | 285 | cp -a --parents arch/x86/tools/relocs.c $kerneldir/build/ |
286 | cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/ | 286 | cp -a --parents arch/x86/tools/relocs_common.c $kerneldir/build/ |
287 | cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/ | 287 | cp -a --parents arch/x86/tools/relocs.h $kerneldir/build/ |
288 | cp -a --parents arch/x86/tools/gen-insn-attr-x86.awk $kerneldir/build/ 2>/dev/null || : | 288 | cp -a --parents arch/x86/tools/gen-insn-attr-x86.awk $kerneldir/build/ 2>/dev/null || : |
289 | cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/ | 289 | cp -a --parents arch/x86/purgatory/purgatory.c $kerneldir/build/ |
290 | 290 | ||
291 | # 4.18 + have unified the purgatory files, so we ignore any errors if | 291 | # 4.18 + have unified the purgatory files, so we ignore any errors if |
292 | # these files are not present | 292 | # these files are not present |
293 | cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ 2>/dev/null || : | 293 | cp -a --parents arch/x86/purgatory/sha256.h $kerneldir/build/ 2>/dev/null || : |
294 | cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ 2>/dev/null || : | 294 | cp -a --parents arch/x86/purgatory/sha256.c $kerneldir/build/ 2>/dev/null || : |
295 | 295 | ||
296 | cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/ | 296 | cp -a --parents arch/x86/purgatory/stack.S $kerneldir/build/ |
297 | cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ 2>/dev/null || : | 297 | cp -a --parents arch/x86/purgatory/string.c $kerneldir/build/ 2>/dev/null || : |
298 | cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/ | 298 | cp -a --parents arch/x86/purgatory/setup-x86_64.S $kerneldir/build/ |
299 | cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/ | 299 | cp -a --parents arch/x86/purgatory/entry64.S $kerneldir/build/ |
300 | cp -a --parents arch/x86/boot/string.h $kerneldir/build/ | 300 | cp -a --parents arch/x86/boot/string.h $kerneldir/build/ |
301 | cp -a --parents arch/x86/boot/string.c $kerneldir/build/ | 301 | cp -a --parents arch/x86/boot/string.c $kerneldir/build/ |
302 | cp -a --parents arch/x86/boot/compressed/string.c $kerneldir/build/ 2>/dev/null || : | 302 | cp -a --parents arch/x86/boot/compressed/string.c $kerneldir/build/ 2>/dev/null || : |
303 | cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/ | 303 | cp -a --parents arch/x86/boot/ctype.h $kerneldir/build/ |
304 | 304 | ||
305 | # objtool requires these files | 305 | # objtool requires these files |
306 | cp -a --parents arch/x86/lib/inat.c $kerneldir/build/ 2>/dev/null || : | 306 | cp -a --parents arch/x86/lib/inat.c $kerneldir/build/ 2>/dev/null || : |
307 | cp -a --parents arch/x86/lib/insn.c $kerneldir/build/ 2>/dev/null || : | 307 | cp -a --parents arch/x86/lib/insn.c $kerneldir/build/ 2>/dev/null || : |
308 | 308 | ||
309 | # v6.1+ | 309 | # v6.1+ |
310 | cp -a --parents arch/x86/kernel/asm-offsets* $kerneldir/build || : | 310 | cp -a --parents arch/x86/kernel/asm-offsets* $kerneldir/build || : |
311 | # for capabilities.h, vmx.h | 311 | # for capabilities.h, vmx.h |
312 | cp -a --parents arch/x86/kvm/vmx/*.h $kerneldir/build || : | 312 | cp -a --parents arch/x86/kvm/vmx/*.h $kerneldir/build || : |
313 | # for lapic.h, hyperv.h .... | 313 | # for lapic.h, hyperv.h .... |
314 | cp -a --parents arch/x86/kvm/*.h $kerneldir/build || : | 314 | cp -a --parents arch/x86/kvm/*.h $kerneldir/build || : |
315 | fi | 315 | fi |
316 | 316 | ||
317 | # moved from arch/mips to all arches for v6.1+ | 317 | # moved from arch/mips to all arches for v6.1+ |
318 | cp -a --parents kernel/time/timeconst.bc $kerneldir/build 2>/dev/null || : | 318 | cp -a --parents kernel/time/timeconst.bc $kerneldir/build 2>/dev/null || : |
319 | cp -a --parents kernel/bounds.c $kerneldir/build 2>/dev/null || : | 319 | cp -a --parents kernel/bounds.c $kerneldir/build 2>/dev/null || : |
320 | 320 | ||
321 | if [ "${ARCH}" = "mips" ]; then | 321 | if [ "${ARCH}" = "mips" ]; then |
322 | cp -a --parents arch/mips/Kbuild.platforms $kerneldir/build/ | 322 | cp -a --parents arch/mips/Kbuild.platforms $kerneldir/build/ |
323 | cp --parents $(find -type f -name "Platform") $kerneldir/build | 323 | cp --parents $(find -type f -name "Platform") $kerneldir/build |
324 | cp --parents arch/mips/boot/tools/relocs* $kerneldir/build | 324 | cp --parents arch/mips/boot/tools/relocs* $kerneldir/build |
325 | cp -a --parents arch/mips/kernel/asm-offsets.c $kerneldir/build | 325 | cp -a --parents arch/mips/kernel/asm-offsets.c $kerneldir/build |
326 | cp -a --parents Kbuild $kerneldir/build | 326 | cp -a --parents Kbuild $kerneldir/build |
327 | cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || : | 327 | cp -a --parents arch/mips/kernel/syscalls/*.sh $kerneldir/build 2>/dev/null || : |
328 | cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || : | 328 | cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || : |
329 | cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || : | 329 | cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || : |
330 | fi | 330 | fi |
331 | 331 | ||
332 | if [ "${ARCH}" = "loongarch" ]; then | 332 | if [ "${ARCH}" = "loongarch" ]; then |
333 | cp -a --parents arch/loongarch/kernel/asm-offsets.c $kerneldir/build | 333 | cp -a --parents arch/loongarch/kernel/asm-offsets.c $kerneldir/build |
334 | cp -a --parents Kbuild $kerneldir/build | 334 | cp -a --parents Kbuild $kerneldir/build |
335 | cp -a --parents arch/loongarch/vdso/*.S $kerneldir/build 2>/dev/null || : | 335 | cp -a --parents arch/loongarch/vdso/*.S $kerneldir/build 2>/dev/null || : |
336 | cp -a --parents arch/loongarch/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || : | 336 | cp -a --parents arch/loongarch/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || : |
337 | cp -a --parents arch/loongarch/vdso/*getcpu.* $kerneldir/build 2>/dev/null || : | 337 | cp -a --parents arch/loongarch/vdso/*getcpu.* $kerneldir/build 2>/dev/null || : |
338 | cp -a --parents arch/loongarch/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || : | 338 | cp -a --parents arch/loongarch/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || : |
339 | fi | 339 | fi |
340 | 340 | ||
341 | # required to build scripts/selinux/genheaders/genheaders | 341 | # required to build scripts/selinux/genheaders/genheaders |
342 | cp -a --parents security/selinux/include/* $kerneldir/build/ | 342 | cp -a --parents security/selinux/include/* $kerneldir/build/ |
343 | 343 | ||
344 | # copy any localversion files | 344 | # copy any localversion files |
345 | cp -a localversion* $kerneldir/build/ 2>/dev/null || : | 345 | cp -a localversion* $kerneldir/build/ 2>/dev/null || : |
346 | ) | 346 | ) |
347 | 347 | ||
348 | # Make sure the Makefile and version.h have a matching timestamp so that | 348 | # Make sure the Makefile and version.h have a matching timestamp so that |
@@ -382,9 +382,9 @@ do_install() { | |||
382 | # left as /usr/bin/python rootfs assembly will fail, since we only have python3 | 382 | # left as /usr/bin/python rootfs assembly will fail, since we only have python3 |
383 | # in the RDEPENDS (and the python3 package does not include /usr/bin/python) | 383 | # in the RDEPENDS (and the python3 package does not include /usr/bin/python) |
384 | for ss in $(find $kerneldir/build/scripts -type f -name '*'); do | 384 | for ss in $(find $kerneldir/build/scripts -type f -name '*'); do |
385 | sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss" | 385 | sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "$ss" |
386 | sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss" | 386 | sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "$ss" |
387 | sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss" | 387 | sed -i 's,/usr/bin/python,/usr/bin/env python3,' "$ss" |
388 | done | 388 | done |
389 | 389 | ||
390 | chown -R root:root ${D} | 390 | chown -R root:root ${D} |