20190401_jeffrey - silenceuncrio/diary GitHub Wiki
一早來 ariel 就找大家開會商量一下 M360 會 reboot 的問題
目前是由 john 和 jessy 幫忙後續
我還是繼續 M330 的產測事宜
areil 上週五給了我一個連絡窗口
我要寫一下文件再把 image 寄給他
先整理一下相關的情報
compile profile
- Products/Vendor - M330/2_MANUFACTURE
build 出來的 image
user@3b95631f73fe:~/proscend$ ls -al image/
total 32968
drwxr-xr-x 2 user user 4096 Apr 1 02:28 .
drwxrwxr-x 13 user user 4096 Apr 1 02:28 ..
-rw-r--r-- 1 user user 16777901 Apr 1 02:28 firmware.img
lrwxrwxrwx 1 user user 12 Apr 1 02:28 M330-04012019.img -> firmware.img
lrwxrwxrwx 1 user user 12 Apr 1 02:28 M330.img -> firmware.img
-rw-r--r-- 1 user user 15335424 Apr 1 02:28 M330-root.squashfs_ubi
-rw-r--r-- 1 user user 185724 Apr 1 02:28 M330-uboot.bin
-rw-r--r-- 1 user user 17 Apr 1 02:28 mcsv
-rw-r--r-- 1 user user 1441792 Apr 1 02:28 vmlinux.lzma.uImage
- firmware.img - 透過 web upgrade 所需要的 image
- M330-root.squashfs_ubi - root file system image
- M330-uboot.bin - uboot image
- vmlinux.lzma.uImage - linux kernel image
假如我是 yuncore 的工程師
我需要昇頻給我
- M330-uboot.bin - uboot image
- vmlinux.lzma.uImage - linux kernel image
- M330-root.squashfs_ubi - root file system image
首先我要想辦法利用套用昇頻的 uboot
- uboot 可以 upgrade uboot
後續就以 proscend 的 uboot 來做說明
先進 uboot
利用 erase
清乾淨 uboot env - erase 0x9f040000 +0x10000
ath> erase 0x9f040000 +0x10000
Erasing flash...
First 0x4 last 0x4 sector size 0x10000
4
Erased 1 sectors
proscend M330 uboot default env 如下
ath> print
bootargs=board= console=ttyS0,115200 ubi.mtd=7,2048 root=ubi0:rootfs rootfstype=ubifs noinitrd mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(reserved),1408k(uImage),64k(mib0),64k(ART);spi0.1:4m(kernel_a),48m(rootfs_a),4m(kernel_b),48m(rootfs_b),4m(config),20m(log),52m@0x0(firmware_a),52m@0x3400000(firmware_b) rootfstype=ubifs noinitrd
bootargsA=board= console=ttyS0,115200 ubi.mtd=7 root=/dev/mtdblock14 rootfstype=squashfs mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(reserved),1408k(uImage),64k(mib0),64k(ART);spi0.1:4m(kernel_a),48m(rootfs_a),4m(kernel_b),48m(rootfs_b),4m(config),20m(log),52m@0x0(firmware_a),52m@0x3400000(firmware_b) rootfstype=squashfs noinitrd
bootargsB=board= console=ttyS0,115200 ubi.mtd=9 root=/dev/mtdblock14 rootfstype=squashfs mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(reserved),1408k(uImage),64k(mib0),64k(ART);spi0.1:4m(kernel_a),48m(rootfs_a),4m(kernel_b),48m(rootfs_b),4m(config),20m(log),52m@0x0(firmware_a),52m@0x3400000(firmware_b) rootfstype=squashfs noinitrd
bootcmd=nboot 0x81000000 0 0
bootdelay=2
baudrate=115200
ethaddr=00:AA:BB:CC:DD:EE
ipaddr=192.168.1.1
serverip=192.168.1.10
dir=
lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap147${bcubi}-nand-jffs2&&nand erase 0x400000 0x3000000&&nand write $fileaddr 0x400000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&nand erase 0x0 0x400000&&nand write $fileaddr 0x0 $filesize
leu=tftp 0x80060000 ${dir}M330-uboot.bin&&erase 0x9f000000 +$filesize&&erase 0x9f040000 +0x10000&&cp.b $fileaddr 0x9f000000 $filesize
ldf=tftp 0x80060000 ${dir}M330-root.squashfs_ubi&&nand erase 0x400000 0x3000000&&nand erase 0x3800000 0x3000000&&nand erase 0x6800000 0x400000&&nand erase 0x6C00000 0x1400000&&nand write $fileaddr 0x400000 $filesize&&nand write $fileaddr 0x3800000 $filesize
ldk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&nand erase 0x0 0x400000&&nand erase 0x3400000 0x400000&&nand write $fileaddr 0x0 $filesize&&nand write $fileaddr 0x3400000 $filesize
dual_image_active=a
uboot_env_ver=0.2
bootloader_ver=1.1.4
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
no_good=.x
Environment size: 2196/65532 bytes
ath>
待會會利用到幾個 env
- ldk - 用來燒錄 linux kernel image -
vmlinux.lzma.uImage
- ldf - 用來燒錄 root file system image -
M330-root.squashfs_ubi
記得配合自己的環境修改 env serverip
以我的環境為例
+------------------+ +----------------------------+
| | | |
| M330-uboot.bin | 192.168.1.1 192.168.1.113 | Tftp Server |
| - ldk +-------------------------------+ - vmlinux.lzma.uImage |
| - ldf | ipaddr serverip | - M330-root.squashfs_ubi |
| | | |
+------------------+ +----------------------------+
使用 run ldk
來燒錄 linux kernel image - vmlinux.lzma.uImage
ath> run ldk
Trying eth0
eth0 link down
FAIL
Trying eth1
enet1 port3 up
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.113; our IP address is 192.168.1.1
Filename 'vmlinux.lzma.uImage'.
Load address: 0x80060000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
######################
done
Bytes transferred = 1441792 (160000 hex)
NAND erase: device 0 offset 0x0, size 0x400000
OK
NAND erase: device 0 offset 0x3400000, size 0x400000
OK
NAND write: device 0 offset 0x0, size 1441792 ... 1441792 bytes written: OK
NAND write: device 0 offset 0x3400000, size 1441792 ... 1441792 bytes written: OK
ath>
使用 run ldf
來燒錄 root file system image - M330-root.squashfs_ubi
ath> run ldf
Trying eth0
eth0 link down
FAIL
Trying eth1
Using eth1 device
TFTP from server 192.168.1.113; our IP address is 192.168.1.1
Filename 'M330-root.squashfs_ubi'.
Load address: 0x80060000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
######
done
Bytes transferred = 15335424 (ea0000 hex)
NAND erase: device 0 offset 0x400000, size 0x3000000
OK
NAND erase: device 0 offset 0x3800000, size 0x3000000
OK
NAND erase: device 0 offset 0x6800000, size 0x400000
OK
NAND erase: device 0 offset 0x6c00000, size 0x1400000
OK
NAND write: device 0 offset 0x400000, size 15335424 ... 15335424 bytes written: OK
NAND write: device 0 offset 0x3800000, size 15335424 ... 15335424 bytes written: OK
ath>
再來可以使用 reset
或直接使用 run bootcmd
來開機進 proscend 的產測 image
ath> run bootcmd
Loading from device 0: ath-spi-nand (offset 0x3400000)
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2019-03-26 3:29:04 UTC
Image Type: MIPS Linux Multi-File Image (lzma compressed)
Data Size: 1441661 Bytes = 1.4 MB
Load Address: 80060000
Entry Point: 80060000
Contents:
Image 0: 1441653 Bytes = 1.4 MB
## Booting image at 81000000 ...
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2019-03-26 3:29:04 UTC
Image Type: MIPS Linux Multi-File Image (lzma compressed)
Data Size: 1441661 Bytes = 1.4 MB
Load Address: 80060000
Entry Point: 80060000
Contents:
Image 0: 1441653 Bytes = 1.4 MB
Verifying Checksum at 0x81000040 ...OK
Uncompressing Multi-File Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728
Starting kernel ...
...
WARNING: uboot env macaddr loose
WARNING: uboot env macaddr loose, use ethaddr instead - 00:AA:BB:CC:DD:EE
WARNING: uboot env hw_mcsv loose
WARNING: uboot env hw_mcsv set to default - 014A00000012E7C1
WARNING: uboot env serialno loose
WARNING: uboot env serialno set to default - NA
WARNING: uboot env serialno not set
Note: ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE
Note: ifconfig eth1 hw ether 00:AA:BB:CC:DD:EF
### module <system> init
### module <switch> init
### module <lte> init
### module <connmgr> init
### module <cli> init
M330 login:
登入的帳號為 root 密碼隨便敲都可以
M330 login: root
Password:
Jan 1 00:02:44 login[1160]: pam_unix(login:account): account root has password changed in future
Jan 1 00:02:44 login[1160]: pam_unix(login:session): session opened for user root by (uid=0)
Jan 1 00:02:44 login[1160]: root login on 'ttyS0'
BusyBox v1.19.4 (2019-03-26 02:57:55 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.
=======================================================
M330-V330--20190401
Beta
Mon Apr 1 02:28:01 UTC 2019
=======================================================
root@M330:~#
請在 shell 下使用 clishell
進入 proscend 的 CLI - 僅提供產測使用
root@M330:~# clishell
M330#
目前僅提供以下命令
M330# help
status enter submenu status
system enter submenu system
lte enter submenu lte
mgmt enter submenu mgmt
exit exit
status sim list
用來檢查 LTE 模組
M330# status sim list
status = unknown
operator =
access =
IMSI =
number =
band =
EARFCN = 0
PLMN =
roaming = NO
up-kbps =
down-kbps =
tx-rx-kbytes =
tx-rx-drop =
M330#
system ethernet status list
用來檢查兩個 ethernet ports
M330# system ethernet status list
wan = auto
lan = 100M/Full
rx-crc-err = 0
M330#
lte serving-cell list
用來檢查 lte 模組
M330# lte serving-cell list
RATE =
RSRP =
RSRQ =
SINR =
RSCP =
ECIO = 0
cell-identity =
eNB-id = 0
cell-id = 0
pci-id =
EARFCN = 0
UL-BW =
DL-BW =
RSSI = 0 dbm
M330#
mgmt info list
用來檢查 proscend 產品面的一些資訊
M330# mgmt info list
hostname = M330
lan-mac = 00:AA:BB:CC:DD:EE
wan-mac = 00:AA:BB:CC:DD:EF
sn =
smcsv = 014A00000012E7C1
hmcsv = 014A00000012E7C1
software-version = V0.01
hardware-version =
modem =
IMEI =
uptime = 00:09:29
production = Yes
M330#
先盤到這邊
先排除 status sim list
的問題
先借 ariel 的 SIM 卡來用
status sim list
M330# status sim list
status = ready
operator = Chunghwa Telecom
access = FDD LTE
IMSI = 466924132182892
number = 0970717458
band = LTE BAND 7
EARFCN = 3400
PLMN = 46692
roaming = NO
up-kbps =
down-kbps =
tx-rx-kbytes =
tx-rx-drop =
M330/status#
lte serving-cell list
還是有問題
M330# lte serving-cell list
RATE =
RSRP =
RSRQ =
SINR =
RSCP =
ECIO = 0
cell-identity =
eNB-id = 0
cell-id = 0
pci-id =
EARFCN = 0
UL-BW =
DL-BW =
RSSI = 0 dbm
M330/lte#
mgmt info list
需要調整一下
M330# mgmt info list
hostname = M330
lan-mac = 00:AA:BB:CC:DD:EE
wan-mac = 00:AA:BB:CC:DD:EF
sn =
smcsv = 014A00000012E7C1
hmcsv = 014A00000012E7C1
software-version = V0.01
hardware-version =
modem = EC25EFAR06A02M4G
IMEI = 866758041450426
uptime = 00:06:57
production = Yes
M330#
hardware-version
拿掉
- M330 是從 M360 porting 過來的
-
hardware-version
是 M360 客戶的需求
production
拿掉
- M330 是從 M360 porting 過來的
- 這是 M360 在製造階段因應生產者流程上的特別需求
修改如下
diff --git a/proscend/prosrc/icos/clishell/cli_mgmt_identification.c b/proscend/prosrc/icos/clishell/cli_mgmt_identification.c
index d8352dd..cd9829c 100644
--- a/proscend/prosrc/icos/clishell/cli_mgmt_identification.c
+++ b/proscend/prosrc/icos/clishell/cli_mgmt_identification.c
@@ -155,11 +155,9 @@ static int list(idenetification *data)
CLI_MGMT_KERNEL_VERSION_ID,
#endif
CLI_MGMT_SOFTWARE_VERSION_ID,
- CLI_MGMT_HARDWARE_VERSION_ID,
CLI_MGMT_MODEM_FIRMWARE_VERSION_ID,
CLI_MGMT_IMEI_ID,
CLI_MGMT_UPTIME_ID,
- CLI_MGMT_PRODUCTION_STATE_ID,
};
int length = dim(ids);
@@ -268,11 +266,9 @@ sMenuItem menu_mgmt_identification[] =
#else
_ACTION_ITEM("software-version", "show software version", CLI_MGMT_SOFTWARE_VERSION_ID),
#endif
- _ACTION_ITEM("hardware-version", "show hardware version", CLI_MGMT_HARDWARE_VERSION_ID),
_ACTION_ITEM("modem", "show modem firmware version", CLI_MGMT_MODEM_FIRMWARE_VERSION_ID),
_ACTION_ITEM("IMEI", "show modem IMEI", CLI_MGMT_IMEI_ID),
_ACTION_ITEM("uptime", "show system uptime", CLI_MGMT_UPTIME_ID),
- _ACTION_ITEM("production", "show production state", CLI_MGMT_PRODUCTION_STATE_ID),
LIST_ITEM(CLI_MGMT_LIST_ID, _main),
上 code
commit 1f7393b92234c24e552d758e29ad10af1df0e389
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Mon Apr 1 13:53:37 2019 +0800
remove the following items from CLI: mgmt info
- hardware-version
- production
proscend/prosrc/icos/clishell/cli_mgmt_identification.c | 4 ----
1 file changed, 4 deletions(-)
些改後的 mgmt info list
M330# mgmt info list
hostname = M330
lan-mac = 00:AA:BB:CC:DD:EE
wan-mac = 00:AA:BB:CC:DD:EF
sn =
smcsv = 014A00000012E7C1
hmcsv = 014A00000012E7C1
software-version = V0.01
modem = EC25EFAR06A02M4G
IMEI = 866758041450426
uptime = 00:03:22
M330#
status sim list
和 lte serving-cell list
要等 ariel 排除問題
不然這樣的 image 也沒辦法提供給 yuncore 產測使用
ariel 表示他找到問題的癥結點了
我再 pull 一下 code 來 build image
結果是一場誤會
目前 base on 以下的版本
commit 6a895fb70d54ab8c9d477bac90e827350fd275bd
Refs: [develop], {origin/develop}
Author: ariel <[email protected]>
Date: Mon Apr 1 15:24:33 2019 +0800
add sleep in rc.local
proscend/yuncore_manufacture/rc.local | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
測試的變因是變壓器
我的變壓器稱 M330 Power Sample 01
ariel 的變壓器稱 M330 Power Sample 02
先針對我的 M330 Power Sample 01
來個 10 次測試
看看 status sim list
的結果
M330 Power Sample 01
- 100% PASS
- PASS - 10
- FAIL - 0
改用 ariel 的 M330 Power Sample 02
來個 10 次測試 - 100% PASS
- PASS - 10
- FAIL - 0
看來目前的 image 可以給 yuncore 了
繼續準備文件吧