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