Yu.Ding 2 giorni fa
parent
commit
d2bc274e56
4 ha cambiato i file con 45 aggiunte e 55 eliminazioni
  1. 4 30
      etc/scripts/upgrade.sh
  2. 13 25
      oem/etc/speaker.conf
  3. 28 0
      readyForTarget.sh
  4. BIN
      www/speaker-cgi

+ 4 - 30
etc/scripts/upgrade.sh

@@ -13,35 +13,10 @@ case ${para} in
 		[ ! -d /userdata/lost+found ] && mkdir -p /userdata/lost+found
 		[ ! -f /userdata/ispeaker.log ] && touch /userdata/ispeaker.log
 		[ ! -f /userdata/tmp_state.conf ] && touch /userdata/tmp_state.conf
-		[ ! -f /userdata/.pppoe_status ] && touch /userdata/.pppoe_status
         cat << END > /userdata/tmp_state.conf
 [intercom]
 onekey_state=idle
 END
-
-        model="`sysconf /etc/speaker.conf get system ui_model`"
-		[ ! -d /userdata/cfg/eq_bin ] && mkdir -p /userdata/cfg/eq_bin
-		if [ ! -z ${model} ];then
-			if [ "foo${model}" = "fooSW15" -o "foo${model}" = "fooSW16" ];then
-				cp /oem/cfg/eq_bin/SW15.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			elif [ "foo${model}" = "fooSC15" -o "foo${model}" = "fooSW16" ];then
-				cp /oem/cfg/eq_bin/SC15.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			elif [ "foo${model}" = "fooSH30" ];then
-				cp /oem/cfg/eq_bin/SH30.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			elif [ "foo${model}" = "fooSL50" ];then
-				cp /oem/cfg/eq_bin/SL50.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			elif [ "foo${model}" = "fooSL30" ];then
-				cp /oem/cfg/eq_bin/SL30.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			elif [ "foo${model}" = "fooSC10" ];then
-				cp /oem/cfg/eq_bin/SC10.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-            elif [ "foo${model}" = "fooSH10" ];then
-				cp /oem/cfg/eq_bin/SH30.bin /userdata/cfg/eq_bin/Para_48000Hz_2ch.bin
-			else
-				rm -rf /userdata/cfg/eq_bin/*
-			fi
-		else
-			rm -rf /userdata/cfg/eq_bin/*
-		fi
         sync
     ;;
     *)
@@ -58,7 +33,6 @@ END
         fi
         sync
 
-        /etc/scripts/shell_action.sh showReboot
         reset_default="`sysconf /etc/speaker.conf get upgrade reset_default`"
         updatetime="`sysconf /etc/speaker.conf get upgrade date`"
 
@@ -74,8 +48,8 @@ END
 
         if [ "foo${reset_default}" = "foono" ];then
             rm -rf /oem/.upgrade
-            #/usr/bin/recoverySystem ota ${para}
-            updateEngine --image_url=${para} --misc=update --savepath=${para}  --reboot
+            #updateEngine --image_url=${para} --misc=update --savepath=${para}  --reboot
+            tar -zxvf ${para} -C /
             recode="$?"
             if [ "${recode}" = 255 ];then
                 touch /oem/.upgrade
@@ -85,8 +59,8 @@ END
             fi
         else
             rm -rf /oem/.userdata
-            #/usr/bin/recoverySystem ota ${para}
-            updateEngine --image_url=${para} --misc=update --savepath=${para}  --reboot
+            # updateEngine --image_url=${para} --misc=update --savepath=${para}  --reboot
+            tar -zxvf ${para} -C /
             recode="$?"
             if [ "${recode}" = 255 ];then
                 touch /oem/.userdata

+ 13 - 25
oem/etc/speaker.conf

@@ -158,30 +158,6 @@ state_info=incoming
 type=On
 mode=delay
 duration=5
-play_music=Disabled
-alarm=Disabled
-
-[led_ctrl]
-call_state=no
-state_info=incoming
-type=On
-mode=delay
-duration=5
-dtmf=no
-dtmf_code=2*
-play_music=Disabled
-alarm=Disabled
-
-[screen_ctrl]
-dtmf=no
-dtmf_code=2*
-play_music=Disabled
-alarm=Disabled
-call_state=no
-state_info=outgoing
-type=
-mode=delay
-duration=5
 
 [multicast_player]
 enable=no
@@ -284,5 +260,17 @@ relay_type=On
 enable_mic=yes
 
 [remote_cast]
+remark=test
 url=https://www.galaxynext.us/
-
+remark_1=
+url_1=
+remark_2=
+url_2=
+remark_3=
+url_3=
+remark_4=
+url_4=
+remark_5=
+url_5=
+boot_remark=
+boot_url=

+ 28 - 0
readyForTarget.sh

@@ -0,0 +1,28 @@
+#! /bin/bash
+
+if [ $# = 1 ];then
+    branch_name=$1
+    if [ "foo${branch_name}" != "foomain" ];then
+        echo "Branch name not found!"
+        exit 0
+    fi
+
+    #modify build date
+    build_date="`date \"+%Y-%m-%d\"`"
+    cd oem/etc && awk -v new_date="$build_date" '/^\[upgrade\]/{f=1} f==1 && /^date=/{sub(/=.*/, "=" new_date); f=0} 1' speaker.conf > temp.conf && mv temp.conf speaker.conf
+
+    cd oem && tar cpf ../oem_backup.tar .
+
+    date="`date \"+%Y%m%d\"`"
+    SOFT_VERSION="`grep firmware oem/etc/speaker.conf | cut -d '=' -f2`"
+
+    name="u_m2_g2_fs_v_${SOFT_VERSION}_d_${date}.img"
+
+    tar -zcvf ${name} oem_backup.tar etc lib  oem usr www
+    
+    rk_generate ${name} IPS-M2 ${SOFT_VERSION}
+else
+    echo "usage:$0 branch-name"
+fi
+
+exit 0

BIN
www/speaker-cgi