0001 #
0002 # Example config for cross compiling
0003 #
0004 # In this config, it is expected that the tool chains from:
0005 #
0006 # https://kernel.org/pub/tools/crosstool/files/bin/x86_64/
0007 #
0008 # running on a x86_64 system have been downloaded and installed into:
0009 #
0010 # /usr/local/
0011 #
0012 # such that the compiler binaries are something like:
0013 #
0014 # /usr/local/gcc-4.5.2-nolibc/mips-linux/bin/mips-linux-gcc
0015 #
0016 # Some of the archs will use gcc-4.5.1 instead of gcc-4.5.2
0017 # this config uses variables to differentiate them.
0018 #
0019 # Comments describe some of the options, but full descriptions of
0020 # options are described in the samples.conf file.
0021
0022 # ${PWD} is defined by ktest.pl to be the directory that the user
0023 # was in when they executed ktest.pl. It may be better to hardcode the
0024 # path name here. THIS_DIR is the variable used through out the config file
0025 # in case you want to change it.
0026
0027 THIS_DIR := ${PWD}
0028
0029 # Update the BUILD_DIR option to the location of your git repo you want to test.
0030 BUILD_DIR = ${THIS_DIR}/linux.git
0031
0032 # The build will go into this directory. It will be created when you run the test.
0033 OUTPUT_DIR = ${THIS_DIR}/cross-compile
0034
0035 # The build will be compiled with -j8
0036 BUILD_OPTIONS = -j8
0037
0038 # The test will not stop when it hits a failure.
0039 DIE_ON_FAILURE = 0
0040
0041 # If you want to have ktest.pl store the failure somewhere, uncomment this option
0042 # and change the directory where ktest should store the failures.
0043 #STORE_FAILURES = ${THIS_DIR}/failures
0044
0045 # The log file is stored in the OUTPUT_DIR called cross.log
0046 # If you enable this, you need to create the OUTPUT_DIR. It wont be created for you.
0047 LOG_FILE = ${OUTPUT_DIR}/cross.log
0048
0049 # The log file will be cleared each time you run ktest.
0050 CLEAR_LOG = 1
0051
0052 # As some archs do not build with the defconfig, they have been marked
0053 # to be ignored. If you want to test them anyway, change DO_FAILED to 1.
0054 # If a test that has been marked as DO_FAILED passes, then you should change
0055 # that test to be DO_DEFAULT
0056
0057 DO_FAILED := 0
0058 DO_DEFAULT := 1
0059
0060 # By setting both DO_FAILED and DO_DEFAULT to zero, you can pick a single
0061 # arch that you want to test. (uncomment RUN and chose your arch)
0062 #RUN := arm
0063
0064 # At the bottom of the config file exists a bisect test. You can update that
0065 # test and set DO_FAILED and DO_DEFAULT to zero, and uncomment this variable
0066 # to run the bisect on the arch.
0067 #RUN := bisect
0068
0069 # By default all tests will be running gcc 4.5.2. Some tests are using 4.5.1
0070 # and they select that in the test.
0071 # Note: GCC_VER is declared as on option and not a variable ('=' instead of ':=')
0072 # This is important. A variable is used only in the config file and if it is set
0073 # it stays that way for the rest of the config file until it is change again.
0074 # Here we want GCC_VER to remain persistent and change for each test, as it is used in
0075 # the MAKE_CMD. By using '=' instead of ':=' we achieve our goal.
0076
0077 GCC_VER = 4.5.2
0078 MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-nolibc/${CROSS}/bin:$PATH CROSS_COMPILE=${CROSS}- make ARCH=${ARCH}
0079
0080 # all tests are only doing builds.
0081 TEST_TYPE = build
0082
0083 # If you want to add configs on top of the defconfig, you can add those configs into
0084 # the add-config file and uncomment this option. This is useful if you want to test
0085 # all cross compiles with PREEMPT set, or TRACING on, etc.
0086 #ADD_CONFIG = ${THIS_DIR}/add-config
0087
0088 # All tests are using defconfig
0089 BUILD_TYPE = defconfig
0090
0091 # The test names will have the arch and cross compiler used. This will be shown in
0092 # the results.
0093 TEST_NAME = ${ARCH} ${CROSS}
0094
0095 # alpha
0096 TEST_START IF ${RUN} == alpha || ${DO_DEFAULT}
0097 # Notice that CROSS and ARCH are also options and not variables (again '=' instead
0098 # of ':='). This is because TEST_NAME and MAKE_CMD wil use them for each test.
0099 # Only options are available during runs. Variables are only present in parsing the
0100 # config file.
0101 CROSS = alpha-linux
0102 ARCH = alpha
0103
0104 # arm
0105 TEST_START IF ${RUN} == arm || ${DO_DEFAULT}
0106 CROSS = arm-unknown-linux-gnueabi
0107 ARCH = arm
0108
0109 # ia64
0110 TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT}
0111 CROSS = ia64-linux
0112 ARCH = ia64
0113
0114 # m68k fails with error?
0115 TEST_START IF ${RUN} == m68k || ${DO_DEFAULT}
0116 CROSS = m68k-linux
0117 ARCH = m68k
0118
0119 # mips64
0120 TEST_START IF ${RUN} == mips || ${RUN} == mips64 || ${DO_DEFAULT}
0121 CROSS = mips64-linux
0122 ARCH = mips
0123
0124 # mips32
0125 TEST_START IF ${RUN} == mips || ${RUN} == mips32 || ${DO_DEFAULT}
0126 CROSS = mips-linux
0127 ARCH = mips
0128
0129 # parisc64 failed?
0130 TEST_START IF ${RUN} == hppa || ${RUN} == hppa64 || ${DO_FAILED}
0131 CROSS = hppa64-linux
0132 ARCH = parisc
0133
0134 # parisc
0135 TEST_START IF ${RUN} == hppa || ${RUN} == hppa32 || ${DO_FAILED}
0136 CROSS = hppa-linux
0137 ARCH = parisc
0138
0139 # ppc
0140 TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 || ${DO_DEFAULT}
0141 CROSS = powerpc-linux
0142 ARCH = powerpc
0143
0144 # ppc64
0145 TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 || ${DO_DEFAULT}
0146 CROSS = powerpc64-linux
0147 ARCH = powerpc
0148
0149 # s390
0150 TEST_START IF ${RUN} == s390 || ${DO_DEFAULT}
0151 CROSS = s390x-linux
0152 ARCH = s390
0153
0154 # sh
0155 TEST_START IF ${RUN} == sh || ${DO_DEFAULT}
0156 CROSS = sh4-linux
0157 ARCH = sh
0158
0159 # sparc64
0160 TEST_START IF ${RUN} == sparc || ${RUN} == sparc64 || ${DO_DEFAULT}
0161 CROSS = sparc64-linux
0162 ARCH = sparc64
0163
0164 # sparc
0165 TEST_START IF ${RUN} == sparc || ${RUN} == sparc32 || ${DO_DEFAULT}
0166 CROSS = sparc-linux
0167 ARCH = sparc
0168
0169 # xtensa failed
0170 TEST_START IF ${RUN} == xtensa || ${DO_FAILED}
0171 CROSS = xtensa-linux
0172 ARCH = xtensa
0173
0174 # UML
0175 TEST_START IF ${RUN} == uml || ${DO_DEFAULT}
0176 MAKE_CMD = make ARCH=um SUBARCH=x86_64
0177 ARCH = uml
0178 CROSS =
0179
0180 TEST_START IF ${RUN} == x86 || ${RUN} == i386 || ${DO_DEFAULT}
0181 MAKE_CMD = make ARCH=i386
0182 ARCH = i386
0183 CROSS =
0184
0185 TEST_START IF ${RUN} == x86 || ${RUN} == x86_64 || ${DO_DEFAULT}
0186 MAKE_CMD = make ARCH=x86_64
0187 ARCH = x86_64
0188 CROSS =
0189
0190 #################################
0191
0192 # This is a bisect if needed. You need to give it a MIN_CONFIG that
0193 # will be the config file it uses. Basically, just copy the created defconfig
0194 # for the arch someplace and point MIN_CONFIG to it.
0195 TEST_START IF ${RUN} == bisect
0196 MIN_CONFIG = ${THIS_DIR}/min-config
0197 CROSS = s390x-linux
0198 ARCH = s390
0199 TEST_TYPE = bisect
0200 BISECT_TYPE = build
0201 BISECT_GOOD = v3.1
0202 BISECT_BAD = v3.2
0203 CHECKOUT = v3.2
0204
0205 #################################
0206
0207 # These defaults are needed to keep ktest.pl from complaining. They are
0208 # ignored because the test does not go pass the build. No install or
0209 # booting of the target images.
0210
0211 DEFAULTS
0212 MACHINE = crosstest
0213 SSH_USER = root
0214 BUILD_TARGET = cross
0215 TARGET_IMAGE = image
0216 POWER_CYCLE = cycle
0217 CONSOLE = console
0218 LOCALVERSION = version
0219 GRUB_MENU = grub
0220
0221 REBOOT_ON_ERROR = 0
0222 POWEROFF_ON_ERROR = 0
0223 POWEROFF_ON_SUCCESS = 0
0224 REBOOT_ON_SUCCESS = 0
0225