#!/usr/bin/env mksh
#
# Copyright © 2014-2017
# Waldemar Brodkorb <wbx@embedded-test.org>
#
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
# is granted to deal in this work without restriction, including un‐
# limited rights to use, publicly perform, distribute, sell, modify,
# merge, give away, or sublicence.
#
# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
# the utmost extent permitted by applicable law, neither express nor
# implied; without malicious intent or gross negligence. In no event
# may a licensor, author or contributor be held liable for indirect,
# direct, other damage, loss, or other issues arising in any way out
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person’s immediate fault when using the work as intended.
#
# Alternatively, this work may be distributed under the Terms of the
# General Public License, any version as published by the Free Soft‐
# ware Foundation.
# uClibc-ng
arch_list_uclibcng="aarch64 aarch64be alpha arcv1 arcv2 arcv1-be \
arcv2-be arm-nommu armv5 armv6 armv7 armv7-thumb2 armeb avr32 \
bf512-flat bf512-fdpic c6x crisv10 crisv32 frv h8300 hppa ia64 \
lm32 m68k m68k-nommu metag microblazeel microblazebe mips32 mips32r6 \
mips32sf mips32el mips32elsf mips64 mips64n32 mips64n64 mips64el \
mips64eln32 mips64eln64 nds32le nios2 or1k ppc ppcsf sh2 sh3 \
sh4 sh4eb sparc sparc-leon3 sparc64 x86 x86_64 xtensa xtensabe \
xtensa-nommu"
# musl
arch_list_musl="aarch64 aarch64be armv5 armv6 armv7 armeb microblazeel \
microblazebe mips32 mips32r6 mips32sf mips32el mips32elsf mips64n32 mips64n64 \
mips64eln32 mips64eln64 or1k ppc ppcsf ppc64 ppc64le s390 sh4 \
sh4eb x86 x86_64 x86_64_x32"
# glibc
arch_list_glibc="aarch64 aarch64be alpha armv5 armv6 armv7 armeb \
ia64 microblazeel microblazebe mips32 mips32r6 mips32sf mips32el mips32elsf \
mips64 mips64n32 mips64n64 mips64el mips64eln32 mips64eln64 \
nios2 ppc ppcsf ppc64 ppc64le s390 sh3 sh4 sh4eb sparc64 tilegx \
x86 x86_64 x86_64_x32"
# newlib
arch_list_newlib="aarch64 aarch64be arcv1 armv5 armeb bfin crisv10 \
crisv32 epiphany ft32 frv h8300 ia64 lm32 m32r m68k microblazeel \
microblazebe mips32 mips32el mn10300 moxie msp430 nds32le nds32be \
nios2 or1k ppc rx sh sparc sparc64 v850 x86 x86_64"
topdir=$(pwd)
giturl=https://git.openadk.org/git/openadk.git
valid_libc="uclibc-ng musl glibc newlib"
valid_tests="toolchain boot libc libcmusl ltp mksh native"
valid_thread_types="none lt nptl"
bootserver=10.0.0.1
buildserver=10.0.0.2
tools='make git wget xz cpio tar awk sed'
f=0
for tool in $tools; do
if ! which $tool >/dev/null; then
echo "Checking if $tool is installed... failed"
f=1
fi
done
if [ $f -eq 1 ]; then
exit 1
fi
help() {
cat >&2 <<EOF
Syntax: $0 [ --libc=<libc> --arch=<arch> --test=<test> ]
Explanation:
--libc=<libc> C library to use (${valid_libc})
--arch=<arch> architecture to check (otherwise all supported)
--skip-arch=<arch>
|