20170123_jeffrey - silenceuncrio/diary GitHub Wiki

Index

  • 0905 - review
  • 0935 - Fine Tune Firmware Built and Upgrade 還有兩個 issue
  • 1020 - 跟 ariel 稍微 sync 一下
  • 1105 - 和 ariel 以及 aaron 討論 rootfs read-only 後導致某些 icos module 初始化異常 的 issue
  • 1150 - winston 希望知道我之前 efm bridge 最後跟 actelis co 端達到甚麼樣的狀態
  • 1305 - 找出當時最後的一封 mail 轉發給 winston - 是由 pioneer 在當時下的一步公司從來沒有的好棋
  • 1315 - ariel 提出 web ui firmware upgrade 的問題
  • 1420 - Fine Tune Firmware Built and Upgrade 的 proposal 已完成
  • 1425 - 來進行 rootfs read-only 後導致某些 icos module 初始化異常 的 issue
  • 1500 - 不做 /bin/mkdir -p /tmp/varmount /tmp/var /var
  • 1530 - aaron 找到 yocto 本身就有的 Read-Only Root Filesystem 功能
  • 1620 - 明天要回台中一趟

0905

review

engineering note book... 用 上禮拜寫的 uboot_env.sh

記得填我的 RD - resource table

0935

Fine Tune Firmware Built and Upgrade 還有兩個 issue

  • 檔案的完整性檢查
  • MCSV 的加密保護

來寫 proposal

1020

跟 ariel 稍微 sync 一下

  • sys led 已經在 uboot delay 一秒後去點亮了
  • gps demo page 完成
  • dual image 完成
  • rootfs read-only 後導致某些 icos module 初始化異常

rootfs read-only 後導致某些 icos module 初始化異常 issue 發 mail 讓 m300 team 各自認領

繼續回到 Fine Tune Firmware Built and Upgrade proposal

1105

剛剛和 ariel 以及 aaron 討論 rootfs read-only 後導致某些 icos module 初始化異常 的 issue

結論如下

從 M300 的 application 角度來看

  • /mnt/data - 可寫, 保存
  • /etc - 可寫, 保存
  • /home/log - 可寫, 保存
    • 不跟 /mnt/data/var 在同一塊 NAND Flash MTD
  • /var - 可寫, 不保存
    • 掛在 tmp 下即可

1150

winston 希望知道我之前 efm bridge 最後跟 actelis co 端達到甚麼樣的狀態

1305

我找出當時最後的一封 mail 轉發給 winston - 是由 pioneer 在當時下的一步公司從來沒有的好棋

Dear all,
From my observation, I summarize the following points:
1. Our product follows standard, which achive max speed 5696K
2. Customer uses Actelis CO which is compliant with standard and our product can connect to the CO with max speed up to 5696K
3. Actelis CO implements with proprietary feature (through proprietary EOC omessage) which can allow Actelis's CPEs to connect with speed up to more than 15M. This is the feature called DRB.

Under this condition, we can take following actions, either way:
1. Inform customer that it's possbile to implement this feature if
    -- we deal with Actelis for getting their permission and technical support (e.g., paying royalty fee per units) to implement this feature.
    -- and, customer need to pay the NRE or commit certain quantity of volume for covering the additional development cost
    -- and, customer need to accept the cost up resulting from the royalty fee per unit from Actelis.
2. Nego with customer that it's proprietary design of Actelis. We can't implement this without Actelis's permission. (It's IP legal issue, not just technical issue.)

Dear Andres, Shin,
Please confirm if what I said is correct or not.

Dear Jim, Vincent,
Please advise.

覺得 pioneer 在當下為了這個 issue 下了很好的決策點

比其他的被動轉達者好得太多

不過我自己在當下的處境其實很不堪

像個廉價的技術人員...

1315

ariel 提出 web ui firmware upgrade 的問題

重開機後做 firmware upgrade 會在 3% 才跳出說要使用者 log in

1420

Fine Tune Firmware Built and Upgrade 的 proposal 已完成

1425

來進行 rootfs read-only 後導致某些 icos module 初始化異常 的 issue

實作早上的結論

從 M300 的 application 角度來看

  • /mnt/data - 可寫, 保存
  • /etc - 可寫, 保存
  • /home/log - 可寫, 保存
    • 不跟 /mnt/data/var 在同一塊 NAND Flash MTD
  • /var - 可寫, 不保存
    • 掛在 tmp 下即可

先不考慮 /home/log 不跟 /mnt/data/var 在同一塊 NAND Flash MTD 的情況

rc.local

# ======================================================================
# | read-only remount a mounted root file system
# | attach MTD device to UBI according to the current rootfs
# ======================================================================
/bin/mkdir -p /mnt/data
/bin/mkdir -p /mnt/config
/bin/mkdir -p /home/log

if df | grep rootfs_a
then
    echo "read-only remount a mounted root file system"
    mount -t ubifs ubi0:rootfs_a / -o remount,ro

    echo "attach MTD device 5 (mtd5) to UBI - ubi1:config_a"
    ubiattach -m 5
    mount -t ubifs ubi1:config_a /mnt/config
else
    echo "read-only remount a mounted root file system"
    mount -t ubifs ubi0:rootfs_b / -o remount,ro

    echo "attach MTD device 10 (mtd10) to UBI - ubi1:config_b"
    ubiattach -m 10
    mount -t ubifs ubi1:config_b /mnt/config
fi



# ======================================================================
# | prepare the following mountpoint for the application
# | '/mnt/data' - writeble and need save
# | '/etc' - writeble and need save
# | '/home/log' - writeble and need save
# | '/var' - writeble and do not need save

# ======================================================================
/bin/mkdir -p /mnt/config/data
/bin/mkdir -p /mnt/config/etc
/bin/mkdir -p /mnt/config/log
/bin/mkdir -p /tmp/var

mount /mnt/config/data /mnt/data
mount /mnt/config/etc /etc
mount /mnt/config/log /home/log
mount /tmp/var /var

做完 firmware upgrade... 重開機

...
Running local boot scripts (/etc/rc.local)uboot_env_ver=1.0
uboot_env_ver 1.0 match, nothing to do
read-only remount a mounted root file system
attach MTD device 10 (mtd10) to UBI - ubi1:config_b
UBI device number 1, total 124 LEBs (15745024 bytes, 15.0 MiB), available 0 LEBs (0 bytes),(124.0 KiB)
udevd[95]: failed to create queue file: No such file or directory

udevd[95]: failed to create queue file: No such file or directory

tar: Removing leading `/' from member names
mkdir: can't create directory '/tmp/': No such file or directory
error

m300 login:

連 icos init 都沒進去

1500

不做 /bin/mkdir -p /tmp/varmount /tmp/var /var

rc.local

# ======================================================================
# | prepare the following mountpoint for the application
# | '/mnt/data' - writeble and need save
# | '/etc' - writeble and need save
# | '/home/log' - writeble and need save
# | '/var' - writeble and do not need save
# ======================================================================
/bin/mkdir -p /mnt/config/data
/bin/mkdir -p /mnt/config/etc
/bin/mkdir -p /mnt/config/log
#/bin/mkdir -p /tmp/var

mount /mnt/config/data /mnt/data
mount /mnt/config/etc /etc
mount /mnt/config/log /home/log
#mount /tmp/var /var

再試試

...
Running local boot scripts (/etc/rc.local)uboot_env_ver=1.0
uboot_env_ver 1.0 match, nothing to do
read-only remount a mounted root file system
attach MTD device 10 (mtd10) to UBI - ubi1:config_b
UBI device number 1, total 124 LEBs (15745024 bytes, 15.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
tar: Removing leading `/' from member names

### module <system> init
sh: /var/seqcmdd/ipt_cmd.pid: No such file or directory
mkdir: can't create directory '/var/usock': Read-only file system
### module <syslog> init
### module <switch> init
### module <wanst> init
### module <lan> init
cp: can't create '/etc/icos/lan/lancfg.ini': No such file or directory
 Error: Module lan cfg init failure
### module <dhcpc> init
### module <firewall> init
### module <firewall6> init
### module <dns6> init
### module <web> init
### module <virtual-server> init
### module <nat> init
### module <dhcp> init
cp: can't create '/etc/icos/dhcp/dhcpcfg.ini': No such file or directory
### module <sntp> init
sh: /home/root/.profile: Read-only file system
### module <ssh> init
### module <ipsec> init
cp: can't create '/etc/icos/ipsec/ipseccfg.json': No such file or directory
json_object_from_file: error opening file /etc/icos/ipsec/ipseccfg.json: No such file or directory
 Error: Module ipsec cfg init failure
### module <pppoe_client> init
cp: can't create '/etc/icos/pppoe_client/pppoe_client.ini': No such file or directory
### module <ddns> init
### module <ipv6lan> init
cp: can't create '/etc/icos/ipv6lan/ipv6_lan.ini': No such file or directory
### module <dhcp6c> init
sh: /var/dhcpv6/etc/dhcp6cctlkey: No such file or directory
sh: /var/dhcpv6/etc/dhcp6sctlkey: No such file or directory
### module <alarm> init
cp: can't create '/etc/icos/alarm/alarm.ini': No such file or directory
### module <lte> init
cp: can't create '/etc/icos/lte/lte.ini': No such file or directory
### module <com> init
cp: can't create '/etc/icos/com/comcfg.ini': No such file or directory
 Error: Module com cfg init failure
### module <vcom> init
cp: can't create '/etc/icos/vcom/vcomcfg.ini': No such file or directory
 Error: Module vcom cfg init failure
### module <openvpn> init
 Error: Module openvpn cfg init failure
### module <netmon> init
### module <connmgr> init
Cannot parse config file: No such file or directory
Error: environment not initialized
error

Mobile Router login: 

1530

aaron 找到 yocto 本身就有的 Read-Only Root Filesystem 功能

5.23. Creating a Read-Only Root Filesystem

aaron 已經 build 過了

不過有個 dns 啥的 recipe 要調整一下

看來我這個情報不足的在 rc.local remount 方式先退下吧

在告知 ariel 時

她表示有打開過這個 feature, 不過 build 不過就作罷了

真多虧了 aaron

1620

明天要回台中一趟

禮拜三要提 Fine Tune Firmware Built and Upgrade 的 proposal

今天要完成

⚠️ **GitHub.com Fallback** ⚠️