Skip to content

Toolchain Update Plugin (s3.TUP)

WXbet edited this page Nov 26, 2023 · 115 revisions

HOME » Documentation » Plugins » Toolchain Update Plugin (s3.TUP)

This page refers to version 0.24.x of the Toolchain Update Plugin (s3.TUP).

Click here for the corresponding documentation for version 0.23.x
Click here for the corresponding documentation for version 0.22.x
Click here for the corresponding documentation for version 0.21.x
Click here for the corresponding documentation for version 0.20.x
Click here for the corresponding documentation for version 0.16.x
Click here for the corresponding documentation for version 0.15.x
Click here for the corresponding documentation for version 0.14.x
Click here for the corresponding documentation for version 0.13.x
Click here for the corresponding documentation for version 0.12.x
Click here for the corresponding documentation for version 0.11.x

Purpose and functionality

  • Install or update libraries such as OpenSSL, libusb, PCSC-Lite, zlib etc. in cross toolchains from simplebuild3 (extendable via flexible configuration file)
  • Copy, duplicate and backup of cross toolchains
  • Creation of new cross toolchains based on crosstool-NG, Freetz-NG, Android NDK

Prerequisites

The following (ubuntu) packages are installed automatically when the plugin is started: autoconf automake bison bzip2 curl flex g++ gawk gcc git gperf help2man jq libtool libtool-bin make patch python3-dev rsync texinfo unzip wget xz-utils file diffutils imagemagick inkscape pkg-config python gettext ruby libncurses-dev libacl1-dev libcap-dev libreadline-dev libglib2.0-dev libstdc++6

Localization

Since version 0.16.0 the plugin use the s3 integrated localization support. The translation status is shown below ( Translators are very welcome):

Language Status
Bulgarian (bg) 85%
German (de) 100%
English (en) 100%
Spanish (es) 95%
French (fr) 100%
Italian (it) 95%
Dutch (nl) 0%
Polish (pl) 0%
Portuguese (pt) 0%
Turkish (tr) 90%

Start via simplebuild3 menu

Since version 0.10.0 the plugin can be started up via some s3 menus.

Main menu

s3 main menu

s3 Toolchain menu

s3 toolchain menu

s3 Build menu

s3 build menu

Start via commandline

The following functions are available directly via the command line and can be used in own scripts to automate the creation and update of cross toolchains:

  • ./s3 tcupdate Opens the menu to select an already installed toolchain (Toolchain Menu).

  • ./s3 tcupdate TOOLCHAIN-NAME LIBRARY-KEY-1,LIBRARY-KEY-2,LIBRARY-KEY-n Opens the menu to select the libraries to be updated / installed in the specified toolchain (Library Update Menu). If one or more library keys are specified, the toolchain is updated immediately without opening the menu.

  • ./s3 tcupdate -b TOOLCHAIN-NAME or ./s3 tcupdate --backup TOOLCHAIN-NAME Backup of the specified toolchain. A tar.xz archive is created in the s3 downloads folder, which can be restored via ./s3 tcrepair.

  • ./s3 tcupdate -c TEMPLATE-NAME-1,TEMPLATE-NAME-2,TEMPLATE-NAME-n or ./s3 tcupdate --create TEMPLATE-NAME-1,TEMPLATE-NAME-2,TEMPLATE-NAME-n Opens the menu for selecting a new toolchain to be added/created (Cross Toolchain Template Menu). If one or more existing toolchain template names are specified, the toolchains are created immediately without opening the menu.

  • ./s3 tcupdate -dl TEMPLATE-NAME-1,TEMPLATE-NAME-2,TEMPLATE-NAME-n or ./s3 tcupdate --download TEMPLATE-NAME-1,TEMPLATE-NAME-2,TEMPLATE-NAME-n Opens the menu for selecting a new toolchain to be added/created (Cross Toolchain Template Menu). If one or more existing toolchain template names are specified, the toolchains are downloaded immediately without opening the menu.

  • ./s3 tcupdate -cfg VARIABLE-NAME VALUE or ./s3 tcupdate --config VARIABLE-NAME VALUE Change the value of variables in the configuration file plugin_update_toolchain.config directly. Only variables existing in the configuration file can be changed.

  • ./s3 tcupdate -ctng TEMPLATE-NAME or ./s3 tcupdate --crosstool-ng TEMPLATE-NAME Opens the menu of crosstool-NG for manual editing of the toolchain configuration options (crosstool-NG Menu). Depending on the specified toolchain template, an existing template is edited or a new one is created. After closing the menu, you can save the template and / or create a new toolchain based on this template.

  • ./s3 tcupdate -fng TEMPLATE-NAME or ./s3 tcupdate --freetz-ng TEMPLATE-NAME Opens the menu of Freetz-NG for manual editing of the toolchain configuration options (Freetz-NG Menu). Depending on the specified toolchain template, an existing template is edited or a new one is created. After closing the menu, you can save the template and / or create a new toolchain based on this template.

  • ./s3 tcupdate -andk TEMPLATE-NAME or ./s3 tcupdate --android-ndk TEMPLATE-NAME Opens the system editor for manual editing of the Android NDK toolchain configuration options. Depending on the specified toolchain template, an existing template is edited or a new one is created. After closing the menu, you can save the template and / or create a new toolchain based on this template.

  • ./s3 tcupdate -d TOOLCHAIN-NAME NEW-TOOLCHAIN-NAME or ./s3 tcupdate --duplicate TOOLCHAIN-NAME NEW-TOOLCHAIN-NAME Create a copy of the specified toolchain. A tar.xz archive is created in the s3 downloads folder and restored under the new toolchain name.

  • ./s3 tcupdate -l TOOLCHAIN-NAME-1,TOOLCHAIN-NAME-2,TOOLCHAIN-NAME-n or ./s3 tcupdate --libs TOOLCHAIN-NAME-1,TOOLCHAIN-NAME-2,TOOLCHAIN-NAME-n Creates a formatted list as table with all integrated library keys for each cross toolchain (green means the CURRENT library is up-to-date, magenta means update of the CURRENT library is possible, red means the CURRENT library is newer than the configured NEW library version). If the second parameter is omitted, the list contains all installed cross toolchains.

  • ./s3 tcupdate -lv TOOLCHAIN-NAME-1,TOOLCHAIN-NAME-2,TOOLCHAIN-NAME-n or ./s3 tcupdate --libs-version TOOLCHAIN-NAME-1,TOOLCHAIN-NAME-2,TOOLCHAIN-NAME-n Creates a formatted list as table with all integrated library keys including version information for each cross toolchain (green means the CURRENT library is up-to-date, magenta means update of the CURRENT library is possible, red means the CURRENT library is newer than the configured NEW library version). If the second parameter is omitted, the list contains all installed cross toolchains.

  • ./s3 tcupdate -r or ./s3 tcupdate --reset Recreates the configuration file plugin_update_toolchain.config.

  • ./s3 tcupdate -s or ./s3 tcupdate --setup (Re)Installs the build environment of crosstool-NG in the folder support/crosstool/crosstool-ng, Freetz-NG in the folder support/crosstool/freetz-ng and Android NDK in the folder support/crosstool/android-ndk.

  • ./s3 tcupdate -u or ./s3 tcupdate --update_me Update check and install latest version of this plugin.

Configuration file

Many parameters of the plugin can be changed via the configuration file. All parameters are commented in detail in the configuration file. Changes should only be made by experienced Linux users. The configuration file can be reset at any time using ./s3 tcupdate -r or ./s3 tcupdate --reset. The current configuration file is saved with a time stamp and a new one is created automatically. Each time the configuration file is reset, this automatic determines the latest versions of the OpenSSL, libusb, PCSC-Lite and zlib libraries. It makes sense to create a new configuration file from time to time in order to get the current versions of the libraries.

Toolchain Menu

The toolchains already installed in s3 are listed here. The toolchains created with this plugin shows the creation time at the end of the description in green letters. This menu can be closed by pressing ESC.

s3tup toolchain menu

  • <Update> Opens the "Library Update Menu" for the selected toolchain.
  • <Repair> Repairs the selected Toolchain by restoring it from the s3 download folder.
  • <Add> Opens the "Cross Toolchain Template Menu".
  • <Backup> A backup copy of the selected toolchain is created as a tar.xz archive in the s3 download folder, which can be restored via ./s3 tcrepair.

Library Update Menu

The current versions of the libraries (OpenSSL, libusb, PCSC-Lite, zlib) are listed here, which can be updated or installed in the selected toolchain. The selected toolchain is displayed in the menu title. Libraries are automatically recognized and preselected (if an update is possible). The versions are compared in the NEW / CURRENT columns and colorized (green means the CURRENT library is up-to-date, magenta means update of the CURRENT library is possible, red means the CURRENT library is newer than the configured NEW library version). This menu can be closed by pressing ESC.

s3tup library update menu

  • <Build> Starts the process of compiling and installing the libraries in the selected toolchain.
  • <Back/Exit> Closes the "Library Update Menu" and opens the previous one or exits the plugin.
  • <Info> Displays detailed information about the toolchain and configuration of the selected library.

Cross Toolchain Template Menu

Completely new toolchains can be downloaded or created in this menu. The functionality is provided by the crosstool-NG, Freetz-NG and Android NDK toolchain generators depending on the listed templates. You can choose from templates for crosstool-NG, Freetz-NG or Android NDK in order to create new or rebuild existing toolchains for s3. This menu can be closed by pressing ESC. Toolchains based on these templates have already been tested and work for different systems. Please make sure that s3 is not executed as root or via sudo. This is not necessary and involves some security risks! If there are reasons to run as root, you can force it with the following command: ./s3 tcupdate --config "CTNG_BUILD_AS_ROOT" "1"

s3tup cross toolchain template menu

  • <Download> A prebuild version of the toolchain can be downloaded to save a lot of time. :-)
  • <Build> Starts the process of compiling, installing and registering the selected toolchain. A backup copy of the created toolchains is taken as a tar.xz archive in the s3 download folder, which can be restored via ./s3 tcrepair. Please pay attention to the note on red colored templates. They have the same name as already installed toolchains and will be overwritten when compiling. Once integrated, libraries are automatically reintegrated when an existing toolchain is recreated. This automatism can be deactivated with the command: ./s3 tcupdate --config "LIBS_AUTO_INTEGRATE" "0"
  • <Setup> (Re)Installs the build environment of crosstool-NG in the folder support/crosstool/crosstool-ng, Freetz-NG in the folder support/crosstool/freetz-ng and Android NDK in the folder support/crosstool/android-ndk.
  • <Edit> Opens the menu/editor of crosstool-NG, Freetz-NG or Android NDK for manual editing of the toolchain configuration options (crosstool-NG Menu).

Available Cross Toolchain Templates

Template Type Description Components Template Version Plugin Version added Plugin Version updated
android_10_arm ANDK Android 10 STBs arm armeabi-v7a 32-bit LE, libc++ API 29, clang 17.0.2, Linux 6.3.0 2 0.21.1 0.24.2
android_11_arm ANDK Android 11 STBs arm armeabi-v7a 32-bit LE, libc++ API 30, clang 17.0.2, Linux 6.3.0 2 0.21.1 0.24.2
android_nougat_arm ANDK Android 7.x Nougat STBs arm armeabi-v7a 32-bit LE, libc++ API 24, clang 17.0.2, Linux 6.3.0 3 0.20.0 0.24.2
android_oreo_arm ANDK Android 8.x Oreo STBs arm armeabi-v7a 32-bit LE, libc++ API 26, clang 17.0.2, Linux 6.3.0 2 0.21.1 0.24.2
android_pie_arm ANDK Android 9.x Pie STBs arm armeabi-v7a 32-bit LE, libc++ API 28, clang 17.0.2, Linux 6.3.0 2 0.21.1 0.24.2
dream_aarch64 CTNG Dreambox ONE|TWO aarch64 64-bit LE, glibc 2.25, gcc 13.2.0, binutils 2.29.1, linux 6.5.5 13 0.7.0 0.24.2
dream_arm CTNG Dreambox DM9x0 UHD arm 32-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.7.0 0.24.2
dream_mipsel CTNG Dreambox 500 HD|52x|8x0 HD|70x0 HD mips mips1 32-bit LE, glibc 2.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.7.0 0.24.2
fos_g71x_mips CTNG FRITZ!Box 7582|7581 7.1x mips mips1 32-bit BE, glibc 2.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.14.0 0.23.4
fos_m72x_mips FNG FRITZ!Box 7590|7490 7.2x mips mips32r2 32-bit BE, uClibc 1.0.15, gcc 8.3.0, linux 4.9.198 5 0.20.2 0.22.2
fos_mLAB_mips CTNG FRITZ!Box 7590 Labor mips mips1 32-bit BE, musl 1.1.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 9 0.13.0 0.23.4
fos_u69x_mips FNG FRITZ!Box 7590|7490 6.9x mips mips32r2 32-bit BE, uClibc 0.9.33.2, gcc 5.5.0, binutils 2.25, linux 3.10.12 2 0.13.0 0.14.0
fos_u71x_arm FNG FRITZ!Box 7530|7520 7.1x arm armv7-a 32-bit LE, uClibc 1.0.14, gcc 5.5.0, binutils 2.25, linux 4.4.60 1 0.14.0
fos_u71x_mips FNG FRITZ!Box 7590|7490 7.1x mips mips32r2 32-bit BE, uClibc 1.0.14, gcc 5.5.0, binutils 2.25, linux 3.10.104 2 0.13.0 0.14.0
fos_u71x_puma FNG FRITZ!Box 6690|6491|6490|6430 7.1x i686 atom 32-bit LE, uClibc 1.0.14, gcc 5.5.0, binutils 2.25, linux 2.6.39.3 1 0.14.0
fos_uLAB_mips CTNG FRITZ!Box 7490 Labor mips mips1 32-bit BE, uClibc 1.0.31, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.14.0 0.23.4
igel_x86 CTNG Igel VIA VX855, x86 devices x86 i686 32-bit LE, glibc 2.28, gcc 13.2.0, binutils 2.40, linux 6.5.5 7 0.22.3 0.24.2
oe20_armv7 CTNG OpenEmbedded 2.0 STB's, ARM-Cortex-A9 devices arm armv7-a 32-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 2 0.24.0 0.24.2
oe20_mipsel CTNG OpenEmbedded 2.0 STB's mips mips1 32-bit LE, glibc 2.19, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.10.4 0.24.2
oe20_sh4 CTNG OpenEmbedded 2.0 STB's sh sh4 32-bit LE, glibc 2.25, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.13.3 0.24.2
oe20_sh_multilib CTNG OpenEmbedded 2.0 STB's multilib support for other/older Super-H variants sh sh4 32-bit LE+BE, glibc 2.25, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.13.3 0.24.2
owrt_ar71xx_mips CTNG OpenWrt 18.06 ar71xx, mips_24kc BE devices mips mips1 32-bit BE, musl 1.1.19, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.8.5 0.24.2
owrt_ath79_mips CTNG OpenWrt 19.07|21.02 ath79, mips_24kc BE devices mips mips1 32-bit BE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.8.4 0.24.2
owrt_kirkwood_arm CTNG OpenWrt 19.07|21.02 kirkwood, Pogoplug V2 LE devices arm armv5te 32-bit LE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 7 0.23.4 0.24.2
owrt_mediatek_armv8 CTNG OpenWrt 19.07|21.02 mediatek, GLinet Brume2 devices aarch64 cortex-a53 64-bit LE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 2 0.24.0 0.24.2
owrt_mpc85xx_ppc CTNG OpenWrt 19.07|21.02 mpc85xx, Freescale MPC85xx BE devices powerpc 32-bit BE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.11.0 0.24.2
owrt_ramips_mips CTNG OpenWrt 19.07|21.02 ramips, Mediatek/Ralink mips_24kc LE devices mips mips1 32-bit LE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.22.3 0.24.2
owrt_rpi_armv6 CTNG OpenWrt 19.07|21.02 Raspberry Pi Zero W|WH, 1 Model A|A+|B|B+ arm arm1176jzf-s 32-bit LE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 2 0.24.0 0.24.2
owrt_rpi_armv7 CTNG OpenWrt 19.07|21.02 Raspberry Pi 2 Model B arm cortex-a7 32-bit LE, musl 1.1.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 2 0.24.0 0.24.2
pogoplug_arm CTNG Marvell Kirkwood devices, Pogoplug V2 arm armv5te 32-bit LE, glibc 2.24, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.22.3 0.24.2
qnap_armv5 CTNG QNAP Marvell 628x devices, QNAP TS-119P II arm armv5te 32-bit LE, glibc 2.12.1, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.23.3 0.24.2
qnap_armv7 CTNG QNAP ARM-Cortex-A9 devices arm cortex-a7 32-bit LE, glibc 2.17, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.11.5 0.24.2
qnap_x64 CTNG QNAP x64 devices x86 64-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 7 0.23.0 0.24.2
rpi_aarch64 CTNG Raspberry Pi 3 Modell B+, 4 Model B aarch64 cortex-a53 64-bit LE, glibc 2.31, gcc 13.2.0, binutils 2.40, linux 6.5.5, OS with 64-Bit-Kernel and -Userland-Libraries necessary 12 0.11.0 0.24.2
rpi_armv6 CTNG Raspberry Pi Zero W|WH, 1 Model A/A+/B/B+ arm arm1176jzf-s 32-bit LE, glibc 2.31, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.7.0 0.24.2
rpi_armv7 CTNG Raspberry Pi 2 Model B arm cortex-a7 32-bit LE, glibc 2.31, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.7.0 0.24.2
rpi_armv8 CTNG Raspberry Pi 2 Model B v1.2, 3 Modell A+|B|B+, 4 Model B arm cortex-a53 32-bit LE, glibc 2.31, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.7.0 0.24.2
synology_aarch64 CTNG Synology DS418 aarch64 64-bit LE, glibc 2.25, gcc 13.2.0, binutils 2.29.1, linux 6.5.5 13 0.11.1 0.24.2
synology_armv5 CTNG Synology Marvell 628x devices, Synology DS112x arm armv5te 32-bit LE, glibc 2.31, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.13.3 0.24.2
synology_armv7 CTNG Synology DS216play, ZyXEL NAS326|NAS520 arm armv7-a+fp 32-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 13 0.7.0 0.24.2
synology_armv7a CTNG Synology Marvell ARMADA 375 devices, Synology DS115 arm armv7-a 32-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 5 0.23.5 0.24.2
synology_ppc CTNG Synology DS213+ powerpc 8548 32-bit BE, glibc 2.23, gcc 7.5.0, binutils 2.40, linux 6.5.5 8 0.21.1 0.24.2
ubnt_aarch64 CTNG Ubiquiti Networks devices, UDM|UDM-Pro aarch64 cortex-a57 64-bit LE, glibc 2.30, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.23.3 0.24.2
ubnt_mips64 CTNG Ubiquiti Networks devices, USG|USG-Pro mips mips64r2 32-bit BE, glibc 2.17, gcc 13.2.0, binutils 2.40, linux 6.5.5 8 0.23.3 0.24.2
vuplus4k_arm CTNG Vu+ Zero|Uno|Duo|Solo|Ultimo 4K arm 32-bit LE, glibc 2.23, gcc 13.2.0, binutils 2.40, linux 6.5.5 12 0.7.0 0.24.2

CTNG - crosstool-NG, FNG - Freetz-NG, ANDK - Android NDK

Internal settings of Cross Toolchain Templates

Setting Description Mandatory
toolchain template
#toolchain template: OpenWrt 18.06 ar71xx, mips_24kc BE devices
template description used in menus Yes
toolchain template version
#toolchain template version: 3
template version Yes
toolchain template updated
#toolchain template updated: 2020-07-12 13:52:34
last modification date and update timestamp No
toolchain template migrate
#toolchain template migrate: ar71xx_mips
used to track template renaming No
toolchain template copyof
#toolchain template copyof: owrt_ar71xx_mips_original
used to link the original template when duplicating templates No
toolchain template cflags
#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
special toolchain compiler flags that are used when building and integrating libraries No
toolchain template ldflags
#toolchain template ldlags: -Wl,-dynamic-linker,/usr/lib/freetz/ld-uClibc.so.0
special toolchain linker flags that are used when building and integrating libraries No

These settings are bash comments and must be in the first 7 lines of the toolchain template.

Back to top

Clone this wiki locally