Steven Rostedt | 2e10952 | 2012-05-22 00:11:00 -0400 | [diff] [blame] | 1 | # |
| 2 | # Example config for cross compiling |
| 3 | # |
| 4 | # In this config, it is expected that the tool chains from: |
| 5 | # |
| 6 | # http://kernel.org/pub/tools/crosstool/files/bin/x86_64/ |
| 7 | # |
| 8 | # running on a x86_64 system have been downloaded and installed into: |
| 9 | # |
| 10 | # /usr/local/ |
| 11 | # |
| 12 | # such that the compiler binaries are something like: |
| 13 | # |
| 14 | # /usr/local/gcc-4.5.2-nolibc/mips-linux/bin/mips-linux-gcc |
| 15 | # |
| 16 | # Some of the archs will use gcc-4.5.1 instead of gcc-4.5.2 |
| 17 | # this config uses variables to differentiate them. |
| 18 | # |
| 19 | # Comments describe some of the options, but full descriptions of |
| 20 | # options are described in the samples.conf file. |
| 21 | |
| 22 | # ${PWD} is defined by ktest.pl to be the directory that the user |
| 23 | # was in when they executed ktest.pl. It may be better to hardcode the |
| 24 | # path name here. THIS_DIR is the variable used through out the config file |
| 25 | # in case you want to change it. |
| 26 | |
| 27 | THIS_DIR := ${PWD} |
| 28 | |
| 29 | # Update the BUILD_DIR option to the location of your git repo you want to test. |
| 30 | BUILD_DIR = ${THIS_DIR}/linux.git |
| 31 | |
| 32 | # The build will go into this directory. It will be created when you run the test. |
| 33 | OUTPUT_DIR = ${THIS_DIR}/cross-compile |
| 34 | |
| 35 | # The build will be compiled with -j8 |
| 36 | BUILD_OPTIONS = -j8 |
| 37 | |
| 38 | # The test will not stop when it hits a failure. |
| 39 | DIE_ON_FAILURE = 0 |
| 40 | |
| 41 | # If you want to have ktest.pl store the failure somewhere, uncomment this option |
| 42 | # and change the directory where ktest should store the failures. |
| 43 | #STORE_FAILURES = ${THIS_DIR}/failures |
| 44 | |
| 45 | # The log file is stored in the OUTPUT_DIR called cross.log |
| 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 |
| 48 | |
| 49 | # The log file will be cleared each time you run ktest. |
| 50 | CLEAR_LOG = 1 |
| 51 | |
| 52 | # As some archs do not build with the defconfig, they have been marked |
| 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 passes, then you should change |
| 55 | # that test to be DO_DEFAULT |
| 56 | |
| 57 | DO_FAILED := 0 |
| 58 | DO_DEFAULT := 1 |
| 59 | |
| 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 and chose your arch) |
| 62 | #RUN := m32r |
| 63 | |
| 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 zero, and uncomment this variable |
| 66 | # to run the bisect on the arch. |
| 67 | #RUN := bisect |
| 68 | |
| 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. |
| 71 | # Note: GCC_VER is declared as on option and not a variable ('=' instead of ':=') |
| 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 file until it is change again. |
| 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 ':=' we achieve our goal. |
| 76 | |
| 77 | GCC_VER = 4.5.2 |
| 78 | MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-nolibc/${CROSS}/bin:$PATH CROSS_COMPILE=${CROSS}- make ARCH=${ARCH} |
| 79 | |
| 80 | # all tests are only doing builds. |
| 81 | TEST_TYPE = build |
| 82 | |
| 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 option. This is useful if you want to test |
| 85 | # all cross compiles with PREEMPT set, or TRACING on, etc. |
| 86 | #ADD_CONFIG = ${THIS_DIR}/add-config |
| 87 | |
| 88 | # All tests are using defconfig |
| 89 | BUILD_TYPE = defconfig |
| 90 | |
| 91 | # The test names will have the arch and cross compiler used. This will be shown in |
| 92 | # the results. |
| 93 | TEST_NAME = ${ARCH} ${CROSS} |
| 94 | |
| 95 | # alpha |
| 96 | TEST_START IF ${RUN} == alpha || ${DO_DEFAULT} |
| 97 | # Notice that CROSS and ARCH are also options and not variables (again '=' instead |
| 98 | # of ':='). This is because TEST_NAME and MAKE_CMD wil use them for each test. |
| 99 | # Only options are available during runs. Variables are only present in parsing the |
| 100 | # config file. |
| 101 | CROSS = alpha-linux |
| 102 | ARCH = alpha |
| 103 | |
| 104 | # arm |
| 105 | TEST_START IF ${RUN} == arm || ${DO_DEFAULT} |
| 106 | CROSS = arm-unknown-linux-gnueabi |
| 107 | ARCH = arm |
| 108 | |
| 109 | # black fin |
| 110 | TEST_START IF ${RUN} == bfin || ${DO_DEFAULT} |
| 111 | CROSS = bfin-uclinux |
| 112 | ARCH = blackfin |
| 113 | BUILD_OPTIONS = -j8 vmlinux |
| 114 | |
| 115 | # cris - FAILS? |
| 116 | TEST_START IF ${RUN} == cris || ${RUN} == cris64 || ${DO_FAILED} |
| 117 | CROSS = cris-linux |
| 118 | ARCH = cris |
| 119 | |
| 120 | # cris32 - not right arch? |
| 121 | TEST_START IF ${RUN} == cris || ${RUN} == cris32 || ${DO_FAILED} |
| 122 | CROSS = crisv32-linux |
| 123 | ARCH = cris |
| 124 | |
| 125 | # ia64 |
| 126 | TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT} |
| 127 | CROSS = ia64-linux |
| 128 | ARCH = ia64 |
| 129 | |
| 130 | # frv |
| 131 | TEST_START IF ${RUN} == frv || ${DO_FAILED} |
| 132 | CROSS = frv-linux |
| 133 | ARCH = frv |
| 134 | GCC_VER = 4.5.1 |
| 135 | |
| 136 | # h8300 - failed make defconfig?? |
| 137 | TEST_START IF ${RUN} == h8300 || ${DO_FAILED} |
| 138 | CROSS = h8300-elf |
| 139 | ARCH = h8300 |
| 140 | GCC_VER = 4.5.1 |
| 141 | |
| 142 | # m68k fails with error? |
| 143 | TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} |
| 144 | CROSS = m68k-linux |
| 145 | ARCH = m68k |
| 146 | |
| 147 | # mips64 |
| 148 | TEST_START IF ${RUN} == mips || ${RUN} == mips64 || ${DO_DEFAULT} |
| 149 | CROSS = mips64-linux |
| 150 | ARCH = mips |
| 151 | |
| 152 | # mips32 |
| 153 | TEST_START IF ${RUN} == mips || ${RUN} == mips32 || ${DO_DEFAULT} |
| 154 | CROSS = mips-linux |
| 155 | ARCH = mips |
| 156 | |
| 157 | # m32r |
| 158 | TEST_START IF ${RUN} == m32r || ${DO_FAILED} |
| 159 | CROSS = m32r-linux |
| 160 | ARCH = m32r |
| 161 | GCC_VER = 4.5.1 |
| 162 | BUILD_OPTIONS = -j8 vmlinux |
| 163 | |
| 164 | # parisc64 failed? |
| 165 | TEST_START IF ${RUN} == hppa || ${RUN} == hppa64 || ${DO_FAILED} |
| 166 | CROSS = hppa64-linux |
| 167 | ARCH = parisc |
| 168 | |
| 169 | # parisc |
| 170 | TEST_START IF ${RUN} == hppa || ${RUN} == hppa32 || ${DO_FAILED} |
| 171 | CROSS = hppa-linux |
| 172 | ARCH = parisc |
| 173 | |
| 174 | # ppc |
| 175 | TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 || ${DO_DEFAULT} |
| 176 | CROSS = powerpc-linux |
| 177 | ARCH = powerpc |
| 178 | |
| 179 | # ppc64 |
| 180 | TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 || ${DO_DEFAULT} |
| 181 | CROSS = powerpc64-linux |
| 182 | ARCH = powerpc |
| 183 | |
| 184 | # s390 |
| 185 | TEST_START IF ${RUN} == s390 || ${DO_DEFAULT} |
| 186 | CROSS = s390x-linux |
| 187 | ARCH = s390 |
| 188 | |
| 189 | # sh |
| 190 | TEST_START IF ${RUN} == sh || ${DO_DEFAULT} |
| 191 | CROSS = sh4-linux |
| 192 | ARCH = sh |
| 193 | |
| 194 | # sparc64 |
| 195 | TEST_START IF ${RUN} == sparc || ${RUN} == sparc64 || ${DO_DEFAULT} |
| 196 | CROSS = sparc64-linux |
| 197 | ARCH = sparc64 |
| 198 | |
| 199 | # sparc |
| 200 | TEST_START IF ${RUN} == sparc || ${RUN} == sparc32 || ${DO_DEFAULT} |
| 201 | CROSS = sparc-linux |
| 202 | ARCH = sparc |
| 203 | |
| 204 | # xtensa failed |
| 205 | TEST_START IF ${RUN} == xtensa || ${DO_FAILED} |
| 206 | CROSS = xtensa-linux |
| 207 | ARCH = xtensa |
| 208 | |
| 209 | # UML |
| 210 | TEST_START IF ${RUN} == uml || ${DO_DEFAULT} |
| 211 | MAKE_CMD = make ARCH=um SUBARCH=x86_64 |
| 212 | ARCH = uml |
| 213 | CROSS = |
| 214 | |
| 215 | TEST_START IF ${RUN} == x86 || ${RUN} == i386 || ${DO_DEFAULT} |
| 216 | MAKE_CMD = make ARCH=i386 |
| 217 | ARCH = i386 |
| 218 | CROSS = |
| 219 | |
| 220 | TEST_START IF ${RUN} == x86 || ${RUN} == x86_64 || ${DO_DEFAULT} |
| 221 | MAKE_CMD = make ARCH=x86_64 |
| 222 | ARCH = x86_64 |
| 223 | CROSS = |
| 224 | |
| 225 | ################################# |
| 226 | |
| 227 | # This is a bisect if needed. You need to give it a MIN_CONFIG that |
| 228 | # will be the config file it uses. Basically, just copy the created defconfig |
| 229 | # for the arch someplace and point MIN_CONFIG to it. |
| 230 | TEST_START IF ${RUN} == bisect |
| 231 | MIN_CONFIG = ${THIS_DIR}/min-config |
| 232 | CROSS = s390x-linux |
| 233 | ARCH = s390 |
| 234 | TEST_TYPE = bisect |
| 235 | BISECT_TYPE = build |
| 236 | BISECT_GOOD = v3.1 |
| 237 | BISECT_BAD = v3.2 |
| 238 | CHECKOUT = v3.2 |
| 239 | |
| 240 | ################################# |
| 241 | |
| 242 | # These defaults are needed to keep ktest.pl from complaining. They are |
| 243 | # ignored because the test does not go pass the build. No install or |
| 244 | # booting of the target images. |
| 245 | |
| 246 | DEFAULTS |
| 247 | MACHINE = crosstest |
| 248 | SSH_USER = root |
| 249 | BUILD_TARGET = cross |
| 250 | TARGET_IMAGE = image |
| 251 | POWER_CYCLE = cycle |
| 252 | CONSOLE = console |
| 253 | LOCALVERSION = version |
| 254 | GRUB_MENU = grub |
| 255 | |
| 256 | REBOOT_ON_ERROR = 0 |
| 257 | POWEROFF_ON_ERROR = 0 |
| 258 | POWEROFF_ON_SUCCESS = 0 |
| 259 | REBOOT_ON_SUCCESS = 0 |
| 260 | |