embedded-test.sh 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822
  1. #!/usr/bin/env mksh
  2. #
  3. # Copyright © 2014-2018
  4. # Waldemar Brodkorb <wbx@embedded-test.org>
  5. #
  6. # Provided that these terms and disclaimer and all copyright notices
  7. # are retained or reproduced in an accompanying document, permission
  8. # is granted to deal in this work without restriction, including un‐
  9. # limited rights to use, publicly perform, distribute, sell, modify,
  10. # merge, give away, or sublicence.
  11. #
  12. # This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
  13. # the utmost extent permitted by applicable law, neither express nor
  14. # implied; without malicious intent or gross negligence. In no event
  15. # may a licensor, author or contributor be held liable for indirect,
  16. # direct, other damage, loss, or other issues arising in any way out
  17. # of dealing in the work, even if advised of the possibility of such
  18. # damage or existence of a defect, except proven that it results out
  19. # of said person’s immediate fault when using the work as intended.
  20. #
  21. # Alternatively, this work may be distributed under the Terms of the
  22. # General Public License, any version as published by the Free Soft‐
  23. # ware Foundation.
  24. # uClibc-ng
  25. arch_list_uclibcng="aarch64 aarch64be alpha arcv1 arcv2 arcv1-be \
  26. arcv2-be arm-nommu armv5 armv6 armv7 armv7-thumb2 armeb avr32 \
  27. bf512-flat bf512-fdpic bf532-flat bf532-fdpic \
  28. c6x crisv10 crisv32 csky-ck610 csky-ck807 csky-ck810 \
  29. frv h8300-h8300h h8300-h8s hppa ia64 \
  30. lm32 m68k m68k-nommu metag microblazeel microblazebe \
  31. mips32 mips32r6 mips32sf mips32el mips32r6el mips32elsf \
  32. mips64 mips64n32 mips64n64 mips64el mips64eln32 mips64eln64 \
  33. mips64r6n32 mips64r6n64 mips64r6eln32 mips64r6eln64 \
  34. nds32le nios2 or1k ppc ppcsf sh2 sh3 sh4 sh4eb \
  35. sparc sparc-leon3 sparc64 x86 x86_64 \
  36. xtensa xtensabe xtensa-nommu"
  37. # musl
  38. arch_list_musl="aarch64 aarch64be armv5 armv6 armv7 armeb \
  39. microblazeel microblazebe \
  40. mips32 mips32r6 mips32sf mips32el mips32elsf \
  41. mips64n32 mips64n64 mips64eln32 mips64eln64 \
  42. or1k ppc ppcsf ppc64 ppc64le s390 sh4 sh4eb \
  43. x86 x86_64 x86_64_x32"
  44. # glibc
  45. arch_list_glibc="aarch64 aarch64be alpha armv5 armv6 armv7 armeb \
  46. ia64 m68k microblazeel microblazebe \
  47. mips32 mips32r6 mips32sf mips32el mips32elsf \
  48. mips64 mips64n32 mips64n64 mips64el mips64eln32 mips64eln64 \
  49. mips64r6n32 mips64r6n64 mips64r6eln32 mips64r6eln64 \
  50. nios2 ppc ppcsf ppc64 ppc64le s390 sh3 sh4 sh4eb sparc64 tilegx \
  51. x86 x86_64 x86_64_x32"
  52. # newlib
  53. arch_list_newlib="aarch64 aarch64be arcv1 armv5 armeb bfin crisv10 \
  54. crisv32 epiphany ft32 frv h8300-h8300h ia64 lm32 m32r m68k microblazeel \
  55. microblazebe mips32 mips32el mn10300 moxie msp430 nds32le nds32be \
  56. nios2 or1k ppc rx sh sparc sparc64 v850 x86 x86_64 xtensa"
  57. topdir=$(pwd)
  58. giturl=https://git.openadk.org/git/openadk.git
  59. valid_os="waldux linux"
  60. valid_libc="uclibc-ng musl glibc newlib"
  61. valid_tests="toolchain boot libc libcmusl ltp mksh native"
  62. valid_thread_types="none lt nptl"
  63. bootserver=10.0.0.1
  64. buildserver=10.0.0.2
  65. tools='make git wget xz cpio tar awk sed'
  66. f=0
  67. for tool in $tools; do
  68. if ! which $tool >/dev/null; then
  69. echo "Checking if $tool is installed... failed"
  70. f=1
  71. fi
  72. done
  73. if [ $f -eq 1 ]; then
  74. exit 1
  75. fi
  76. help() {
  77. cat >&2 <<EOF
  78. Syntax: $0 [ --libc=<libc> --os=<os> --arch=<arch> --test=<test> ]
  79. Explanation:
  80. --libc=<libc> C library to use (${valid_libc})
  81. --os=<operating system> operating system to use (${valid_os})
  82. --arch=<arch> architecture to check (otherwise all supported)
  83. --skip-arch=<arch> architectures to skip when all choosen
  84. --skip-nsim skip nsim simulator tests
  85. --targets=<targets.txt> a list of remote targets to test via nfsroot or chroot
  86. --test=<test> run test (${valid_tests}), default toolchain
  87. --threads=<type> configure threading support (${valid_thread_types}) (only for uClibc-ng)
  88. --libc-source=<dir> use directory with source for C library
  89. --gcc-source=<dir> use directory with source for gcc
  90. --binutils-source=<dir> use directory with source for binutils
  91. --gdb-source=<dir> use directory with source for gdb
  92. --kernel-source=<dir> use directory with source for kernel
  93. --libc-version=<version> use version of C library
  94. --gcc-version=<version> use version of gcc
  95. --binutils-version=<version> use version of binutils
  96. --gdb-version=<version> use version of gdb
  97. --kernel-version=<version> use version of kernel
  98. --ntp=<ntpserver> set NTP server for test run
  99. --packages=<packagelist> add extra packages to the build
  100. --update update OpenADK source via git pull, before building
  101. --create create toolchain archive for external usage
  102. --continue continue on a broken build
  103. --cleandir clean OpenADK build directories before build
  104. --clean clean OpenADK build directory for single arch
  105. --no-clean do not clean OpenADK build directory for single arch
  106. --cxx enable C++ toolchain
  107. --static use static compilation
  108. --ssp use smack stashing protection
  109. --debug make debug build
  110. --verbose enable verbose output from OpenADK
  111. --shell start a shell instead of test autorun
  112. --help this help text
  113. EOF
  114. exit 1
  115. }
  116. cont=0
  117. clean=0
  118. noclean=0
  119. cleandir=0
  120. shell=0
  121. update=0
  122. verbose=0
  123. create=0
  124. static=0
  125. cxx=0
  126. ssp=0
  127. debug=0
  128. skipnsim=0
  129. ntp=""
  130. libc=""
  131. os="linux"
  132. test="toolchain"
  133. while [[ $1 != -- && $1 = -* ]]; do case $1 {
  134. (--cleandir) cleandir=1; shift ;;
  135. (--clean) clean=1; shift ;;
  136. (--no-clean) noclean=1; shift ;;
  137. (--verbose) verbose=1; shift ;;
  138. (--update) update=1; shift ;;
  139. (--create) create=1; shift ;;
  140. (--static) static=1; shift ;;
  141. (--cxx) cxx=1; shift ;;
  142. (--ssp) ssp=1; shift ;;
  143. (--debug) debug=1; shift ;;
  144. (--continue) cont=1; shift ;;
  145. (--shell) shell=1 shift ;;
  146. (--libc=*) libc=${1#*=}; shift ;;
  147. (--os=*) os=${1#*=}; shift ;;
  148. (--arch=*) archs=${1#*=}; shift ;;
  149. (--skip-arch=*) skiparchs=${1#*=}; shift ;;
  150. (--skip-nsim) skipnsim=1 shift ;;
  151. (--targets=*) targets=${1#*=}; shift ;;
  152. (--test=*) test=${1#*=}; shift ;;
  153. (--threads=*) threads=${1#*=}; shift ;;
  154. (--libc-source=*) libcsource=${1#*=}; shift ;;
  155. (--gcc-source=*) gccsource=${1#*=}; shift ;;
  156. (--binutils-source=*) binutilssource=${1#*=}; shift ;;
  157. (--gdb-source=*) gdbsource=${1#*=}; shift ;;
  158. (--kernel-source=*) kernelsource=${1#*=}; shift ;;
  159. (--libc-version=*) libcversion=${1#*=}; shift ;;
  160. (--gcc-version=*) gccversion=${1#*=}; shift ;;
  161. (--binutils-version=*) binutilsversion=${1#*=}; shift ;;
  162. (--gdb-version=*) gdbversion=${1#*=}; shift ;;
  163. (--kernel-version=*) kernelversion=${1#*=}; shift ;;
  164. (--packages=*) packages=${1#*=}; shift ;;
  165. (--ntp=*) ntp=${1#*=}; shift ;;
  166. (--help) help; shift ;;
  167. (--*) echo "unknown option $1"; exit 1 ;;
  168. (-*) help ;;
  169. }; done
  170. if [ ! -z $targets ]; then
  171. targetmode=1
  172. fi
  173. if [ -z "$libc" ]; then
  174. if [[ $libcversion ]]; then
  175. echo "You can not use a specific C library version without setting the C library"
  176. exit 1
  177. else
  178. libc="uclibc-ng musl glibc newlib"
  179. fi
  180. fi
  181. if [ $static -eq 1 ]; then
  182. rsuffix=${rsuffix}.static
  183. fi
  184. if [ $ssp -eq 1 ]; then
  185. rsuffix=${rsuffix}.ssp
  186. fi
  187. if [ $debug -eq 1 ]; then
  188. rsuffix=${rsuffix}.debug
  189. fi
  190. if [ $cxx -eq 1 ]; then
  191. rsuffix=${rsuffix}.cxx
  192. fi
  193. if [ ! -d openadk ]; then
  194. git clone $giturl
  195. if [ $? -ne 0 ]; then
  196. echo "Cloning from $giturl failed."
  197. exit 1
  198. fi
  199. else
  200. if [ $update -eq 1 ]; then
  201. (cd openadk && git pull)
  202. if [ $? -ne 0 ]; then
  203. echo "Updating from $giturl failed."
  204. exit 1
  205. fi
  206. fi
  207. fi
  208. get_arch_info() {
  209. arch=$1
  210. lib=$2
  211. emulator=qemu
  212. gdbcmd=
  213. noappend=0
  214. piggyback=0
  215. endian=
  216. suffix=
  217. allowed_libc=
  218. runtime_test=
  219. qemu_args=-nographic
  220. case ${arch} in
  221. aarch64)
  222. allowed_libc="uclibc-ng musl glibc newlib"
  223. runtime_test="uclibc-ng musl glibc"
  224. allowed_tests="toolchain boot libc libcmusl ltp mksh native"
  225. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-aarch64"
  226. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-aarch64"
  227. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-aarch64"
  228. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=aarch64"
  229. cpu_arch=cortex_a53
  230. qemu_machine=virt
  231. qemu_args="${qemu_args} -cpu cortex-a53 -netdev user,id=eth0 -device virtio-net-device,netdev=eth0"
  232. suffix=${cpu_arch}
  233. skiplt=aarch64
  234. ;;
  235. aarch64be)
  236. allowed_libc="uclibc-ng musl glibc newlib"
  237. runtime_test=""
  238. allowed_tests="toolchain"
  239. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_SYSTEM=generic-aarch64 ADK_TARGET_ENDIAN=big"
  240. default_musl="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_SYSTEM=generic-aarch64 ADK_TARGET_ENDIAN=big"
  241. default_glibc="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=aarch64 ADK_TARGET_SYSTEM=generic-aarch64 ADK_TARGET_ENDIAN=big"
  242. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=aarch64 ADK_TARGET_ENDIAN=big"
  243. cpu_arch=cortex_a53
  244. qemu_machine=virt
  245. qemu_args="${qemu_args} -cpu cortex-a53 -netdev user,id=eth0 -device virtio-net-device,netdev=eth0"
  246. suffix=${cpu_arch}
  247. skiplt=aarch64be
  248. ;;
  249. alpha)
  250. allowed_libc="uclibc-ng glibc"
  251. runtime_test="uclibc-ng glibc"
  252. allowed_tests="toolchain boot libc libcmusl ltp mksh"
  253. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=alpha ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-alpha"
  254. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=alpha ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-alpha"
  255. march=alpha
  256. qemu=qemu-system-alpha
  257. qemu_machine=clipper
  258. qemu_args="${qemu_args} -monitor null"
  259. ;;
  260. armv5)
  261. allowed_libc="uclibc-ng musl glibc newlib"
  262. runtime_test="uclibc-ng musl glibc"
  263. allowed_tests="toolchain boot libc libcmusl ltp mksh native"
  264. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-versatilepb"
  265. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-versatilepb"
  266. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-versatilepb"
  267. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arm ADK_TARGET_ENDIAN=little ADK_TARGET_CPU=arm926ej-s"
  268. cpu_arch=arm926ej_s
  269. march=arm-versatilepb
  270. qemu=qemu-system-arm
  271. qemu_machine=versatilepb
  272. suffix=${cpu_arch}_soft_eabi
  273. dtbdir=openadk/firmware/qemu-${march}_${lib}_${suffix}
  274. qemu_args="${qemu_args} -cpu arm926 -net user -net nic,model=smc91c111 -dtb ${dtbdir}/versatile-pb.dtb"
  275. ;;
  276. armv6)
  277. allowed_libc="uclibc-ng musl glibc newlib"
  278. runtime_test="uclibc-ng musl glibc"
  279. allowed_tests="toolchain boot libc libcmusl ltp mksh native"
  280. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-realview-eb-mpcore"
  281. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-realview-eb-mpcore"
  282. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-realview-eb-mpcore"
  283. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arm ADK_TARGET_ENDIAN=little ADK_TARGET_CPU=arm1176jzf-s"
  284. cpu_arch=mpcore
  285. march=arm-realview-eb-mpcore
  286. qemu=qemu-system-arm
  287. qemu_machine=realview-eb-mpcore
  288. suffix=${cpu_arch}_hard_eabihf
  289. dtbdir=openadk/firmware/qemu-${march}_${lib}_${suffix}
  290. qemu_args="${qemu_args} -net user -net nic -dtb ${dtbdir}/arm-realview-eb-11mp-ctrevb.dtb"
  291. ;;
  292. armv7)
  293. allowed_libc="uclibc-ng musl glibc"
  294. runtime_test="uclibc-ng musl glibc"
  295. allowed_tests="toolchain boot libc libcmusl ltp mksh native"
  296. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-vexpress-a9"
  297. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-vexpress-a9"
  298. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-arm-vexpress-a9"
  299. cpu_arch=cortex_a9
  300. march=arm-vexpress-a9
  301. qemu=qemu-system-arm
  302. qemu_machine=vexpress-a9
  303. suffix=${cpu_arch}_hard_eabihf
  304. dtbdir=openadk/firmware/qemu-${march}_${lib}_${suffix}
  305. qemu_args="${qemu_args} -cpu cortex-a9 -net user -net nic,model=lan9118 -dtb ${dtbdir}/vexpress-v2p-ca9.dtb"
  306. ;;
  307. armv7-thumb2)
  308. allowed_libc="uclibc-ng"
  309. runtime_test="uclibc-ng"
  310. allowed_tests="toolchain boot libc libcmusl ltp mksh native"
  311. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_INSTRUCTION_SET=thumb ADK_TARGET_FS=initramfsarchive ADK_TARGET_FLOAT=soft ADK_TARGET_SYSTEM=qemu-arm-vexpress-a9"
  312. cpu_arch=cortex_a9
  313. march=arm-vexpress-a9
  314. qemu=qemu-system-arm
  315. qemu_machine=vexpress-a9
  316. suffix=${cpu_arch}_soft_eabi
  317. dtbdir=openadk/firmware/qemu-${march}_${lib}_${suffix}
  318. qemu_args="${qemu_args} -cpu cortex-a9 -net user -net nic,model=lan9118 -dtb ${dtbdir}/vexpress-v2p-ca9.dtb"
  319. ;;
  320. armeb)
  321. allowed_libc="uclibc-ng musl glibc"
  322. runtime_test=""
  323. allowed_tests="toolchain"
  324. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=generic-arm ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  325. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=generic-arm ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  326. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=generic-arm ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  327. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arm ADK_TARGET_ENDIAN=big ADK_TARGET_CPU=arm926ej-s"
  328. ;;
  329. arm-nommu)
  330. allowed_libc="uclibc-ng"
  331. runtime_test="uclibc-ng"
  332. allowed_tests="toolchain boot"
  333. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arm ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-arm-versatilepb-nommu ADK_TARGET_ENDIAN=little"
  334. march=arm-versatilepb-nommu
  335. qemu=qemu-system-arm
  336. qemu_machine=versatilepb
  337. suffix=soft_eabi
  338. qemu_args="${qemu_args} -cpu arm926 -net user -net nic,model=smc91c111"
  339. piggyback=1
  340. ;;
  341. arcv1)
  342. allowed_libc="uclibc-ng newlib"
  343. runtime_test="uclibc-ng"
  344. allowed_tests="toolchain boot libc ltp mksh native"
  345. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arc ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=nsim-arcv1 ADK_TARGET_ENDIAN=little"
  346. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arc ADK_TARGET_ENDIAN=little"
  347. emulator=nsim
  348. cpu_arch=arc700
  349. suffix=${cpu_arch}
  350. piggyback=1
  351. ;;
  352. arcv2)
  353. allowed_libc="uclibc-ng"
  354. runtime_test="uclibc-ng"
  355. allowed_tests="toolchain boot libc ltp mksh native"
  356. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arc ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=nsim-arcv2 ADK_TARGET_ENDIAN=little"
  357. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arc ADK_TARGET_ENDIAN=little"
  358. emulator=nsim
  359. cpu_arch=archs
  360. suffix=${cpu_arch}
  361. piggyback=1
  362. ;;
  363. arcv1-be)
  364. allowed_libc="uclibc-ng"
  365. runtime_test="uclibc-ng"
  366. allowed_tests="toolchain boot libc ltp mksh native"
  367. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arc ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=nsim-arcv1 ADK_TARGET_ENDIAN=big"
  368. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arc ADK_TARGET_ENDIAN=big"
  369. emulator=nsim
  370. endian=eb
  371. cpu_arch=arc700
  372. suffix=${cpu_arch}${endian}
  373. march=arcv1
  374. piggyback=1
  375. ;;
  376. arcv2-be)
  377. allowed_libc="uclibc-ng"
  378. runtime_test="uclibc-ng"
  379. allowed_tests="toolchain boot libc ltp mksh native"
  380. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=arc ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=nsim-arcv2 ADK_TARGET_ENDIAN=big"
  381. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=arc ADK_TARGET_ENDIAN=big"
  382. emulator=nsim
  383. endian=eb
  384. cpu_arch=archs
  385. march=arcv2
  386. suffix=${cpu_arch}${endian}
  387. piggyback=1
  388. ;;
  389. avr32)
  390. allowed_libc="uclibc-ng"
  391. runtime_test=""
  392. allowed_tests="toolchain"
  393. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=avr32 ADK_TARGET_SYSTEM=generic-avr32"
  394. ;;
  395. bf512-flat)
  396. allowed_libc="uclibc-ng"
  397. runtime_test="uclibc-ng"
  398. allowed_tests="toolchain"
  399. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=bfin ADK_TARGET_SYSTEM=sim-bfin ADK_TARGET_BINFMT=flat"
  400. emulator=gdb
  401. model=bf512
  402. march=bfin
  403. binfmt=flat
  404. gdbcmd="bfin-openadk-uclinux-uclibc-run --env operating --model bf512"
  405. piggyback=1
  406. suffix=bf512_flat
  407. ;;
  408. bf512-fdpic)
  409. allowed_libc="uclibc-ng"
  410. runtime_test="uclibc-ng"
  411. allowed_tests="toolchain"
  412. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=bfin ADK_TARGET_SYSTEM=sim-bfin ADK_TARGET_BINFMT=fdpic"
  413. emulator=gdb
  414. model=bf512
  415. march=bfin
  416. binfmt=fdpic
  417. gdbcmd="bfin-openadk-linux-uclibc-run --env operating --model bf512"
  418. piggyback=1
  419. suffix=bf512_fdpic
  420. ;;
  421. bf532-flat)
  422. allowed_libc="uclibc-ng"
  423. runtime_test="uclibc-ng"
  424. allowed_tests="toolchain"
  425. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=bfin ADK_TARGET_CPU=bf532 ADK_TARGET_SYSTEM=sim-bfin ADK_TARGET_BINFMT=flat"
  426. emulator=gdb
  427. model=bf532
  428. march=bfin
  429. binfmt=flat
  430. gdbcmd="bfin-openadk-uclinux-uclibc-run --env operating --model bf532"
  431. piggyback=1
  432. suffix=bf532_flat
  433. ;;
  434. bf532-fdpic)
  435. allowed_libc="uclibc-ng"
  436. runtime_test="uclibc-ng"
  437. allowed_tests="toolchain"
  438. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=bfin ADK_TARGET_CPU=bf532 ADK_TARGET_SYSTEM=sim-bfin ADK_TARGET_BINFMT=fdpic"
  439. emulator=gdb
  440. model=bf532
  441. march=bfin
  442. binfmt=fdpic
  443. gdbcmd="bfin-openadk-linux-uclibc-run --env operating --model bf532"
  444. piggyback=1
  445. suffix=bf532_fdpic
  446. ;;
  447. bfin)
  448. allowed_libc="newlib"
  449. runtime_test=""
  450. allowed_tests="toolchain"
  451. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=bfin"
  452. ;;
  453. c6x)
  454. allowed_libc="uclibc-ng"
  455. runtime_test=""
  456. allowed_tests="toolchain"
  457. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=c6x ADK_TARGET_SYSTEM=generic-c6x ADK_TARGET_ENDIAN=little"
  458. ;;
  459. crisv10)
  460. allowed_libc="uclibc-ng newlib"
  461. runtime_test=""
  462. allowed_tests="toolchain"
  463. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=cris ADK_TARGET_SYSTEM=generic-cris ADK_TARGET_CPU=crisv10"
  464. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=cris ADK_TARGET_CPU=crisv10"
  465. ;;
  466. crisv32)
  467. allowed_libc="uclibc-ng newlib"
  468. runtime_test="uclibc-ng"
  469. allowed_tests="toolchain boot libc ltp"
  470. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=cris ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-cris"
  471. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=cris ADK_TARGET_CPU=crisv32"
  472. cpu_arch=crisv32
  473. march=cris
  474. qemu=qemu-system-${march}
  475. qemu_machine=axis-dev88
  476. piggyback=1
  477. suffix=${cpu_arch}
  478. ;;
  479. csky-ck610)
  480. allowed_libc="uclibc-ng"
  481. runtime_test="uclibc-ng"
  482. allowed_tests="toolchain boot libc mksh native"
  483. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=csky ADK_TARGET_SYSTEM=qemu-csky-ck610 ADK_TARGET_ENDIAN=little"
  484. dtbdir=openadk/target/csky
  485. qemu=qemu-system-cskyv1
  486. qemu_args="-nographic -dtb ${dtbdir}/qemu.dtb"
  487. qemu_machine=virt
  488. piggyback=1
  489. suffix=soft
  490. ;;
  491. csky-ck807)
  492. allowed_libc="uclibc-ng"
  493. runtime_test="uclibc-ng"
  494. allowed_tests="toolchain boot libc mksh native"
  495. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=csky ADK_TARGET_SYSTEM=qemu-csky-ck807 ADK_TARGET_ENDIAN=little"
  496. dtbdir=openadk/target/csky
  497. qemu=qemu-system-cskyv2
  498. qemu_args="-nographic -dtb ${dtbdir}/qemu.dtb"
  499. qemu_machine=virt
  500. piggyback=1
  501. suffix=soft
  502. ;;
  503. csky-ck810)
  504. allowed_libc="uclibc-ng"
  505. runtime_test="uclibc-ng"
  506. allowed_tests="toolchain boot libc mksh native"
  507. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=csky ADK_TARGET_SYSTEM=qemu-csky-ck810 ADK_TARGET_ENDIAN=little"
  508. dtbdir=openadk/target/csky
  509. qemu=qemu-system-cskyv2
  510. qemu_args="-nographic -dtb ${dtbdir}/qemu.dtb"
  511. qemu_machine=virt
  512. piggyback=1
  513. suffix=soft
  514. ;;
  515. epiphany)
  516. allowed_libc="newlib"
  517. runtime_test=""
  518. allowed_tests="toolchain"
  519. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=epiphany"
  520. ;;
  521. ft32)
  522. allowed_libc="newlib"
  523. runtime_test=""
  524. allowed_tests="toolchain"
  525. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=ft32"
  526. ;;
  527. frv)
  528. allowed_libc="uclibc-ng newlib"
  529. runtime_test=""
  530. allowed_tests="toolchain"
  531. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=frv ADK_TARGET_SYSTEM=generic-frv"
  532. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=frv"
  533. ;;
  534. ia64)
  535. allowed_libc="uclibc-ng glibc newlib"
  536. runtime_test=""
  537. allowed_tests="toolchain"
  538. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=ia64 ADK_TARGET_SYSTEM=generic-ia64"
  539. default_glibc="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=ia64 ADK_TARGET_SYSTEM=generic-ia64"
  540. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=ia64"
  541. ;;
  542. h8300-h8300h)
  543. allowed_libc="uclibc-ng newlib"
  544. runtime_test=""
  545. allowed_tests="toolchain"
  546. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=h8300 ADK_TARGET_CPU=h8300h ADK_TARGET_SYSTEM=sim-h8300"
  547. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=h8300 ADK_TARGET_CPU=h8300h"
  548. ;;
  549. h8300-h8s)
  550. allowed_libc="uclibc-ng newlib"
  551. runtime_test=""
  552. allowed_tests="toolchain"
  553. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=h8300 ADK_TARGET_CPU=h8s ADK_TARGET_SYSTEM=sim-h8300"
  554. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=h8300 ADK_TARGET_CPU=h8s"
  555. ;;
  556. hppa)
  557. allowed_libc="uclibc-ng glibc"
  558. runtime_test="uclibc-ng glibc"
  559. allowed_tests="boot libc mksh native toolchain"
  560. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=hppa ADK_TARGET_SYSTEM=qemu-hppa"
  561. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=hppa ADK_TARGET_SYSTEM=qemu-hppa"
  562. qemu=qemu-system-hppa
  563. qemu_args="-nographic"
  564. qemu_machine=hppa
  565. piggyback=1
  566. ;;
  567. lm32)
  568. allowed_libc="uclibc-ng newlib"
  569. runtime_test=""
  570. allowed_tests="toolchain"
  571. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=lm32 ADK_TARGET_SYSTEM=qemu-lm32"
  572. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=lm32"
  573. skipcxx=lm32
  574. ;;
  575. m32r)
  576. allowed_libc="newlib"
  577. runtime_test=""
  578. allowed_tests="toolchain"
  579. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=m32r"
  580. ;;
  581. m68k)
  582. allowed_libc="uclibc-ng glibc newlib"
  583. runtime_test="uclibc-ng"
  584. allowed_tests="toolchain boot libc ltp native"
  585. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=m68k ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-m68k-q800"
  586. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=m68k ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-m68k-q800 ADK_TARGET_CPU=68020"
  587. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=m68k ADK_TARGET_CPU=68040"
  588. cpu_arch=68040
  589. march=m68k-q800
  590. qemu=qemu-system-m68k-full
  591. qemu_args="-nographic"
  592. qemu_machine=q800
  593. suffix=${cpu_arch}
  594. ;;
  595. m68k-nommu)
  596. allowed_libc="uclibc-ng"
  597. runtime_test="uclibc-ng"
  598. allowed_tests="toolchain boot libc"
  599. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=m68k ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-m68k-mcf5208"
  600. cpu_arch=cf5208
  601. march=m68k-mcf5208
  602. qemu=qemu-system-m68k
  603. qemu_args="-nographic"
  604. qemu_machine=mcf5208evb
  605. suffix=${cpu_arch}
  606. piggyback=1
  607. ;;
  608. metag)
  609. allowed_libc="uclibc-ng"
  610. runtime_test="uclibc-ng"
  611. allowed_tests="toolchain boot libc"
  612. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=metag ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-metag"
  613. cpu_arch=metag
  614. qemu=qemu-system-meta
  615. qemu_args="-nographic -display none -device da,exit_threads=1 -chardev stdio,id=chan1 -chardev pty,id=chan2"
  616. qemu_machine=01sp
  617. piggyback=1
  618. skiplt=metag
  619. skipstatic=metag
  620. ;;
  621. microblazeel)
  622. allowed_libc="uclibc-ng musl glibc newlib"
  623. runtime_test="uclibc-ng musl glibc"
  624. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  625. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=little"
  626. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=little"
  627. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=little"
  628. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=microblaze ADK_TARGET_ENDIAN=little"
  629. cpu_arch=microblaze
  630. endian=el
  631. march=microblaze-s3adsp1800
  632. qemu=qemu-system-microblazeel
  633. qemu_machine=petalogix-s3adsp1800
  634. suffix=${cpu_arch}${endian}
  635. skipssp=microblazeel
  636. ;;
  637. microblazebe)
  638. allowed_libc="uclibc-ng musl glibc newlib"
  639. runtime_test="uclibc-ng musl glibc"
  640. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  641. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=big"
  642. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=big"
  643. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=microblaze ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-microblaze-s3adsp1800 ADK_TARGET_ENDIAN=big"
  644. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=microblaze ADK_TARGET_ENDIAN=big"
  645. cpu_arch=microblaze
  646. march=microblaze-s3adsp1800
  647. qemu=qemu-system-microblaze
  648. qemu_machine=petalogix-s3adsp1800
  649. suffix=${cpu_arch}
  650. skipssp=microblazebe
  651. ;;
  652. mips32)
  653. allowed_libc="uclibc-ng musl glibc newlib"
  654. runtime_test="uclibc-ng musl glibc"
  655. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  656. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  657. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  658. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  659. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=mips ADK_TARGET_ENDIAN=big"
  660. cpu_arch=mips32
  661. march=mips
  662. qemu=qemu-system-mips
  663. qemu_machine=malta
  664. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  665. suffix=${cpu_arch}_hard
  666. ;;
  667. mips32r6)
  668. allowed_libc="uclibc-ng musl glibc"
  669. runtime_test="uclibc-ng musl glibc"
  670. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  671. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  672. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  673. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  674. cpu_arch=mips32r6
  675. march=mips
  676. qemu=qemu-system-mips
  677. qemu_machine=malta
  678. qemu_args="${qemu_args} -cpu mips32r6-generic -device e1000,netdev=adk0 -netdev user,id=adk0"
  679. suffix=${cpu_arch}_hard
  680. ;;
  681. mips32sf)
  682. allowed_libc="uclibc-ng musl glibc"
  683. runtime_test="uclibc-ng musl glibc"
  684. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  685. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  686. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  687. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=big ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  688. cpu_arch=mips32
  689. march=mips
  690. qemu=qemu-system-mips
  691. qemu_machine=malta
  692. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  693. suffix=${cpu_arch}_soft
  694. ;;
  695. mips32el)
  696. allowed_libc="uclibc-ng musl glibc newlib"
  697. runtime_test="uclibc-ng musl glibc"
  698. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  699. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  700. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  701. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32"
  702. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=mips ADK_TARGET_ENDIAN=little"
  703. cpu_arch=mips32
  704. endian=el
  705. march=mips
  706. qemu=qemu-system-mipsel
  707. qemu_machine=malta
  708. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  709. suffix=${cpu_arch}${endian}_hard
  710. ;;
  711. mips32r6el)
  712. allowed_libc="uclibc-ng musl glibc"
  713. runtime_test="uclibc-ng musl glibc"
  714. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  715. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  716. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  717. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=hard ADK_TARGET_CPU=mips32r6"
  718. cpu_arch=mips32r6
  719. march=mips
  720. qemu=qemu-system-mipsel
  721. qemu_machine=malta
  722. qemu_args="${qemu_args} -cpu mips32r6-generic -device e1000,netdev=adk0 -netdev user,id=adk0"
  723. endian=el
  724. suffix=${cpu_arch}${endian}_hard
  725. ;;
  726. mips32elsf)
  727. allowed_libc="uclibc-ng musl glibc"
  728. runtime_test="uclibc-ng musl glibc"
  729. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  730. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  731. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  732. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips ADK_TARGET_ENDIAN=little ADK_TARGET_FLOAT=soft ADK_TARGET_CPU=mips32"
  733. cpu_arch=mips32
  734. endian=el
  735. march=mips
  736. qemu=qemu-system-mipsel
  737. qemu_machine=malta
  738. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  739. suffix=${cpu_arch}${endian}_soft
  740. ;;
  741. mips64)
  742. allowed_libc="uclibc-ng glibc"
  743. runtime_test="uclibc-ng glibc"
  744. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  745. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=o32 ADK_TARGET_CPU=mips64"
  746. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=o32 ADK_TARGET_CPU=mips64"
  747. cpu_arch=mips64
  748. qemu_machine=malta
  749. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  750. suffix=${cpu_arch}_o32
  751. ;;
  752. mips64r6n32)
  753. allowed_libc="uclibc-ng glibc"
  754. runtime_test="uclibc-ng glibc"
  755. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  756. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64r6"
  757. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64r6"
  758. cpu_arch=mips64r6
  759. march=mips64
  760. qemu=qemu-system-${march}
  761. qemu_machine=malta
  762. qemu_args="${qemu_args} -cpu I6400 -device e1000,netdev=adk0 -netdev user,id=adk0"
  763. suffix=${cpu_arch}_n32
  764. ;;
  765. mips64r6n64)
  766. allowed_libc="uclibc-ng glibc"
  767. runtime_test="uclibc-ng glibc"
  768. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  769. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64r6"
  770. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64r6"
  771. cpu_arch=mips64r6
  772. march=mips64
  773. qemu=qemu-system-${march}
  774. qemu_machine=malta
  775. qemu_args="${qemu_args} -cpu I6400 -device e1000,netdev=adk0 -netdev user,id=adk0"
  776. suffix=${cpu_arch}_n64
  777. ;;
  778. mips64n32)
  779. allowed_libc="uclibc-ng musl glibc"
  780. runtime_test="uclibc-ng musl glibc"
  781. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  782. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  783. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  784. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  785. cpu_arch=mips64
  786. march=mips64
  787. qemu=qemu-system-${cpu_arch}
  788. qemu_machine=malta
  789. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  790. suffix=${cpu_arch}_n32
  791. ;;
  792. mips64n64)
  793. allowed_libc="uclibc-ng musl glibc"
  794. runtime_test="uclibc-ng musl glibc"
  795. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  796. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  797. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  798. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=big ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  799. cpu_arch=mips64
  800. march=mips64
  801. qemu=qemu-system-${cpu_arch}
  802. qemu_machine=malta
  803. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  804. suffix=${cpu_arch}_n64
  805. ;;
  806. mips64el)
  807. allowed_libc="uclibc-ng glibc"
  808. runtime_test="uclibc-ng glibc"
  809. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  810. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=o32 ADK_TARGET_CPU=mips64"
  811. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=o32 ADK_TARGET_CPU=mips64"
  812. cpu_arch=mips64
  813. march=mips64
  814. endian=el
  815. qemu=qemu-system-mips64el
  816. qemu_machine=malta
  817. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  818. suffix=${cpu_arch}${endian}_o32
  819. ;;
  820. mips64eln32)
  821. allowed_libc="uclibc-ng musl glibc"
  822. runtime_test="uclibc-ng musl glibc"
  823. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  824. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  825. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  826. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64"
  827. cpu_arch=mips64
  828. march=mips64
  829. endian=el
  830. qemu=qemu-system-mips64el
  831. qemu_machine=malta
  832. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  833. suffix=${cpu_arch}${endian}_n32
  834. ;;
  835. mips64eln64)
  836. allowed_libc="uclibc-ng musl glibc"
  837. runtime_test="uclibc-ng musl glibc"
  838. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  839. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  840. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  841. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64"
  842. cpu_arch=mips64
  843. march=mips64
  844. endian=el
  845. qemu=qemu-system-mips64el
  846. qemu_machine=malta
  847. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  848. suffix=${cpu_arch}${endian}_n64
  849. ;;
  850. mips64r6eln32)
  851. allowed_libc="uclibc-ng glibc"
  852. runtime_test="uclibc-ng glibc"
  853. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  854. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64r6"
  855. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n32 ADK_TARGET_CPU=mips64r6"
  856. cpu_arch=mips64r6
  857. march=mips64
  858. endian=el
  859. qemu=qemu-system-mips64el
  860. qemu_machine=malta
  861. qemu_args="${qemu_args} -cpu I6400 -device e1000,netdev=adk0 -netdev user,id=adk0"
  862. suffix=${cpu_arch}${endian}_n32
  863. ;;
  864. mips64r6eln64)
  865. allowed_libc="uclibc-ng glibc"
  866. runtime_test="uclibc-ng glibc"
  867. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  868. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64r6"
  869. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=mips64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-mips64 ADK_TARGET_ENDIAN=little ADK_TARGET_ABI=n64 ADK_TARGET_CPU=mips64r6"
  870. cpu_arch=mips64r6
  871. march=mips64
  872. endian=el
  873. qemu=qemu-system-mips64el
  874. qemu_machine=malta
  875. qemu_args="${qemu_args} -cpu I6400 -device e1000,netdev=adk0 -netdev user,id=adk0"
  876. suffix=${cpu_arch}${endian}_n64
  877. ;;
  878. mn10300)
  879. allowed_libc="newlib"
  880. runtime_test=""
  881. allowed_tests="toolchain"
  882. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=mn10300"
  883. ;;
  884. moxie)
  885. allowed_libc="newlib"
  886. runtime_test=""
  887. allowed_tests="toolchain"
  888. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=moxie"
  889. ;;
  890. msp430)
  891. allowed_libc="newlib"
  892. runtime_test=""
  893. allowed_tests="toolchain"
  894. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=msp430"
  895. ;;
  896. nds32le)
  897. allowed_libc="uclibc-ng newlib"
  898. runtime_test=""
  899. allowed_tests="toolchain"
  900. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=nds32 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=generic-nds32 ADK_TARGET_ENDIAN=little"
  901. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=nds32 ADK_TARGET_ENDIAN=little"
  902. ;;
  903. nds32be)
  904. allowed_libc="uclibc-ng newlib"
  905. runtime_test=""
  906. allowed_tests="toolchain"
  907. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=nds32 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=generic-nds32 ADK_TARGET_ENDIAN=big"
  908. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=nds32 ADK_TARGET_ENDIAN=big"
  909. ;;
  910. nios2)
  911. allowed_libc="uclibc-ng glibc newlib"
  912. runtime_test="uclibc-ng glibc"
  913. allowed_tests="toolchain"
  914. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=nios2 ADK_TARGET_SYSTEM=qemu-nios2"
  915. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=nios2 ADK_TARGET_SYSTEM=qemu-nios2"
  916. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=nios2"
  917. qemu_machine=10m50-ghrd
  918. piggyback=1
  919. ;;
  920. or1k)
  921. allowed_libc="uclibc-ng musl newlib"
  922. runtime_test="uclibc-ng"
  923. allowed_tests="toolchain boot libc libcmusl ltp native"
  924. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=or1k ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-or1k"
  925. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=or1k ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-or1k"
  926. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=or1k"
  927. qemu_machine=or1k-sim
  928. piggyback=1
  929. ;;
  930. ppc)
  931. allowed_libc="uclibc-ng musl glibc newlib"
  932. runtime_test="uclibc-ng musl glibc"
  933. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  934. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-macppc ADK_TARGET_FLOAT=hard ADK_TARGET_ENDIAN=big"
  935. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-macppc ADK_TARGET_FLOAT=hard ADK_TARGET_ENDIAN=big"
  936. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-macppc ADK_TARGET_FLOAT=hard ADK_TARGET_ENDIAN=big"
  937. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=ppc ADK_TARGET_ENDIAN=big"
  938. cpu_arch=ppc
  939. march=ppc-macppc
  940. qemu=qemu-system-${cpu_arch}
  941. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  942. qemu_machine=mac99
  943. suffix=hard
  944. noappend=1
  945. ;;
  946. ppcsf)
  947. allowed_libc="uclibc-ng musl glibc newlib"
  948. runtime_test="uclibc-ng musl glibc"
  949. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  950. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-bamboo ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  951. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-bamboo ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  952. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc-bamboo ADK_TARGET_FLOAT=soft ADK_TARGET_ENDIAN=big"
  953. cpu_arch=ppc
  954. march=ppc-bamboo
  955. qemu=qemu-system-${cpu_arch}
  956. qemu_args="${qemu_args} -device e1000,netdev=adk0 -netdev user,id=adk0"
  957. qemu_machine=bamboo
  958. suffix=soft
  959. ;;
  960. ppc64)
  961. allowed_libc="musl glibc"
  962. runtime_test="musl glibc"
  963. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  964. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc64 ADK_TARGET_ENDIAN=big"
  965. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc64 ADK_TARGET_ENDIAN=big"
  966. cpu_arch=ppc64
  967. qemu=qemu-system-${cpu_arch}
  968. qemu_machine=pseries
  969. suffix=${cpu_arch}
  970. ;;
  971. ppc64le)
  972. allowed_libc="musl glibc"
  973. runtime_test="musl glibc"
  974. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  975. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc64 ADK_TARGET_ENDIAN=little"
  976. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=ppc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-ppc64 ADK_TARGET_ENDIAN=little"
  977. cpu_arch=ppc64
  978. endian=le
  979. march=ppc64
  980. qemu=qemu-system-ppc64
  981. qemu_machine=pseries
  982. suffix=${cpu_arch}
  983. ;;
  984. rx)
  985. allowed_libc="newlib"
  986. runtime_test=""
  987. allowed_tests="toolchain"
  988. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=rx"
  989. ;;
  990. s390)
  991. allowed_libc="musl glibc"
  992. runtime_test="musl glibc"
  993. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  994. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=s390 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-s390"
  995. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=s390 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-s390"
  996. cpu_arch=s390x
  997. qemu=qemu-system-${cpu_arch}
  998. qemu_machine=s390-ccw-virtio-2.4
  999. ;;
  1000. sh)
  1001. allowed_libc="newlib"
  1002. runtime_test=""
  1003. allowed_tests="toolchain"
  1004. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=sh ADK_TARGET_ENDIAN=little"
  1005. ;;
  1006. sh2)
  1007. allowed_libc="uclibc-ng"
  1008. runtime_test=""
  1009. allowed_tests="toolchain"
  1010. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_SYSTEM=generic-sh ADK_TARGET_CPU=sh2"
  1011. cpu_arch=sh2
  1012. ;;
  1013. sh3)
  1014. allowed_libc="uclibc-ng glibc"
  1015. runtime_test=""
  1016. allowed_tests="toolchain"
  1017. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_SYSTEM=generic-sh ADK_TARGET_CPU=sh3"
  1018. default_glibc="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_SYSTEM=generic-sh ADK_TARGET_CPU=sh3"
  1019. cpu_arch=sh3
  1020. ;;
  1021. sh4)
  1022. allowed_libc="uclibc-ng musl glibc"
  1023. runtime_test="uclibc-ng musl glibc"
  1024. allowed_tests="toolchain boot libc libcmusl ltp native"
  1025. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=little"
  1026. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=little"
  1027. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=little"
  1028. cpu_arch=sh4
  1029. march=sh
  1030. qemu=qemu-system-sh4
  1031. qemu_machine=r2d
  1032. qemu_args="${qemu_args} -monitor null -serial null -serial stdio"
  1033. suffix=${cpu_arch}
  1034. ;;
  1035. sh4eb)
  1036. allowed_libc="uclibc-ng musl glibc"
  1037. runtime_test="uclibc-ng musl glibc"
  1038. allowed_tests="toolchain boot libc libcmusl ltp native"
  1039. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=big"
  1040. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=big"
  1041. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sh ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sh ADK_TARGET_ENDIAN=big"
  1042. cpu_arch=sh4eb
  1043. march=sh
  1044. qemu=qemu-system-sh4eb
  1045. qemu_machine=r2d
  1046. qemu_args="${qemu_args} -monitor null -serial null -serial stdio"
  1047. suffix=${cpu_arch}
  1048. ;;
  1049. sparc)
  1050. allowed_libc="uclibc-ng glibc newlib"
  1051. runtime_test="uclibc-ng glibc"
  1052. allowed_tests="toolchain boot libc mksh ltp native"
  1053. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sparc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sparc"
  1054. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sparc ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sparc"
  1055. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=sparc"
  1056. cpu_arch=v8
  1057. qemu=qemu-system-sparc
  1058. qemu_machine=SS-10
  1059. suffix=${cpu_arch}
  1060. ;;
  1061. sparc-leon3)
  1062. allowed_libc="uclibc-ng"
  1063. runtime_test=""
  1064. allowed_tests="toolchain"
  1065. default_uclibc_ng="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=sparc ADK_TARGET_CPU=leon3 ADK_TARGET_SYSTEM=generic-sparc"
  1066. cpu_arch=leon
  1067. suffix=${cpu_arch}
  1068. ;;
  1069. sparc64)
  1070. allowed_libc="uclibc-ng glibc newlib"
  1071. runtime_test="glibc"
  1072. allowed_tests="toolchain boot libc mksh ltp native"
  1073. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sparc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sparc64"
  1074. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=sparc64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-sparc64"
  1075. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=sparc64"
  1076. cpu_arch=v9
  1077. qemu=qemu-system-sparc64
  1078. qemu_machine=sun4u
  1079. qemu_args="${qemu_args} -net nic,model=e1000 -net user"
  1080. suffix=${cpu_arch}
  1081. ;;
  1082. tilegx)
  1083. allowed_libc="glibc"
  1084. runtime_test=""
  1085. allowed_tests="toolchain"
  1086. default_glibc="ADK_APPLIANCE=toolchain ADK_TARGET_OS=$os ADK_TARGET_ARCH=tile ADK_TARGET_CPU=tilegx ADK_TARGET_SYSTEM=generic-tile"
  1087. ;;
  1088. v850)
  1089. allowed_libc="newlib"
  1090. runtime_test=""
  1091. allowed_tests="toolchain"
  1092. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=v850"
  1093. ;;
  1094. x86)
  1095. allowed_libc="uclibc-ng musl glibc newlib"
  1096. runtime_test="uclibc-ng musl glibc"
  1097. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  1098. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86"
  1099. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86"
  1100. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86"
  1101. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=x86"
  1102. cpu_arch=i686
  1103. qemu=qemu-system-i386
  1104. qemu_machine=pc
  1105. qemu_args="${qemu_args}"
  1106. ;;
  1107. x86_64)
  1108. allowed_libc="uclibc-ng musl glibc newlib"
  1109. runtime_test="uclibc-ng musl glibc"
  1110. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  1111. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86_64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86_64"
  1112. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86_64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86_64"
  1113. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86_64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86_64"
  1114. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=x86_64"
  1115. cpu_arch=x86_64
  1116. qemu_machine=pc
  1117. libdir=lib64
  1118. ;;
  1119. x86_64_x32)
  1120. allowed_libc="musl glibc"
  1121. runtime_test="musl glibc"
  1122. allowed_tests="toolchain boot libc libcmusl mksh ltp native"
  1123. default_glibc="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86_64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86_64 ADK_TARGET_ABI=x32"
  1124. default_musl="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=x86_64 ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-x86_64 ADK_TARGET_ABI=x32"
  1125. cpu_arch=x86_64
  1126. march=x86_64
  1127. qemu=qemu-system-${cpu_arch}
  1128. qemu_machine=pc
  1129. libdir=libx32
  1130. suffix=x32
  1131. ;;
  1132. xtensa)
  1133. allowed_libc="newlib uclibc-ng"
  1134. runtime_test="uclibc-ng"
  1135. allowed_tests="toolchain boot libc mksh ltp native"
  1136. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=xtensa ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-xtensa ADK_TARGET_CPU=dc233c ADK_TARGET_ENDIAN=little"
  1137. default_newlib="ADK_APPLIANCE=toolchain ADK_TARGET_OS=baremetal ADK_TARGET_ARCH=xtensa"
  1138. cpu_arch=dc233c
  1139. qemu=qemu-system-xtensa
  1140. qemu_machine=kc705
  1141. qemu_args="${qemu_args} -cpu dc233c"
  1142. suffix=${cpu_arch}
  1143. ;;
  1144. xtensabe)
  1145. allowed_libc="uclibc-ng"
  1146. runtime_test="uclibc-ng"
  1147. allowed_tests="toolchain"
  1148. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=xtensa ADK_TARGET_FS=initramfsarchive ADK_TARGET_SYSTEM=qemu-xtensa ADK_TARGET_CPU=kc705_be ADK_TARGET_ENDIAN=big"
  1149. cpu_arch=dc233c
  1150. qemu=qemu-system-xtensa
  1151. qemu_machine=kc705
  1152. qemu_args="${qemu_args} -cpu dc233c"
  1153. suffix=${cpu_arch}
  1154. ;;
  1155. xtensa-nommu)
  1156. allowed_libc="uclibc-ng"
  1157. runtime_test="uclibc-ng"
  1158. allowed_tests="toolchain boot libc"
  1159. default_uclibc_ng="ADK_APPLIANCE=test ADK_TARGET_OS=$os ADK_TARGET_ARCH=xtensa ADK_TARGET_FS=initramfspiggyback ADK_TARGET_SYSTEM=qemu-xtensa ADK_TARGET_CPU=de212 ADK_TARGET_ENDIAN=little"
  1160. cpu_arch=de212
  1161. march=xtensa
  1162. qemu=qemu-system-xtensa
  1163. qemu_machine=kc705-nommu
  1164. qemu_args="${qemu_args} -cpu de212 -m 256"
  1165. suffix=${cpu_arch}
  1166. piggyback=1
  1167. ;;
  1168. *)
  1169. echo "architecture ${arch} not supported"; exit 1;;
  1170. esac
  1171. }
  1172. # creating test script to be run on boot
  1173. create_run_sh() {
  1174. test=$1
  1175. file=$2
  1176. type=$3
  1177. if [ "$type" = "netcat" ]; then
  1178. tee="| tee -a /REPORT"
  1179. fi
  1180. cat > $file << EOF
  1181. #!/bin/sh
  1182. uname -a
  1183. if [ -x /usr/sbin/rdate ]; then
  1184. if [ \$ntpserver ]; then
  1185. rdate \$ntpserver
  1186. else
  1187. rdate time.fu-berlin.de
  1188. fi
  1189. fi
  1190. EOF
  1191. if [ "$type" = "netcat" ]; then
  1192. cat >> $file << EOF
  1193. dmesg >> /REPORT
  1194. EOF
  1195. fi
  1196. # boot test
  1197. if [ $test = "boot" ]; then
  1198. cat >> $file << EOF
  1199. if [ -x /usr/bin/size ]; then
  1200. size /bin/busybox $tee
  1201. else
  1202. ls -la /bin/busybox $tee
  1203. fi
  1204. helloworld
  1205. helloworld.static
  1206. if [ -x helloworld-cxx ]; then
  1207. helloworld-cxx
  1208. fi
  1209. if [ -x helloworld-cxx.static ]; then
  1210. helloworld-cxx.static
  1211. fi
  1212. EOF
  1213. if [ $static -eq 0 ]; then
  1214. cat >> $file << EOF
  1215. for i in \$(ls /lib/*.so 2>/dev/null|grep -v libgcc);do
  1216. if [ -x /usr/bin/size ]; then
  1217. size \$i $tee
  1218. else
  1219. ls -la \$i $tee
  1220. fi
  1221. done
  1222. EOF
  1223. fi
  1224. fi
  1225. # ltp test
  1226. if [ $test = "ltp" ]; then
  1227. cat >> $file << EOF
  1228. /opt/ltp/runltp $tee
  1229. EOF
  1230. fi
  1231. # native test
  1232. if [ $test = "native" ]; then
  1233. cat >> $file << EOF
  1234. echo '#include <stdio.h>\nint main() {\n printf("Hello World");\n return 0; \n}'> /hello.c
  1235. gcc -o /hello /hello.c $tee
  1236. /hello $tee
  1237. if [ \$? -eq 0 ]; then
  1238. echo "\nsuccess"
  1239. else
  1240. echo "\nfailed"
  1241. fi
  1242. EOF
  1243. fi
  1244. # mksh test
  1245. if [ $test = "mksh" ]; then
  1246. cat >> $file << EOF
  1247. tty=\$(cat /proc/consoles |cut -f 1 -d " ")
  1248. mksh -T !/dev/\$tty -c '/opt/mksh/test.sh' $tee
  1249. EOF
  1250. fi
  1251. # libc test
  1252. if [ $test = "libc" ]; then
  1253. cat >> $file << EOF
  1254. cd /usr/lib/uclibc-ng-test/test
  1255. sh ./uclibcng-testrunner.sh $tee
  1256. EOF
  1257. fi
  1258. if [ $test = "libcmusl" ]; then
  1259. cat >> $file << EOF
  1260. cd /opt/libc-test
  1261. CC=: make run $tee
  1262. EOF
  1263. fi
  1264. # info
  1265. cat >> $file <<EOF
  1266. if [ -f /etc/.adkgithash ]; then
  1267. echo "OpenADK git version:"
  1268. cat /etc/.adkgithash
  1269. fi
  1270. if [ -f /etc/.adkcompiler ]; then
  1271. echo "Compiler used:"
  1272. cat /etc/.adkcompiler
  1273. fi
  1274. if [ -f /etc/.adklinker ]; then
  1275. echo "Linker used:"
  1276. cat /etc/.adklinker
  1277. fi
  1278. EOF
  1279. if [ "$type" = "netcat" ]; then
  1280. cat >> $file << EOF
  1281. echo quit|nc $buildserver 9999
  1282. EOF
  1283. fi
  1284. if [ "$type" = "quit" ]; then
  1285. cat >> $file << EOF
  1286. exit
  1287. EOF
  1288. fi
  1289. chmod u+x $file
  1290. }
  1291. runtest() {
  1292. lib=$1
  1293. arch=$2
  1294. test=$3
  1295. if [ $ntp ]; then
  1296. qemu_append="-append ntpserver=$ntp"
  1297. fi
  1298. if [ $shell -eq 1 ]; then
  1299. qemu_append="-append shell"
  1300. fi
  1301. qemu=qemu-system-${arch}
  1302. march=${arch}
  1303. get_arch_info $arch $lib
  1304. case $emulator in
  1305. qemu)
  1306. echo "Using QEMU as emulator"
  1307. if ! which $qemu >/dev/null; then
  1308. echo "Checking if $qemu is installed... failed"
  1309. exit 1
  1310. fi
  1311. qemuver=$(${qemu} -version|awk '{ print $4 }'|head -1)
  1312. if [ "$arch" != "metag" ]; then
  1313. if [ $(echo $qemuver |sed -e "s#\.##g" -e "s#,##") -lt 240 ]; then
  1314. echo "Your qemu version is too old. Please update to 2.4 or greater"
  1315. exit 1
  1316. fi
  1317. fi
  1318. ;;
  1319. nsim)
  1320. echo "Using Synopsys NSIM as simulator"
  1321. if ! which nsimdrv >/dev/null; then
  1322. echo "Checking if $emulator is installed... failed"
  1323. exit 1
  1324. fi
  1325. ;;
  1326. gdb)
  1327. echo "Using GDB as simulator"
  1328. ;;
  1329. *)
  1330. echo "emulator/simulator not supported"
  1331. exit 1
  1332. ;;
  1333. esac
  1334. echo "Starting test for $lib and $arch"
  1335. # check if initramfs or piggyback is used
  1336. if [ $piggyback -eq 1 ]; then
  1337. echo "Using extra directory for test image creation"
  1338. root=openadk/extra
  1339. rm -rf openadk/extra 2>/dev/null
  1340. mkdir openadk/extra 2>/dev/null
  1341. if [ ! -z $suffix ]; then
  1342. kernel=openadk/firmware/${emulator}-${march}_${lib}_${suffix}/${emulator}-${march}-initramfspiggyback-kernel
  1343. else
  1344. kernel=openadk/firmware/${emulator}-${march}_${lib}/${emulator}-${march}-initramfspiggyback-kernel
  1345. fi
  1346. else
  1347. echo "Generating root filesystem for test run"
  1348. root=$(mktemp -d /tmp/XXXX)
  1349. if [ ! -z $suffix ]; then
  1350. archive=openadk/firmware/${emulator}-${march}_${lib}_${suffix}/qemu-${march}-${lib}-initramfsarchive.tar.xz
  1351. kernel=openadk/firmware/${emulator}-${march}_${lib}_${suffix}/qemu-${march}-initramfsarchive-kernel
  1352. else
  1353. archive=openadk/firmware/${emulator}-${march}_${lib}/${emulator}-${march}-${lib}-initramfsarchive.tar.xz
  1354. kernel=openadk/firmware/${emulator}-${march}_${lib}/${emulator}-${march}-initramfsarchive-kernel
  1355. fi
  1356. if [ ! -f $archive ]; then
  1357. echo "No root filesystem available for architecture ${arch} tried $archive"
  1358. exit 1
  1359. fi
  1360. tar -xf $archive -C $root
  1361. fi
  1362. create_run_sh $test ${root}/run.sh quit
  1363. if [ $piggyback -eq 1 ]; then
  1364. (cd openadk && make v)
  1365. else
  1366. echo "Creating initramfs filesystem"
  1367. (cd $root; find . | cpio -o -C512 -Hnewc |xz --check=crc32 --stdout > ${topdir}/initramfs.${arch})
  1368. rm -rf $root
  1369. qemu_args="$qemu_args -initrd initramfs.${arch}"
  1370. fi
  1371. # qemu-ppc overwrites existing commandline
  1372. if [ $noappend -eq 0 ]; then
  1373. qemu_args="$qemu_args ${qemu_append}"
  1374. fi
  1375. report=REPORT.${arch}.${test}.${libver}${rsuffix}
  1376. echo "Now running the test ${test} in ${emulator} for architecture ${arch} and ${lib}"
  1377. case $emulator in
  1378. qemu)
  1379. echo "${qemu} -M ${qemu_machine} ${qemu_args} -kernel ${kernel} -qmp tcp:127.0.0.1:4444,server,nowait -no-reboot"
  1380. ${qemu} -M ${qemu_machine} ${qemu_args} -kernel ${kernel} -qmp tcp:127.0.0.1:4444,server,nowait -no-reboot | tee $report
  1381. ;;
  1382. nsim)
  1383. echo "./openadk/scripts/nsim.sh ${arch} ${kernel}"
  1384. ./openadk/scripts/nsim.sh ${arch} ${kernel} | tee $report
  1385. ;;
  1386. gdb)
  1387. echo "$emulator ${arch} ${kernel}"
  1388. ./openadk/toolchain_${emulator}-${march}_${lib}_${model}_${binfmt}/usr/bin/${gdbcmd} ${kernel}
  1389. ;;
  1390. esac
  1391. if [ $? -eq 0 ]; then
  1392. echo "Test ${test} for ${arch} finished. See $report"
  1393. else
  1394. echo "Test ${test} failed for ${arch} with ${lib} ${libver}."
  1395. fi
  1396. }
  1397. build() {
  1398. lib=$1
  1399. arch=$2
  1400. test=$3
  1401. system=$4
  1402. rootfs=$5
  1403. DEFAULT=
  1404. cd openadk
  1405. if [[ $targetmode ]]; then
  1406. DEFAULT="ADK_APPLIANCE=test ADK_TARGET_ARCH=$arch ADK_TARGET_SYSTEM=$system ADK_TARGET_FS=$rootfs"
  1407. else
  1408. get_arch_info $arch $lib
  1409. fi
  1410. if [ $verbose -eq 1 ]; then
  1411. DEFAULT="$DEFAULT ADK_VERBOSE=1"
  1412. fi
  1413. # build defaults for different tests
  1414. if [ $test = "toolchain" ]; then
  1415. DEFAULT="$DEFAULT ADK_TEST_TOOLCHAIN=y"
  1416. fi
  1417. if [ $test = "boot" ]; then
  1418. DEFAULT="$DEFAULT ADK_TEST_BASE=y"
  1419. fi
  1420. if [ $test = "ltp" ]; then
  1421. DEFAULT="$DEFAULT ADK_TEST_LTP=y"
  1422. fi
  1423. if [ $test = "mksh" ]; then
  1424. DEFAULT="$DEFAULT ADK_TEST_MKSH=y"
  1425. REBUILD=.rebuild.mksh
  1426. fi
  1427. if [ $test = "libc" ]; then
  1428. DEFAULT="$DEFAULT ADK_TEST_UCLIBC_NG_TEST=y"
  1429. fi
  1430. if [ $test = "libcmusl" ]; then
  1431. DEFAULT="$DEFAULT ADK_TEST_LIBC_TEST=y"
  1432. fi
  1433. if [ $test = "native" ]; then
  1434. case $lib in
  1435. uclibc-ng)
  1436. DEFAULT="$DEFAULT ADK_TEST_UCLIBC_NG_NATIVE=y"
  1437. ;;
  1438. musl)
  1439. DEFAULT="$DEFAULT ADK_TEST_MUSL_NATIVE=y"
  1440. ;;
  1441. glibc)
  1442. DEFAULT="$DEFAULT ADK_TEST_GLIBC_NATIVE=y"
  1443. ;;
  1444. esac
  1445. fi
  1446. # build defaults for different C library
  1447. DEFAULT="$DEFAULT ADK_TARGET_LIBC=$lib"
  1448. case $lib in
  1449. uclibc-ng)
  1450. DEFAULT="$DEFAULT $default_uclibc_ng"
  1451. ;;
  1452. musl)
  1453. DEFAULT="$DEFAULT $default_musl"
  1454. ;;
  1455. glibc)
  1456. DEFAULT="$DEFAULT $default_glibc"
  1457. ;;
  1458. newlib)
  1459. DEFAULT="$DEFAULT $default_newlib"
  1460. ;;
  1461. esac
  1462. # use special C library version
  1463. if [[ $libcversion ]]; then
  1464. DEFAULT="$DEFAULT ADK_TARGET_LIBC_VERSION=$libcversion"
  1465. fi
  1466. # use special Linux kernel version
  1467. if [[ $kernelversion ]]; then
  1468. DEFAULT="$DEFAULT ADK_TARGET_KERNEL_VERSION=$kernelversion"
  1469. fi
  1470. if [[ $binutilsversion ]]; then
  1471. DEFAULT="$DEFAULT ADK_TOOLCHAIN_BINUTILS_VERSION=$binutilsversion"
  1472. fi
  1473. if [[ $gccversion ]]; then
  1474. DEFAULT="$DEFAULT ADK_TOOLCHAIN_GCC_VERSION=$gccversion"
  1475. fi
  1476. if [[ $gdbversion ]]; then
  1477. DEFAULT="$DEFAULT ADK_TOOLCHAIN_GDB_VERSION=$gdbversion"
  1478. fi
  1479. rm .config* .defconfig 2>/dev/null
  1480. echo "Using following defaults: $DEFAULT"
  1481. make $DEFAULT defconfig
  1482. if [ $create -eq 1 ]; then
  1483. printf "ADK_CREATE_TOOLCHAIN_ARCHIVE=y\n" >> .config
  1484. fi
  1485. if [ $static -eq 1 ]; then
  1486. printf "ADK_TARGET_USE_STATIC_LIBS_ONLY=y\n" >> .config
  1487. fi
  1488. if [ $cxx -eq 1 ]; then
  1489. if [ "$arch" = "$skipcxx" -o "$lib" = "newlib" ]; then
  1490. echo "Skipping $skipcxx"
  1491. else
  1492. printf "ADK_TOOLCHAIN_WITH_CXX=y\n" >> .config
  1493. printf "ADK_COMPILE_LIBSTDCXX=y\n" >> .config
  1494. printf "ADK_PACKAGE_LIBSTDCXX=y\n" >> .config
  1495. fi
  1496. fi
  1497. if [ $ssp -eq 1 ]; then
  1498. printf "ADK_TARGET_USE_SSP=y\n" >> .config
  1499. fi
  1500. if [ $debug -eq 1 ]; then
  1501. printf "ADK_DEBUG=y\n" >> .config
  1502. fi
  1503. if [ ! -z $threads ]; then
  1504. if [ $threads = "none" ]; then
  1505. printf "ADK_TARGET_WITHOUT_THREADS=y\n" >> .config
  1506. fi
  1507. if [ $threads = "lt" ]; then
  1508. printf "ADK_TARGET_WITH_LT=y\n" >> .config
  1509. fi
  1510. if [ $threads = "nptl" ]; then
  1511. printf "ADK_TARGET_WITH_NPTL=y\n" >> .config
  1512. fi
  1513. fi
  1514. for pkg in $packages; do
  1515. p=$(echo $pkg|tr '[:lower:]' '[:upper:]'|tr - _);printf "ADK_COMPILE_$p=y\nADK_PACKAGE_$p=y\n" >> .config
  1516. done
  1517. # refresh after any changes to config
  1518. yes|make oldconfig >/dev/null
  1519. if [ $clean -eq 1 ]; then
  1520. echo "cleaning openadk build directory"
  1521. make cleansystem
  1522. fi
  1523. if [ ! -z $REBUILD ]; then
  1524. touch $REBUILD
  1525. fi
  1526. make $DEFAULT all
  1527. if [ $? -ne 0 ];then
  1528. echo "build failed"
  1529. exit 1
  1530. fi
  1531. cd ..
  1532. }
  1533. for lib in ${libc}; do
  1534. case $lib in
  1535. uclibc-ng)
  1536. archlist=$arch_list_uclibcng
  1537. if [[ $libcversion ]]; then
  1538. version=$libcversion
  1539. else
  1540. version=1.0.29
  1541. fi
  1542. libver=uClibc-ng-${version}
  1543. libdir=uClibc-ng
  1544. ;;
  1545. glibc)
  1546. archlist=$arch_list_glibc
  1547. if [[ $libcversion ]]; then
  1548. version=$libcversion
  1549. else
  1550. version=2.26
  1551. fi
  1552. libver=glibc-${version}
  1553. libdir=glibc
  1554. ;;
  1555. musl)
  1556. archlist=$arch_list_musl
  1557. if [[ $libcversion ]]; then
  1558. version=$libcversion
  1559. else
  1560. version=1.1.19
  1561. fi
  1562. libver=musl-${version}
  1563. libdir=musl
  1564. ;;
  1565. newlib)
  1566. archlist=$arch_list_newlib
  1567. if [[ $libcversion ]]; then
  1568. version=$libcversion
  1569. else
  1570. version=2.5.0
  1571. fi
  1572. libver=newlib-${version}
  1573. libdir=newlib
  1574. ;;
  1575. *)
  1576. echo "$lib not supported"
  1577. exit 1
  1578. ;;
  1579. esac
  1580. if [ ! -z $archs ]; then
  1581. archlist="$archs"
  1582. fi
  1583. # libc source used?
  1584. if [ ! -z $libcsource ]; then
  1585. if [ ! -d $libcsource ]; then
  1586. echo "Not a directory."
  1587. exit 1
  1588. fi
  1589. usrc=$(mktemp -d /tmp/XXXX)
  1590. echo "Creating C library source tarball openadk/dl/${libver}.tar.xz"
  1591. cp -a $libcsource $usrc/$libver
  1592. mkdir -p $topdir/openadk/dl 2>/dev/null
  1593. rm $topdir/openadk/dl/${libver}.tar.xz 2>/dev/null
  1594. (cd $usrc && tar cJf $topdir/openadk/dl/${libver}.tar.xz ${libver} )
  1595. touch $topdir/openadk/dl/${libver}.tar.xz.nohash
  1596. # we need to clean system, when external source is used
  1597. if [ $noclean -eq 0 ]; then
  1598. clean=1
  1599. fi
  1600. fi
  1601. # binutils source used?
  1602. if [ ! -z $binutilssource ]; then
  1603. if [ ! -d $binutilssource ]; then
  1604. echo "Not a directory."
  1605. exit 1
  1606. fi
  1607. usrc=$(mktemp -d /tmp/XXXX)
  1608. echo "Creating binutils source tarball openadk/dl/binutils-git.tar.xz"
  1609. (cd $binutilssource && ./src-release.sh binutils)
  1610. tar xf $binutilssource/binutils-*.tar -C $usrc
  1611. (cd $usrc && mv binutils-* binutils-git)
  1612. mkdir -p $topdir/openadk/dl 2>/dev/null
  1613. rm $topdir/openadk/dl/binutils-git.tar.xz 2>/dev/null
  1614. (cd $usrc && tar cJf $topdir/openadk/dl/binutils-git.tar.xz binutils-git)
  1615. touch $topdir/openadk/dl/binutils-git.tar.xz.nohash
  1616. # we need to clean system, when external source is used
  1617. if [ $noclean -eq 0 ]; then
  1618. clean=1
  1619. fi
  1620. fi
  1621. # gcc source used?
  1622. if [ ! -z $gccsource ]; then
  1623. if [ ! -d $gccsource ]; then
  1624. echo "Not a directory."
  1625. exit 1
  1626. fi
  1627. usrc=$(mktemp -d /tmp/XXXX)
  1628. echo "Creating gcc source tarball openadk/dl/gcc-git.tar.xz"
  1629. cp -a $gccsource $usrc/gcc-git
  1630. mkdir -p $topdir/openadk/dl 2>/dev/null
  1631. rm $topdir/openadk/dl/gcc-git.tar.xz 2>/dev/null
  1632. (cd $usrc && tar cJf $topdir/openadk/dl/gcc-git.tar.xz gcc-git)
  1633. touch $topdir/openadk/dl/gcc-git.tar.xz.nohash
  1634. # we need to clean system, when external source is used
  1635. if [ $noclean -eq 0 ]; then
  1636. clean=1
  1637. fi
  1638. fi
  1639. # gdb source used?
  1640. if [ ! -z $gdbsource ]; then
  1641. if [ ! -d $gdbsource ]; then
  1642. echo "Not a directory."
  1643. exit 1
  1644. fi
  1645. usrc=$(mktemp -d /tmp/XXXX)
  1646. echo "Creating gdb source tarball openadk/dl/gdb-git.tar.xz"
  1647. cp -a $gdbsource $usrc/gdb-git
  1648. mkdir -p $topdir/openadk/dl 2>/dev/null
  1649. rm $topdir/openadk/dl/gdb-git.tar.xz 2>/dev/null
  1650. (cd $usrc && tar cJf $topdir/openadk/dl/gdb-git.tar.xz gdb-git)
  1651. touch $topdir/openadk/dl/gdb-git.tar.xz.nohash
  1652. # we need to clean system, when external source is used
  1653. if [ $noclean -eq 0 ]; then
  1654. clean=1
  1655. fi
  1656. fi
  1657. # Linux kernel source used?
  1658. if [ ! -z $kernelsource ]; then
  1659. if [ ! -d $kernelsource ]; then
  1660. echo "Not a directory."
  1661. exit 1
  1662. fi
  1663. if [ ! -f openadk/dl/linux-git.tar.xz ]; then
  1664. usrc=$(mktemp -d /tmp/XXXX)
  1665. echo "Creating Linux kernel source tarball openadk/dl/linux-git.tar.xz"
  1666. cp -a $kernelsource $usrc/linux-git
  1667. mkdir -p $topdir/openadk/dl 2>/dev/null
  1668. rm $topdir/openadk/dl/linux-git.tar.xz 2>/dev/null
  1669. (cd $usrc && tar cJf $topdir/openadk/dl/linux-git.tar.xz linux-git)
  1670. touch $topdir/openadk/dl/linux-git.tar.xz.nohash
  1671. # we need to clean system, when external source is used
  1672. if [ $noclean -eq 0 ]; then
  1673. clean=1
  1674. fi
  1675. else
  1676. echo "Tarball already exist, skipping creation"
  1677. fi
  1678. fi
  1679. # start with a clean dir
  1680. if [ $cleandir -eq 1 ]; then
  1681. echo "completely cleaning openadk build directory"
  1682. (cd openadk && make cleandir)
  1683. fi
  1684. if [[ $targetmode ]]; then
  1685. create_run_sh $test run.sh netcat
  1686. while read -u3 line; do
  1687. target_host=$(echo $line|cut -f 1 -d ,)
  1688. target_ip=$(echo $line|cut -f 2 -d ,)
  1689. target_arch=$(echo $line|cut -f 3 -d ,)
  1690. target_system=$(echo $line|cut -f 4 -d ,)
  1691. target_suffix=$(echo $line|cut -f 5 -d ,)
  1692. target_rootfs=$(echo $line|cut -f 6 -d ,)
  1693. target_powerid=$(echo $line|cut -f 7 -d ,)
  1694. echo "Testing target system $target_system ($target_arch) with $target_rootfs on $target_host"
  1695. build $lib $target_arch $test $target_system $target_rootfs
  1696. kernel=openadk/firmware/${target_system}_${lib}_${target_suffix}/${target_system}-${target_rootfs}-kernel
  1697. tarball=openadk/firmware/${target_system}_${lib}_${target_suffix}/${target_system}-${lib}-${target_rootfs}.tar.xz
  1698. scp $kernel root@${bootserver}:/tftpboot/${target_host}
  1699. ssh -n root@${bootserver} "cd /tftpboot; ln -sf ${target_host} vmlinux"
  1700. ssh -n root@${bootserver} "mkdir /nfsroot/${target_host} 2>/dev/null"
  1701. xzcat $tarball | ssh root@${bootserver} "tar -xf - -C /nfsroot/${target_host}"
  1702. scp run.sh root@${bootserver}:/nfsroot/${target_host}
  1703. echo "Powering on target system"
  1704. ssh -n root@${bootserver} "sispmctl -o $target_powerid"
  1705. echo "Waiting for target system to finish"
  1706. nc -l -p 9999
  1707. echo "Test finished. Powering off target system"
  1708. ssh -n root@${bootserver} "sispmctl -f $target_powerid"
  1709. scp root@${bootserver}:/nfsroot/${target_host}/REPORT REPORT.${target_arch}.${target_system}.${test}.${libver}
  1710. ssh -n root@${bootserver} "rm /nfsroot/${target_host}/REPORT"
  1711. done 3< $targets
  1712. else
  1713. for arch in $archlist; do
  1714. get_arch_info $arch $lib
  1715. report=REPORT.${arch}.${test}.${libver}${rsuffix}
  1716. if [ $cont -eq 1 ]; then
  1717. if [ -f $report ]; then
  1718. echo "Skipping already run test $test for $arch and $lib"
  1719. continue
  1720. fi
  1721. fi
  1722. if [ "$arch" = "$skiparchs" ]; then
  1723. echo "Skipping $skiparchs"
  1724. continue
  1725. fi
  1726. if [ "$threads" = "lt" ]; then
  1727. if [ "$arch" = "$skiplt" ]; then
  1728. echo "Skipping $skiplt"
  1729. continue
  1730. fi
  1731. fi
  1732. if [ $static -eq 1 ]; then
  1733. if [ "$arch" = "$skipstatic" ]; then
  1734. echo "Skipping $skipstatic"
  1735. continue
  1736. fi
  1737. fi
  1738. if [ $ssp -eq 1 ]; then
  1739. if [ "$arch" = "$skipssp" ]; then
  1740. echo "Skipping $skipssp"
  1741. continue
  1742. fi
  1743. fi
  1744. # skip nsim
  1745. if [ $skipnsim -eq 1 ]; then
  1746. if [[ "$arch" = arcv* ]]; then
  1747. echo "Skipping nsim $arch"
  1748. continue
  1749. fi
  1750. fi
  1751. if [[ "$allowed_tests" = *${test}* ]]; then
  1752. if [[ "$allowed_libc" = *${lib}* ]]; then
  1753. echo "Compiling for $lib and $arch testing $test"
  1754. build $lib $arch $test
  1755. if [ "$test" != "toolchain" ]; then
  1756. if [[ "$runtime_test" = *${lib}* ]]; then
  1757. runtest $lib $arch $test
  1758. fi
  1759. else
  1760. # fake stamp for continue
  1761. touch $report
  1762. fi
  1763. else
  1764. echo "$lib not available for $arch"
  1765. fi
  1766. else
  1767. echo "$test not available for $arch and $lib"
  1768. fi
  1769. done
  1770. fi
  1771. done
  1772. echo "All tests finished."
  1773. exit 0