diff --git a/support/functions/_misc b/support/functions/_misc index b8c5c0e..3a12742 100644 --- a/support/functions/_misc +++ b/support/functions/_misc @@ -251,6 +251,8 @@ _init_menu(){ IFS="#" COUNT=0 MENU_OPTIONS="BACK#$txt_back#" + MENU_OPTIONS_GEN="" + MENU_OPTIONS_STD="" counter } _select_menu(){ diff --git a/support/functions/_toolchain b/support/functions/_toolchain index c8cb46a..d7a36d7 100644 --- a/support/functions/_toolchain +++ b/support/functions/_toolchain @@ -73,6 +73,8 @@ _toolchain_config_menu(){ _toolchain_main_menu(){ _fill_tc_array + _init_menu + IFS="#" COUNT=0 MENU_OPTIONS="BACK#$txt_back_main#" @@ -98,27 +100,22 @@ _toolchain_main_menu(){ then unset _self_build source "$tccfgdir/$i" - if [ "$systype" == "ok" ] - then - MENU_OPTIONS+="$_toolchainname#$_description#" - counter - elif [ "$_self_build" == "yes" ] + if [ "$systype" == "ok" -o "$_self_build" == "yes" ] then - MENU_OPTIONS+="$_toolchainname#$_description#" + [[ "$i" =~ "_generic" ]] && MENU_OPTIONS_GEN+="$_toolchainname#$_description#" || MENU_OPTIONS_STD+="$_toolchainname#$_description#" counter - fi fi done fi - - MENU_OPTIONS+="EXIT#$txt_firstmenu_exit#" + MENU_OPTIONS+="${MENU_OPTIONS_GEN}${MENU_OPTIONS_STD}EXIT#$txt_firstmenu_exit#" counter + out=$( "$gui" "$st_" "$nc_" "$bt_" "$title_" --help-button --help-label INFO --title "-[ Toolchain $txt_menu ]-" --menu "$txt_main_revision$(REVISION)" "${COUNT+8}" 75 0 ${MENU_OPTIONS}) IFS=$OIFS first=$(echo "$out" | awk '{printf $1}') - tc_info=$(echo "$out" | awk '{printf $2}';) + tc_info=$(echo "$out" | awk '{printf $2}') case $first in EXIT) @@ -137,7 +134,7 @@ _toolchain_main_menu(){ then source "$tccfgdir/$tc_info" "$gui" "$st_" "$nc_" "$bt_" "$title_" "$ib_" "$_tc_info" $((_tc_infolines + 5)) 65 - sleep 5 + sleep 10 fi _toolchain_main_menu;; *) @@ -185,7 +182,7 @@ _console_extract_toolchain(){ [ -d "$tcdir/$_toolchainname" ] && rm -rf "$tcdir/$_toolchainname" mkdir "$tcdir/$_toolchainname" cd "$tcdir/$_toolchainname" - xz -d "$tc_dl" -c | tar -x + tar -xf "$tc_dl" --strip-components=1 printf "\r$w_l $txt_extracting :$g_l$txt_done! \n\n" } @@ -364,24 +361,32 @@ _toolchain_add_menu(){ if [ ! "$i" == "native" ] then source "$tccfgdir/$i" - MENU_OPTIONS+="$_toolchainname#$_description#" + [[ "$i" =~ "_generic" ]] && MENU_OPTIONS_GEN+="$_toolchainname#$_description#" || MENU_OPTIONS_STD+="$_toolchainname#$_description#" counter fi done - - MENU_OPTIONS+="EXIT#$txt_menu_builder1#" + MENU_OPTIONS+="${MENU_OPTIONS_GEN}${MENU_OPTIONS_STD}EXIT#$txt_menu_builder1#" counter out=$( "$gui" "$st_" "$nc_" "$bt_" "$title_" --help-button --help-label INFO --title "-[ $txt_add_menu ]-" --menu "$txt_main_revision$(REVISION)" "${COUNT+8}" 75 0 ${MENU_OPTIONS[@]}) IFS=$OIFS first=$(echo "$out" | awk '{printf $1}') + tc_info=$(echo "$out" | awk '{printf $2}') case $first in EXIT) bye;; BACK | '') _toolchain_main_menu;; + HELP) + if [ -f "$tccfgdir/$tc_info" ] + then + source "$tccfgdir/$tc_info" + "$gui" "$st_" "$nc_" "$bt_" "$title_" "$ib_" "$_tc_info" $((_tc_infolines + 5)) 65 + sleep 10 + fi + _toolchain_add_menu;; *) _toolchain_gui_install _toolchain_main_menu;; @@ -391,6 +396,7 @@ _toolchain_add_menu(){ _toolchain_remove_menu(){ _fill_tc_array _init_menu + if [ "$tcempty" == "0" ] then for i in "${INST_TCLIST[@]}" @@ -398,13 +404,12 @@ _toolchain_remove_menu(){ if [ ! "$i" == "native" ] then source "$tccfgdir/$i" - MENU_OPTIONS+="$_toolchainname#$_description#" + [[ "$i" =~ "_generic" ]] && MENU_OPTIONS_GEN+="$_toolchainname#$_description#" || MENU_OPTIONS_STD+="$_toolchainname#$_description#" counter fi done fi - - MENU_OPTIONS+="EXIT#$txt_menu_builder1#" + MENU_OPTIONS+="${MENU_OPTIONS_GEN}${MENU_OPTIONS_STD}EXIT#$txt_menu_builder1#" counter out=$( @@ -441,7 +446,7 @@ _toolchain_gui_install(){ [ -d "$tcdir/$first" ] && rm -rf "$tcdir/$first" && printf "$txt_delete $tcdir/$first" mkdir "$tcdir/$first" cd "$tcdir/$first" - (xz -d "$dldir/$tcname" -c |tar -xv) |"$gui" "$st_" --title " -[ $txt_extracting $tcname ]- " "$pb_" 20 74 + (tar -xvf "$dldir/$tcname" --strip-components=1) |"$gui" "$st_" --title " -[ $txt_extracting $tcname ]- " "$pb_" 20 74 else printf "$r_l $txt_error:$y_l $stcname$w_l Toolchain $txt_no_download""$rs_" fi diff --git a/support/toolchains.cfg/aarch64_generic b/support/toolchains.cfg/aarch64_generic new file mode 100644 index 0000000..ba49d5c --- /dev/null +++ b/support/toolchains.cfg/aarch64_generic @@ -0,0 +1,25 @@ +_toolchainname="aarch64_generic"; +default_use="USE_LIBCRYPTO"; +extra_use=""; +extra_cc=""; +extra_ld=""; +extra_c=""; +_description="aarch64 stb's (generic)"; +_oscamconfdir_default="/etc/tuxbox/config"; +_oscamconfdir_custom=""; +_compiler="aarch64-buildroot-linux-gnu-"; +_sysroot="aarch64-buildroot-linux-gnu/sysroot"; +_libsearchdir="/usr/lib"; +_toolchainfilename="aHR0cHM6Ly90b29sY2hhaW5zLmJvb3RsaW4uY29tL2Rvd25sb2Fkcy9yZWxlYXNlcy90b29sY2hhaW5zL2FhcmNoNjQvdGFyYmFsbHMvYWFyY2g2NC0tZ2xpYmMtLXN0YWJsZS0yMDE4LjExLTEudGFyLmJ6Mg=="; +_md5sum="3dabef3ced22e58bc061be2f74dfae85 aarch64--glibc--stable-2018.11-1.tar.bz2"; +_tc_info="!!! Bootlin Stable Toolchain 2018.11-1 !!!\n +\n +generic cross toolchain for aarch64 devices\n +\n +arch aarch64\n +glibc 2.27\n +gcc 7.3.0\n +gdb 7.12.1\n +linux 4.1.52\n +binutils 2.29.1\n"; +_tc_infolines="10"; diff --git a/support/toolchains.cfg/armv7_generic b/support/toolchains.cfg/armv7_generic new file mode 100644 index 0000000..45d9710 --- /dev/null +++ b/support/toolchains.cfg/armv7_generic @@ -0,0 +1,25 @@ +_toolchainname="armv7_generic"; +default_use="USE_LIBCRYPTO"; +extra_use=""; +extra_cc=""; +extra_ld=""; +extra_c="-mfpu=vfpv3-d16"; #special optimization for HiSilicon MV430 devices +_description="armv7 stb's (generic)"; +_oscamconfdir_default="/etc/tuxbox/config"; +_oscamconfdir_custom=""; +_compiler="arm-buildroot-linux-gnueabihf-"; +_sysroot="arm-buildroot-linux-gnueabihf/sysroot"; +_libsearchdir="/usr/lib"; +_toolchainfilename="aHR0cHM6Ly90b29sY2hhaW5zLmJvb3RsaW4uY29tL2Rvd25sb2Fkcy9yZWxlYXNlcy90b29sY2hhaW5zL2FybXY3LWVhYmloZi90YXJiYWxscy9hcm12Ny1lYWJpaGYtLWdsaWJjLS1zdGFibGUtMjAxOC4xMS0xLnRhci5iejI="; +_md5sum="cf6286d326c14d6a51ba05c33c8218a0 armv7-eabihf--glibc--stable-2018.11-1.tar.bz2"; +_tc_info="!!! Bootlin Stable Toolchain 2018.11-1 !!!\n +\n +generic cross toolchain for armv7eabihf devices\n +\n +arch armv7\n +glibc 2.27\n +gcc 7.3.0\n +gdb 7.12.1\n +linux 4.1.52\n +binutils 2.29.1\n"; +_tc_infolines="10"; diff --git a/support/toolchains.cfg/mips32el_generic b/support/toolchains.cfg/mips32el_generic new file mode 100644 index 0000000..5aadec2 --- /dev/null +++ b/support/toolchains.cfg/mips32el_generic @@ -0,0 +1,25 @@ +_toolchainname="mips32el_generic"; +default_use="USE_LIBCRYPTO"; +extra_use=""; +extra_cc=""; +extra_ld=""; +extra_c=""; +_description="mips32el stb's (generic)"; +_oscamconfdir_default="/etc/tuxbox/config"; +_oscamconfdir_custom=""; +_compiler="mipsel-buildroot-linux-gnu-"; +_sysroot="mipsel-buildroot-linux-gnu/sysroot"; +_libsearchdir="/usr/lib"; +_toolchainfilename="aHR0cHM6Ly90b29sY2hhaW5zLmJvb3RsaW4uY29tL2Rvd25sb2Fkcy9yZWxlYXNlcy90b29sY2hhaW5zL21pcHMzMmVsL3RhcmJhbGxzL21pcHMzMmVsLS1nbGliYy0tc3RhYmxlLTIwMTguMTEtMS50YXIuYnoy"; +_md5sum="6c1170df27d57dd3bbff9456f0afa813 mips32el--glibc--stable-2018.11-1.tar.bz2"; +_tc_info="!!! Bootlin Stable Toolchain 2018.11-1 !!!\n +\n +generic cross toolchain for mips32el devices\n +\n +arch mips32el\n +glibc 2.27\n +gcc 7.3.0\n +gdb 7.12.1\n +linux 4.1.52\n +binutils 2.29.1\n"; +_tc_infolines="10"; diff --git a/support/toolchains.cfg/sh4_generic b/support/toolchains.cfg/sh4_generic new file mode 100644 index 0000000..3fae867 --- /dev/null +++ b/support/toolchains.cfg/sh4_generic @@ -0,0 +1,25 @@ +_toolchainname="sh4_generic"; +default_use="USE_LIBCRYPTO"; +extra_use=""; +extra_cc=""; +extra_ld=""; +extra_c=""; +_description="sh4 stb's (generic)"; +_oscamconfdir_default="/etc/tuxbox/config"; +_oscamconfdir_custom=""; +_compiler="sh4-buildroot-linux-gnu-"; +_sysroot="sh4-buildroot-linux-gnu/sysroot"; +_libsearchdir="/usr/lib"; +_toolchainfilename="aHR0cHM6Ly90b29sY2hhaW5zLmJvb3RsaW4uY29tL2Rvd25sb2Fkcy9yZWxlYXNlcy90b29sY2hhaW5zL3NoLXNoNC90YXJiYWxscy9zaC1zaDQtLWdsaWJjLS1zdGFibGUtMjAxOC4xMS0xLnRhci5iejI="; +_md5sum="ad318a6d09ce1d18912b83293c8ed434 sh-sh4--glibc--stable-2018.11-1.tar.bz2"; +_tc_info="!!! Bootlin Stable Toolchain 2018.11-1 !!!\n +\n +generic cross toolchain for sh4 devices\n +\n +arch sh4\n +glibc 2.27\n +gcc 7.3.0\n +gdb 7.12.1\n +linux 4.1.52\n +binutils 2.29.1\n"; +_tc_infolines="10";