1 # 1 # 2 # Example config for cross compiling 2 # Example config for cross compiling 3 # 3 # 4 # In this config, it is expected that the tool 4 # In this config, it is expected that the tool chains from: 5 # 5 # 6 # https://kernel.org/pub/tools/crosstool/fil 6 # https://kernel.org/pub/tools/crosstool/files/bin/x86_64/ 7 # 7 # 8 # running on a x86_64 system have been downloa 8 # running on a x86_64 system have been downloaded and installed into: 9 # 9 # 10 # /usr/local/ 10 # /usr/local/ 11 # 11 # 12 # such that the compiler binaries are somethin 12 # such that the compiler binaries are something like: 13 # 13 # 14 # /usr/local/gcc-4.5.2-nolibc/mips-linux/bin 14 # /usr/local/gcc-4.5.2-nolibc/mips-linux/bin/mips-linux-gcc 15 # 15 # 16 # Some of the archs will use gcc-4.5.1 instead 16 # Some of the archs will use gcc-4.5.1 instead of gcc-4.5.2 17 # this config uses variables to differentiate 17 # this config uses variables to differentiate them. 18 # 18 # 19 # Comments describe some of the options, but f 19 # Comments describe some of the options, but full descriptions of 20 # options are described in the samples.conf fi 20 # options are described in the samples.conf file. 21 21 22 # ${PWD} is defined by ktest.pl to be the dire 22 # ${PWD} is defined by ktest.pl to be the directory that the user 23 # was in when they executed ktest.pl. It may b 23 # was in when they executed ktest.pl. It may be better to hardcode the 24 # path name here. THIS_DIR is the variable use 24 # path name here. THIS_DIR is the variable used through out the config file 25 # in case you want to change it. 25 # in case you want to change it. 26 26 27 THIS_DIR := ${PWD} 27 THIS_DIR := ${PWD} 28 28 29 # Update the BUILD_DIR option to the location 29 # Update the BUILD_DIR option to the location of your git repo you want to test. 30 BUILD_DIR = ${THIS_DIR}/linux.git 30 BUILD_DIR = ${THIS_DIR}/linux.git 31 31 32 # The build will go into this directory. It wi 32 # The build will go into this directory. It will be created when you run the test. 33 OUTPUT_DIR = ${THIS_DIR}/cross-compile 33 OUTPUT_DIR = ${THIS_DIR}/cross-compile 34 34 35 # The build will be compiled with -j8 35 # The build will be compiled with -j8 36 BUILD_OPTIONS = -j8 36 BUILD_OPTIONS = -j8 37 37 38 # The test will not stop when it hits a failur 38 # The test will not stop when it hits a failure. 39 DIE_ON_FAILURE = 0 39 DIE_ON_FAILURE = 0 40 40 41 # If you want to have ktest.pl store the failu 41 # If you want to have ktest.pl store the failure somewhere, uncomment this option 42 # and change the directory where ktest should 42 # and change the directory where ktest should store the failures. 43 #STORE_FAILURES = ${THIS_DIR}/failures 43 #STORE_FAILURES = ${THIS_DIR}/failures 44 44 45 # The log file is stored in the OUTPUT_DIR cal 45 # The log file is stored in the OUTPUT_DIR called cross.log 46 # If you enable this, you need to create the O 46 # If you enable this, you need to create the OUTPUT_DIR. It wont be created for you. 47 LOG_FILE = ${OUTPUT_DIR}/cross.log 47 LOG_FILE = ${OUTPUT_DIR}/cross.log 48 48 49 # The log file will be cleared each time you r 49 # The log file will be cleared each time you run ktest. 50 CLEAR_LOG = 1 50 CLEAR_LOG = 1 51 51 52 # As some archs do not build with the defconfi 52 # As some archs do not build with the defconfig, they have been marked 53 # to be ignored. If you want to test them anyw 53 # to be ignored. If you want to test them anyway, change DO_FAILED to 1. 54 # If a test that has been marked as DO_FAILED 54 # If a test that has been marked as DO_FAILED passes, then you should change 55 # that test to be DO_DEFAULT 55 # that test to be DO_DEFAULT 56 56 57 DO_FAILED := 0 57 DO_FAILED := 0 58 DO_DEFAULT := 1 58 DO_DEFAULT := 1 59 59 60 # By setting both DO_FAILED and DO_DEFAULT to 60 # By setting both DO_FAILED and DO_DEFAULT to zero, you can pick a single 61 # arch that you want to test. (uncomment RUN a 61 # arch that you want to test. (uncomment RUN and chose your arch) 62 #RUN := arm 62 #RUN := arm 63 63 64 # At the bottom of the config file exists a bi 64 # At the bottom of the config file exists a bisect test. You can update that 65 # test and set DO_FAILED and DO_DEFAULT to zer 65 # test and set DO_FAILED and DO_DEFAULT to zero, and uncomment this variable 66 # to run the bisect on the arch. 66 # to run the bisect on the arch. 67 #RUN := bisect 67 #RUN := bisect 68 68 69 # By default all tests will be running gcc 4.5 69 # By default all tests will be running gcc 4.5.2. Some tests are using 4.5.1 70 # and they select that in the test. 70 # and they select that in the test. 71 # Note: GCC_VER is declared as on option and n 71 # Note: GCC_VER is declared as on option and not a variable ('=' instead of ':=') 72 # This is important. A variable is used only i 72 # This is important. A variable is used only in the config file and if it is set 73 # it stays that way for the rest of the config 73 # it stays that way for the rest of the config file until it is change again. 74 # Here we want GCC_VER to remain persistent an 74 # Here we want GCC_VER to remain persistent and change for each test, as it is used in 75 # the MAKE_CMD. By using '=' instead of ':=' w 75 # the MAKE_CMD. By using '=' instead of ':=' we achieve our goal. 76 76 77 GCC_VER = 4.5.2 77 GCC_VER = 4.5.2 78 MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-noli 78 MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-nolibc/${CROSS}/bin:$PATH CROSS_COMPILE=${CROSS}- make ARCH=${ARCH} 79 79 80 # all tests are only doing builds. 80 # all tests are only doing builds. 81 TEST_TYPE = build 81 TEST_TYPE = build 82 82 83 # If you want to add configs on top of the def 83 # If you want to add configs on top of the defconfig, you can add those configs into 84 # the add-config file and uncomment this optio 84 # the add-config file and uncomment this option. This is useful if you want to test 85 # all cross compiles with PREEMPT set, or TRAC 85 # all cross compiles with PREEMPT set, or TRACING on, etc. 86 #ADD_CONFIG = ${THIS_DIR}/add-config 86 #ADD_CONFIG = ${THIS_DIR}/add-config 87 87 88 # All tests are using defconfig 88 # All tests are using defconfig 89 BUILD_TYPE = defconfig 89 BUILD_TYPE = defconfig 90 90 91 # The test names will have the arch and cross 91 # The test names will have the arch and cross compiler used. This will be shown in 92 # the results. 92 # the results. 93 TEST_NAME = ${ARCH} ${CROSS} 93 TEST_NAME = ${ARCH} ${CROSS} 94 94 95 # alpha 95 # alpha 96 TEST_START IF ${RUN} == alpha || ${DO_DEFAULT} 96 TEST_START IF ${RUN} == alpha || ${DO_DEFAULT} 97 # Notice that CROSS and ARCH are also options 97 # Notice that CROSS and ARCH are also options and not variables (again '=' instead 98 # of ':='). This is because TEST_NAME and MAKE 98 # of ':='). This is because TEST_NAME and MAKE_CMD wil use them for each test. 99 # Only options are available during runs. Vari 99 # Only options are available during runs. Variables are only present in parsing the 100 # config file. 100 # config file. 101 CROSS = alpha-linux 101 CROSS = alpha-linux 102 ARCH = alpha 102 ARCH = alpha 103 103 104 # arm 104 # arm 105 TEST_START IF ${RUN} == arm || ${DO_DEFAULT} 105 TEST_START IF ${RUN} == arm || ${DO_DEFAULT} 106 CROSS = arm-unknown-linux-gnueabi 106 CROSS = arm-unknown-linux-gnueabi 107 ARCH = arm 107 ARCH = arm 108 108 109 # ia64 109 # ia64 110 TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT} 110 TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT} 111 CROSS = ia64-linux 111 CROSS = ia64-linux 112 ARCH = ia64 112 ARCH = ia64 113 113 114 # m68k fails with error? 114 # m68k fails with error? 115 TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} 115 TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} 116 CROSS = m68k-linux 116 CROSS = m68k-linux 117 ARCH = m68k 117 ARCH = m68k 118 118 119 # mips64 119 # mips64 120 TEST_START IF ${RUN} == mips || ${RUN} == mips 120 TEST_START IF ${RUN} == mips || ${RUN} == mips64 || ${DO_DEFAULT} 121 CROSS = mips64-linux 121 CROSS = mips64-linux 122 ARCH = mips 122 ARCH = mips 123 123 124 # mips32 124 # mips32 125 TEST_START IF ${RUN} == mips || ${RUN} == mips 125 TEST_START IF ${RUN} == mips || ${RUN} == mips32 || ${DO_DEFAULT} 126 CROSS = mips-linux 126 CROSS = mips-linux 127 ARCH = mips 127 ARCH = mips 128 128 129 # parisc64 failed? 129 # parisc64 failed? 130 TEST_START IF ${RUN} == hppa || ${RUN} == hppa 130 TEST_START IF ${RUN} == hppa || ${RUN} == hppa64 || ${DO_FAILED} 131 CROSS = hppa64-linux 131 CROSS = hppa64-linux 132 ARCH = parisc 132 ARCH = parisc 133 133 134 # parisc 134 # parisc 135 TEST_START IF ${RUN} == hppa || ${RUN} == hppa 135 TEST_START IF ${RUN} == hppa || ${RUN} == hppa32 || ${DO_FAILED} 136 CROSS = hppa-linux 136 CROSS = hppa-linux 137 ARCH = parisc 137 ARCH = parisc 138 138 139 # ppc 139 # ppc 140 TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 140 TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 || ${DO_DEFAULT} 141 CROSS = powerpc-linux 141 CROSS = powerpc-linux 142 ARCH = powerpc 142 ARCH = powerpc 143 143 144 # ppc64 144 # ppc64 145 TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 145 TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 || ${DO_DEFAULT} 146 CROSS = powerpc64-linux 146 CROSS = powerpc64-linux 147 ARCH = powerpc 147 ARCH = powerpc 148 148 149 # s390 149 # s390 150 TEST_START IF ${RUN} == s390 || ${DO_DEFAULT} 150 TEST_START IF ${RUN} == s390 || ${DO_DEFAULT} 151 CROSS = s390x-linux 151 CROSS = s390x-linux 152 ARCH = s390 152 ARCH = s390 153 153 154 # sh 154 # sh 155 TEST_START IF ${RUN} == sh || ${DO_DEFAULT} 155 TEST_START IF ${RUN} == sh || ${DO_DEFAULT} 156 CROSS = sh4-linux 156 CROSS = sh4-linux 157 ARCH = sh 157 ARCH = sh 158 158 159 # sparc64 159 # sparc64 160 TEST_START IF ${RUN} == sparc || ${RUN} == spa 160 TEST_START IF ${RUN} == sparc || ${RUN} == sparc64 || ${DO_DEFAULT} 161 CROSS = sparc64-linux 161 CROSS = sparc64-linux 162 ARCH = sparc64 162 ARCH = sparc64 163 163 164 # sparc 164 # sparc 165 TEST_START IF ${RUN} == sparc || ${RUN} == spa 165 TEST_START IF ${RUN} == sparc || ${RUN} == sparc32 || ${DO_DEFAULT} 166 CROSS = sparc-linux 166 CROSS = sparc-linux 167 ARCH = sparc 167 ARCH = sparc 168 168 169 # xtensa failed 169 # xtensa failed 170 TEST_START IF ${RUN} == xtensa || ${DO_FAILED} 170 TEST_START IF ${RUN} == xtensa || ${DO_FAILED} 171 CROSS = xtensa-linux 171 CROSS = xtensa-linux 172 ARCH = xtensa 172 ARCH = xtensa 173 173 174 # UML 174 # UML 175 TEST_START IF ${RUN} == uml || ${DO_DEFAULT} 175 TEST_START IF ${RUN} == uml || ${DO_DEFAULT} 176 MAKE_CMD = make ARCH=um SUBARCH=x86_64 176 MAKE_CMD = make ARCH=um SUBARCH=x86_64 177 ARCH = uml 177 ARCH = uml 178 CROSS = 178 CROSS = 179 179 180 TEST_START IF ${RUN} == x86 || ${RUN} == i386 180 TEST_START IF ${RUN} == x86 || ${RUN} == i386 || ${DO_DEFAULT} 181 MAKE_CMD = make ARCH=i386 181 MAKE_CMD = make ARCH=i386 182 ARCH = i386 182 ARCH = i386 183 CROSS = 183 CROSS = 184 184 185 TEST_START IF ${RUN} == x86 || ${RUN} == x86_6 185 TEST_START IF ${RUN} == x86 || ${RUN} == x86_64 || ${DO_DEFAULT} 186 MAKE_CMD = make ARCH=x86_64 186 MAKE_CMD = make ARCH=x86_64 187 ARCH = x86_64 187 ARCH = x86_64 188 CROSS = 188 CROSS = 189 189 190 ################################# 190 ################################# 191 191 192 # This is a bisect if needed. You need to give 192 # This is a bisect if needed. You need to give it a MIN_CONFIG that 193 # will be the config file it uses. Basically, 193 # will be the config file it uses. Basically, just copy the created defconfig 194 # for the arch someplace and point MIN_CONFIG 194 # for the arch someplace and point MIN_CONFIG to it. 195 TEST_START IF ${RUN} == bisect 195 TEST_START IF ${RUN} == bisect 196 MIN_CONFIG = ${THIS_DIR}/min-config 196 MIN_CONFIG = ${THIS_DIR}/min-config 197 CROSS = s390x-linux 197 CROSS = s390x-linux 198 ARCH = s390 198 ARCH = s390 199 TEST_TYPE = bisect 199 TEST_TYPE = bisect 200 BISECT_TYPE = build 200 BISECT_TYPE = build 201 BISECT_GOOD = v3.1 201 BISECT_GOOD = v3.1 202 BISECT_BAD = v3.2 202 BISECT_BAD = v3.2 203 CHECKOUT = v3.2 203 CHECKOUT = v3.2 204 204 205 ################################# 205 ################################# 206 206 207 # These defaults are needed to keep ktest.pl f 207 # These defaults are needed to keep ktest.pl from complaining. They are 208 # ignored because the test does not go pass th 208 # ignored because the test does not go pass the build. No install or 209 # booting of the target images. 209 # booting of the target images. 210 210 211 DEFAULTS 211 DEFAULTS 212 MACHINE = crosstest 212 MACHINE = crosstest 213 SSH_USER = root 213 SSH_USER = root 214 BUILD_TARGET = cross 214 BUILD_TARGET = cross 215 TARGET_IMAGE = image 215 TARGET_IMAGE = image 216 POWER_CYCLE = cycle 216 POWER_CYCLE = cycle 217 CONSOLE = console 217 CONSOLE = console 218 LOCALVERSION = version 218 LOCALVERSION = version 219 GRUB_MENU = grub 219 GRUB_MENU = grub 220 220 221 REBOOT_ON_ERROR = 0 221 REBOOT_ON_ERROR = 0 222 POWEROFF_ON_ERROR = 0 222 POWEROFF_ON_ERROR = 0 223 POWEROFF_ON_SUCCESS = 0 223 POWEROFF_ON_SUCCESS = 0 224 REBOOT_ON_SUCCESS = 0 224 REBOOT_ON_SUCCESS = 0 225 225
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.