1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0-only 3 4 set -eu 5 6 destdir=${1} 7 8 is_enabled() { 9 grep -q "^$1=y" include/config/auto.conf 10 } 11 12 mkdir -p "${destdir}" 13 14 ( 15 cd "${srctree}" 16 echo Makefile 17 find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*' 18 find include scripts -type f -o -type l 19 find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform 20 find "arch/${SRCARCH}" -name include -type d 21 ) | tar -c -f - -C "${srctree}" -T - | tar -xf - -C "${destdir}" 22 23 { 24 if is_enabled CONFIG_OBJTOOL; then 25 echo tools/objtool/objtool 26 fi 27 28 find "arch/${SRCARCH}/include" Module.symvers include scripts -type f 29 30 if is_enabled CONFIG_GCC_PLUGINS; then 31 find scripts/gcc-plugins -name '*.so' 32 fi 33 } | tar -c -f - -T - | tar -xf - -C "${destdir}" 34 35 # copy .config manually to be where it's expected to be 36 cp "${KCONFIG_CONFIG}" "${destdir}/.config"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.