Path: blob/master/tools/testing/ktest/examples/crosstests.conf
26296 views
#1# Example config for cross compiling2#3# In this config, it is expected that the tool chains from:4#5# https://kernel.org/pub/tools/crosstool/files/bin/x86_64/6#7# running on a x86_64 system have been downloaded and installed into:8#9# /usr/local/10#11# such that the compiler binaries are something like:12#13# /usr/local/gcc-4.5.2-nolibc/mips-linux/bin/mips-linux-gcc14#15# Some of the archs will use gcc-4.5.1 instead of gcc-4.5.216# this config uses variables to differentiate them.17#18# Comments describe some of the options, but full descriptions of19# options are described in the samples.conf file.2021# ${PWD} is defined by ktest.pl to be the directory that the user22# was in when they executed ktest.pl. It may be better to hardcode the23# path name here. THIS_DIR is the variable used through out the config file24# in case you want to change it.2526THIS_DIR := ${PWD}2728# Update the BUILD_DIR option to the location of your git repo you want to test.29BUILD_DIR = ${THIS_DIR}/linux.git3031# The build will go into this directory. It will be created when you run the test.32OUTPUT_DIR = ${THIS_DIR}/cross-compile3334# The build will be compiled with -j835BUILD_OPTIONS = -j83637# The test will not stop when it hits a failure.38DIE_ON_FAILURE = 03940# If you want to have ktest.pl store the failure somewhere, uncomment this option41# and change the directory where ktest should store the failures.42#STORE_FAILURES = ${THIS_DIR}/failures4344# The log file is stored in the OUTPUT_DIR called cross.log45# If you enable this, you need to create the OUTPUT_DIR. It wont be created for you.46LOG_FILE = ${OUTPUT_DIR}/cross.log4748# The log file will be cleared each time you run ktest.49CLEAR_LOG = 15051# As some archs do not build with the defconfig, they have been marked52# to be ignored. If you want to test them anyway, change DO_FAILED to 1.53# If a test that has been marked as DO_FAILED passes, then you should change54# that test to be DO_DEFAULT5556DO_FAILED := 057DO_DEFAULT := 15859# By setting both DO_FAILED and DO_DEFAULT to zero, you can pick a single60# arch that you want to test. (uncomment RUN and chose your arch)61#RUN := arm6263# At the bottom of the config file exists a bisect test. You can update that64# test and set DO_FAILED and DO_DEFAULT to zero, and uncomment this variable65# to run the bisect on the arch.66#RUN := bisect6768# By default all tests will be running gcc 4.5.2. Some tests are using 4.5.169# and they select that in the test.70# Note: GCC_VER is declared as on option and not a variable ('=' instead of ':=')71# This is important. A variable is used only in the config file and if it is set72# it stays that way for the rest of the config file until it is change again.73# Here we want GCC_VER to remain persistent and change for each test, as it is used in74# the MAKE_CMD. By using '=' instead of ':=' we achieve our goal.7576GCC_VER = 4.5.277MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-nolibc/${CROSS}/bin:$PATH CROSS_COMPILE=${CROSS}- make ARCH=${ARCH}7879# all tests are only doing builds.80TEST_TYPE = build8182# If you want to add configs on top of the defconfig, you can add those configs into83# the add-config file and uncomment this option. This is useful if you want to test84# all cross compiles with PREEMPT set, or TRACING on, etc.85#ADD_CONFIG = ${THIS_DIR}/add-config8687# All tests are using defconfig88BUILD_TYPE = defconfig8990# The test names will have the arch and cross compiler used. This will be shown in91# the results.92TEST_NAME = ${ARCH} ${CROSS}9394# alpha95TEST_START IF ${RUN} == alpha || ${DO_DEFAULT}96# Notice that CROSS and ARCH are also options and not variables (again '=' instead97# of ':='). This is because TEST_NAME and MAKE_CMD wil use them for each test.98# Only options are available during runs. Variables are only present in parsing the99# config file.100CROSS = alpha-linux101ARCH = alpha102103# arm104TEST_START IF ${RUN} == arm || ${DO_DEFAULT}105CROSS = arm-unknown-linux-gnueabi106ARCH = arm107108# ia64109TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT}110CROSS = ia64-linux111ARCH = ia64112113# m68k fails with error?114TEST_START IF ${RUN} == m68k || ${DO_DEFAULT}115CROSS = m68k-linux116ARCH = m68k117118# mips64119TEST_START IF ${RUN} == mips || ${RUN} == mips64 || ${DO_DEFAULT}120CROSS = mips64-linux121ARCH = mips122123# mips32124TEST_START IF ${RUN} == mips || ${RUN} == mips32 || ${DO_DEFAULT}125CROSS = mips-linux126ARCH = mips127128# parisc64 failed?129TEST_START IF ${RUN} == hppa || ${RUN} == hppa64 || ${DO_FAILED}130CROSS = hppa64-linux131ARCH = parisc132133# parisc134TEST_START IF ${RUN} == hppa || ${RUN} == hppa32 || ${DO_FAILED}135CROSS = hppa-linux136ARCH = parisc137138# ppc139TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 || ${DO_DEFAULT}140CROSS = powerpc-linux141ARCH = powerpc142143# ppc64144TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 || ${DO_DEFAULT}145CROSS = powerpc64-linux146ARCH = powerpc147148# s390149TEST_START IF ${RUN} == s390 || ${DO_DEFAULT}150CROSS = s390x-linux151ARCH = s390152153# sh154TEST_START IF ${RUN} == sh || ${DO_DEFAULT}155CROSS = sh4-linux156ARCH = sh157158# sparc64159TEST_START IF ${RUN} == sparc || ${RUN} == sparc64 || ${DO_DEFAULT}160CROSS = sparc64-linux161ARCH = sparc64162163# sparc164TEST_START IF ${RUN} == sparc || ${RUN} == sparc32 || ${DO_DEFAULT}165CROSS = sparc-linux166ARCH = sparc167168# xtensa failed169TEST_START IF ${RUN} == xtensa || ${DO_FAILED}170CROSS = xtensa-linux171ARCH = xtensa172173# UML174TEST_START IF ${RUN} == uml || ${DO_DEFAULT}175MAKE_CMD = make ARCH=um SUBARCH=x86_64176ARCH = uml177CROSS =178179TEST_START IF ${RUN} == x86 || ${RUN} == i386 || ${DO_DEFAULT}180MAKE_CMD = make ARCH=i386181ARCH = i386182CROSS =183184TEST_START IF ${RUN} == x86 || ${RUN} == x86_64 || ${DO_DEFAULT}185MAKE_CMD = make ARCH=x86_64186ARCH = x86_64187CROSS =188189#################################190191# This is a bisect if needed. You need to give it a MIN_CONFIG that192# will be the config file it uses. Basically, just copy the created defconfig193# for the arch someplace and point MIN_CONFIG to it.194TEST_START IF ${RUN} == bisect195MIN_CONFIG = ${THIS_DIR}/min-config196CROSS = s390x-linux197ARCH = s390198TEST_TYPE = bisect199BISECT_TYPE = build200BISECT_GOOD = v3.1201BISECT_BAD = v3.2202CHECKOUT = v3.2203204#################################205206# These defaults are needed to keep ktest.pl from complaining. They are207# ignored because the test does not go pass the build. No install or208# booting of the target images.209210DEFAULTS211MACHINE = crosstest212SSH_USER = root213BUILD_TARGET = cross214TARGET_IMAGE = image215POWER_CYCLE = cycle216CONSOLE = console217LOCALVERSION = version218GRUB_MENU = grub219220REBOOT_ON_ERROR = 0221POWEROFF_ON_ERROR = 0222POWEROFF_ON_SUCCESS = 0223REBOOT_ON_SUCCESS = 0224225226227