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

TOMOYO Linux Cross Reference
Linux/arch/mips/tools/generic-board-config.sh

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 /arch/mips/tools/generic-board-config.sh (Architecture m68k) and /arch/mips/tools/generic-board-config.sh (Architecture mips)


  1 #!/bin/sh                                           1 #!/bin/sh
  2 # SPDX-License-Identifier: GPL-2.0-or-later         2 # SPDX-License-Identifier: GPL-2.0-or-later
  3 #                                                   3 #
  4 # Copyright (C) 2017 Imagination Technologies       4 # Copyright (C) 2017 Imagination Technologies
  5 # Author: Paul Burton <paul.burton@mips.com>         5 # Author: Paul Burton <paul.burton@mips.com>
  6 #                                                   6 #
  7 # This script merges configuration fragments f      7 # This script merges configuration fragments for boards supported by the
  8 # generic MIPS kernel. It checks each for requ      8 # generic MIPS kernel. It checks each for requirements specified using
  9 # formatted comments, and then calls merge_con      9 # formatted comments, and then calls merge_config.sh to merge those
 10 # fragments which have no unmet requirements.      10 # fragments which have no unmet requirements.
 11 #                                                  11 #
 12 # An example of requirements in your board con     12 # An example of requirements in your board config fragment might be:
 13 #                                                  13 #
 14 # # require CONFIG_CPU_MIPS32_R2=y                 14 # # require CONFIG_CPU_MIPS32_R2=y
 15 # # require CONFIG_CPU_LITTLE_ENDIAN=y             15 # # require CONFIG_CPU_LITTLE_ENDIAN=y
 16 #                                                  16 #
 17 # This would mean that your board is only incl     17 # This would mean that your board is only included in kernels which are
 18 # configured for little endian MIPS32r2 CPUs,      18 # configured for little endian MIPS32r2 CPUs, and not for example in kernels
 19 # configured for 64 bit or big endian systems.     19 # configured for 64 bit or big endian systems.
 20 #                                                  20 #
 21                                                    21 
 22 srctree="$1"                                       22 srctree="$1"
 23 objtree="$2"                                       23 objtree="$2"
 24 ref_cfg="$3"                                       24 ref_cfg="$3"
 25 cfg="$4"                                           25 cfg="$4"
 26 boards_origin="$5"                                 26 boards_origin="$5"
 27 shift 5                                            27 shift 5
 28                                                    28 
 29 # Only print Skipping... lines if the user exp     29 # Only print Skipping... lines if the user explicitly specified BOARDS=. In the
 30 # general case it only serves to obscure the u     30 # general case it only serves to obscure the useful output about what actually
 31 # was included.                                    31 # was included.
 32 case ${boards_origin} in                           32 case ${boards_origin} in
 33 "command line")                                    33 "command line")
 34         print_skipped=1                            34         print_skipped=1
 35         ;;                                         35         ;;
 36 environment*)                                      36 environment*)
 37         print_skipped=1                            37         print_skipped=1
 38         ;;                                         38         ;;
 39 *)                                                 39 *)
 40         print_skipped=0                            40         print_skipped=0
 41         ;;                                         41         ;;
 42 esac                                               42 esac
 43                                                    43 
 44 for board in $@; do                                44 for board in $@; do
 45         board_cfg="${srctree}/arch/mips/config     45         board_cfg="${srctree}/arch/mips/configs/generic/board-${board}.config"
 46         if [ ! -f "${board_cfg}" ]; then           46         if [ ! -f "${board_cfg}" ]; then
 47                 echo "WARNING: Board config '$     47                 echo "WARNING: Board config '${board_cfg}' not found"
 48                 continue                           48                 continue
 49         fi                                         49         fi
 50                                                    50 
 51         # For each line beginning with # requi     51         # For each line beginning with # require, cut out the field following
 52         # it & search for that in the referenc     52         # it & search for that in the reference config file. If the requirement
 53         # is not found then the subshell will      53         # is not found then the subshell will exit with code 1, and we'll
 54         # continue on to the next board.           54         # continue on to the next board.
 55         grep -E '^# require ' "${board_cfg}" |     55         grep -E '^# require ' "${board_cfg}" | \
 56             cut -d' ' -f 3- | \                    56             cut -d' ' -f 3- | \
 57             while read req; do                     57             while read req; do
 58                 case ${req} in                     58                 case ${req} in
 59                 *=y)                               59                 *=y)
 60                         # If we require someth     60                         # If we require something =y then we check that a line
 61                         # containing it is pre     61                         # containing it is present in the reference config.
 62                         grep -Eq "^${req}\$" "     62                         grep -Eq "^${req}\$" "${ref_cfg}" && continue
 63                         ;;                         63                         ;;
 64                 *=n)                               64                 *=n)
 65                         # If we require someth     65                         # If we require something =n then we just invert that
 66                         # check, considering t     66                         # check, considering the requirement met if there isn't
 67                         # a line containing th     67                         # a line containing the value =y in the reference
 68                         # config.                  68                         # config.
 69                         grep -Eq "^${req/%=n/=     69                         grep -Eq "^${req/%=n/=y}\$" "${ref_cfg}" || continue
 70                         ;;                         70                         ;;
 71                 *)                                 71                 *)
 72                         echo "WARNING: Unhandl     72                         echo "WARNING: Unhandled requirement '${req}'"
 73                         ;;                         73                         ;;
 74                 esac                               74                 esac
 75                                                    75 
 76                 [ ${print_skipped} -eq 1 ] &&      76                 [ ${print_skipped} -eq 1 ] && echo "Skipping ${board_cfg}"
 77                 exit 1                             77                 exit 1
 78         done || continue                           78         done || continue
 79                                                    79 
 80         # Merge this board config fragment int     80         # Merge this board config fragment into our final config file
 81         ${srctree}/scripts/kconfig/merge_confi     81         ${srctree}/scripts/kconfig/merge_config.sh \
 82                 -m -O ${objtree} ${cfg} ${boar     82                 -m -O ${objtree} ${cfg} ${board_cfg} \
 83                 | grep -Ev '^(#|Using)'            83                 | grep -Ev '^(#|Using)'
 84 done                                               84 done
                                                      

~ [ 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