20181218_jeffrey - silenceuncrio/diary GitHub Wiki
繼續 M300 wizard
目前 wizard 的 flow 經過 areil 與 DQA 的討論決定如下
Wizard Flow:
(1) Management → Administration
(2) Wan Priority →
ETH Only:
(2.1) WAN → Ethernet
ETH First / LTE First:
(2.1) LTE → Dual SIM
(2.2) WAN → Ethernet
LTE Only:
(2.1) LTE → Dual SIM
(3) LAN → Ipv4
(4) System → Time and Date
不過以 wizard 來說
第一步的 Management → Administration
原本的頁面有
- System Setup
- Model name
- Session TTL
- Super User
- User #1
- User #2
- User #3
是不是每個設定項都要出現在 wizard 是個問題
而且 user 的部分還會因為目前 login 的 user level 而有不同
看來 Management → Administration
還是保留原本的
與 ariel 討論一下 wizard 每個 flow 的設定項是否有需要都開放
ariel 想起來當初與 DQA 的討論
(1) Management → Administration
只改 super user 密碼
只有 super user 能使用 wizard
(2) Wan Priority →
ETH Only:
(2.1) WAN → Ethernet
Ethernet Ping Health 不要
ETH First / LTE First:
(2.1) LTE → Dual SIM
只要 SIM1/SIM2 configuration
(2.2) WAN → Ethernet
Ethernet Ping Health 不要
LTE Only:
(2.1) LTE → Dual SIM
只要 SIM1/SIM2 configuration
(3) LAN → Ipv4
全部保留
(4) System → Time and Date
只要 Time Zone Setup
繼續 汽車座椅
昨天經過與老婆的討論
我們已經放棄 escape 加裝第三排的選項
目前專心於副駕駛座的轉向改裝
剛剛打電話 豪革汽車裝潢 的 曾先生 0912634884
他表示他不會做這項改裝
況且他表示這也不合法規
應該不會有人會幫我們改裝才對
我還是繼續 survey 吧
最糟就不改裝了
把今天 daily build 得到的 M360-P image 解開得到的 upgrade.bin 以及修改後的 uboot 寄給 mitrastar 試用
隨信在附上生產流程該幫我們注意的事項
跟進一下 M360 uboot 點燈的議題
mitrastar 已經寫信告知如何從 linux 來 upgrade uboot
Hi Jeffrey:
可參考下面步驟,
1. 先將u-boot上傳至device上(GUI/FTP/TFTP)
2. 透過flash command ( 可參考fw upgrade command) 將適才上傳的u-boot fw 更新至bootloader partition (dev/mtd1)
3. 重開機
注意: 更新bootloader為危險動作,如果更新失敗會造成系統無法開機! 需更換flash.
Best regards,
Nils
我先改一版 uboot 來看看有沒有 upgrade 成功
利用下面的 command 進入該 container
docker exec -it -u user build-uboot-m360 /bin/bash
做點小修改才能知道 uboot 真的有被換掉了沒
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 852f274..8ffadb9 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -2113,7 +2113,7 @@ __attribute__((nomips16)) void board_init_r (gd_t *id, ulong dest_addr)
ledCtrl(_LED_GPIO_POWER, 1);
ledCtrl(_LED_GPIO_LAN, 0);
- ledCtrl(_LED_GPIO_INTERNET, 0);
+ ledCtrl(_LED_GPIO_INTERNET, 1);
ledCtrl(_LED_GPIO_SIM, 0);
(END)
利用 tftp 先把 uboot.img 抓到 device 上
root@M360-P:/tmp# tftp -g -r uboot.img 192.168.1.113
root@M360-P:/tmp# ls -al
...
-rw-r--r-- 1 root root 136204 Dec 14 07:05 uboot.img
...
再來要利用 mtd 這個原本 openwrt 就有的 command
root@M360-P:/tmp# mtd
Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]
The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
unlock unlock the device
refresh refresh mtd partition
erase erase all data on device
verify <imagefile>|- verify <imagefile> (use - for stdin) to device
write <imagefile>|- write <imagefile> (use - for stdin) to device
jffs2write <file> append <file> to the jffs2 partition on the device
fixseama fix the checksum in a seama header on first boot
Following options are available:
-q quiet mode (once: no [w] on writing,
twice: no status messages)
-n write without first erasing the blocks
-r reboot after successful command
-f force write without trx checks
-e <device> erase <device> before executing the command
-d <name> directory for jffs2write, defaults to "tmp"
-j <name> integrate <file> into jffs2 data when writing an image
-s <number> skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"
-p write beginning at partition offset
Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
mtd -r write linux.trx linux
參考 linux 開機的訊息得知 uboot 所在的 device 名稱
...
[ 2.804000] Creating 8 MTD partitions on "MT7621-NAND":
[ 2.812000] 0x000000000000-0x000007f80000 : "ALL"
[ 2.824000] 0x000000000000-0x000000080000 : "Bootloader"
[ 2.836000] 0x000000080000-0x000000100000 : "Config"
[ 2.848000] 0x000000100000-0x000000140000 : "Factory"
[ 2.856000] 0x000000140000-0x000002140000 : "firmware"
[ 2.872000] 0x0000002ecd97-0x000002140000 : "rootfs"
[ 2.880000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[ 2.920000] mtd: partition "rootfs_data" created automatically, ofs=0xec0000, len=0x1280000
[ 2.936000] 0x000000ec0000-0x000002140000 : "rootfs_data"
[ 2.948000] 0x000002140000-0x000004140000 : "reserve"
[ 2.960000] 0x000005000000-0x000006000000 : "Proscend-config"
[ 2.972000] 0x000006000000-0x000007000000 : "Proscend-misc"
[ 2.984000] [mtk_nand] probe successfully!
名稱為 Bootloader
再來就是瞬間定生死的 command - mtd wirte /tmp/uboot.img Bootloader
root@M360-P:/tmp# mtd write /tmp/uboot.img Bootloader
Unlocking Bootloader ...
Writing from /tmp/uboot.img to Bootloader ...
root@M360-P:/tmp#
寫失敗的話就開不了機了
reboot 吧
成功置換了 uboot
找 ariel 討論後的結論如下
uboot.img 在 upload 到 device 的過程也許會出錯
比較適當的方式還是要參考 firmware upgrade 的作法
產生 md5 checksum 再打包
比如 uboot.img + uboot.md5 = M360-P_uboot.img
我特別開一個後門讓 PI 能透過 web ui 作 upgrade
跟 firmware upgrade 一模一樣
不過另外寫一隻 shell script 來做事
這樣會再 release 一版有此後們的 firmware 給 PI
然後再透過秘密的 url 來作 uboot upgrade
一樣會提醒 PI 作 reboot
uboot 一旦牽涉到修改
以及使用者需要作 uboot upgrade 的話
那 uboot 的版本號就是必須的了
我想就從 1.0 開始吧
重點是目前的 uboot 並沒有版本的訊息
我需要想一個完善的方式來做這件事
先請 ariel 幫我新增這個 job
索性連 job name 和 schedule 一起 mail 給 ariel
- job - web ui for upgrade uboot (uboot need version information: 1.0)
- Start - 12/24
- End - 12/28
待會 BUII 開會我要會 GRE with NHRP 為何延期對作金主作個說明
就以 M300 的 wiki - DMVPN 作個資訊彙整的起點吧
至於 新版的 auagga 的 nhrpd 是如何的搞不定就不要解釋來花大家的時間了
好好的讓金主了解到 是方科技 需要的其實就是 DMVPN 就好了