~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/package/install-extmod-build

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/package/install-extmod-build (Architecture mips) and /scripts/package/install-extmod-build (Architecture m68k)


  1 #!/bin/sh                                           1 #!/bin/sh
  2 # SPDX-License-Identifier: GPL-2.0-only             2 # SPDX-License-Identifier: GPL-2.0-only
  3                                                     3 
  4 set -eu                                             4 set -eu
  5                                                     5 
  6 destdir=${1}                                        6 destdir=${1}
  7                                                     7 
  8 is_enabled() {                                      8 is_enabled() {
  9         grep -q "^$1=y" include/config/auto.co      9         grep -q "^$1=y" include/config/auto.conf
 10 }                                                  10 }
 11                                                    11 
 12 find_in_scripts() {                                12 find_in_scripts() {
 13         find scripts \                             13         find scripts \
 14                 \( -name atomic -o -name dtc -     14                 \( -name atomic -o -name dtc -o -name kconfig -o -name package \) -prune -o \
 15                 ! -name unifdef -a ! -name mk_     15                 ! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) -print
 16 }                                                  16 }
 17                                                    17 
 18 mkdir -p "${destdir}"                              18 mkdir -p "${destdir}"
 19                                                    19 
 20 (                                                  20 (
 21         cd "${srctree}"                            21         cd "${srctree}"
 22         echo Makefile                              22         echo Makefile
 23         find "arch/${SRCARCH}" -maxdepth 1 -na     23         find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
 24         find "arch/${SRCARCH}" -name generated     24         find "arch/${SRCARCH}" -name generated -prune -o -name include -type d -print
 25         find "arch/${SRCARCH}" -name Kbuild.pl     25         find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform
 26         find include \( -name config -o -name      26         find include \( -name config -o -name generated \) -prune -o \( -type f -o -type l \) -print
 27         find_in_scripts                            27         find_in_scripts
 28 ) | tar -c -f - -C "${srctree}" -T - | tar -xf     28 ) | tar -c -f - -C "${srctree}" -T - | tar -xf - -C "${destdir}"
 29                                                    29 
 30 {                                                  30 {
 31         if is_enabled CONFIG_OBJTOOL; then         31         if is_enabled CONFIG_OBJTOOL; then
 32                 echo tools/objtool/objtool         32                 echo tools/objtool/objtool
 33         fi                                         33         fi
 34                                                    34 
 35         echo Module.symvers                        35         echo Module.symvers
 36         echo "arch/${SRCARCH}/include/generate     36         echo "arch/${SRCARCH}/include/generated"
 37         echo include/config/auto.conf              37         echo include/config/auto.conf
 38         echo include/config/kernel.release         38         echo include/config/kernel.release
 39         echo include/generated                     39         echo include/generated
 40         find_in_scripts                            40         find_in_scripts
 41                                                    41 
 42         if is_enabled CONFIG_GCC_PLUGINS; then     42         if is_enabled CONFIG_GCC_PLUGINS; then
 43                 find scripts/gcc-plugins -name     43                 find scripts/gcc-plugins -name '*.so'
 44         fi                                         44         fi
 45 } | tar -c -f - -T - | tar -xf - -C "${destdir     45 } | tar -c -f - -T - | tar -xf - -C "${destdir}"
 46                                                    46 
 47 # When ${CC} and ${HOSTCC} differ, rebuild hos     47 # When ${CC} and ${HOSTCC} differ, rebuild host programs using ${CC}.
 48 #                                                  48 #
 49 # This caters to host programs that participat     49 # This caters to host programs that participate in Kbuild. objtool and
 50 # resolve_btfids are out of scope.                 50 # resolve_btfids are out of scope.
 51 if [ "${CC}" != "${HOSTCC}" ]; then                51 if [ "${CC}" != "${HOSTCC}" ]; then
 52         echo "Rebuilding host programs with ${     52         echo "Rebuilding host programs with ${CC}..."
 53                                                    53 
 54         cat <<-'EOF' >  "${destdir}/Kbuild"        54         cat <<-'EOF' >  "${destdir}/Kbuild"
 55         subdir-y := scripts                        55         subdir-y := scripts
 56         EOF                                        56         EOF
 57                                                    57 
 58         # HOSTCXX is not overridden. The C++ c     58         # HOSTCXX is not overridden. The C++ compiler is used to build:
 59         # - scripts/kconfig/qconf, which is un     59         # - scripts/kconfig/qconf, which is unneeded for external module builds
 60         # - GCC plugins, which will not work o     60         # - GCC plugins, which will not work on the installed system even after
 61         #   being rebuilt.                         61         #   being rebuilt.
 62         #                                          62         #
 63         # Use the single-target build to avoid     63         # Use the single-target build to avoid the modpost invocation, which
 64         # would overwrite Module.symvers.          64         # would overwrite Module.symvers.
 65         "${MAKE}" HOSTCC="${CC}" KBUILD_EXTMOD     65         "${MAKE}" HOSTCC="${CC}" KBUILD_EXTMOD="${destdir}" scripts/
 66                                                    66 
 67         cat <<-'EOF' >  "${destdir}/scripts/Kb     67         cat <<-'EOF' >  "${destdir}/scripts/Kbuild"
 68         subdir-y := basic                          68         subdir-y := basic
 69         hostprogs-always-y := mod/modpost          69         hostprogs-always-y := mod/modpost
 70         mod/modpost-objs := $(addprefix mod/,      70         mod/modpost-objs := $(addprefix mod/, modpost.o file2alias.o sumversion.o symsearch.o)
 71         EOF                                        71         EOF
 72                                                    72 
 73         # Run once again to rebuild scripts/ba     73         # Run once again to rebuild scripts/basic/ and scripts/mod/modpost.
 74         "${MAKE}" HOSTCC="${CC}" KBUILD_EXTMOD     74         "${MAKE}" HOSTCC="${CC}" KBUILD_EXTMOD="${destdir}" scripts/
 75                                                    75 
 76         rm -f "${destdir}/Kbuild" "${destdir}/     76         rm -f "${destdir}/Kbuild" "${destdir}/scripts/Kbuild"
 77 fi                                                 77 fi
 78                                                    78 
 79 find "${destdir}" \( -name '.*.cmd' -o -name '     79 find "${destdir}" \( -name '.*.cmd' -o -name '*.o' \) -delete
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php