Browse Source

Merge pull request #41 from WXbet/Gorgone

Advanced toolchain specific parametrization
pull/45/head
Gorgone 4 years ago
committed by GitHub
parent
commit
ab4c9ec3b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      support/functions/_cmd_build
  2. 5
      support/functions/_gui_build
  3. 2
      support/functions/_misc

19
support/functions/_cmd_build

@ -19,6 +19,7 @@ _cmd_build(){
#set build defaults #set build defaults
CROSS="$tcdir/$_toolchainname/bin/$_compiler" CROSS="$tcdir/$_toolchainname/bin/$_compiler"
[ "$_stagingdir" == "1" ] && export STAGING_DIR="$tcdir/$_toolchainname" [ "$_stagingdir" == "1" ] && export STAGING_DIR="$tcdir/$_toolchainname"
[ "$_androidndkdir" == "1" ] && export ANDROID_NDK="$tcdir/$_toolchainname"
[ -f "$configdir/compiler_option" ] && co=$(cat "$configdir/compiler_option") || co="-O2" [ -f "$configdir/compiler_option" ] && co=$(cat "$configdir/compiler_option") || co="-O2"
#toolchain defaults #toolchain defaults
@ -73,6 +74,7 @@ _cmd_build(){
#fill use variables and set name addons #fill use variables and set name addons
USESTRING=; USESTRING=;
EXTRA_USE=;
_usb=; _usb=;
_pcsc=; _pcsc=;
_stapi=; _stapi=;
@ -109,8 +111,8 @@ _cmd_build(){
s3cfg_vars[COMPRESS]=1;;# overwrite global s3cfg_vars[COMPRESS]=1;;# overwrite global
"USE_STAPI=1") "USE_STAPI=1")
_stapi="-stapi" _stapi="-stapi"
STAPI_LIB="STAPI_LIB=$sdir/stapi/liboscam_stapi.a" [ -z "$stapi_lib_custom" ] && STAPI_LIB="STAPI_LIB=$sdir/stapi/liboscam_stapi.a" || STAPI_LIB="STAPI_LIB=$sdir/stapi/${stapi_lib_custom}"
printf "$w_l | LIB : "$c_l"liboscam_stapi.a"$w_l;; printf "$w_l | LIB : ${c_l}$(basename "$STAPI_LIB")${w_l}";;
"USE_STAPI5=1") "USE_STAPI5=1")
_stapi5="-stapi5" _stapi5="-stapi5"
[ "$OPENBOX" == "1" ] && STAPI_LIB="STAPI5_LIB=$sdir/stapi/liboscam_stapi5_OPENBOX.a" && printf "$w_l| LIB : "$c_l"liboscam_stapi5_OPENBOX.a"$w_l [ "$OPENBOX" == "1" ] && STAPI_LIB="STAPI5_LIB=$sdir/stapi/liboscam_stapi5_OPENBOX.a" && printf "$w_l| LIB : "$c_l"liboscam_stapi5_OPENBOX.a"$w_l
@ -163,22 +165,23 @@ fi
[ "${s3cfg_vars[USE_VERBOSE]}" == "1" ] && _verbose="V=1" [ "${s3cfg_vars[USE_VERBOSE]}" == "1" ] && _verbose="V=1"
#killstapi for nonsh4 #killstapi for nonsh4
if [ ! "$_toolchainname" == "sh4" ] || [ ! "$_toolchainname" == "sh_4" ] # if [ ! "$_toolchainname" == "sh4" ] || [ ! "$_toolchainname" == "sh_4" ]
then # then
silent=$("$svndir/config.sh" --disable CARDREADER_STAPI CARDREADER_STAPI5) # silent=$("$svndir/config.sh" --disable CARDREADER_STAPI CARDREADER_STAPI5)
fi # fi
#build #build
timer_start timer_start
_generate_oscam_name "$_toolchainname" _generate_oscam_name "$_toolchainname"
_nl _nl
USESTRING=${USE_vars[@]} USESTRING=${USE_vars[@]}
EXTRA_USE=$extra_use
make -j"$cpus" $_verbose \ make -j"$cpus" $_verbose \
"CONF_DIR=$CONFDIR" \ "CONF_DIR=$CONFDIR" \
"OSCAM_BIN=$bdir/$oscam_name" \ "OSCAM_BIN=$bdir/$oscam_name" \
"CC_OPTS=$co $cc_opts" \ "CC_OPTS=$co $cc_opts $extra_cc" \
"CC_WARN=$cc_warn" \ "CC_WARN=$cc_warn" \
"CROSS=$CROSS" $STAPI_LIB $USESTRING 2>&1 \ "CROSS=$CROSS" $STAPI_LIB $USESTRING $EXTRA_USE 2>&1 \
|tee -a "$ldir/$log_name" \ |tee -a "$ldir/$log_name" \
|grep --line-buffered -v 'BFD\|^/' \ |grep --line-buffered -v 'BFD\|^/' \
|grep --line-buffered '^CC\|^GEN\|UseFlags\| CONF_DIR =\|Binary\|LINK\|STRIP\|BUILD\|Addons\|Protocols\|Readers\|CardRdrs\|^/' \ |grep --line-buffered '^CC\|^GEN\|UseFlags\| CONF_DIR =\|Binary\|LINK\|STRIP\|BUILD\|Addons\|Protocols\|Readers\|CardRdrs\|^/' \

5
support/functions/_gui_build

@ -19,12 +19,14 @@ _gui_build(){
CROSS="$tcdir/$_toolchainname/bin/$_compiler" CROSS="$tcdir/$_toolchainname/bin/$_compiler"
[ "$_stagingdir" == "1" ] && export STAGING_DIR="$tcdir/$_toolchainname" [ "$_stagingdir" == "1" ] && export STAGING_DIR="$tcdir/$_toolchainname"
[ "$_androidndkdir" == "1" ] && export ANDROID_NDK="$tcdir/$_toolchainname"
[ -f "$configdir/compiler_option" ] && co=$(cat "$configdir/compiler_option") || co="-O2" [ -f "$configdir/compiler_option" ] && co=$(cat "$configdir/compiler_option") || co="-O2"
#make clean #make clean
cd "$svndir" cd "$svndir"
make distclean > /dev/null 2>&1 make distclean > /dev/null 2>&1
USESTRING_='' USESTRING_=''
EXTRA_USE=''
#do use_vars #do use_vars
for e2 in $USESTRING for e2 in $USESTRING
@ -70,6 +72,7 @@ _gui_build(){
fi fi
USESTRING_=${USE_vars[@]} USESTRING_=${USE_vars[@]}
EXTRA_USE=$extra_use
#todo add switch for verbose #todo add switch for verbose
_generate_oscam_name "$_toolchainname" _generate_oscam_name "$_toolchainname"
@ -86,7 +89,7 @@ _gui_build(){
(ologo; _nl (ologo; _nl
timer_start timer_start
make -j"$cpus" \ make -j"$cpus" \
"CONF_DIR=$_oscamconfdir_default" "OSCAM_BIN=$bdir/$oscam_name" "CC_OPTS=$co $cc_opts" "CC_WARN=$cc_warn" "CROSS=$CROSS" $stapivar $USESTRING_ 2>&1 \ "CONF_DIR=$_oscamconfdir_default" "OSCAM_BIN=$bdir/$oscam_name" "CC_OPTS=$co $cc_opts $extra_cc" "CC_WARN=$cc_warn" "CROSS=$CROSS" $stapivar $USESTRING_ $EXTRA_USE 2>&1 \
|tee "$ldir/$log_name" \ |tee "$ldir/$log_name" \
|grep --line-buffered -v 'BFD\|^/' \ |grep --line-buffered -v 'BFD\|^/' \
|grep --line-buffered '^CC\|^GEN\|UseFlags\| CONF_DIR =\|Binary\|LINK\|STRIP\|BUILD\|Addons\|Protocols\|Readers\|CardRdrs\|^/' \ |grep --line-buffered '^CC\|^GEN\|UseFlags\| CONF_DIR =\|Binary\|LINK\|STRIP\|BUILD\|Addons\|Protocols\|Readers\|CardRdrs\|^/' \

2
support/functions/_misc

@ -544,7 +544,7 @@ _stapi_select(){
0) 0)
stapivar=;; stapivar=;;
1) 1)
stapivar="STAPI_LIB=$sdir/stapi/liboscam_stapi.a" [ -z "$stapi_lib_custom" ] && stapivar="STAPI_LIB=$sdir/stapi/liboscam_stapi.a" || stapivar="STAPI_LIB=$sdir/stapi/${stapi_lib_custom}"
addstapi="USE_STAPI";; addstapi="USE_STAPI";;
2) 2)
stapivar="STAPI5_LIB=$sdir/stapi/liboscam_stapi5_UFS916.a" stapivar="STAPI5_LIB=$sdir/stapi/liboscam_stapi5_UFS916.a"

Loading…
Cancel
Save