Browse Source

s3.TUP Support for Android Toolchains (v0.20.0)

- integrate use of toolchains from Android Native Development Kit (NDK)
- add new cross toolchain template for Android 7.0 Nougat STBs
- rewrite/optimze config file generation code and introduce a config template file to avoid unmaintainable code
- add new libraries for toolchain integration (CCID IFD Handler 1.4.33, libusb 0.1.12)
- update language files
pull/45/head
WXbet 5 years ago
parent
commit
df71151698
  1. 271
      support/configs/plugin_update_toolchain.config.template
  2. 11
      support/crosstool/templates/android_nougat_arm
  3. 639
      support/functions/_plugin_update_toolchain
  4. 25
      support/translation/bg
  5. 29
      support/translation/de
  6. 35
      support/translation/en
  7. 25
      support/translation/es
  8. 25
      support/translation/fr
  9. 25
      support/translation/it
  10. 25
      support/translation/nl
  11. 25
      support/translation/pl
  12. 25
      support/translation/pt
  13. 29
      support/translation/tr

271
support/configs/plugin_update_toolchain.config.template

@ -0,0 +1,271 @@
# List of setup, build and config commands below. All commands are executed in the context of the current user.
# Pay attention to the SEMICOLON at the end of EACH command and the correct quoting (' or ") for or to avoid expansion of variables.
# Tokens that are replaced automatically:
# @CTNGSOURCE@ crosstool-NG source folder; support/crosstool/crosstool-ng
# @FNGSOURCE@ freetz-NG source folder; support/crosstool/freetz-ng
# @ANDKSOURCE@ android-NDK source folder; support/crosstool/android-ndk
# @LOGFILE@ current log file
# @TOOLCHAIN current toolchain folder
# @TEMPLATE@ current template file
# @CC@ C compiler binary of the toolchain
# @RANLIB@ library archive indexer binary of the toolchain
# @PREFIX@ prefix folder for cross builds
# @HOST@ hostname of the toolchain
# @TYPE@ toolchain type (ct-ng, freetz-ng, android-ndk)
# @ARCH@ architecture of the toolchain
# @BITNESS@ bitness of the toolchain (32, 64)
# @API@ Android API level of the toolchain (see https://source.android.com/setup/start/build-numbers)
# @SSL_TARGET@ Android specific build target for OpenSSL (android-arm, android-arm64, android-x86, android-x86)
# @CFLAGS@ individuell flags for the C compiler
# @CPUS@ CPU number of the build system
# @VALIDATE@ Special validation function for some libraries (@VALIDATE@ "PCSC")
# You normally do *not* need to be root to build a toolchain using crosstool-NG. In fact, it is *VERY* dangerous to run as root,
# as crosstool-NG will, as part of the build process, remove a few directories. If anything goes wrong, running as root can ruin your host distribution.
CTNG_BUILD_AS_ROOT="0"; # Enable/Disable build as root (1|0)
# crosstool-NG toolchain build settings
CTNG_REPO_URL="https://github.com/crosstool-ng/crosstool-ng"; # Repository to load ct-ng from
CTNG_CONFIG_tasks=('./ct-ng menuconfig;'); # config command1
CTNG_CONFIG_tasks+=('TPL_SAVE=$($gui --defaultno --output-fd 1 --ok-label "${txt_s3tup_menu_command_label_yes}" --cancel-label "${txt_s3tup_menu_command_label_no}" --colors $bt_ "$title_ - \Z0$pdesc\Zn" --title "-[ ${txt_s3tup_menu_edit_title} ]-" --inputbox "\n${txt_s3tup_menu_edit_text}" 10 55 "@TEMPLATE@") && cp ".config" "$TPL_SAVE";'); # config command2
CTNG_BUILD_tasks=('./ct-ng show-config | tee -a "@LOGFILE@";'); # build command1
CTNG_BUILD_tasks+=('./ct-ng build;'); # build command2
CTNG_SETUP_tasks=('git clone --progress "$CTNG_REPO_URL" "@CTNGSOURCE@";'); # setup command1
#CTNG_SETUP_tasks+=('echo "Patch 1: Add option to build binary toolchain tarball..." && curl --silent https://github.com/crosstool-ng/crosstool-ng/commit/77c44ad9a01293983e95949a1ece4b1f2270ad9c.diff | git apply -v;'); # setup command2
#CTNG_SETUP_tasks+=('echo "Patch 2: gcc: Remove nested 8.3.0 directory..." && curl --silent https://github.com/crosstool-ng/crosstool-ng/commit/1b29292f897f28b3ffc55cb7e254fba040b078cf.diff | git apply -v;'); # setup command3
#CTNG_SETUP_tasks+=('echo "Patch 3: Update to GCC 9.x to latest release 9.3.0..." && curl https://github.com/crosstool-ng/crosstool-ng/commit/44ca1ca171f63300869ec1f3f8a18707843ad747.diff | git apply -v;'); # setup command3
#CTNG_SETUP_tasks+=('echo "Patch 4: Add support for GCC 10.1.0..." && curl https://github.com/crosstool-ng/crosstool-ng/commit/ac16f40b09f20bfef870cead2c8188bcd4b5aacc.diff | git apply -v;'); # setup command5
#CTNG_SETUP_tasks+=('echo "Patch 5: Allow glibc 2.12 - 2.20 to work with GCC 10+..." && curl https://github.com/crosstool-ng/crosstool-ng/commit/3a39186a4ba7f549e4297f77ca28d89ae6b615b7.diff | git apply -v;'); # setup command6
CTNG_SETUP_tasks+=('./bootstrap;'); # setup command7
CTNG_SETUP_tasks+=('./configure --enable-local;'); # setup command8
CTNG_SETUP_tasks+=('make;'); # setup command9
# freetz-NG toolchain build settings
FNG_REPO_URL="https://github.com/Freetz-NG/freetz-ng.git"; # Repository to load freetz-ng from
FNG_CONFIG_tasks=('make menuconfig;'); # config command1
FNG_CONFIG_tasks+=('TPL_SAVE=$($gui --defaultno --output-fd 1 --ok-label "${txt_s3tup_menu_command_label_yes}" --cancel-label "${txt_s3tup_menu_command_label_no}" --colors $bt_ "$title_ - \Z0$pdesc\Zn" --title "-[ ${txt_s3tup_menu_edit_title} ]-" --inputbox "\n${txt_s3tup_menu_edit_text}" 10 55 "@TEMPLATE@") && cp ".config" "$TPL_SAVE";'); # config command2
FNG_BUILD_tasks=('make olddefconfig | tee -a "@LOGFILE@";'); # build command1
FNG_BUILD_tasks+=('make toolchain-dirclean | tee -a "@LOGFILE@";'); # build command2
FNG_BUILD_tasks+=('make toolchain | tee -a "@LOGFILE@";'); # build command3
FNG_SETUP_tasks=('git clone --progress "$FNG_REPO_URL" "@FNGSOURCE@";'); # setup command1
FNG_SETUP_tasks+=('ln -s "../../downloads" "@FNGSOURCE@/dl";'); # setup command2
# android-NDK toolchain build settings
ANDK_REPO_URL="https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip"; # Location to load Android Native Development Kit (NDK) from freetz-ng from
ANDK_CONFIG_tasks=('editor ".config";'); # config command1
ANDK_CONFIG_tasks+=('TPL_SAVE=$($gui --defaultno --output-fd 1 --ok-label "${txt_s3tup_menu_command_label_yes}" --cancel-label "${txt_s3tup_menu_command_label_no}" --colors $bt_ "$title_ - \Z0$pdesc\Zn" --title "-[ ${txt_s3tup_menu_edit_title} ]-" --inputbox "\n${txt_s3tup_menu_edit_text}" 10 55 "@TEMPLATE@") && cp ".config" "$TPL_SAVE";'); # config command2
ANDK_BUILD_tasks=('TOOLCHAIN="@TOOLCHAIN@";'); # build command1
ANDK_BUILD_tasks+=('printf "Extracting prebuild toolchain "@ANDKSOURCE@/toolchains/llvm/prebuilt/linux-x86_64" from NDK to "@TOOLCHAIN@"..." | tee -a "@LOGFILE@" && rm -rf "@TOOLCHAIN@" | tee -a "@LOGFILE@" && cp -rf "@ANDKSOURCE@/toolchains/llvm/prebuilt/linux-x86_64/" "@TOOLCHAIN@" | tee -a "@LOGFILE@";'); # build command2
ANDK_BUILD_tasks+=('cleanups="aarch64 arm i686 i386 x86_64 python .py pkgconfig ++ cmake test prebuilt_include bfd-plugins 2to3 share 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30";'); # build command3
ANDK_BUILD_tasks+=('cleanups=${cleanups//$ANDK_ARCH/} && cleanups=${cleanups//$ANDK_API/};'); # build command4
ANDK_BUILD_tasks+=('printf "Cleaning up extracted toolchain to save disk space..." | tee -a "@LOGFILE@" && for c in ; do find -name "*$c*" ! -name "*libc++*" -exec rm -rf {} \; 2>/dev/null >>"@LOGFILE@" 2>&1; done;'); # build command5
ANDK_BUILD_tasks+=('rm -rf "$TOOLCHAIN/include" "$TOOLCHAIN/libexec" | tee -a "@LOGFILE@";'); # build command6
ANDK_BUILD_tasks+=('printf "Creating symlinks "$TOOLCHAIN/bin/${ANDK_HOST}-gcc", "$TOOLCHAIN/bin/${ANDK_HOST}-clang" to wrap "$TOOLCHAIN/bin/${ANDK_CLANG}"..." | tee -a "@LOGFILE@" && ln -rsf "$TOOLCHAIN/bin/${ANDK_CLANG}" "$TOOLCHAIN/bin/${ANDK_HOST}-gcc" && ln -rsf "$TOOLCHAIN/bin/${ANDK_CLANG}" "$TOOLCHAIN/bin/${ANDK_HOST}-clang" && chmod 775 "$TOOLCHAIN/bin/${ANDK_HOST}*" | tee -a "@LOGFILE@";'); # build command7
ANDK_SETUP_tasks=('curl --silent "$ANDK_REPO_URL" | busybox unzip -;'); # setup command1
ANDK_SETUP_tasks+=('mv --force "$(basename "$ANDK_REPO_URL" | cut -d "-" -f 1-3)" "@ANDKSOURCE@";'); # setup command2
ANDK_SETUP_tasks+=('chmod -R 755 "@ANDKSOURCE@";'); # setup command3
# Library build settings
LIBS=(SSL_300 SSL_111 SSL_110 SSL_102 SSL_100 SSL_098 LIB_USB LIB_USB0 LIB_PCSC LIB_CCID LIB_ZLIB); # List of ordered libraries. Only libraries in this list are available
LIBS_LIST_BETA="1"; # In(Ex)clude libraries defined as beta
LIBS_AUTO_INTEGRATE="1"; # Automatically reintegrate libraries when rebuilding toolchains
# OpenSSL 3.0.0-alpha5
SSL_300="1";
SSL_300_beta="1";
SSL_300_name="OpenSSL";
SSL_300_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("openssl-3.0.0\\S.*"))][0] | .name' | sed -e 's#openssl-##g; s#_#.#g; s#\"##g')";
SSL_300_check="openssl.pc $(printf "$SSL_300_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_300_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("openssl-3.0.0\\S.*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_300_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_300_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_300_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_300_tasks+=('[ "@TYPE@" == "android-ndk" ] && export CC="gcc" || export CC=@CC@;');
SSL_300_tasks+=('[ "@TYPE@" == "android-ndk" ] && export RANLIB=ranlib || export RANLIB=@RANLIB@;');
SSL_300_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
SSL_300_tasks+=('[ "@TYPE@" == "android-ndk" ] && FLAGS="@SSL_TARGET@ --api=0.9.8 -D__ANDROID_API__=@API@ no-shared no-afalgeng no-aria no-asan no-asm no-async no-autoalginit no-autoerrinit no-autoload-config no-bf no-blake2 no-camellia no-capieng no-cast no-chacha no-cmac no-cms no-comp no-crypto-mdebug no-crypto-mdebug-backtrace no-ct no-devcryptoeng no-dgram no-dh no-dsa no-dso no-dynamic-engine no-ec no-ec2m no-ecdh no-ecdsa no-ec_nistp_64_gcc_128 no-egd no-engine no-err no-external-tests no-filenames no-fuzz-libfuzzer no-fuzz-afl no-gost no-idea no-makedepend no-md2 no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocb no-ocsp no-pic no-poly1305 no-posix-io no-psk no-rc2 no-rc4 no-rc5 no-rdrand no-rfc3779 no-rmd160 no-scrypt no-sctp no-seed no-siphash no-sm2 no-sm3 no-sm4 no-srp no-srtp no-sse2 no-ssl-trace no-tests no-threads no-ts no-ubsan no-ui-console no-unit-test no-whirlpool no-weak-ssl-ciphers no-zlib no-zlib-dynamic no-heartbeats no-msan no-dtls no-dtls1 no-dtls1-method no-dtls1_2 no-dtls1_2-method" || FLAGS="linux-generic32 shared";');
SSL_300_tasks+=('./Configure --prefix=@PREFIX@ $FLAGS;');
SSL_300_tasks+=('make -j@CPUS@;');
SSL_300_tasks+=('make install;');
SSL_300_tasks+=('[ "@TYPE@" == "android-ndk" ] && find "@PREFIX@/lib/" -maxdepth 1 \( -name "libcrypto.*" -o -name "libssl.*" \) -execdir ln -frs "@PREFIX@/lib/{}" "@PREFIX@/lib/@HOST@/@API@/{}" \;;');
# OpenSSL 1.1.1g
SSL_111="1";
SSL_111_beta="0";
SSL_111_name="OpenSSL";
SSL_111_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_1[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')";
SSL_111_check="openssl.pc $(printf "$SSL_111_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_111_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_1[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_111_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_111_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_111_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_111_tasks+=('[ "@TYPE@" == "android-ndk" ] && export CC="gcc" || export CC=@CC@;');
SSL_111_tasks+=('[ "@TYPE@" == "android-ndk" ] && export RANLIB="ranlib" || export RANLIB=@RANLIB@;');
SSL_111_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
SSL_111_tasks+=('[ "@TYPE@" == "android-ndk" ] && FLAGS="@SSL_TARGET@ --api=0.9.8 -D__ANDROID_API__=@API@ no-shared no-afalgeng no-aria no-asan no-asm no-async no-autoalginit no-autoerrinit no-autoload-config no-bf no-blake2 no-camellia no-capieng no-cast no-chacha no-cmac no-cms no-comp no-crypto-mdebug no-crypto-mdebug-backtrace no-ct no-devcryptoeng no-dgram no-dh no-dsa no-dso no-dynamic-engine no-ec no-ec2m no-ecdh no-ecdsa no-ec_nistp_64_gcc_128 no-egd no-engine no-err no-external-tests no-filenames no-fuzz-libfuzzer no-fuzz-afl no-gost no-idea no-makedepend no-md2 no-mdc2 no-md4 no-multiblock no-nextprotoneg no-ocb no-ocsp no-pic no-poly1305 no-posix-io no-psk no-rc2 no-rc4 no-rc5 no-rdrand no-rfc3779 no-rmd160 no-scrypt no-sctp no-seed no-siphash no-sm2 no-sm3 no-sm4 no-srp no-srtp no-sse2 no-ssl-trace no-tests no-threads no-ts no-ubsan no-ui-console no-unit-test no-whirlpool no-weak-ssl-ciphers no-zlib no-zlib-dynamic no-heartbeats no-msan no-dtls no-dtls1 no-dtls1-method no-dtls1_2 no-dtls1_2-method" || FLAGS="linux-generic32 shared";');
SSL_111_tasks+=('./Configure --prefix=@PREFIX@ $FLAGS;');
SSL_111_tasks+=('make -j@CPUS@;');
SSL_111_tasks+=('make install_sw;');
SSL_111_tasks+=('[ "@TYPE@" == "android-ndk" ] && find "@PREFIX@/lib/" -maxdepth 1 \( -name "libcrypto.*" -o -name "libssl.*" \) -execdir ln -frs "@PREFIX@/lib/{}" "@PREFIX@/lib/@HOST@/@API@/{}" \;;');
# OpenSSL 1.1.0l
SSL_110="1";
SSL_110_name="OpenSSL";
SSL_110_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_0[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')";
SSL_110_check="openssl.pc $(printf "$SSL_110_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_110_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_0[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_110_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_110_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_110_tasks+=('export CC=@CC@;');
SSL_110_tasks+=('export RANLIB=@RANLIB@;');
SSL_110_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_110_tasks+=('./Configure --prefix=@PREFIX@ linux-generic32 shared;');
SSL_110_tasks+=('make -j@CPUS@;');
SSL_110_tasks+=('make install_sw;');
# OpenSSL 1.0.2u
SSL_102="1";
SSL_102_beta="0";
SSL_102_name="OpenSSL";
SSL_102_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_2[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')";
SSL_102_check="openssl.pc $(printf "$SSL_102_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_102_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_2[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_102_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_102_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_102_tasks+=('export CC=@CC@;');
SSL_102_tasks+=('export RANLIB=@RANLIB@;');
SSL_102_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_102_tasks+=('./Configure --prefix=@PREFIX@ linux-generic32 shared;');
SSL_102_tasks+=('make -j@CPUS@;');
SSL_102_tasks+=('make install_sw SHLIB_VERSION_NUMBER=1.0.2 SHLIB_MINOR=0.2;');
# OpenSSL 1.0.0t
SSL_100="1";
SSL_100_beta="0";
SSL_100_name="OpenSSL";
SSL_100_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_0[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')";
SSL_100_check="openssl.pc $(printf "$SSL_100_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_100_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_0[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_100_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_100_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_100_tasks+=('export CC=@CC@;');
SSL_100_tasks+=('export RANLIB=@RANLIB@;');
SSL_100_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_100_tasks+=('[ $(echo -e "$_tc_info" | grep -ic "musl") -gt 0 ] && echo "Apply the musl libc patch to avoid OpenSSL build errors due to missing termio.h..." && curl --silent "https://raw.githubusercontent.com/beagleboard/buildroot/master/package/openssl/openssl-004-musl-termios.patch" | patch -p1;');
SSL_100_tasks+=('./Configure --prefix=@PREFIX@ linux-generic32 shared;');
SSL_100_tasks+=('make -j@CPUS@;');
SSL_100_tasks+=('make install_sw;');
# OpenSSL 0.9.8zh
SSL_098="1";
SSL_098_beta="0";
SSL_098_name="OpenSSL";
SSL_098_version="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_0_9_8[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')";
SSL_098_check="openssl.pc $(printf "$SSL_098_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
SSL_098_url="$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_0_9_8[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')";
SSL_098_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
SSL_098_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
SSL_098_tasks+=('export CC=@CC@;');
SSL_098_tasks+=('export RANLIB=@RANLIB@;');
SSL_098_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
SSL_098_tasks+=('[ $(echo -e "$_tc_info" | grep -ic "musl") -gt 0 ] && echo "Apply the musl libc patch to avoid OpenSSL build errors due to missing termio.h..." && curl --silent "https://raw.githubusercontent.com/beagleboard/buildroot/master/package/openssl/openssl-004-musl-termios.patch" | patch -p1;');
SSL_098_tasks+=('./Configure --prefix=@PREFIX@ linux-generic32 shared;');
SSL_098_tasks+=('make -j@CPUS@;');
SSL_098_tasks+=('make install_sw;');
# libusb 1.0.23
LIB_USB="1";
LIB_USB_beta="0";
LIB_USB_name="libusb";
LIB_USB_version="$(curl --silent "https://api.github.com/repos/libusb/libusb/releases/latest" | jq -r '.tag_name' | cut -c 2-)";
LIB_USB_check="libusb-1.0.pc $(printf "$LIB_USB_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_USB_url="$(curl --silent "https://api.github.com/repos/libusb/libusb/releases/latest" | jq -r '.assets[1].browser_download_url')";
LIB_USB_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
LIB_USB_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
LIB_USB_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
LIB_USB_tasks+=('export CC=@CC@;');
LIB_USB_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
LIB_USB_tasks+=('[ "@TYPE@" == "android-ndk" ] && cp -f "android/config.h" "./config.h";');
LIB_USB_tasks+=('[ "@TYPE@" == "android-ndk" ] && FLAGS="--enable-static --disable-shared --disable-udev" || FLAGS="--disable-udev";');
LIB_USB_tasks+=('./configure --prefix=@PREFIX@ --host=@HOST@ $FLAGS;');
LIB_USB_tasks+=('make -j@CPUS@;');
LIB_USB_tasks+=('make install;');
LIB_USB_tasks+=('[ "@TYPE@" == "android-ndk" ] && find "@PREFIX@/lib/" -maxdepth 1 -name "libusb-1.0.*" -execdir ln -frs "@PREFIX@/lib/{}" "@PREFIX@/lib/@HOST@/@API@/{}" \;;');
# libusb 0.1.12
LIB_USB0="1";
LIB_USB0_beta="0";
LIB_USB0_name="libusb";
LIB_USB0_version="0.1.12";
LIB_USB0_check="libusb.pc $(printf "$LIB_USB0_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_USB0_url="http://downloads.sourceforge.net/libusb/libusb-0.1.12.tar.gz";
LIB_USB0_tasks=('echo "Patch 1: Handle compile failures with GCC 7+..." && curl --silent https://sources.debian.org/data/main/libu/libusb/2:0.1.12-32/debian/patches/12_ENAMETOOLONG.diff | git apply -v;');
LIB_USB0_tasks+=('export TOOLCHAIN=@TOOLCHAIN@;');
LIB_USB0_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
LIB_USB0_tasks+=('export CC=@CC@;');
LIB_USB0_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
LIB_USB0_tasks+=('./configure --prefix=@PREFIX@ --host=@HOST@ --disable-udev;');
LIB_USB0_tasks+=('make -j@CPUS@;');
LIB_USB0_tasks+=('make install;');
# PCSC-Lite 1.9.0
LIB_PCSC="1";
LIB_PCSC_beta="0";
LIB_PCSC_name="PCSC-Lite";
LIB_PCSC_version="$(curl --silent "https://pcsclite.apdu.fr/files/" | grep -m1 'href="pcsc-lite' | awk -F '"' '{printf $4}' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_PCSC_check="libpcsclite.pc $(printf "$LIB_PCSC_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_PCSC_url="$(printf 'https://pcsclite.apdu.fr/files/'$(curl --silent "https://pcsclite.apdu.fr/files/" | grep -m1 'href="pcsc-lite' | awk -F '"' '{printf $4}'))";
LIB_PCSC_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
LIB_PCSC_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
LIB_PCSC_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
LIB_PCSC_tasks+=('export CC=@CC@;');
LIB_PCSC_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
LIB_PCSC_tasks+=('[ "@TYPE@" == "android-ndk" ] && LIBUSB_LIBS="@PREFIX@/lib/@HOST@/@API@ -lusb-1.0" || LIBUSB_LIBS="@PREFIX@/lib -lusb-1.0 -lrt";');
LIB_PCSC_tasks+=('[ "@TYPE@" == "android-ndk" ] && FLAGS="--enable-static --disable-shared --disable-libudev LIBS=-llog" || FLAGS="--disable-libudev";');
LIB_PCSC_tasks+=('./configure --prefix=@PREFIX@ --host=@HOST@ $FLAGS --disable-libsystemd --with-systemdsystemunitdir=@PREFIX@/lib/systemd/system LIBUSB_LIBS="-L${LIBUSB_LIBS}" LIBUSB_CFLAGS="-I@PREFIX@/include/libusb-1.0";');
LIB_PCSC_tasks+=('make -j@CPUS@;');
LIB_PCSC_tasks+=('make install;');
LIB_PCSC_tasks+=('[ "@TYPE@" == "android-ndk" ] && find "@PREFIX@/lib/" -maxdepth 1 -name "libpcsc*" -execdir ln -frs "@PREFIX@/lib/{}" "@PREFIX@/lib/@HOST@/@API@/{}" \;;');
LIB_PCSC_tasks+=('@VALIDATE@ "PCSC";');
LIB_PCSC_tasks+=('[ "@TYPE@" == "android-ndk" ] && zip -j "$bdir/@HOST@@API@-pcscd.zip" -xi "@PREFIX@/sbin/pcscd";');
# CCID IFD Handler 1.4.33
LIB_CCID="1";
LIB_CCID_beta="0";
LIB_CCID_name="CCID";
LIB_CCID_version="$(curl --silent "https://ccid.apdu.fr/files/" | grep -m1 'href="ccid' | awk -F '"' '{printf $4}' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_CCID_check="libccid.pc $(printf "$LIB_CCID_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_CCID_url="$(printf 'https://ccid.apdu.fr/files/'$(curl --silent "https://ccid.apdu.fr/files/" | grep -m1 'href="ccid' | awk -F '"' '{printf $4}'))";
LIB_CCID_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
LIB_CCID_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
LIB_CCID_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
LIB_CCID_tasks+=('export CC=@CC@;');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && LIBUSB_LIBS="@PREFIX@/lib/@HOST@/@API@ -lusb-1.0" || LIBUSB_LIBS="@PREFIX@/lib -lusb-1.0 -lrt";');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && FLAGS="--enable-static" || FLAGS="";');
LIB_CCID_tasks+=('./bootstrap;');
LIB_CCID_tasks+=('./configure --prefix=@PREFIX@ --host=@HOST@ $FLAGS --enable-twinserial --enable-usbdropdir="@PREFIX@/..$(pkg-config libpcsclite --variable=usbdropdir)" --enable-serialconfdir="@PREFIX@$(pkg-config libpcsclite --variable=serialconfdir)" LIBUSB_LIBS="-L${LIBUSB_LIBS}" LIBUSB_CFLAGS="-I@PREFIX@/include/libusb-1.0";');
LIB_CCID_tasks+=('make -j@CPUS@;');
LIB_CCID_tasks+=('make install;');
LIB_CCID_tasks+=('echo -e "prefix=@PREFIX@\nexec_prefix=\${prefix}\nlibdir=\${exec_prefix}/lib\nincludedir=\${prefix}/include/PCSC\nusbdropdir=@PREFIX@/lib/pcsc/drivers\nserialconfdir=@PREFIX@/etc/reader.conf.d\n\nName: CCID IFD Handler\nDescription: Generic USB CCID (Chip/Smart Card Interface Devices) and ICCD (Integrated Circuit(s) Card Devices) driver\nVersion: $LIB_CCID_version\nRequires: libusb libpcsclite" > "@PREFIX@/lib/pkgconfig/libccid.pc";');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && zip -j "$bdir/@HOST@@API@-libccid.zip" -xi "@PREFIX@/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so";');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && zip -j "$bdir/@HOST@@API@-libccidtwin.zip" -xi "@PREFIX@/lib/pcsc/drivers/serial/libccidtwin.so";');
LIB_CCID_tasks+=('[ "@TYPE@" == "android-ndk" ] && zip -j "$bdir/@HOST@@API@-libccidplist.zip" -xi "@PREFIX@/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist";');
# zlib 1.2.11
LIB_ZLIB="1";
LIB_ZLIB_beta="0";
LIB_ZLIB_name="zlib";
LIB_ZLIB_version="$(curl --silent https://api.github.com/repos/madler/zlib/tags | jq -r '.[0].name' | cut -c 2-)";
LIB_ZLIB_check="zlib.pc $(printf "$LIB_ZLIB_version" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')";
LIB_ZLIB_url="$(curl --silent "https://api.github.com/repos/madler/zlib/tags" | jq -r '.[0].tarball_url')";
LIB_ZLIB_tasks=('export TOOLCHAIN=@TOOLCHAIN@;');
LIB_ZLIB_tasks+=('[ -n "@CFLAGS@" ] && export CFLAGS="@CFLAGS@";');
LIB_ZLIB_tasks+=('export CC=@CC@;');
LIB_ZLIB_tasks+=('[ "@TYPE@" == "android-ndk" ] && export ANDROID_NDK="@TOOLCHAIN@";');
LIB_ZLIB_tasks+=('export PATH="$TOOLCHAIN/bin:$PATH";');
LIB_ZLIB_tasks+=('./configure --prefix=@PREFIX@;');
LIB_ZLIB_tasks+=('make -j@CPUS@;');
LIB_ZLIB_tasks+=('make install;');
LIB_ZLIB_tasks+=('[ "@TYPE@" == "android-ndk" ] && find "@PREFIX@/lib/" -maxdepth 1 -name "libz.*" -execdir ln -frs "@PREFIX@/lib/{}" "@PREFIX@/lib/@HOST@/@API@/{}" \;;');

11
support/crosstool/templates/android_nougat_arm

@ -0,0 +1,11 @@
#toolchain template: Android 7.0 Nougat STBs
#toolchain template version: 1
#toolchain template cflags: -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=vfpv3-d16 -DANDROID -D__ANDROID_API__=24 -fpic -fno-addrsig -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wno-invalid-command-line-argument -Wno-unused-command-line-argument
#toolchain template updated: 2020-07-20 15:28:28
ANDK_API="24" #https://source.android.com/setup/start/build-numbers
ANDK_ABI="armeabi-v7a"
ANDK_ARCH="arm"
ANDK_ARCH_BITNESS="32"
ANDK_HOST="arm-linux-androideabi"
ANDK_CLANG="armv7a-linux-androideabi24-clang"
ANDK_SSL_TARGET="android-arm" #android-arm, android-arm64, android-x86, android-x86

639
support/functions/_plugin_update_toolchain

@ -3,15 +3,17 @@
#simplebuild_plugin tcupdate
tcupdate(){
pversion="0.16.0";
pversion="0.20.0";
pname="s3.TUP";
pdesc="Plugin $pname v$pversion";
configname="$configdir/plugin_update_toolchain.config";
configtemplate="${configname}.template";
disable_syscheck="0";
ctdir="$sdir/crosstool";
cttpldir="$ctdir/templates";
ctngsrcdir="$ctdir/crosstool-ng";
fngsrcdir="$ctdir/freetz-ng";
andksrcdir="$ctdir/android-ndk";
cpus="$(getconf _NPROCESSORS_ONLN)";
CMDTC="$1";
@ -66,9 +68,9 @@ tcupdate(){
#ct-ng must not be run as root unless you forcing it by config
if ! _check_root || [ "$CTNG_BUILD_AS_ROOT" == "1" ];then
CTNG_START_BUILD=1;
CT_START_BUILD=1;
else
CTNG_START_BUILD=0;
CT_START_BUILD=0;
sp=$(printf '%*s' 9);
CTNG_ROOT_BUILD_ERROR="\nERROR -> ${txt_s3tup_msg_buildasroot_error1}\n\n"${sp}"${txt_s3tup_msg_buildasroot_error2}\n\n";
CTNG_ROOT_BUILD_CMD="$sp""./s3 tcupdate --config \"CTNG_BUILD_AS_ROOT\" \"1\"\n";
@ -94,8 +96,8 @@ tcupdate(){
else
_nl && exit;
fi;
elif [ "$CMDTC" == "-ctng" ] || [ "$CMDTC" == "--crosstool-ng" ] || [ "$CMDTC" == "-fng" ] || [ "$CMDTC" == "--freetz-ng" ];then #toolchain editor menu
_tpl_editor "$(_get_template_type "$cttpldir/$OPTION1")" "$OPTION1";
elif [ "$CMDTC" == "-ctng" ] || [ "$CMDTC" == "--crosstool-ng" ] || [ "$CMDTC" == "-fng" ] || [ "$CMDTC" == "--freetz-ng" ] || [ "$CMDTC" == "-andk" ] || [ "$CMDTC" == "--android-ndk" ];then #toolchain editor menu
_tpl_editor "$(_get_template_type "$cttpldir/$OPTION1" | awk -F';' '{print $1}' | xargs)" "$OPTION1";
bye;
elif [ -z "$CMDTC" ];then #show toolchain menu
unset menu_close;
@ -109,8 +111,7 @@ tcupdate(){
for i in "${INST_TCLIST[@]}";do
if [ ! "$i" == "native" ];then
source "$tccfgdir/$i" && tcdate="";
[ -f "$tcdir/$i/build.log.bz2" ] && tcdate=" ct-ng."$(date -r "$tcdir/$i/build.log.bz2" "+%F %T");
[ -f "$tcdir/$i/freetz-ng.log.bz2" ] && tcdate=" freetz-ng."$(date -r "$tcdir/$i/freetz-ng.log.bz2" "+%F %T");
tcdate=" $(_get_toolchain_date "$i")";
MENU_OPTIONS+=("$_toolchainname" "$_description\Z2$tcdate\Zn" "${txt_s3tup_menu_toolchain_folder}$tcdir/$i | ${txt_s3tup_menu_toolchain_config}$tccfgdir/$i");
counter;
fi;
@ -160,6 +161,12 @@ _integrate_libs(){
prefixdir=$(echo "$props" | awk -F';' '{print $5}' | xargs);
pkgconfigdir=$(echo "$props" | awk -F';' '{print $6}' | xargs);
hostname=$(echo "$props" | awk -F';' '{print $7}' | xargs);
type=$(echo "$props" | awk -F';' '{print $8}' | xargs);
arch=$(echo "$props" | awk -F';' '{print $9}' | xargs);
bitness=$(echo "$props" | awk -F';' '{print $10}' | xargs);
api=$(echo "$props" | awk -F';' '{print $11}' | xargs);
ssl_target=$(echo "$props" | awk -F';' '{print $12}' | xargs);
cflags=$(echo "$props" | awk -F';' '{print $13}' | xargs);
while [ ! $menu_close ]
do
@ -282,7 +289,7 @@ _integrate_libs(){
_create_tc(){
_sz; # Prepare DIALOG settings
unset TPL_LIST;
local menu_close libkeys;
local menu_close libkeys use;
while [ ! $menu_close ]
do
if [ "${#2}" -gt 0 ];then #Force setup call
@ -300,16 +307,16 @@ _create_tc(){
else
tplempty=1;
fi;
#CROSS TOOLCHAIN TEMPLATE MENU
unset MENU_OPTIONS;COUNT=0;
if [ "$tplempty" == "0" ];then
for t in "${TPL_LIST[@]}";do
props=$(_get_template_properties "$t");
desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs);
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs);
changed=$(echo "$props" | awk -F'^' '{print $4}' | xargs);[ -n "$changed" ] && changed=", changed:$changed";
copyof=$(echo "$props" | awk -F'^' '{print $5}' | xargs);[ -n "$copyof" ] && copyof=", copy of:$copyof";
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs); [ -z "$version" ] && version="0";
changed=$(echo "$props" | awk -F'^' '{print $5}' | xargs);[ -n "$changed" ] && changed=", changed:$changed";
copyof=$(echo "$props" | awk -F'^' '{print $6}' | xargs);[ -n "$copyof" ] && copyof=", copy of:$copyof";
version_tc=$(echo $(_get_template_properties "$tcdir/$t/.config") | awk -F'^' '{print $2}' | xargs); [ -z "$version_tc" ] && version_tc="0";
if [[ -d "$tcdir/$t" && -f "$tccfgdir/$t" ]];then
[ "$version" -gt "$version_tc" ] && color="\Z1" || color="\Zb\Z1";
@ -330,7 +337,7 @@ _create_tc(){
case $ret in
0) #Start - Build cross toolchain
#Setup crosstool-NG and Freetz-NG automatically if not installed
#Setup crosstool-NG, Freetz-NG, Android-NDK automatically if not installed
_check_crosstool_setup;
#Build cross toolchains
@ -339,7 +346,8 @@ _create_tc(){
if [ -f "$cttpldir/$tpl" ];then
#get existing toolchain properties to detect current toolchain libs
unset libkeys;
unset libkeys;tc=$tpl;sysroot="";
if [ -d "$tcdir/$tpl" ];then
props=$(_get_toolchain_properties "$tpl");
prefixdir=$(echo "$props" | awk -F';' '{print $5}' | xargs);
@ -363,91 +371,117 @@ _create_tc(){
echo -e "$pdesc - ${txt_s3tup_msg_cross_toolchain_log} - $(date +"%F %T")" | tee -a "$logfile";
echo -e "${y_l}$sp\n${txt_b2} ($i/$icount): ${txt_s3tup_msg_cross_toolchain_commandlist} $tpl:\n$sp" | tee -a "$logfile";
#set ctsrcdir based on template type
template_type="$(_get_template_type "$cttpldir/$tpl")";
tpl_type="$(echo "$template_type" | awk -F';' '{print $1}' | xargs)";
tpl_type_name="$(echo "$template_type" | awk -F';' '{print $2}' | xargs)";
ctsrcdir="${tpl_type,,}srcdir";ctsrcdir="${!ctsrcdir}";
#copy template
[ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ] && tpltargetdir="$ctngsrcdir";
[ $(_get_template_type "$cttpldir/$tpl") == "FNG" ] && tpltargetdir="$fngsrcdir";
echo "rm \"$tpltargetdir/.config\"* 2>/dev/null;cp -f \"$cttpldir/$tpl\" \"$tpltargetdir/.config\";" | tee -a "$logfile";
rm "$tpltargetdir/.config"* 2>/dev/null;cp -f "$cttpldir/$tpl" "$tpltargetdir/.config";
echo "rm \"$ctsrcdir/.config\"* 2>/dev/null;cp -f \"$cttpldir/$tpl\" \"$ctsrcdir/.config\";" | tee -a "$logfile";
rm "$ctsrcdir/.config"* 2>/dev/null;cp -f "$cttpldir/$tpl" "$ctsrcdir/.config";
#patch template
if [ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ];then
#CT_LOCAL_TARBALLS_DIR aka cache folder for downloads
echo "sed -i \"s#.*CT_LOCAL_TARBALLS_DIR=.*#CT_LOCAL_TARBALLS_DIR=\"$dldir\"#g\" \"$tpltargetdir/.config\";" | tee -a "$logfile";
sed -i "s#.*CT_LOCAL_TARBALLS_DIR=.*#CT_LOCAL_TARBALLS_DIR=\"$dldir\"#g" "$tpltargetdir/.config";
#CT_PREFIX_DIR aka folder that contains the final toolchain
echo "sed -i \"s#.*CT_PREFIX_DIR=.*#CT_PREFIX_DIR=\"$tcdir/$tpl\"#g\" \"$tpltargetdir/.config\";" | tee -a "$logfile";
sed -i "s#.*CT_PREFIX_DIR=.*#CT_PREFIX_DIR=\"$tcdir/$tpl\"#g" "$tpltargetdir/.config";
#CT_PARALLEL_JOBS aka parallel task count for building
echo "echo -e \"\nCT_PARALLEL_JOBS=$cpus\" >>\"$tpltargetdir/.config\";" | tee -a "$logfile";
echo -e "\nCT_PARALLEL_JOBS=$cpus" >>"$tpltargetdir/.config";
#CT_ALLOW_BUILD_AS_ROOT aka force build as root
_check_root && [ "$CTNG_BUILD_AS_ROOT" == "1" ] && echo "echo -e \"\nCT_EXPERIMENTAL=y\nCT_ALLOW_BUILD_AS_ROOT=y\nCT_ALLOW_BUILD_AS_ROOT_SURE=y\" >>\"$tpltargetdir/.config\";" | tee -a "$logfile";
_check_root && [ "$CTNG_BUILD_AS_ROOT" == "1" ] && echo -e "\nCT_EXPERIMENTAL=y\nCT_ALLOW_BUILD_AS_ROOT=y\nCT_ALLOW_BUILD_AS_ROOT_SURE=y" >>"$tpltargetdir/.config";
elif [ $(_get_template_type "$cttpldir/$tpl") == "FNG" ];then
#FREETZ_JLEVEL aka parallel task count for building
echo "echo -e \"\FREETZ_JLEVEL=$cpus\" >>\"$tpltargetdir/.config\";" | tee -a "$logfile";
echo -e "\nFREETZ_JLEVEL=$cpus" >>"$tpltargetdir/.config";
fi;
#prepare template and build
case "$tpl_type" in
"CTNG") #CT_LOCAL_TARBALLS_DIR aka cache folder for downloads
echo "sed -i \"s#.*CT_LOCAL_TARBALLS_DIR=.*#CT_LOCAL_TARBALLS_DIR=\"$dldir\"#g\" \"$ctsrcdir/.config\";" | tee -a "$logfile";
sed -i "s#.*CT_LOCAL_TARBALLS_DIR=.*#CT_LOCAL_TARBALLS_DIR=\"$dldir\"#g" "$ctsrcdir/.config";
#CT_PREFIX_DIR aka folder that contains the final toolchain
echo "sed -i \"s#.*CT_PREFIX_DIR=.*#CT_PREFIX_DIR=\"$tcdir/$tpl\"#g\" \"$ctsrcdir/.config\";" | tee -a "$logfile";
sed -i "s#.*CT_PREFIX_DIR=.*#CT_PREFIX_DIR=\"$tcdir/$tpl\"#g" "$ctsrcdir/.config";
#CT_PARALLEL_JOBS aka parallel task count for building
echo "echo -e \"\nCT_PARALLEL_JOBS=$cpus\" >>\"$ctsrcdir/.config\";" | tee -a "$logfile";
echo -e "\nCT_PARALLEL_JOBS=$cpus" >>"$ctsrcdir/.config";
#CT_ALLOW_BUILD_AS_ROOT aka force build as root
_check_root && [ "$CTNG_BUILD_AS_ROOT" == "1" ] && echo "echo -e \"\nCT_EXPERIMENTAL=y\nCT_ALLOW_BUILD_AS_ROOT=y\nCT_ALLOW_BUILD_AS_ROOT_SURE=y\" >>\"$ctsrcdir/.config\";" | tee -a "$logfile";
_check_root && [ "$CTNG_BUILD_AS_ROOT" == "1" ] && echo -e "\nCT_EXPERIMENTAL=y\nCT_ALLOW_BUILD_AS_ROOT=y\nCT_ALLOW_BUILD_AS_ROOT_SURE=y" >>"$ctsrcdir/.config";
bcl=$(printf '%s\n' "${CTNG_BUILD_tasks[@]}");;
"FNG") #FREETZ_JLEVEL aka parallel task count for building
echo "echo -e \"\FREETZ_JLEVEL=$cpus\" >>\"$ctsrcdir/.config\";" | tee -a "$logfile";
echo -e "\nFREETZ_JLEVEL=$cpus" >>"$ctsrcdir/.config";
bcl=$(printf '%s\n' "${FNG_BUILD_tasks[@]}");;
"ANDK") #resource template
source "$ctsrcdir/.config"
bcl=$(printf '%s\n' "${ANDK_BUILD_tasks[@]}");;
esac;
#run build
[ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ] && bcl=$(printf '%s\n' "${CTNG_BUILD_tasks[@]}");
[ $(_get_template_type "$cttpldir/$tpl") == "FNG" ] && bcl=$(printf '%s\n' "${FNG_BUILD_tasks[@]}");
echo -e "cd \"${tpltargetdir}\";\n$(_replace_tokens "$bcl")\n$sp${re_}" | tee -a "$logfile";
echo -e "cd \"${ctsrcdir}\";\n$(_replace_tokens "$bcl")\n$sp${re_}" | tee -a "$logfile";
sleep 2;
if [ $CTNG_START_BUILD -eq 1 ];then
cd "$tpltargetdir";
if [ $CT_START_BUILD -eq 1 ];then
cd "$ctsrcdir";
#print out detected libs in current toolchain
[ "${#libkeys}" -gt 0 -a "$LIBS_AUTO_INTEGRATE" -eq 1 ] && echo -e "${y_l}\n${txt_s3tup_msg_cross_toolchain_library_detection}\n${b_l}$(echo "$libkeys" | tr ',' '\n' | sort -hr)${re_}" | tee -a "$logfile";
#print out crosstool version
[ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ] && echo -e "${g_l}\n$(./ct-ng | grep 'crosstool-NG version' &2>/dev/null | tail -1)\n${re_}" | tee -a "$logfile";
[ $(_get_template_type "$cttpldir/$tpl") == "FNG" ] && echo -e "${g_l}\n$(tools/freetz-revision 2>&1 | tail -1)\n${re_}" | tee -a "$logfile";
#generate build command list
#print out crosstool version and generate build command list
unset buildtasks;
if [ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ];then
for task in "${CTNG_BUILD_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
buildtasks+=("$task");
done;
elif [ $(_get_template_type "$cttpldir/$tpl") == "FNG" ];then
[[ ! $(umask) == 0022 ]] && umask 0022;
for task in "${FNG_BUILD_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
buildtasks+=("$task");
done;
fi;
case "$tpl_type" in
"CTNG")
echo -e "${g_l}\n$(./ct-ng | grep 'crosstool-NG version' &2>/dev/null | tail -1)\n${re_}" | tee -a "$logfile";
for task in "${CTNG_BUILD_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
buildtasks+=("$task");
done;;
"FNG")
echo -e "${g_l}\n$(tools/freetz-revision 2>&1 | tail -1)\n${re_}" | tee -a "$logfile";
[[ ! $(umask) == 0022 ]] && umask 0022;
for task in "${FNG_BUILD_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
buildtasks+=("$task");
done;;
"ANDK")
echo -e "${g_l}\n$(grep '^Pkg.Desc =' "source.properties" | awk -F'=' '{print $2}' | xargs) $(grep '^Pkg.Revision =' "source.properties" | awk -F'=' '{print $2}' | xargs)\n${re_}" | tee -a "$logfile";
for task in "${ANDK_BUILD_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
echo_task="$(printf "%q" "$task")";
buildtasks+=("echo "$echo_task";");buildtasks+=("$task");
done;;
esac;
#run build and save error
( eval "${buildtasks[@]}" ) 2>&1;
[ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ] && err=$(grep -c '\[ERROR\]' "$tpltargetdir/build.log");
[ $(_get_template_type "$cttpldir/$tpl") == "FNG" ] && err=$(grep 'Error .*' "$logfile" | grep -vc '(ignored)');
case "$tpl_type" in
"CTNG") err=$(grep -c '\[ERROR\]' "$ctsrcdir/build.log");;
"FNG") err=$(grep 'Error .*' "$logfile" | grep -vc '(ignored)');;
"ANDK") err=$?;;
esac;
#save build.log in logs
[ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ] && cat "$tpltargetdir/build.log" >>"$logfile";
[ "$tpl_type" == "CTNG" ] && cat "$ctsrcdir/build.log" >>"$logfile";
if [ ! $err -gt 0 ];then
if [ $(_get_template_type "$cttpldir/$tpl") == "CTNG" ];then
#get target from build.log
target=$(sed -n -e '/target = / s/.*\= *//p' "$tpltargetdir/build.log");
case "$tpl_type" in
"CTNG") #get target from build.log
target=$(sed -n -e '/target = / s/.*\= *//p' "$ctsrcdir/build.log");
use="";
#get CT_BUILD_TOP_DIR aka temporary toolchain build directory from build.log and delete it to save disk space
buildtopdir=$(sed -n -e '/CT_BUILD_TOP_DIR=\// s/.*\= *//p' "$tpltargetdir/build.log");
[ -d "$buildtopdir" ] && rm -rf "$buildtopdir" 2>/dev/null;
elif [ $(_get_template_type "$cttpldir/$tpl") == "FNG" ];then
#get toolchain and target from logfile
btcbindir=$(grep -i '{ PATH=.*kernel.*' "$logfile" | head -n 1 | awk -F':|"' '{print $2}');
btcdir=$(realpath "$btcbindir/../");
target=$(basename "$btcdir");
#copy toolchain folder
rm -rf "$tcdir/$tpl";
cp -rf "$btcdir" "$tcdir/$tpl";
#get CT_BUILD_TOP_DIR aka temporary toolchain build directory from build.log and delete it to save disk space
buildtopdir=$(sed -n -e '/CT_BUILD_TOP_DIR=\// s/.*\= *//p' "$ctsrcdir/build.log");
[ -d "$buildtopdir" ] && rm -rf "$buildtopdir" 2>/dev/null;;
"FNG") #get toolchain and target from logfile
btcbindir=$(grep -i '{ PATH=.*kernel.*' "$logfile" | head -n 1 | awk -F':|"' '{print $2}');
btcdir=$(realpath "$btcbindir/../");
target=$(basename "$btcdir");
use="";
#compress log file
cp -f "$logfile" "$tcdir/$tpl/freetz-ng.log";
bzip2 -zf9 "$tcdir/$tpl/freetz-ng.log";
fi;
#copy toolchain folder
rm -rf "$tcdir/$tpl";
cp -rf "$btcdir" "$tcdir/$tpl";
#compress log file
cp -f "$logfile" "$tcdir/$tpl/freetz-ng.log";
bzip2 -zf9 "$tcdir/$tpl/freetz-ng.log";;
"ANDK") #
target="$ANDK_HOST";
sysroot="sysroot";
use="LIB_RT= LIB_PTHREAD=";
#compress log file
cp -f "$logfile" "$tcdir/$tpl/android-ndk.log";
bzip2 -zf9 "$tcdir/$tpl/android-ndk.log";;
esac;
#save config in target toolchain folder
cp -f "$cttpldir/$tpl" "$tcdir/$tpl/.config";
@ -464,7 +498,8 @@ _create_tc(){
#create toolchain.cfg
props=$(_get_template_properties "$cttpldir/$tpl");
desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs);
_create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "" "" "$desc" "" "$dldir/Toolchain-$tpl.tar.xz" "yes";
cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs);
_create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "$sysroot" "" "$desc" "" "$dldir/Toolchain-$tpl.tar.xz" "yes" "$tpl_type_name" "$use" "$cflags" "$tpl_type";
else
_paktc_timer 10;
fi;
@ -478,11 +513,12 @@ _create_tc(){
fi;
done;;
1) #Setup - Setup crosstool-NG
_ctng_setup "$CTNG_START_BUILD";
_fng_setup "$CTNG_START_BUILD";;
_ctng_setup "$CT_START_BUILD";
_fng_setup "$CT_START_BUILD";
_andk_setup "$CT_START_BUILD";;
2) #Edit
tpl=$(echo "$opts" | awk '{printf $2}';);
_tpl_editor "$(_get_template_type "$cttpldir/$tpl")" "$tpl";;
_tpl_editor "$(_get_template_type "$cttpldir/$tpl" | awk -F';' '{print $1}' | xargs)" "$tpl";;
3) #Exit
menu_close="1";
return;;
@ -506,7 +542,7 @@ _migrations(){
for tpl in "${TPL_LIST[@]}";do
props=$(_get_template_properties "$cttpldir/$tpl"); #get template properties
desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs); #extract description
tc_migrate=$(echo "$props" | awk -F'^' '{print $3}' | xargs); #extract template name to migrate
tc_migrate=$(echo "$props" | awk -F'^' '{print $4}' | xargs); #extract template name to migrate
if [[ -n "$tc_migrate" && -d "$tcdir/$tc_migrate" ]];then
mig_list+="\n${txt_tc} ${y_l}${tc_migrate}${re_}\n\t${txt_tpl} ${y_l}${tc_migrate}${re_} ${txt_s3tup_msg_cross_migrations_renamed} ${p_l}${tpl}\n${re_}";
rm_list+="\n${txt_s3tup_msg_cross_migrations_remove} ${y_l}${tc_migrate}${re_}\n\trm -r \"${tcdir}/${y_l}${tc_migrate}${re_}\"\n\trm -f \"${tccfgdir}/${y_l}${tc_migrate}${re_}\"\n";
@ -536,8 +572,11 @@ _backup(){
_compress "$xzfile" "$tcdir/$src"
#create toolchain.cfg
source "$tccfgdir/$src" && target="${_compiler%?}" && sysroot="$_sysroot" && lsd="$_libsearchdir" && desc="$_description" && info="$_tc_info" && sb="$_self_build";
_create_toolchaincfg "$tcdir/$src" "$dest" "$target" "$sysroot" "$lsd" "$desc" "$info" "$xzfile" "$sb";
template_type="$(_get_template_type "$cttpldir/$src")";
tpl_type="$(echo "$template_type" | awk -F';' '{print $1}' | xargs)";
tpl_type_name="$(echo "$template_type" | awk -F';' '{print $2}' | xargs)";
source "$tccfgdir/$src" && target="${_compiler%?}" && sysroot="$_sysroot" && lsd="$_libsearchdir" && desc="$_description" && info="$_tc_info" && sb="$_self_build" && eu="$extra_use" && ec="$extra_cc";
_create_toolchaincfg "$tcdir/$src" "$dest" "$target" "$sysroot" "$lsd" "$desc" "$info" "$xzfile" "$sb" "tpl_type_name" "$eu" "$ec" "$tpl_type";
) | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_backup_title} ${src} ${txt_to} $(basename "$xzfile") ]- " "$pb_" "$_lines" "$_cols";
[ -f "$newtccfgfile" ] && echo "$dest";
};
@ -568,13 +607,17 @@ _build_library(){
};
_tpl_editor(){
tc="$2";tpl="$tc";unset TASKS;unset configtasks;
tc="$2";tpl="$tc";unset TASKS;unset configtasks;local i=0;
_check_crosstool_setup;
props=$(_get_template_properties "$cttpldir/$tpl");
desc=$(echo "$props" | awk -F'(' '{print $1}' | xargs);
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs);[ -z "$version" ] && version="0";
copyof=$(echo "$props" | awk -F'^' '{print $5}' | xargs);
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs);[ -z "$version" ] && version=0; ((version+=1));
cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs);
copyof=$(echo "$props" | awk -F'^' '{print $6}' | xargs);
editordir="$(echo "$1" | awk '{print tolower($0)}')srcdir";editordir="${!editordir}";
editordir="${1,,}srcdir";editordir="${!editordir}";
if [ -f "$cttpldir/$tpl" ];then #copy the existing template to edit it
cp -f "$cttpldir/$tpl" "$editordir/.config"
@ -598,15 +641,17 @@ _tpl_editor(){
if [ -f "$TPL_SAVE" ];then #edited template was saved
sed -i '/^$\|^#$/d' "$TPL_SAVE"; #cleanup template by removing empty and #-lines
sed -i '/^#toolchain template.*:.*/d' "$TPL_SAVE"; #remove existing toolchain template description lines
sed -i "1i #toolchain template: $desc" "$TPL_SAVE"; #add toolchain template description line
sed -i "2i #toolchain template version: $version" "$TPL_SAVE"; #add toolchain template version property
sed -i "3i #toolchain template updated: $(date -r "$TPL_SAVE" "+%F %T")" "$TPL_SAVE"; #add toolchain template updated property
((i+=1)); sed -i "${i}i #toolchain template: $desc" "$TPL_SAVE"; #add toolchain template description line
((i+=1)); sed -i "${i}i #toolchain template version: $version" "$TPL_SAVE"; #add toolchain template version property
[ -n "$cflags" ] && ((i+=1)) && sed -i "${i}i #toolchain template cflags: $cflags" "$TPL_SAVE"; #add toolchain template cflags property
((i+=1)); sed -i "${i}i #toolchain template updated: $(date -r "$TPL_SAVE" "+%F %T")" "$TPL_SAVE"; #add toolchain template updated property
[ "$TPL_SAVE" != "$cttpldir/$tpl" ] && copyof="$tpl";
[ -n "$copyof" ] && sed -i "4i #toolchain template copyof: $copyof" "$TPL_SAVE"; #add toolchain template copyof property
[ -n "$copyof" ] && ((i+=1)) && sed -i "${i}i #toolchain template copyof: $copyof" "$TPL_SAVE"; #add toolchain template copyof property
fi;
) 2>&1;
};
_ctng_setup(){
_sz; # Prepare DIALOG settings
logfile="$ldir/$(date +%F.%H%M%S)_tup_ctng_setup.log";
unset setuptasks;
(
@ -635,6 +680,7 @@ _ctng_setup(){
) | tee "$logfile" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_ctng_setup_title} crosstool-NG ]- " "$pb_" "$_lines" "$_cols";
};
_fng_setup(){
_sz; # Prepare DIALOG settings
logfile="$ldir/$(date +%F.%H%M%S)_tup_fng_setup.log";
unset setuptasks;
(
@ -663,6 +709,34 @@ _fng_setup(){
fi;
) | tee "$logfile" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_fng_setup_title} Freetz-NG ]- " "$pb_" "$_lines" "$_cols";
};
_andk_setup(){
_sz; # Prepare DIALOG settings
logfile="$ldir/$(date +%F.%H%M%S)_tup_andk_setup.log";
unset setuptasks;
(
bcl=$(printf '%s\n' "${ANDK_SETUP_tasks[@]}");
sp=$(printf '%*s' 80 | tr ' ' '=')
echo -e "$pdesc - ${txt_s3tup_msg_andk_setup_log} - $(date +"%F %T")";
echo -e "$sp\n${txt_s3tup_msg_andk_setup_commandlist} Android-NDK:\n$sp\ncd "$andksrcdir"\n$(_replace_tokens "$bcl")\n$sp";
sleep 2;
if [ $1 -eq 1 ];then
# setup Android-NDK wc
echo "${txt_s3tup_msg_andk_setup_cleanup} "$andksrcdir/"..."
rm -rf "$andksrcdir" 2>/dev/null;
cd "$ctdir";
#generate setup command list
for task in "${ANDK_SETUP_tasks[@]}";do
task=$(_replace_tokens "$task"); #replace tokens
setuptasks+=("$task");
done
( eval "${setuptasks[@]}" ) 2>&1;
else
echo -e "$CTNG_ROOT_BUILD_ERROR$CTNG_ROOT_BUILD_CMD";
sleep 5;
fi;
) | tee "$logfile" | "$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--title" " -[ ${txt_s3tup_menu_andk_setup_title} Android-NDK ]- " "$pb_" "$_lines" "$_cols";
};
_dl(){
[ -d "$dldir/#tmp" ] && rm --recursive --force "$dldir/#tmp"
mkdir --parents "$dldir/#tmp";
@ -732,15 +806,21 @@ _extract(){
_replace_tokens(){
echo -e "$1" | sed -e "s#@TOOLCHAIN@#$tcdir/$tc#g; \
s#@TEMPLATE@#$cttpldir/$tpl#g; \
s#@TYPE@#$type#g; \
s#@ARCH@#$arch#g; \
s#@BITNESS@#$bitness#g; \
s#@API@#$api#g; \
s#@SSL_TARGET@#$ssl_target#g; \
s#@CFLAGS@#$cflags#g; \
s#@CPUS@#$cpus#g; \
s#@CC@#$compilername#g; \
s#@RANLIB@#$ranlibname#g; \
s#@PREFIX@#$prefixdir#g; \
s#@HOST@#$hostname#g; \
s#@CTNGSOURCE@#$ctngsrcdir#g; \
s#@FNGSOURCE@#$fngsrcdir#g; \
s#@ANDKSOURCE@#$andksrcdir#g; \
s#@VALIDATE@#_check_lib#g; \
s#@COMPRESS@#_compress#g; \
s#@CREATECFG@#_create_toolchaincfg#g; \
s#@LOGFILE@#$logfile#g";
};
_tidy_tasks(){
@ -752,7 +832,8 @@ _tidy_tasks(){
s#"\'\)\;"##g;";
};
_get_toolchain_properties(){
local tc="$1" props;
local tc="$1" props tc_type;
unset _target;
#load toolchain config
[ -f "$tccfgdir/$tc" ] && source "$tccfgdir/$tc";
@ -761,11 +842,13 @@ _get_toolchain_properties(){
cd "$tcdir/$tc/bin"
#autodetect toolchain's properties
compilername="$_compiler""gcc";compilername=$(realpath -s $compilername);
ranlibname="$_compiler""ranlib";ranlibname=$(realpath -s $ranlibname);
hostname="${_compiler%?}";
tc_type="$(_get_toolchain_date "$tc" | awk -F'.' '{print $1}' | xargs)";
compilername="${_compiler}gcc";compilername=$(realpath -s $compilername);
ranlibname="${_compiler}ranlib";ranlibname=$(realpath -s $ranlibname);
[ "$tc_type" == "android-ndk" ] && hostname="${_compiler%?}" || hostname="$("$compilername" -dumpmachine 2>/dev/null)";
includedir=$(realpath -s $(echo | "$compilername" -Wp,-v -xc - -fsyntax-only 2>&1 | grep include$ | tail -n 1 | xargs))
sysrootdir="$(realpath -sm "$("$compilername" -print-sysroot 2>/dev/null)" 2>/dev/null)";
sysrootdir="$("$compilername" -print-sysroot 2>/dev/null)";[ -z "$sysrootdir" ] && sysrootdir="$tcdir/$tc/$_sysroot";
sysrootdir="$(realpath -sm "$sysrootdir")";
if [ "${#sysrootdir}" -gt "${#tcdir}" ];then
[ -d "$sysrootdir/include" ] && cd "$sysrootdir"
@ -777,7 +860,22 @@ _get_toolchain_properties(){
pkgconfigdir="$(_get_toolchain_pkgconfig "$prefixdir")";
props="$compilername;$ranlibname;$includedir;$sysrootdir;$prefixdir;$pkgconfigdir;$hostname"
#get specific properties from .config
if [ -f "$tcdir/$tc/.config" ];then
cflags=$(_get_template_properties "$tcdir/$tc/.config" | awk -F'^' '{print $3}' | xargs);
fi;
#get android specific properties from .config
if [ -f "$tcdir/$tc/.config" -a "$tc_type" == "android-ndk" ];then
arch=$(grep '^ANDK_ARCH=' "$tcdir/$tc/.config" | awk -F'"' '{print $2}' | xargs);
bitness=$(grep '^ANDK_ARCH_BITNESS=' "$tcdir/$tc/.config" | awk -F'"' '{print $2}' | xargs);
api=$(grep '^ANDK_API=' "$tcdir/$tc/.config" | awk -F'"' '{print $2}' | xargs);
ssl_target=$(grep '^ANDK_SSL_TARGET=' "$tcdir/$tc/.config" | awk -F'"' '{print $2}' | xargs);
else
arch=""; bitness=""; api="";
fi;
props="$compilername;$ranlibname;$includedir;$sysrootdir;$prefixdir;$pkgconfigdir;$hostname;$tc_type;$arch;$bitness;$api;$ssl_target;$cflags"
echo "$props" | xargs;
[ -n "$props" ] && exit 0 || exit 1;
};
@ -822,16 +920,25 @@ _get_toolchain_libs(){
echo "${libs%?}" | xargs;
[ -n "$libs" ] && exit 0 || exit 1;
};
_get_toolchain_date(){
local tc_date="built-in";
[ -f "$tcdir/$1/build.log.bz2" ] && tc_date="ct-ng.$(date -r "$tcdir/$1/build.log.bz2" "+%F %T")";
[ -f "$tcdir/$1/freetz-ng.log.bz2" ] && tc_date="freetz-ng.$(date -r "$tcdir/$1/freetz-ng.log.bz2" "+%F %T")";
[ -f "$tcdir/$1/android-ndk.log.bz2" ] && tc_date="android-ndk.$(date -r "$tcdir/$1/android-ndk.log.bz2" "+%F %T")";
echo "$tc_date";
};
_get_template_properties(){
desc="";
if [ -f "$1" ];then
if [ -z "$2" ];then
desc="$(awk -F': ' '/^#toolchain template:./{print $NF}' "$1" | xargs)";
version="$(awk -F': ' '/^#toolchain template version:./{print $NF}' "$1" | xargs)";
cflags="$(awk -F': ' '/^#toolchain template cflags:./{print $NF}' "$1" | xargs)";
migrate="$(awk -F': ' '/^#toolchain template migrate:./{print $NF}' "$1" | xargs)";
updated="$(awk -F': ' '/^#toolchain template updated:./{print $NF}' "$1" | xargs)";
copyof="$(awk -F': ' '/^#toolchain template copyof:./{print $NF}' "$1" | xargs)";
[ -n "$version" ] && props="^$version" || props="^0";
[ -n "$version" ] && props="^$version" || props="^0";
[ -n "$cflags" ] && props+="^$cflags" || props+="^";
[ -n "$migrate" ] && props+="^$migrate" || props+="^";
[ -n "$updated" ] && props+="^$updated" || props+="^";
[ -n "$copyof" ] && props+="^$copyof" || props+="^";
@ -840,53 +947,68 @@ _get_template_properties(){
fi;
[ -z "$desc" ] && desc="${txt_s3tup_msg_gtp_missing}";
#extract template properties
if [ $(_get_template_type "$1") == "CTNG" ];then
arch=$(grep '^CT_ARCH=' "$1" | awk -F'"' '{print $2}');
[ $(grep -i '^CT_ARCH_LE=y' "$1") ] && endianness="LE";
[ $(grep -i '^CT_ARCH_BE=y' "$1") ] && endianness="BE";
[ $(grep -i '^CT_ARCH_LE_BE=y' "$1") ] && endianness="LE+BE";
[ $(grep -i '^CT_ARCH_BE_LE=y' "$1") ] && endianness="BE+LE";
bitness=$(grep '^CT_ARCH_BITNESS=' "$1" | awk -F'=' '{print $2}');
[ "$arch" == "arm" ] && [ "$bitness" == "64" ] && arch="aarch64";
cpu=$(grep '^CT_ARCH_CPU=' "$1" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
[ -z "$cpu" ] && cpu=$(grep -i "^CT_ARCH_${arch}_VARIANT=" "$1" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
aarch=$(grep '^CT_ARCH_ARCH=' "$1" | awk -F'"' '{print $2}') && [ -n "$aarch" ] && aarch=" $aarch";
cc=$(grep '^CT_CC=' "$1" | awk -F'"' '{print $2}');
ccv=$(grep -i "CT_${cc}_VERSION=" "$1" | awk -F'"' '{print $2}');
libc=$(grep '^CT_LIBC=' "$1" | awk -F'"' '{print $2}');
libcu=$(grep -i "^CT_${libc}_USE=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcu" ] && libcv=$(grep -i "CT_${libcu}_VERSION=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcu" ] && libcmv=$(grep -i "CT_${libcu}_OLDEST_ABI=" "$1" | awk -F'"' '{print $2}');
[ -z "$libcu" ] && libcv=$(grep -i "CT_${libc}_VERSION=" "$1" | awk -F'"' '{print $2}');
[ -z "$libcu" ] && libcmv=$(grep -i "CT_${libc}_OLDEST_ABI=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcmv" ] && libcmv="${libcmv}-"
kernel=$(grep '^CT_KERNEL=' "$1" | awk -F'"' '{print $2}');
kernelv=$(grep -i "CT_${kernel}_VERSION=" "$1" | awk -F'"' '{print $2}');
elif [ $(_get_template_type "$1") == "FNG" ];then
if [ -d "$fngsrcdir" ];then
cp "$1" "$fngsrcdir/.config";
cd "$fngsrcdir";
[[ ! $(umask) == 0022 ]] && umask 0022;
make olddefconfig >/dev/null 2>&1;
arch=$(grep '^FREETZ_TARGET_ARCH=' ".config" | awk -F'"' '{print $2}');
cpu=$(grep '^FREETZ_GCC_ARCH=' ".config" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
bitness=$(grep '^FREETZ_GCC_ABI=' ".config" | awk -F'"' '{print $2}') && [ -z "${num##*[!0-9]*}" ] && bitness="32";
[ $(grep -i '^FREETZ_TARGET_ARCH_BE=y' ".config") ] && endianness="BE" || endianness="LE";
[ $(grep -i '^FREETZ_LIB_libuClibc=y' ".config") ] && libc="uClibc";
[ $(grep -i '^FREETZ_LIB_libglibc=y' ".config") ] && libc="glibc";
[ $(grep -i '^FREETZ_LIB_libumusl=y' ".config") ] && libc="musl";
libcv=$(grep -i "^FREETZ_TARGET_${libc}_VERSION=" ".config" | awk -F'"' '{print $2}');
[ $(grep -i '^FREETZ_TARGET_GCC_[0-9]=y' ".config") ] && cc="gcc";
ccv=$(grep -i "^FREETZ_TARGET_${cc}_MAJOR_VERSION=" ".config" | awk -F'"' '{print $2}').$(grep -i "^FREETZ_TARGET_${cc}_MINOR_VERSION=" ".config" | awk -F'"' '{print $2}');
kernel='linux';
kernelv=$(grep -i "^FREETZ_KERNEL_VERSION=" ".config" | awk -F'"' '{print $2}');
rm -f "$fngsrcdir/.config";
else
setup=0;
desc="$desc (${txt_s3tup_msg_gtp_info})";
fi;
fi;
#extract template properties based on template type
tpl_type="$(_get_template_type "$1" | awk -F';' '{print $1}' | xargs)";
case "$tpl_type" in
"CTNG")
arch=$(grep '^CT_ARCH=' "$1" | awk -F'"' '{print $2}');
[ $(grep -i '^CT_ARCH_LE=y' "$1") ] && endianness="LE";
[ $(grep -i '^CT_ARCH_BE=y' "$1") ] && endianness="BE";
[ $(grep -i '^CT_ARCH_LE_BE=y' "$1") ] && endianness="LE+BE";
[ $(grep -i '^CT_ARCH_BE_LE=y' "$1") ] && endianness="BE+LE";
bitness=$(grep '^CT_ARCH_BITNESS=' "$1" | awk -F'=' '{print $2}');
[ "$arch" == "arm" ] && [ "$bitness" == "64" ] && arch="aarch64";
cpu=$(grep '^CT_ARCH_CPU=' "$1" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
[ -z "$cpu" ] && cpu=$(grep -i "^CT_ARCH_${arch}_VARIANT=" "$1" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
aarch=$(grep '^CT_ARCH_ARCH=' "$1" | awk -F'"' '{print $2}') && [ -n "$aarch" ] && aarch=" $aarch";
cc=$(grep '^CT_CC=' "$1" | awk -F'"' '{print $2}');
ccv=$(grep -i "CT_${cc}_VERSION=" "$1" | awk -F'"' '{print $2}');
libc=$(grep '^CT_LIBC=' "$1" | awk -F'"' '{print $2}');
libcu=$(grep -i "^CT_${libc}_USE=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcu" ] && libcv=$(grep -i "CT_${libcu}_VERSION=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcu" ] && libcmv=$(grep -i "CT_${libcu}_OLDEST_ABI=" "$1" | awk -F'"' '{print $2}');
[ -z "$libcu" ] && libcv=$(grep -i "CT_${libc}_VERSION=" "$1" | awk -F'"' '{print $2}');
[ -z "$libcu" ] && libcmv=$(grep -i "CT_${libc}_OLDEST_ABI=" "$1" | awk -F'"' '{print $2}');
[ -n "$libcmv" ] && libcmv="${libcmv}-"
kernel=$(grep '^CT_KERNEL=' "$1" | awk -F'"' '{print $2}');
kernelv=$(grep -i "CT_${kernel}_VERSION=" "$1" | awk -F'"' '{print $2}');;
"FNG")
if [ -d "$fngsrcdir" ];then
cp "$1" "$fngsrcdir/.config";
cd "$fngsrcdir";
[[ ! $(umask) == 0022 ]] && umask 0022;
make olddefconfig >/dev/null 2>&1;
arch=$(grep '^FREETZ_TARGET_ARCH=' ".config" | awk -F'"' '{print $2}');
cpu=$(grep '^FREETZ_GCC_ARCH=' ".config" | awk -F'"' '{print $2}') && [ -n "$cpu" ] && cpu=" $cpu";
bitness=$(grep '^FREETZ_GCC_ABI=' ".config" | awk -F'"' '{print $2}') && [ -z "${num##*[!0-9]*}" ] && bitness="32";
[ $(grep -i '^FREETZ_TARGET_ARCH_BE=y' ".config") ] && endianness="BE" || endianness="LE";
[ $(grep -i '^FREETZ_LIB_libuClibc=y' ".config") ] && libc="uClibc";
[ $(grep -i '^FREETZ_LIB_libglibc=y' ".config") ] && libc="glibc";
[ $(grep -i '^FREETZ_LIB_libumusl=y' ".config") ] && libc="musl";
libcv=$(grep -i "^FREETZ_TARGET_${libc}_VERSION=" ".config" | awk -F'"' '{print $2}');
[ $(grep -i '^FREETZ_TARGET_GCC_[0-9]=y' ".config") ] && cc="gcc";
ccv=$(grep -i "^FREETZ_TARGET_${cc}_MAJOR_VERSION=" ".config" | awk -F'"' '{print $2}').$(grep -i "^FREETZ_TARGET_${cc}_MINOR_VERSION=" ".config" | awk -F'"' '{print $2}');
kernel='linux';
kernelv=$(grep -i "^FREETZ_KERNEL_VERSION=" ".config" | awk -F'"' '{print $2}');
rm -f "$fngsrcdir/.config";
else
setup=0;
desc="$desc (${txt_s3tup_msg_gtp_info})";
fi;;
"ANDK")
if [ -d "$andksrcdir" ];then
arch=$(grep '^ANDK_ARCH=' "$1" | awk -F'"' '{print $2}');
aarch=" $(grep '^ANDK_ABI=' "$1" | awk -F'"' '{print $2}')";
bitness=$(grep '^ANDK_ARCH_BITNESS=' "$1" | awk -F'"' '{print $2}');
endianness="LE";
libc="libc++" && libcv="API $(grep '^ANDK_API=' "$1" | awk -F'"' '{print $2}')";
cc="clang" && ccv=" $($andksrcdir/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -dumpversion)";
kernel="Linux" && kernelv="4.9.0";
else
setup=0;
desc="$desc (${txt_s3tup_msg_gtp_info})";
fi;;
esac;
#build template property string
[ -z $setup ] && desc="$desc ($arch$cpu$aarch $bitness-bit $endianness, $libc $libcmv$libcv, $cc $ccv, $kernel $kernelv)$props";
@ -896,9 +1018,11 @@ _get_template_properties(){
};
_get_template_type(){
if [ $(grep -c '^FREETZ_' "$1") -gt 0 ];then
echo "FNG";
echo "FNG;freetz-NG";
elif [ $(grep -c '^ANDK_' "$1") -gt 0 ];then
echo "ANDK;Android-NDK";
else
echo "CTNG";
echo "CTNG;crosstool-NG";
fi;
};
_compare_version(){
@ -950,10 +1074,10 @@ _check_lib(){
echo -e "\n${txt_s3tup_msg_check_library_info1}";
if [ "${#includedir}" -gt 0 ] && [ ! -d "$includedir/PCSC" ];then
headerdir="$(dirname $(find "$prefixdir" -type f -name "pcsclite.h" | head -n 1))";
[ "${#headerdir}" -gt 0 ] && ln -s "$(realpath --relative-to="$includedir" "$headerdir")" "$includedir/PCSC";
[ "${#headerdir}" -gt 0 ] && ln -frs "$headerdir" "$includedir/PCSC";
[ "${#headerdir}" -gt 0 ] && echo "$includedir/PCSC -> ${txt_s3tup_msg_check_library_info2a}" || "${txt_s3tup_msg_check_library_info2b} $prefixdir";
else
[ "${#includedir}" -gt 0 ] && echo "${txt_s3tup_msg_check_library_info3b} $includedir/PCSC" || echo "${txt_s3tup_msg_check_library_info3b}";
[ "${#includedir}" -gt 0 ] && echo "${txt_s3tup_msg_check_library_info3a} $includedir/PCSC" || echo "${txt_s3tup_msg_check_library_info3b}";
fi;;
*) echo "not implemented yet!";
esac;
@ -990,7 +1114,7 @@ _check_crosstool_setup(){
clear;
echo -e "${r_l}\nCHECK -> crosstool-NG ${txt_s3tup_msg_check_crosstool_setup_info}\n${re_}";
[ -z "$1" ] && _paktc_timer 5;
_ctng_setup "$CTNG_START_BUILD";
_ctng_setup "$CT_START_BUILD";
fi;
fi;
@ -1000,12 +1124,23 @@ _check_crosstool_setup(){
clear;
echo -e "${r_l}\nCHECK -> Freetz-NG ${txt_s3tup_msg_check_crosstool_setup_info}\n${re_}";
[ -z "$1" ] && _paktc_timer 5;
_fng_setup "$CTNG_START_BUILD";
_fng_setup "$CT_START_BUILD";
fi;
fi;
#Setup Android Native Development Kit automatically if not installed
if [ "$1" == "ANDK" ] || [ -z "$1" ];then
if [ ! -f "$andksrcdir/toolchains/llvm/prebuilt/linux-x86_64/AndroidVersion.txt" ];then
clear;
echo -e "${r_l}\nCHECK -> Android Native Development Kit ${txt_s3tup_msg_check_crosstool_setup_info}\n${re_}";
[ -z "$1" ] && _paktc_timer 5;
_andk_setup "$CT_START_BUILD";
fi;
fi;
};
_check_config(){
nok=0;
[ -z "${ANDK_REPO_URL+x}" ] && conf+="ANDK_REPO_URL\n" && nok=1;
[ -z "${LIBS_AUTO_INTEGRATE+x}" ] && conf+="LIBS_AUTO_INTEGRATE\n" && nok=1;
[ -z "${LIBS_LIST_BETA+x}" ] && conf+="LIBS_LIST_BETA\n" && nok=1;
[ -z "${FNG_REPO_URL+x}" ] && conf+="FNG_REPO_URL\n" && nok=1;
@ -1022,8 +1157,7 @@ _check_config(){
};
_change_config(){
nok=1;
ts="$(date +%F %T)";
[[ ! $2 =~ "(" ]] && [[ ! $string =~ ")" ]] && qte="\"" || qte=""; #no quotes if value contains parentheses
[[ ! $2 =~ "(" ]] && [[ ! $2 =~ ")" ]] && qte="\"" || qte=""; #no quotes if value contains parentheses
if ! grep -Eq "^$1=.*" "$configname";then
echo -e "${r_l}\nCHECK -> ${y_l}${1}${r_l} ${txt_s3tup_msg_change_config_error}\n${re_}";
@ -1032,176 +1166,47 @@ _change_config(){
echo -e "${r_l}\nCHECK -> Modifying ${y_l}tasks-variables${r_l} not implemented yet!\n${re_}";
_paktc_timer 10;
else
cp -f "$configname" "$configname.$(date +"%Y%m%d%H%M%S")"
sed -i "s#^$1=.*#$1=$qte$2$qte; \#changed on $ts via tcupdate commandline#g" "$configname";
[ -z "$3" ] && cp -f "$configname" "$configname.$(date +"%Y%m%d%H%M%S")"
[ -z "$3" ] && ts_comment=" #changed on $(date '+%F %T') via tcupdate commandline" || ts_comment="";
sed -i "s|^$1=.*|$1=$qte$2$qte;$ts_comment|g" "$configname";
result=$(grep -E "^$1=.*" "$configname" | awk '{printf $1}');
echo -e "${g_l}\nDONE -> ${txt_s3tup_msg_change_config_info} ${y_l}${result}\n${re_}";
_paktc_timer 5;
[ -z "$3" ] && echo -e "${g_l}\nDONE -> ${txt_s3tup_msg_change_config_info} ${y_l}${result}\n${re_}" && _paktc_timer 5;
nok=0;
fi;
return $nok;
};
_create_config(){
#check existing jq
if [ ! "$(which jq)" ];then
local lib libs prop props expr;
if [ ! -f "$configtemplate" ];then #check existing config template file
echo -e "${r_l}\nERROR -> ${txt_s3tup_msg_create_config_template_not_found}${re_}" && _paktc_timer 10;
return 1;
elif [ ! "$(which jq)" ];then #check existing jq
echo -e "${r_l}\nCHECK -> ${txt_s3tup_msg_create_config_jq_not_found}\n${y_l}apt install jq\n${re_}" && _paktc_timer 10;
return 1;
else #copy the config template file
cp -f "$configtemplate" "$configname"
fi;
ctng_config_tasks=( "('./ct-ng menuconfig;')"
"('TPL_SAVE=\$(\$gui --defaultno --output-fd 1 --ok-label \"\${txt_s3tup_menu_command_label_yes}\" --cancel-label \"\${txt_s3tup_menu_command_label_no}\" --colors \$bt_ \"\$title_ - \Z0\$pdesc\Zn\" --title \"-[ \${txt_s3tup_menu_edit_title} ]-\" --inputbox \"\\\n\${txt_s3tup_menu_edit_text}\" 10 55 \"@TEMPLATE@\") && cp \".config\" \"\$TPL_SAVE\";')" );
ctng_config_tasks_comment="#config command";
ctng_build_tasks=( "('./ct-ng show-config | tee -a \"@LOGFILE@\";')"
"('./ct-ng build;')" );
ctng_build_tasks_comment="#build command";
ctng_setup_tasks=( "('git clone --progress \"\$CTNG_REPO_URL\" \"@CTNGSOURCE@\";')"
"('./bootstrap;')"
"('./configure --enable-local;')"
"('make;')" );
ctng_setup_tasks_comment="#setup command";
fng_config_tasks=( "('make menuconfig;')"
"('TPL_SAVE=\$(\$gui --defaultno --output-fd 1 --ok-label \"\${txt_s3tup_menu_command_label_yes}\" --cancel-label \"\${txt_s3tup_menu_command_label_no}\" --colors \$bt_ \"\$title_ - \Z0\$pdesc\Zn\" --title \"-[ \${txt_s3tup_menu_edit_title} ]-\" --inputbox \"\\\n${txt_s3tup_menu_edit_text}\" 10 55 \"@TEMPLATE@\") && cp \".config\" \"\$TPL_SAVE\";')" );
fng_config_tasks_comment="#config command";
fng_build_tasks=( "('make olddefconfig | tee -a \"@LOGFILE@\";')"
"('make toolchain-dirclean | tee -a \"@LOGFILE@\";')"
"('make toolchain | tee -a \"@LOGFILE@\";')" );
fng_build_tasks_comment="#build command";
fng_setup_tasks=( "('git clone --progress \"\$FNG_REPO_URL\" \"@FNGSOURCE@\";')"
"('ln -s \"../../downloads\" \"@FNGSOURCE@/dl\";')" );
fng_setup_tasks_comment="#setup command";
lib_comments=( "#Enabled/Disabled (1|0)"
"#Prereleases Enabled/Disabled (1|0)"
"#Displayname"
"#Versionnumber"
"#Filename and optional version number to check in pkgconfig folder for an existing library to get version information"
"#Valid URL for downloading sources of library\n#List of build commands below. Pay attention to the SEMICOLON at the end of EACH\n#command and the correct quoting (' or \") for or to avoid expansion of variables.\n#Tokens @TOOLCHAIN@, @CC@, @RANLIB@, @PREFIX@, @HOST@, @VALIDATE@, @LOGFILE@ are replaced automatically."
"#build command" );
lib_settings=( "" "beta" "name" "version" "check" "url" "tasks" );
lib_keys=( "SAMPLE_LIB" "SSL_300" "SSL_111" "SSL_110" "SSL_102" "SSL_100" "SSL_098" "LIB_USB" "LIB_PCSC" "LIB_ZLIB" );
lib_betas=( "0" "1" "0" "0" "0" "0" "0" "0" "0" "0" );
lib_names=( "SampleLib" "OpenSSL" "OpenSSL" "OpenSSL" "OpenSSL" "OpenSSL" "OpenSSL" "libusb" "PCSC-Lite" "zlib" );
lib_versions=( "0.2.9sl"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("openssl-3.0.0\\S.*"))][0] | .name' | sed -e 's#openssl-##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_1[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_0[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_2[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_0[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_0_9_8[a-z].*"))][0] | .name' | sed -e 's#OpenSSL_##g; s#_#.#g; s#\"##g')"
"$(curl --silent "https://api.github.com/repos/libusb/libusb/releases/latest" | jq -r '.tag_name' | cut -c 2-)"
"$(curl --silent https://salsa.debian.org/api/v4/projects/19181/repository/tags | jq -r '.[0].name' | awk -F '[/-]' '{printf $2}')"
"$(curl --silent https://api.github.com/repos/madler/zlib/tags | jq -r '.[0].name' | cut -c 2-)" );
lib_checks=( "samplelib.pc" "openssl.pc" "openssl.pc" "openssl.pc" "openssl.pc" "openssl.pc" "openssl.pc" "libusb-1.0.pc" "libpcsclite.pc" "zlib.pc" );
lib_urls=( "https://sampleurl.com/archive.tar.bz"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("openssl-3.0.0\\S.*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_1[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_1_0[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=1&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_2[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_1_0_0[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/openssl/openssl/tags?page=2&per_page=100" | jq '[.[] | select(.name|test("OpenSSL_0_9_8[a-z].*"))][0] | .tarball_url' | sed -e 's#\"##g')"
"$(curl --silent "https://api.github.com/repos/libusb/libusb/releases/latest" | jq -r '.assets[1].browser_download_url')"
"$(echo 'https://salsa.debian.org/api/v4/projects/19181/repository/archive.tar.bz2?sha='$(curl --silent https://salsa.debian.org/api/v4/projects/19181/repository/tags | jq -r '.[0].commit.id'))"
"$(curl --silent https://api.github.com/repos/madler/zlib/tags | jq -r '.[0].tarball_url')" );
lib_tasks=( '( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ --host=@HOST@ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install SHLIB_VERSION_NUMBER=1.0.2 SHLIB_MINOR=0.2;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'[ \$(echo -e \"\$_tc_info\" | grep -ic \"musl\") -gt 0 ] && echo \"Apply the musl libc patch to avoid OpenSSL build errors due to missing termio.h...\" && curl --silent \"https://raw.githubusercontent.com/beagleboard/buildroot/master/package/openssl/openssl-004-musl-termios.patch\" | patch -p1;'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export RANLIB=@RANLIB@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'[ \$(echo -e \"\$_tc_info\" | grep -ic \"musl\") -gt 0 ] && echo \"Apply the musl libc patch to avoid OpenSSL build errors due to missing termio.h...\" && curl --silent \"https://raw.githubusercontent.com/beagleboard/buildroot/master/package/openssl/openssl-004-musl-termios.patch\" | patch -p1;'"'"')" "('"'"'./Configure --prefix=@PREFIX@/ linux-generic32 shared;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./configure --prefix=@PREFIX@/ --host=@HOST@ --disable-udev;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./configure --prefix=@PREFIX@/ --host=@HOST@ --disable-libudev --disable-libsystemd --with-systemdsystemunitdir=@PREFIX@/lib/systemd/system LIBUSB_LIBS=\"-L@PREFIX@/lib -lusb-1.0 -lrt\" LIBUSB_CFLAGS=\"-I@PREFIX@/include/libusb-1.0\";'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" "('"'"'@VALIDATE@ \"PCSC\";'"'"')" )'
'( "('"'"'export TOOLCHAIN=@TOOLCHAIN@;'"'"')" "('"'"'export CC=@CC@;'"'"')" "('"'"'export PATH=\"\$TOOLCHAIN/bin:\$PATH\";'"'"')" "('"'"'./configure --prefix=@PREFIX@/;'"'"')" "('"'"'make;'"'"')" "('"'"'make install;'"'"')" )' );
echo '#CROSS toolchain build settings' >"$configname";
echo 'CTNG_REPO_URL="https://github.com/crosstool-ng/crosstool-ng"; #Repository to load ct-ng from' >>"$configname";
echo 'CTNG_BUILD_AS_ROOT="0"; #Enabled/Disabled (1|0); You normally do *not* need to be root to build a toolchain using crosstool-NG. In fact, it is *VERY* dangerous to run as root, as crosstool-NG will, as part of the build process, remove a few directories. If anything goes wrong, running as root can ruin your host distribution.' >>"$configname";
echo '#List of build and setup commands below. Pay attention to the SEMICOLON at the end of EACH' >>"$configname";
echo '#command and the correct quoting ('"'"' or ") for or to avoid expansion of variables.' >>"$configname";
echo '#Tokens @CTNGSOURCE@, @LOGFILE@, @TEMPLATE@, @COMPRESS@, @CREATECFG@ are replaced automatically. The commands are executed in the context of the current user.' >>"$configname";
i=0;
for ct in "${ctng_config_tasks[@]}";
do
echo -e "CTNG_CONFIG_tasks"$([ "$i" -gt "0" ] && echo "+")"=$ct; $ctng_config_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
i=0;
for bt in "${ctng_build_tasks[@]}";
do
echo -e "CTNG_BUILD_tasks"$([ "$i" -gt "0" ] && echo "+")"=$bt; $ctng_build_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
i=0;
for st in "${ctng_setup_tasks[@]}";
do
echo -e "CTNG_SETUP_tasks"$([ "$i" -gt "0" ] && echo "+")"=$st; $ctng_setup_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
#get list of library keys from config template file
libs="$(awk -F'(' '/^LIBS=./{print $NF}' "$configname" | awk -F ')' '{printf $1}' | xargs)";
echo -e '\nFNG_REPO_URL="https://github.com/Freetz-NG/freetz-ng.git"; #Repository to load freetz-ng from' >>"$configname";
i=0;
for ct in "${fng_config_tasks[@]}";
do
echo -e "FNG_CONFIG_tasks"$([ "$i" -gt "0" ] && echo "+")"=$ct; $fng_config_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
i=0;
for bt in "${fng_build_tasks[@]}";
do
echo -e "FNG_BUILD_tasks"$([ "$i" -gt "0" ] && echo "+")"=$bt; $fng_build_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
i=0;
for st in "${fng_setup_tasks[@]}";
#update dynamic library properties in configfile
props='version check url';
for lib in $libs;
do
echo -e "FNG_SETUP_tasks"$([ "$i" -gt "0" ] && echo "+")"=$st; $fng_setup_tasks_comment$(($i+1))" >>"$configname";
((i++));
done;
echo -e '\n#LIBRARY update build settings\n#List of ordered libraries. Only libraries in this list are available' >>"$configname";
echo "LIBS=(${lib_keys[@]});" >>"$configname";
echo 'LIBS_LIST_BETA="0"; #In(Ex)clude libraries defined as beta' >>"$configname";
echo 'LIBS_AUTO_INTEGRATE="1"; #Automatically integrate libraries into toolchains' >>"$configname";
i=0;
for key in "${lib_keys[@]}";
do
for setting in "${lib_settings[@]}";
for prop in $props;
do
case "$setting" in
"") if [ -z $setting ];then
echo -e "\n#${lib_names[$i]} ${lib_versions[$i]}" >>"$configname";
fi;
echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"$([ "$key" == "SAMPLE_LIB" ] && echo '0' || echo '1')\";$([ "$i" -eq "0" ] && echo " ${lib_comments[0]}")" >>"$configname";;
"beta") echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"${lib_betas[$i]}\";$([ "$i" -eq "0" ] && echo " ${lib_comments[1]}")" >>"$configname";;
"name") echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"${lib_names[$i]}\";$([ "$i" -eq "0" ] && echo " ${lib_comments[2]}")" >>"$configname";;
"version") echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"${lib_versions[$i]}\";$([ "$i" -eq "0" ] && echo " ${lib_comments[3]}")" >>"$configname";;
"check") [ $(echo -e "$key" | grep -c "SSL_\|SAMPLE_") -gt 0 ] && chk="$(echo -e "${lib_checks[$i]} $(echo ${lib_versions[$i]} | sed 's/\([0-9.]*\).*/\1/g')")" || chk="${lib_checks[$i]}";
echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"$chk\";$([ "$i" -eq "0" ] && echo " ${lib_comments[4]}")" >>"$configname";;
"url") echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting""=\"${lib_urls[$i]}\";$([ "$i" -eq "0" ] && echo " ${lib_comments[5]}")" >>"$configname";;
"tasks") unset tasks;j=0;
declare -a tasks="${lib_tasks[$i]}"
for t in "${tasks[@]}";
do
echo -e "$key"$([ ! -z "$setting" ] && echo "_")"$setting"$([ "$j" -gt "0" ] && echo "+")"=$t;$([ "$i" -eq "0" ] && echo " ${lib_comments[6]}$(($j+1))")" >>"$configname";
((j++));
done;;
esac;
prop="${lib}_${prop}"; expr="$(grep "^${prop}=" "$configname")"; eval "$expr";
_change_config "$prop" "${!prop}" "1";
done;
((i++))
done;
return 0;
};
_create_toolchaincfg(){
cd "$1/bin";
compilername="$3""-gcc";compilername=$(realpath -s $compilername);
compilername="${3}-gcc";compilername=$(realpath -s $compilername);
sr=$("$compilername" -print-sysroot 2>/dev/null);
sr=$(realpath -sm "$sr" 2>/dev/null);
if [ "${#sr}" -eq 0 ];then
@ -1209,9 +1214,15 @@ _create_toolchaincfg(){
else
sysroot="${sr#"$1/"}";
fi;
[ "${13}" == "ANDK" ] && andk_vars='_oscamconfdir_custom="/data/plugin/oscam";
_androidndkdir="1";
stapi_lib_custom="libwi.a";
stapi_allowed="1";' || andk_vars='_oscamconfdir_custom="";';
[ "${#5}" -gt 0 ] && lsd="$5" || lsd="/usr/lib";
[ "${#7}" -gt 0 ] && info="$7" || info="$(echo -e "\\\n
!!! crosstool-NG Toolchain !!!\\\n
!!! ${10} Toolchain !!!\\\n
\\\n
$(echo "$6" | awk -F'[()]' '{print $1}' | xargs)\\\n
$(echo "$6" | awk -F'[()]' '{print $2}' | xargs)\\\n")";
@ -1220,9 +1231,11 @@ $(echo "$6" | awk -F'[()]' '{print $2}' | xargs)\\\n")";
cat << EOF > $2
_toolchainname="$2";
default_use="USE_UTF8 USE_LIBCRYPTO";
extra_use="${11}";
extra_cc="${12}";
_description="$(echo "$6" | awk -F'[()]' '{print $1}' | xargs)";
_oscamconfdir_default="/etc/tuxbox/config";
_oscamconfdir_custom="";
$andk_vars
_self_build="$([ ! "$9" == "yes" ] && echo "no" || echo "$9")";
_compiler="$3-";
_sysroot="$sysroot";

25
support/translation/bg

@ -106,6 +106,18 @@ txt_upload_cam1="ssh профила не съществува";
txt_upload_cam2="ssh профил е открит";
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -154,20 +166,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

29
support/translation/de

@ -122,6 +122,18 @@ txt_upload_cam1="ssh $txt_profile existiert nicht"
txt_upload_cam2="ssh $txt_profile gefunden"
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Beenden"
txt_s3tup_menu_command_label_back="Zurück"
txt_s3tup_menu_command_label_create="Erstellen"
txt_s3tup_menu_command_label_update="Aktualisieren"
txt_s3tup_menu_command_label_backup="Sichern"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Bearbeiten"
txt_s3tup_menu_command_label_yes="Ja"
txt_s3tup_menu_command_label_no="Nein"
txt_s3tup_msg_syscheck1="Bitte warten während die Abhängigkeiten überprüft werden..."
txt_s3tup_msg_syscheck2="Um dieses Plugin ordnungsgemäß verwenden zu können, müssen folgende Pakete manuell installiert werden:"
txt_s3tup_msg_reset_config1="Verschiebe vorhandene Konfigurationsdatei..."
@ -153,8 +165,8 @@ txt_s3tup_msg_fng_setup_commandlist="Befehlszeilen zur Installation von"
txt_s3tup_msg_fng_setup_cleanup="Bereinigung des Verzeichnisses"
txt_s3tup_msg_extract_file_unreadable="Datei ist nicht lesbar:"
txt_s3tup_msg_extract_extension_unknown="Unbekannte Dateierweiterung:"
txt_s3tup_msg_extract_gtp_missing="Beschreibung fehlt"
txt_s3tup_msg_extract_gtp_info="\Zr<${txt_s3tup_menu_command_label_setup}>\ZR ausführen, um Details anzuzeigen"
txt_s3tup_msg_gtp_missing="Beschreibung fehlt"
txt_s3tup_msg_gtp_info="\Zr<${txt_s3tup_menu_command_label_setup}>\ZR ausführen, um Details anzuzeigen"
txt_s3tup_msg_paktc="Drücken Sie eine beliebige Taste, um fortzufahren"
txt_s3tup_msg_check_toolchain_empty="Parameter${w_l} ${txt_tc} nicht gesetzt!"
txt_s3tup_msg_check_toolchain_not_supported="${txt_tc} ${txt_lib} Aktualisierung nicht unterstützt!"
@ -170,20 +182,9 @@ txt_s3tup_msg_check_config_info1="Die Konfigurationsdatei scheint veraltet zu se
txt_s3tup_msg_check_config_info2="Bitte starten Sie s3 wie folgt, um eine aktualisierte Konfigurationsdatei zu erstellen:"
txt_s3tup_msg_change_config_error="Variable wurde nicht in der Konfigurationsdatei gefunden!"
txt_s3tup_msg_change_config_info="Variable geändert in:"
txt_s3tup_msg_create_config_template_not_found="${txt_tpl} für die Konfigurationsdatei wurde nicht gefunden. Bitte simplebuild 3 erneut auschecken!"
txt_s3tup_msg_create_config_jq_not_found="Ohne das Paket 'jq' ist eine automatische Erstellung der Konfigurationsdatei nicht möglich. Bitte installieren Sie es manuell:"
txt_s3tup_menu_command_label_exit="Beenden"
txt_s3tup_menu_command_label_back="Zurück"
txt_s3tup_menu_command_label_create="Erstellen"
txt_s3tup_menu_command_label_update="Aktualisieren"
txt_s3tup_menu_command_label_backup="Sichern"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Bearbeiten"
txt_s3tup_menu_command_label_yes="Ja"
txt_s3tup_menu_command_label_no="Nein"
txt_s3tup_menu_toolchain_title="${txt_tc} Menü"
txt_s3tup_menu_toolchain_text1="Wählen Sie eine der"
txt_s3tup_menu_toolchain_text2="installierten Cross-${txt_tc}s aus, die Sie aktualisieren möchten:"

35
support/translation/en

@ -113,6 +113,18 @@ txt_upload_cam1="ssh profile doesn't exist"
txt_upload_cam2="ssh profile found"
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -139,9 +151,12 @@ txt_s3tup_msg_build_library_error="ERRORS on build found, details:"
txt_s3tup_msg_ctng_setup_log="installing crosstool-NG log"
txt_s3tup_msg_ctng_setup_commandlist="build command list for"
txt_s3tup_msg_ctng_setup_cleanup="Cleanup source directory"
txt_s3tup_msg_fng_setup_log="installing freetz-ng log"
txt_s3tup_msg_fng_setup_commandlist="build command list for"
txt_s3tup_msg_fng_setup_cleanup="Cleanup source directory"
txt_s3tup_msg_fng_setup_log="installing freetz-NG log"
txt_s3tup_msg_fng_setup_commandlist="${txt_s3tup_msg_ctng_setup_commandlist}"
txt_s3tup_msg_fng_setup_cleanup="${txt_s3tup_msg_ctng_setup_cleanup}"
txt_s3tup_msg_andk_setup_log="installing Android NDK log"
txt_s3tup_msg_andk_setup_commandlist="${txt_s3tup_msg_ctng_setup_commandlist}"
txt_s3tup_msg_andk_setup_cleanup="${txt_s3tup_msg_ctng_setup_cleanup}"
txt_s3tup_msg_extract_file_unreadable="file is unreadable:"
txt_s3tup_msg_extract_extension_unknown="unrecognized file extension:"
txt_s3tup_msg_gtp_missing="missing description"
@ -161,20 +176,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc,,}s that you want to update:"
@ -210,5 +214,6 @@ txt_s3tup_menu_backup_title="$txt_s3tup_menu_command_label_backup"
txt_s3tup_menu_build_library_title="Build"
txt_s3tup_menu_ctng_setup_title="$txt_s3tup_menu_command_label_setup"
txt_s3tup_menu_fng_setup_title="$txt_s3tup_menu_command_label_setup"
txt_s3tup_menu_andk_setup_title="$txt_s3tup_menu_command_label_setup"
txt_s3tup_menu_download_title="Downloading"
txt_s3tup_menu_compress_title="Compress cross ${txt_tc,,}"

25
support/translation/es

@ -101,6 +101,18 @@ txt_upload_cam1="perfil ssh no existente";
txt_upload_cam2="perfil ssh encontrado";
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -149,20 +161,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

25
support/translation/fr

@ -153,6 +153,18 @@ txt_options_title="Editeur de Configuration";
txt_disksvn="révision locale est maintenant "
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -201,20 +213,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

25
support/translation/it

@ -180,6 +180,18 @@ txt_bmenus_profile="Salva profilo $txt_profiles $txt_save"
txt_compress3="filesize reduced to "
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -228,20 +240,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

25
support/translation/nl

@ -116,6 +116,18 @@ txt_upload_cam1="ssh $txt_profile bestaat niet";
txt_upload_cam2="ssh $txt_profiles gevonden";
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -164,20 +176,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

25
support/translation/pl

@ -116,6 +116,18 @@ txt_upload_cam1="SSH profil nie istnieje";
txt_upload_cam2="SSH profil znaleziony";
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -164,20 +176,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

25
support/translation/pt

@ -153,6 +153,18 @@ txt_options_title="Editor de Configuracoes";
txt_disksvn="revisao local esta agora "
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_msg_syscheck1="Please wait while performing checks of required tools and dependencies..."
txt_s3tup_msg_syscheck2="You need to manually install the following packages to use this plugin properly:"
txt_s3tup_msg_reset_config1="Moving existing config file..."
@ -201,20 +213,9 @@ txt_s3tup_msg_check_config_info1="Your config file seems to be outdated. The fol
txt_s3tup_msg_check_config_info2="Please restart s3 as follows to recreate an updated config file:"
txt_s3tup_msg_change_config_error="variable does not exist in the configuration file!"
txt_s3tup_msg_change_config_info="Variable changed to:"
txt_s3tup_msg_create_config_template_not_found="Template file not found. Please make a clean checkout of simplebuild 3!"
txt_s3tup_msg_create_config_jq_not_found="Without the package 'jq' automatic config file generation is not possible. Please install it first:"
txt_s3tup_menu_command_label_exit="Exit"
txt_s3tup_menu_command_label_back="Back"
txt_s3tup_menu_command_label_create="Create"
txt_s3tup_menu_command_label_update="Update"
txt_s3tup_menu_command_label_backup="Backup"
txt_s3tup_menu_command_label_start="Start"
txt_s3tup_menu_command_label_info="Info"
txt_s3tup_menu_command_label_setup="Setup"
txt_s3tup_menu_command_label_edit="Edit"
txt_s3tup_menu_command_label_yes="Yes"
txt_s3tup_menu_command_label_no="No"
txt_s3tup_menu_toolchain_title="${txt_tc} Menu"
txt_s3tup_menu_toolchain_text1="Select one of the"
txt_s3tup_menu_toolchain_text2="installed cross ${txt_tc}s that you want to update:"

29
support/translation/tr

@ -119,6 +119,18 @@ txt_upload_cam1="ssh profili mevcut değil ";
txt_upload_cam2="ssh profili bulundu";
# _plugin_update_toolchain #############################################
txt_s3tup_menu_command_label_exit="Ayrılmak"
txt_s3tup_menu_command_label_back="Geri"
txt_s3tup_menu_command_label_create="Üretmek"
txt_s3tup_menu_command_label_update="Güncellemek için"
txt_s3tup_menu_command_label_backup="Kaydet"
txt_s3tup_menu_command_label_start="Başla"
txt_s3tup_menu_command_label_info="Bilgi"
txt_s3tup_menu_command_label_setup="Kurmak"
txt_s3tup_menu_command_label_edit="Düzenlemek için"
txt_s3tup_menu_command_label_yes="evet"
txt_s3tup_menu_command_label_no="hayir"
txt_s3tup_msg_syscheck1="baglanti uygulana kadar lütfen bekleyiniz ..."
txt_s3tup_msg_syscheck2="bu plugini düzgün kullanmak için,aşağıdaki paketlerin manuel olarak yüklenmesi gerekir:"
txt_s3tup_msg_reset_config1="Hareket Yapılandırma dosyası..."
@ -150,8 +162,8 @@ txt_s3tup_msg_fng_setup_commandlist="kurulum"
txt_s3tup_msg_fng_setup_cleanup="dosya temizleniyor "
txt_s3tup_msg_extract_file_unreadable="dosya okunamıyor:"
txt_s3tup_msg_extract_extension_unknown="bilinmeyen dosya hatası oluştu:"
txt_s3tup_msg_extract_gtp_missing="açıklama eksik"
txt_s3tup_msg_extract_gtp_info="\Zr<${txt_s3tup_menu_command_label_setup}>\ZR yönlendirmek icin, Detayları göster"
txt_s3tup_msg_gtp_missing="açıklama eksik"
txt_s3tup_msg_gtp_info="\Zr<${txt_s3tup_menu_command_label_setup}>\ZR yönlendirmek icin, Detayları göster"
txt_s3tup_msg_paktc="Devam etmek için herhangi bir tuşa basın"
txt_s3tup_msg_check_toolchain_empty="Parameter${w_l} ${txt_tc} ayarlanmadı!"
txt_s3tup_msg_check_toolchain_not_supported="${txt_tc} ${txt_lib} Güncelleme desteklenmiyor!"
@ -167,20 +179,9 @@ txt_s3tup_msg_check_config_info1="Yapılandırma dosyası güncel değil. Aşağ
txt_s3tup_msg_check_config_info2="lütfen başlat s3 güncellenmiş almak için aşağıdaki gibi yapılandırma dosyası oluştur:"
txt_s3tup_msg_change_config_error="Variable yapılandırma dosyasında bulunamadı!"
txt_s3tup_msg_change_config_info="Variable değişti:"
txt_s3tup_msg_create_config_template_not_found="${txt_tpl} dosyası bulunamadı. Lütfen simplebuild 3'te temiz bir ödeme yapın!"
txt_s3tup_msg_create_config_jq_not_found="bu paket olmadi sürece 'jq' yapılandırma dosyasının otomatik olarak oluşturulması mümkün değildir. Lütfen manuel olarak kurun:"
txt_s3tup_menu_command_label_exit="Ayrılmak"
txt_s3tup_menu_command_label_back="Geri"
txt_s3tup_menu_command_label_create="Üretmek"
txt_s3tup_menu_command_label_update="Güncellemek için"
txt_s3tup_menu_command_label_backup="Kaydet"
txt_s3tup_menu_command_label_start="Başla"
txt_s3tup_menu_command_label_info="Bilgi"
txt_s3tup_menu_command_label_setup="Kurmak"
txt_s3tup_menu_command_label_edit="Düzenlemek için"
txt_s3tup_menu_command_label_yes="evet"
txt_s3tup_menu_command_label_no="hayir"
txt_s3tup_menu_toolchain_title="${txt_tc} Menü"
txt_s3tup_menu_toolchain_text1="Şunlardan birini seçin"
txt_s3tup_menu_toolchain_text2="Kurulmuş Cross-${txt_tc}s bu, güncellemek istiyorsun:"

Loading…
Cancel
Save