20190125_jeffrey - silenceuncrio/diary GitHub Wiki

0905

昨天下班前放著 兩台試圖解決 M300 - WiFi: warm reboot cause hang 問題的 device

不斷的重開機 - 在 rc.local 最後會呼叫 /usr/sbin/icosconfig coldreboot

早上看兩台都仍然運作正常

看來的確是解決了

試著下個結論

M300 - WiFi: warm reboot cause hang

  • uboot 裡去控制 IO control power 有時會失控 - 3 %
  • linux 裡去控制 IO control power 要修改 device tree 定義
    • 原本被定義成 uart

0910

昨天 m330 進 /home/user/source proenv.sh

build proscend 外層出了錯

...
 make[3] -C package/proscend-dep/libtprint compile
 make[3] -C package/proscend-dep/libxml2 compile
 make[3] -C package/proscend-dep/mosquitto compile
make -r world: build failed. Please re-run make with V=s to see what's going on
make: *** [world] Error 1

aaron 幫忙修正了問題後繼續 build...

1000

一樣出錯

 make[3] -C package/util-linux install
 make[3] -C package/wireless-tools install
 make[3] -C package/zlib install
 make[3] -C package/base-files install
 make[2] package/rootfs-prepare
 make[3] package/preconfig
 make[2] target/install
 make[3] -C target/linux install
make -r world: build failed. Please re-run make with V=s to see what's going on
make: *** [world] Error 1

make distclean 之後再 build 吧

可能是我先在 branch develop 下先做了 source proenv.sh 的關係

1330

m300 hotfix/v1.76 需要加入 uboot 版本的訊息方便產線做確認

因為這一次的 v1.76 會去 upgrade uboot

1355

盤一下工作狀況方便寫週報

  • M330
    • web server and GUI
    • GRE
    • PPTP
    • RIP 1/2
    • OSPF
    • BGP
  • M300
    • Set to SIM 1 slot in uboot
      • hytec 已放棄這個功能
    • WiFi: warm reboot cause hang
      • uboot 裡去控制 IO control power 有時會失控 - 3 %
      • linux 裡去控制 IO control power 要修改 device tree 定義
        • 原本被定義成 uart
    • Cisco DMVPN
    • Wizard
    • MFG tool with UBI
  • M360
    • Schedule Reboot

1410

M330 proscend 外層 build 過了

先回頭處理 M300 hotfix/v1.76

uboot 先去設定我們 proscend 用的 bootloader version 1.0

diff --git a/main.c b/main.c
index 62ab1ac..8707eb3 100644
--- a/main.c
+++ b/main.c
@@ -74,6 +74,9 @@ void main_loop(void)
        setenv("ver", version_string);  /* set version variable */
 #endif /* CONFIG_VERSION_VARIABLE */

+    // Proscend Bootloader version
+    setenv("bootloader_ver", "1.0");
+
        cli_init();

        run_preboot_environment_command();

使用 quilt

切到 u-boot-imx 所在的 source code 目錄之下

➜  M300 git:(hotfix/v1.76) ✗ cd build_small/tmp/work/m300-poky-linux-gnueabi/u-boot-imx/2015.04-r0/git

quilt new proscend_bootloader_ver.patch

➜  git git:(imx_v2015.04_4.1.15_1.0.0_ga) quilt new proscend_bootloader_ver.patch
Patch patches/proscend_bootloader_ver.patch is now on top

加入待會要改的 files - common/main.c

➜  git git:(imx_v2015.04_4.1.15_1.0.0_ga) quilt add common/main.c
File common/main.c added to patch patches/proscend_bootloader_ver.patch

修改

使用 quilt refresh 產生 proscend_bootloader_ver.patch

➜  git git:(imx_v2015.04_4.1.15_1.0.0_ga) quilt refresh
Refreshed patch patches/proscend_bootloader_ver.patch

產出的 proscend_bootloader_ver.patch

Index: git/common/main.c
===================================================================
--- git.orig/common/main.c
+++ git/common/main.c
@@ -74,6 +74,9 @@ void main_loop(void)
 	setenv("ver", version_string);  /* set version variable */
 #endif /* CONFIG_VERSION_VARIABLE */
 
+    // Proscend Bootloader version
+    setenv("bootloader_ver", "1.0");
+
 	cli_init();
 
 	run_preboot_environment_command();

linux 部分也修一下

build image

1520

mfgtoo 燒錄

icos system module 改壞了

修正後再 build 一次

mfgtool 燒錄

測試 PASS 上 code

commit 6b1fdf0ae5738d0036b14481abdfbbe618b00743
Author: jeffrey <[email protected]>
Date:   Fri Jan 25 15:54:58 2019 +0800

    add bootloader version

 .../recipes-bsp/u-boot/files/proscend_bootloader_ver.patch | 14 ++++++++++++++
 .../recipes-bsp/u-boot/u-boot-imx_2015.04.bbappend         |  1 +
 proscend/memory_fs/nandflash/default/rootfs/etc/rc.local   | 13 +++++++------
 proscend/prosrc/icos/clishell/cli_mgmt_identification.c    |  8 ++++++++
 proscend/prosrc/icos/icoslib/system/systemcfg.c            |  4 ++++
 proscend/prosrc/icos/include/module_system.h               |  1 +
 proscend/prosrc/webcgi/system.c                            |  1 +
 proscend/prosrc/www/app/feature/identification.html        |  2 ++
 proscend/prosrc/www/app/locale-en.json                     |  1 +
 proscend/prosrc/www/app/locale-fr.json                     |  1 +
 proscend/prosrc/www/app/locale-zh-tw.json                  |  1 +
 11 files changed, 41 insertions(+), 6 deletions(-)

1605

目前 M330 我的 task 都還無法開工

我還是先回到 M300

盤一下 M300 待作事項

  • M300
    • Cisco DMVPN
    • Wizard
    • MFG tool with UBI

這三個功能都要做在 branch develop 上面

先 build 一版吧

先把 wixard 做完

已有 wifi 功能的為主 - Products/Vendor = M300/16_MTK_WIFI

build image

build error

因為我昨天重新產生了 container

所以我需要因應 winston 的修改 - 需要 mtd-utils

利用 apt install mtd-utils 做安裝

再次 build image... ok

mfgtool 燒錄