20190225_jeffrey - silenceuncrio/diary GitHub Wiki

0900

review

0920

這禮拜的工作

  • M330
    • GUI

M330 - GUI 目前的需求為 multi wan

參考 ariel 寫的 wiki - Multiple WAN Connections - 1st phrase

0935

先 pull M330 最新的 code

build image

upgrade from uboot

1100

DQA 表示 M300 eMMC 的 V1.76 在透過 web upgrade 之後 bootloader version 顯示 NA

剛剛我從 device 看來是 uboot 沒被更新到

切回 M300 branch - v1.76-mfg

build image 來試試到底哪個環節出了錯

mfgtool 燒錄

實際透過 web ui 做 upgrade 試試

root@M301-TXGW:/tmp/firmware# cat /tmp/FirmwareUpgrade.log
firmware upgrade shell script start...
emmc: 100
cfile: 0

Upgrading the firmware for 'eMMC' storage memory ...

Init the context for upgrading the firmware ...
running dual image is a
Init the context for upgrading the firmware succeeded

Extract the tared firmware ...
tar -C /tmp -xf /tmp/firmware.upload
Extract the tared firmware succeeded

MD5 sums check ...
firmware.md5 exist, read MD5 sums from it and check them
MD5 sums check succeeded

MCSV check ...
mcsv.enc exist, decrypt it and check with hardware MCSV
decrypt mcsv.en
software MCSV: 016D00001762E711
software MCSV-MMMM: 016D
software MCSV-CCCC: 0000
hardware MCSV: 016D00001762E711
hardware MCSV-MMMM: 016D
hardware MCSV-CCCC: 0000
Hardware customer ID is '0000' or '0001'
Software Customer ID is '0000' or '0001'
Allow to upgrade
MCSV check succeeded

Burn the kernel to eMMC ...
cp /tmp/firmware/zImage /tmp/mmc_p1/zImage_b
Burn the kernel to eMMC succeeded

Burn the dtb to eMMC ...
cp /tmp/firmware/zImage-imx6ul-14x14-evk.dtb /tmp/mmc_p1/imx6ul-14x14-evk_b.dtb
Burn the dtb to eMMC succeeded

Get rootfs from encrypted rootfs.tar.bz2.enc ...
rootfs.tar.bz2.enc exist, decrypt it to rootfs.tar.bz2
decrypt rootfs.tar.bz2.enc
openssl des3 -d -salt -in rootfs.tar.bz2.enc -out rootfs.tar.bz2 -k 2wsx#EDC
Get rootfs from encrypted rootfs.tar.bz2.enc succeeded

Burn the rootfs to eMMC ...
rm -rf /tmp/mmc_p3/bin /tmp/mmc_p3/boot /tmp/mmc_p3/dev /tmp/mmc_p3/etc /tmp/mmc_p3/home /tmp/mmc_p3/lib /tmp/mmc_p3/lost+found /tmp/mmc_p3/media /tmp/mmc_p3/mnt /tmp/mmc_p3/proc /tmp/mmc_p3/run /tmp/mmc_p3/sbin /tmp/mmc_p3/sys /tmp/mmc_p3/tmp /tmp/mmc_p3/usr /tmp/mmc_p3/var /tmp/mmc_p3/www
writting rootfs... please wait
tar -jxvm -C /tmp/mmc_p3 -f /tmp/firmware/rootfs.tar.bz2
Total write: 3409, temp proportion: 60
Writting 10/3409 (0, 30)
Writting 20/3409 (0, 30)
...
Writting 3390/3409 (59, 89)
Writting 3400/3409 (59, 89)
Burn the rootfs to eMMC succeeded
burn_rootfs done

Replace current primary application

Addtional patch for firmware upgrade ...
firmware_patch.enc exist, decrypt it and execute it
decrypt firmware_patch.enc

Addtional patch for firmware upgrade succeeded

Upgrading the firmware for 'eMMC' storage memory succeeded

firmware upgrade shell script succeeded
finished

看起來是有去做 patch 的

不過發現 patch 裡我並沒有為了 emmc 去 upgrade uboot

#!/bin/bash
# Additional patch for firmware upgrade shell script



function patch_nandflash {
  echo "patch for NAND Flash storage memory ..."

#  echo "Nothing to do"
  echo "Burn the uboot to NAND..."
  echo "Erasing Boot partition"
  flash_erase /dev/mtd0 0 0
  echo "Flashing Bootloader"
  kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 /tmp/firmware/u-boot-m300.imx-nand

  echo "patch for NAND Flash storage memory succeeded"
}



function patch_emmc {
  echo "patch for eMMC storage memory ..."

  echo "Nothing to do"

  echo "patch for eMMC storage memory succeeded"
}



if [ "$1" == "nandflash" ]
then
  patch_nandflash
elif [ "$1" == "emmc" ]
then
  patch_emmc
else
  echo "Nothing to do"
fi

1155

試著做以下的修改

diff --git a/proscend/tools/firmware_patch.sh b/proscend/tools/firmware_patch.sh
old mode 100755
new mode 100644
index 69d6008..3ff1420
--- a/proscend/tools/firmware_patch.sh
+++ b/proscend/tools/firmware_patch.sh
@@ -21,7 +21,13 @@ function patch_nandflash {
 function patch_emmc {
   echo "patch for eMMC storage memory ..."

-  echo "Nothing to do"
+#  echo "Nothing to do"
+  echo "access boot partition 1"
+  echo 0 > /sys/block/mmcblk1boot0/force_ro
+  echo "write U-Boot to sd card"
+  dd if=/tmp/firmware/u-boot-m300e.imx of=/dev/mmcblk1boot0 bs=512 seek=2
+  echo "re-enable read-only access"
+  echo 1 > /sys/block/mmcblk1boot0/force_ro

   echo "patch for eMMC storage memory succeeded"
 }

再 build 一次 image

1320

確認已經解決

上 code

commit 1cd35e55d6fbf1c791ed2f2983f2f93b7293a205
Refs: [v1.76-mfg], {origin/v1.76-mfg}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 13:15:02 2019 +0800

    [eMMC]write U-Boot at the patch for firmware upgrade

 proscend/tools/firmware_patch.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

一併上到 V1.77 避免遺忘

commit 99ec1c69f18f1587c5edc6b70f92a5168fa0b7d4
Refs: [hotfix/v1.77], {origin/hotfix/v1.77}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 13:22:13 2019 +0800

    [eMMC]write U-Boot at the patch for firmware upgrade

 proscend/tools/firmware_patch.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

1330

mantis issue - 0000428: [WEB UI] sessionTTL login fail issue

這個 issue 是 HYTEC 發問的

原本的解法是讓 web daemon 在重啟之前先睡個一秒確保 http response 已經順利送出去

不過 DQA 表示測了 30 次

第 30 次的時候 fail 了

因為目前 administration 那一頁 apply 都需要 device 重新啟動

這樣看來 web daemon 根本就不需要重新啟動了

修改如下

diff --git a/proscend/prosrc/icos/icoslib/web/webcfg.c b/proscend/prosrc/icos/icoslib/web/webcfg.c
index 441f5b2..b0fbd3a 100644
--- a/proscend/prosrc/icos/icoslib/web/webcfg.c
+++ b/proscend/prosrc/icos/icoslib/web/webcfg.c
@@ -1004,17 +1004,8 @@ static int _notify(PRO_EVENT *pevent)
             }
             break;

-        case ICOS_SYSTEM_UPDATE:
-            WEB_INFO("ICOS_SYSTEM_UPDATE\n");
         case ICOS_UCAST_DMN_RESTART:
             WEB_INFO("ICOS_UCAST_DMN_RESTART\n");
-
-            /*
-            ** sleep 1 second before restart web daemon
-            ** - so the web daemon restart after the cgi response
-            */
-            sleep(1);
-
             WEB_INFO("daemon restart\n");
             web_dump(DUMP_ALL,"init config");
             for(i=0; MAX_DAEMON_NUM>i; i++)

build 個 HYTEC 的 image

1405

試一下 M300 HYTEC 的 image

administration 第一次的 apply

Apply ok, Please reboot to take effect

reboot 吧

DQA 測了 30 次

我好歹也測個 10 次吧

  1. PASS
  2. PASS
  3. PASS
  4. PASS
  5. PASS
  6. PASS
  7. PASS
  8. PASS
  9. PASS
  10. PASS

集滿 10 個 PASS

上 code 吧

commit 1138c05e7353ab17234fc61d07ecab754f19049e
Refs: [hotfix/v1.77], {origin/hotfix/v1.77}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 14:39:34 2019 +0800

    do not restart web daemon when event ICOS_SYSTEM_UPDATE received

 proscend/prosrc/icos/icoslib/web/webcfg.c | 9 ---------
 1 file changed, 9 deletions(-)

commit 99ec1c69f18f1587c5edc6b70f92a5168fa0b7d4

1450

可以回到 M330 了

commit 5d6c6027c2eea697f192ec4eb1f4cbf66ab57439
Refs: [feature/proscend-porting], {origin/feature/proscend-porting}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 15:00:17 2019 +0800

    add the following CGIs:
    - /cgi-bin/connmgr.cgi?act=chg_wan_net_config
    - /cgi-bin/connmgr.cgi?act=chg_wan_net_apply

 proscend/prosrc/webcgi/connmgr.c | 59 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

1720

commit 975c59db96d8b4405507d3f8c06db268ef54988f
Refs: [feature/proscend-porting], {origin/feature/proscend-porting}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 17:16:55 2019 +0800

    modify the 'WAN > Priority' page accoding to the requirement from module designer

 proscend/prosrc/www/app/feature/wanPriority.html | 20 ++++++++++-
 proscend/prosrc/www/app/feature/wanPriority.js   | 43 ++++++++++++------------
 proscend/prosrc/www/app/locale-en.json           | 13 ++++---
 proscend/prosrc/www/app/locale-fr.json           | 15 ++++++---
 proscend/prosrc/www/app/locale-zh-tw.json        | 13 ++++---
 proscend/prosrc/www/app/services/icos.service.js |  7 ++++
 6 files changed, 75 insertions(+), 36 deletions(-)

1755

commit 228b6fa707a5f93432b2fd9cff0d3b73289604dc
Refs: [feature/proscend-porting], {origin/feature/proscend-porting}
Author: jeffrey <[email protected]>
Date:   Mon Feb 25 17:52:46 2019 +0800

    'LTE > Dual APN': remove 'LTE Net Mode' and keep APN1 and APN2 2 tab always

 proscend/prosrc/www/app/feature/dualSim_2apn.html | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)