20160804_jeffrey - silenceuncrio/diary GitHub Wiki
- 0925 - review
- 0930 - nand 的 write 和 write.raw 對外包廠的燒錄來說是否有對應的方法可以實作
- 1010 - 不用 MfgTool 燒錄 NAND Flash 的流程 - 麻煩 - 為了 MfgTool 留 USB Port
- 1020 - 開始進行 web
-
1045 - web
mini_httpd
-index.html
在/www
- source code 在M300\fsl-release-bsp\proscend\prosrc\www
-
1130 - 看
index.html
- 1305 - 問 ariel 關於 share memory 中的 status 資訊 如何取得
review
簡單歸納一下最後的 SOP
我們會準備 9 個檔案給負責燒錄的外包廠
- fcb0
- fcb1
- fcb2
- fcb3
- dbbt0
- dbbt1
- dbbt2
- dbbt3
- tmp_kobs_ng
因為不了解解實際外包廠對 NAND Flash 的燒錄方式
所以我們使用 U-Boot 上的 tool nand
來說明
針對每個檔案燒錄的方式如下
- fcb0
- tftpboot 81000000 fcb0
- nand write.raw 81000000 0 1
- fcb1
- tftpboot 81020000 fcb1
- nand write.raw 81020000 20000 1
- fcb2
- tftpboot 81040000 fcb2
- nand write.raw 81040000 40000 1
- fcb3
- tftpboot 81060000 fcb3
- nand write.raw 81060000 60000 1
- dbbt0
- tftpboot 81080000 dbbt0
- nand write 81080000 80000 800
- dbbt1
- tftpboot 810a0000 dbbt1
- nand write 810a0000 a0000 800
- dbbt2
- tftpboot 810c0000 dbbt2
- nand write 810c0000 c0000 800
- dbbt3
- tftpboot 810e0000 dbbt3
- nand write 810e0000 e0000 800
- tmp_kobs_ng
- tftpboot 81100000 tmp_kobs_ng
- nand write 81100000 100000 65800
- tmp_kobs_ng
- nand write 81100000 200000 65800
目前需要釐清的是
nand write
和 nand write.raw 對外包廠的燒錄來說是否有對應的方法可以實作
剛剛找 morris 和 ariel 聊一下不用 MfgTool 燒錄 NAND Flash 的流程
知道這麼麻煩之後大家就打退堂鼓了
硬體方面就看為了 MfgTool 的 USB Port 要怎麼留了
是外觀上直接留一個 USB Port 還是 PCB 板留個接腳用完 MfgTool 再拆掉
可以開始來進行 web 了
update 一下 M300 最新的 code
build 個 SD Card 用的 image
放到 6 號 CPU 板子上
切換成 SD Card boot
開機
...
Running local boot scripts (/etc/rc.local)### module <system> init
...
### module <web> init
...
Freescale i.MX Release Distro 3.14.52-1.1.1 M300 /dev/ttymxc0
M300 login: root
Password:
root@M300:~#
icos init 跑了
log in 了
root@M300:~# ifconfig
lan Link encap:Ethernet HWaddr 06:4B:58:3C:94:3E
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::44b:58ff:fe3c:943e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:247 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31030 (30.3 KiB) TX bytes:828 (828.0 B)
從可以看的到 RJ-45 ethernet port 的那一面
我們要接的是左邊的那一個 port
C:\WINDOWS\system32>ping 192.168.1.1
Ping 192.168.1.1 (使用 32 位元組的資料):
回覆自 192.168.1.1: 位元組=32 時間<1ms TTL=64
回覆自 192.168.1.1: 位元組=32 時間=1ms TTL=64
回覆自 192.168.1.1: 位元組=32 時間<1ms TTL=64
192.168.1.1 的 Ping 統計資料:
封包: 已傳送 = 3,已收到 = 3, 已遺失 = 0 (0% 遺失),
大約的來回時間 (毫秒):
最小值 = 0ms,最大值 = 1ms,平均 = 0ms
PC 跟 M300 網路接上了
root@M300:~# ps x | grep http
323 ? Ss 0:00 mini_httpd -C /etc/mini_httpd.conf -p 80 -dd /www
456 ttymxc0 S+ 0:00 grep http
負責 web 的 process mini_httpd
也跑起來了
先不管 login 的過程
首頁是 http://192.168.1.1/index.html
root@M300:~# ls /www/
Act_option.html VPN_AddIpsec.html
AddrMapping.html VPN_AddIpsec.js
...
Firewall_RuleSum.html index.html
...
可以看到 index.html
在 /www
之下
至於 source code 的位置在 M300\fsl-release-bsp\proscend\prosrc\www
目前的大架構是蠻整齊的
先看 index.html
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<frameset rows="54,*" frameborder="No",border="0" framespacing="0">
<frame src="top.html" name="header" frameborder="no" scrolling="NO" noresize>
<frameset cols="178,*" frameborder="No",border="0" framespacing="0">
<frame src="menu.html" name="panel" frameborder="no" noresize id="panel">
<frameset rows="19,*,34" frameborder="No",border="0" framespacing="0">
<frame src="path.html" name="path" scrolling="no" noresize>
<frame src="home.html" name="main" frameborder="no" noresize id="main">
<frame src="buttom.html" name="buttom" frameborder="no" scrolling="no" noresize id="status">
</frameset>
</frameset>
</frameset>
<noframes>
<body>Sorry, your browser don't support frame.</body>
</noframes>
</html>
下午找時間問一下 ariel 關於 share memory 中的 status 資訊要如何取得