embedded-test.sh 84 KB

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