Browse Source

verbose enable_emu

pull/57/head
Gorgone 4 years ago
committed by GitHub
parent
commit
cda06857e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      support/functions/_ansi
  2. 2
      support/functions/_cmd_build
  3. 1
      support/functions/_compress
  4. 32
      support/functions/_plugin_update_toolchain
  5. 1
      support/functions/_subversion

23
support/functions/_ansi

@ -9,10 +9,8 @@ initializeANSI(){
nc='\033[0;' #nc normal color nc='\033[0;' #nc normal color
lc='\033[1;' #lc light color lc='\033[1;' #lc light color
bc='\033[' #bc backcolor
# normal # normal
bk_n=$nc'30m' #black
r_n=$nc'31m' #red r_n=$nc'31m' #red
g_n=$nc'32m' #green g_n=$nc'32m' #green
y_n=$nc'33m' #yellow y_n=$nc'33m' #yellow
@ -22,7 +20,6 @@ c_n=$nc'36m' #cyan
w_n=$nc'37m' #white w_n=$nc'37m' #white
#light #light
bk_l=$nc'30m' #black
r_l=$lc'31m' #red r_l=$lc'31m' #red
g_l=$lc'32m' #green g_l=$lc'32m' #green
y_l=$lc'33m' #yellow y_l=$lc'33m' #yellow
@ -31,26 +28,6 @@ p_l=$lc'35m' #pink
c_l=$lc'36m' #cyan c_l=$lc'36m' #cyan
w_l=$lc'37m' #white w_l=$lc'37m' #white
# normal background
bk_nb=$bc'40m' #black
r_nb=$bc'41m' #red
g_nb=$bc'42m' #green
y_nb=$bc'43m' #yellow
b_nb=$bc'44m' #blue
p_nb=$bc'45m' #pink
c_nb=$bc'46m' #cyan
w_nb=$bc'107m' #white
# light background
dg_lb=$bc'100m' #dark gray
r_lb=$bc'101m' #light red
g_lb=$bc'102m' #light green
y_lb=$bc'103m' #light yellow
b_lb=$bc'104m' #light blue
p_lb=$bc'105m' #light pink
c_lb=$bc'106m' #light cyan
lg_lb=$bc'47m' #light gray
#reset to normal #reset to normal
re_='\033[0m' #resets all colors re_='\033[0m' #resets all colors
re_f='\033[39m' #resets only foreground color re_f='\033[39m' #resets only foreground color

2
support/functions/_cmd_build

@ -1,4 +1,4 @@
#!/bin/bash ######!/bin/bash
_cmd_build(){ _cmd_build(){
[ ! -d "$svndir" ] || [ -f "$workdir/NEED-CHECKOUT" ] && checkout [ ! -d "$svndir" ] || [ -f "$workdir/NEED-CHECKOUT" ] && checkout

1
support/functions/_compress

@ -108,6 +108,7 @@ untarsvn(){
if [ -z "$1" ] if [ -z "$1" ]
then then
[ -f "$bsvn/last.tar.gz" ] && tar -xf "$bsvn/last.tar.gz" [ -f "$bsvn/last.tar.gz" ] && tar -xf "$bsvn/last.tar.gz"
echo -e "\e[1A $w_l SVN Revision : $c_l$(basename $(readlink -f $bsvn/last.tar.gz) .tar.gz)$w_l"
else else
if [ -f "$bsvn/$1.tar.gz" ] if [ -f "$bsvn/$1.tar.gz" ]

32
support/functions/_plugin_update_toolchain

@ -3,7 +3,7 @@
#simplebuild_plugin tcupdate #simplebuild_plugin tcupdate
tcupdate(){ tcupdate(){
pversion="0.22.3"; pversion="0.22.1";
pname="s3.TUP"; pname="s3.TUP";
pdesc="Plugin $pname v$pversion"; pdesc="Plugin $pname v$pversion";
configname="$configdir/plugin_update_toolchain.config"; configname="$configdir/plugin_update_toolchain.config";
@ -127,6 +127,7 @@ tcupdate(){
#TOOLCHAIN MENU #TOOLCHAIN MENU
_fill_tc_array; _fill_tc_array;
unset MENU_OPTIONS;COUNT=0 unset MENU_OPTIONS;COUNT=0
if [ "$systype" == "ok" ];then
if [ "$tcempty" == "0" ];then if [ "$tcempty" == "0" ];then
for i in "${INST_TCLIST[@]}";do for i in "${INST_TCLIST[@]}";do
if [ ! "$i" == "native" ];then if [ ! "$i" == "native" ];then
@ -138,6 +139,7 @@ tcupdate(){
done; done;
fi; fi;
[ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "$txt_s3tup_menu_toolchain_notfound" "$txt_s3tup_menu_toolchain_notfound"); [ $COUNT -eq 0 ] && MENU_OPTIONS+=("" "$txt_s3tup_menu_toolchain_notfound" "$txt_s3tup_menu_toolchain_notfound");
fi;
clear;clear; clear;clear;
out=$("$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--item-help" "--help-tags" "--default-item" "$tc" "--ok-label" "${txt_s3tup_menu_command_label_update}" "--cancel-label" "${txt_s3tup_menu_command_label_create}" "--help-button" "--help-label" "${txt_s3tup_menu_command_label_backup}" "--extra-button" "--extra-label" "$([ ! "$FLAG" == "1" ] && echo "${txt_s3tup_menu_command_label_exit}" || echo "${txt_s3tup_menu_command_label_back}")" "--title" "-[ ${txt_s3tup_menu_toolchain_title} ]-" \ out=$("$gui" "$st_" "$bt_" "$title_ - \Z0$pdesc\Zn" "--colors" "--item-help" "--help-tags" "--default-item" "$tc" "--ok-label" "${txt_s3tup_menu_command_label_update}" "--cancel-label" "${txt_s3tup_menu_command_label_create}" "--help-button" "--help-label" "${txt_s3tup_menu_command_label_backup}" "--extra-button" "--extra-label" "$([ ! "$FLAG" == "1" ] && echo "${txt_s3tup_menu_command_label_exit}" || echo "${txt_s3tup_menu_command_label_back}")" "--title" "-[ ${txt_s3tup_menu_toolchain_title} ]-" \
--menu "\n${txt_s3tup_menu_toolchain_text1} $COUNT ${txt_s3tup_menu_toolchain_text2}\n " \ --menu "\n${txt_s3tup_menu_toolchain_text1} $COUNT ${txt_s3tup_menu_toolchain_text2}\n " \
@ -318,7 +320,7 @@ _integrate_libs(){
_create_tc(){ _create_tc(){
_sz; # Prepare DIALOG settings _sz; # Prepare DIALOG settings
unset TPL_LIST; unset TPL_LIST;
local menu_close libkeys use ldf; local menu_close libkeys use;
while [ ! $menu_close ] while [ ! $menu_close ]
do do
if [ "${#2}" -gt 0 ];then #Force setup call if [ "${#2}" -gt 0 ];then #Force setup call
@ -487,6 +489,7 @@ _create_tc(){
case "$tpl_type" in case "$tpl_type" in
"CTNG") #get target from build.log "CTNG") #get target from build.log
target=$(sed -n -e '/target = / s/.*\= *//p' "$ctsrcdir/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 #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"); buildtopdir=$(sed -n -e '/CT_BUILD_TOP_DIR=\// s/.*\= *//p' "$ctsrcdir/build.log");
@ -495,8 +498,7 @@ _create_tc(){
btcbindir=$(grep -i '{ PATH=.*kernel.*' "$logfile" | head -n 1 | awk -F':|"' '{print $2}'); btcbindir=$(grep -i '{ PATH=.*kernel.*' "$logfile" | head -n 1 | awk -F':|"' '{print $2}');
btcdir=$(realpath "$btcbindir/../"); btcdir=$(realpath "$btcbindir/../");
target=$(basename "$btcdir"); target=$(basename "$btcdir");
#autodetect LDFLAGS depending on the freetz-ng configuration options use="";
[ $(grep -i '^FREETZ_AVM_PROP_UCLIBC_SEPARATE=y' "$ctsrcdir/.config") ] && ldf="-Wl,-dynamic-linker,${FNG_SEPARATE_DYNAMIC_LINKER}";
#copy toolchain folder #copy toolchain folder
rm -rf "$tcdir/$tpl"; rm -rf "$tcdir/$tpl";
@ -531,9 +533,8 @@ _create_tc(){
props=$(_get_template_properties "$cttpldir/$tpl"); props=$(_get_template_properties "$cttpldir/$tpl");
desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs); desc=$(echo "$props" | awk -F'^' '{print $1}' | xargs);
cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs); cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs);
[ -z "$ldf" ] && ldf=$(echo "$props" | awk -F'^' '{print $4}' | xargs); ldflags=$(echo "$props" | awk -F'^' '{print $4}' | xargs);
_create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "$sysroot" "" "$desc" "" "$dldir/$(decode "$_t1e")$tpl.tar.xz" "yes" "$tpl_type_name" "$use" "$cflags" "$ldflags" "$tpl_type";
_create_toolchaincfg "$tcdir/$tpl" "$tpl" "$target" "$sysroot" "" "$desc" "" "$dldir/$(decode "$_t1e")$tpl.tar.xz" "yes" "$tpl_type_name" "$use" "$cflags" "$ldf" "$tpl_type";
else else
_paktc_timer 10; _paktc_timer 10;
fi; fi;
@ -994,8 +995,8 @@ _list_toolchain_libkeys(){
do do
if [ -d "$tcdir/$tc" ];then if [ -d "$tcdir/$tc" ];then
#print out table header #print out table header
[ -z "$props" -a -z "$2" ] && printf "${bk_n}${lg_lb}\n%-30s %-45s %-30s %s${re_}" "${txt_tc}" "${txt_s3tup_msg_table_header_libs_col_key}" "${txt_s3tup_msg_table_header_libs_col_update}" "${txt_s3tup_msg_table_header_libs_col_downgrade}" [ -z "$props" -a -z "$2" ] && printf "\n%-30s %-45s %-30s %s\n" "${txt_tc}" "${txt_s3tup_msg_table_header_libs_col_key}" "${txt_s3tup_msg_table_header_libs_col_update}" "${txt_s3tup_msg_table_header_libs_col_downgrade}"
[ -z "$props" -a -n "$2" ] && printf "${bk_n}${lg_lb}\n%-30s %-11s %21s %3s %-12s %-10s %s${re_}" "${txt_tc}" "${txt_s3tup_msg_table_header_libsversion_col_key}" "${txt_s3tup_msg_table_header_libsversion_col_curversion}" "" "${txt_s3tup_msg_table_header_libsversion_col_newversion}" "${txt_s3tup_msg_table_header_libsversion_col_update}" "${txt_s3tup_msg_table_header_libsversion_col_downgrade}" [ -z "$props" -a -n "$2" ] && printf "\n%-30s %-11s %21s %3s %-12s %-10s %s\n" "${txt_tc}" "${txt_s3tup_msg_table_header_libsversion_col_key}" "${txt_s3tup_msg_table_header_libsversion_col_curversion}" "" "${txt_s3tup_msg_table_header_libsversion_col_newversion}" "${txt_s3tup_msg_table_header_libsversion_col_update}" "${txt_s3tup_msg_table_header_libsversion_col_downgrade}"
#get toolchain properties #get toolchain properties
props=$(_get_toolchain_properties "$tc"); props=$(_get_toolchain_properties "$tc");
@ -1033,9 +1034,8 @@ _list_toolchain_libkeys(){
newversion="${fmt}${newversion::16}${re_}"; newversion="${fmt}${newversion::16}${re_}";
[ -z "$update" ] && update="-" || P2=1; [ -z "$update" ] && update="-" || P2=1;
[ -z "$downgrade" ] && downgrade="-"; [ -z "$downgrade" ] && downgrade="-";
[ -n "$tc" ] && fmt="\n" fmt="%-30s %-$((11+$ADD))b %$((21+$ADD))b %-$((1+$ADD))b %-$((16+$ADD))b %-$((11+$ADD*$P2))b %b\n";
fmt="${fmt}%-30s %-$((11+$ADD))b %$((21+$ADD))b %-$((1+$ADD))b %-$((16+$ADD))b %-$((11+$ADD*$P2))b %b\n"; printf "$fmt" "${tc::30}" "$libkey" "$curversion" "$compare" "$newversion" "$update" "$downgrade";
printf "$fmt" "$NL${tc::30}" "$libkey" "$curversion" "$compare" "$newversion" "$update" "$downgrade";
fi; fi;
done; done;
@ -1047,7 +1047,7 @@ _list_toolchain_libkeys(){
[ "$R" -gt 0 ] && downgradable="${downgradable%?}"; [ "$R" -gt 0 ] && downgradable="${downgradable%?}";
[ -z "$downgradable" ] && downgradable="-"; [ -z "$downgradable" ] && downgradable="-";
fmt="\n%-30s %-$((45+$ADD*$CUR))b %-$((30+$ADD*$P))b %b"; fmt="%-30s %-$((45+$ADD*$CUR))b %-$((30+$ADD*$P))b %b\n";
printf "$fmt" "${tc::30}" "${libkeys%?}" "$updatable" "$downgradable"; printf "$fmt" "${tc::30}" "${libkeys%?}" "$updatable" "$downgradable";
fi; fi;
fi; fi;
@ -1129,7 +1129,7 @@ _get_template_properties(){
rm -f "$fngsrcdir/.config"; rm -f "$fngsrcdir/.config";
else else
setup=0; setup=0;
desc="$desc ($(printf '%q' "${txt_s3tup_msg_gtp_info}"))"; desc="$desc (${txt_s3tup_msg_gtp_info})";
fi;; fi;;
"ANDK") "ANDK")
if [ -d "$andksrcdir" ];then if [ -d "$andksrcdir" ];then
@ -1142,14 +1142,14 @@ _get_template_properties(){
kernel="Linux" && kernelv="4.9.0"; kernel="Linux" && kernelv="4.9.0";
else else
setup=0; setup=0;
desc="$desc ($(printf '%q' "${txt_s3tup_msg_gtp_info}"))"; desc="$desc (${txt_s3tup_msg_gtp_info})";
fi;; fi;;
esac; esac;
#build template property string #build template property string
[ -z $setup ] && desc="$desc ($arch$cpu$aarch $bitness-bit $endianness, $libc $libcmv$libcv, $cc $ccv, $kernel $kernelv)$props"; [ -z $setup ] && desc="$desc ($arch$cpu$aarch $bitness-bit $endianness, $libc $libcmv$libcv, $cc $ccv, $kernel $kernelv)$props";
fi; fi;
echo "$desc"; echo "$desc" | xargs;
[ -n "$desc" ] && exit 0 || exit 1; [ -n "$desc" ] && exit 0 || exit 1;
}; };
_get_template_type(){ _get_template_type(){

1
support/functions/_subversion

@ -92,6 +92,7 @@ svnrestore(){
} }
quicksvnrestore(){ quicksvnrestore(){
printf "$1 \n"
untarsvn $1 untarsvn $1
} }

Loading…
Cancel
Save