20190704_jeffrey - silenceuncrio/diary GitHub Wiki
繼續的測試
至少作個 20 次
PASS
清除
- /tmp/firmware.upload
- /tmp/FirmwareUpgrade.log
- /tmp/FirmwareUpgrade.progress.json
繼續
PASS
清除一樣的三個暫存檔 繼續
PASS
三次成功
簡單紀錄
- 04 - PASS
- 05 - PASS
- 06 - PASS
- 07 - PASS
- 08 - PASS
- 09 - PASS
- 10 - PASS
- 11 - PASS
- 12 -
測試的同時也幫新人多寫幾個 web intro 的 demo
M300 - feature/web_ui_intro - web introduction: 03
commit 348729a258911bba4e1128c83904ea6335d517b0
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 10:06:16 2019 +0800
web introduction: 03
- nothing but a '<h2>'
proscend/prosrc/www/app/feature/web_intro_03.html | 20 ++++++++++++++
proscend/prosrc/www/app/feature/web_intro_03.js | 33 +++++++++++++++++++++++
proscend/prosrc/www/src/index.html.src | 1 +
proscend/prosrc/www/src/menu.html.src | 1 +
4 files changed, 55 insertions(+)
commit ff03be28fed772c2a84f9f674ded919cf037d5ce
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 10:38:23 2019 +0800
web introduction: 03
- add test data
- use <pre> to display the test data for debug
- use input with type radio to display vm.test.mode
- use ng-repeate to show vm.test.group
- each entry at vm.group has a edit button with a ng-click handler - vm.edit.in
proscend/prosrc/www/app/feature/web_intro_03.html | 48 ++++++++++++++++++++++-
proscend/prosrc/www/app/feature/web_intro_03.js | 33 +++++++++++++++-
2 files changed, 79 insertions(+), 2 deletions(-)
commit 46dbbc6e2fc5dcd3b9ea4e2d5735beef6d48d4ee
Refs: [feature/web_ui_intro], {origin/feature/web_ui_intro}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 10:50:38 2019 +0800
web introduction: 03
- use vm.edit.in_use with ng-hide and ng-show to display the panel
- add a panel for edit for some entry in vm.test.group
proscend/prosrc/www/app/feature/web_intro_03.html | 43 ++++++++++++++++++++++-
proscend/prosrc/www/app/feature/web_intro_03.js | 19 ++++++++++
2 files changed, 61 insertions(+), 1 deletion(-)
繼續紀錄
- 04 - PASS
- 05 - PASS
- 06 - PASS
- 07 - PASS
- 08 - PASS
- 09 - PASS
- 10 - PASS
- 11 - PASS
- 12 - PASS
- 13 - PASS
- 14 - PASS
- 15 - PASS
- 16 - PASS
- 17 - PASS
- 18 - PASS
- 19 - PASS
- 20 - PASS
可以 commit 了
M330 - develop - sometimes progress bar stop at 99% while firmware upgrade at web ui
commit 31603ae6febfaa14f111beabdd9dc2fdf9826336
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 11:40:29 2019 +0800
use a mutex-like to protect the access to the progress information file whie firmware upgrade
- try to prevent fail to write the correct informaiton
- sometimes progress bar stop at 99% while firmware upgrade at web ui
proscend/prosrc/icos/script/FirmwareUpgrade.sh | 36 ++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
回到 M330 - feature/lighttpd
參考 M300 - feature/lighttpd 的 web icos module 來改 M330
run 起來囉
commit 吧
M330 - feature/lighttpd - replace the iweb with lighttpd at icos web module
commit 7cde8ae4730407eb99b41070604b43a295e31a51
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 14:09:33 2019 +0800
feature/lighttpd - replace the iweb with lighttpd at icos web module
- use web_x509_lighttpd.sh instead of web_x509.sh
- the arg for openssl command options `-keyout` and `-out` are different for iweb
- iweb_key.pem for `-keyout`
- iweb_cert.pem for `-out`
- but the arg for openssl command options `-keyout` and `-out` are the same for lighttpd
- lighttpd.pem for `-keyout` and `-out`
- prepare the x509 certificate at RAM first then move it to the NANDFLASH
- use `-D` command option to tell lighttpd don't go to background
- or after ICOS_ProcLaunch(), proc_msg_cb will be a problem
- before launch the lighttpd, prepare the configuraion for it base on icos web configuraion
- keep the same 2 daemon control but only use the daemon with id DID_HTTPS
- one lighttpd process can serve HTTP and HTTPS at the same time
- keep the same 2 daemon control at icos module save the implementing time
proscend/prosrc/icos/icoslib/web/webcfg.c | 171 ++++++++++++++++++-----
proscend/prosrc/icos/script/web_x509_lighttpd.sh | 5 +
2 files changed, 140 insertions(+), 36 deletions(-)
耐著性子再 review 一下
馬上修了一個和 手指頭 有關係的問題
diff --git a/proscend/prosrc/www/app/feature/restart.js b/proscend/prosrc/www/app/feature/restart.js
index b974827..2de87d7 100644
--- a/proscend/prosrc/www/app/feature/restart.js
+++ b/proscend/prosrc/www/app/feature/restart.js
@@ -32,7 +32,7 @@ angular
.module('app')
.controller('restartController', restartController);
-function restartController($route, $location, ico, help) {
+function restartController($route, $location, icos, help) {^M
var vm = this;
vm.restart = function() {
M330 - feature/lighttpd - 'Management > Restart'
commit dd4b358bcaa620265c319251a63dab6eec818fe5
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date: Thu Jul 4 14:31:37 2019 +0800
feature/lighttpd - 'Management > Restart'
- correct the typo of $injector
proscend/prosrc/www/app/feature/restart.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
剛剛發現一個 HTTPS 有趣的 bug
M330 預設是沒有 key 的
在沒有透過 sntp 要到任何時間的 update 時
預設的時間是 1970年1月1日
這時為了 HTTPS 建立出來的 key 預設的建立時間便為 1970 年
那當連上網路後時間更新到 今年 2019 年
此時與 M330 作 HTTPS 連線便會發現
沒印象 M300 與 M360 有此問題
M300 與 M360 在還沒做 time sync 前
預設的時間是以 image 產生的時間為主
所以時間也會是 今年 頂多是 去年
已告知相關同仁
目前應該是由 john 來處理
M360 - feature/lighttpd 可以開工了
source code 下最外層利用 make menuconfig
進 OpenWrt Configuration
並沒有 search 到任何有關於 lihgttpd 的 package
google openwrt lighttpd package
找到 openwrt/packages/net/lighttpd
clone 到 local
➜ ~ pwd
/home/jeffrey
➜ ~ git clone https://github.com/openwrt/packages.git
Cloning into 'packages'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 85915 (delta 4), reused 7 (delta 0), pack-reused 85870
Receiving objects: 100% (85915/85915), 25.35 MiB | 2.42 MiB/s, done.
Resolving deltas: 100% (44642/44642), done.
Checking connectivity... done.
➜ ~
版本是 1.4.53
➜ ~ cat packages/net/lighttpd/Makefile | grep PKG_VERSION
PKG_VERSION:=1.4.53
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
➜ ~
複製到 M360P
➜ ~ cp -r packages/net/lighttpd M360P/package/net
➜ ~
在 source code 最外層再敲一次 make menuconfig
進 OpenWrt Configuration
便可以發現 lighttpd 在 Network > Web Servers/Proxies > lighttpd
參考 20190619_jeffrey M330 的選項
--- lighttpd........................... A flexible and lightweight web server
[*] SSL support (NEW)
< > lighttpd-mod-access........................... Access restrictions module (NEW)
< > lighttpd-mod-accesslog............................. Access logging module (NEW)
< > lighttpd-mod-alias................................ Directory alias module (NEW)
< > lighttpd-mod-auth.................................. Authentication module (NEW)
<*> lighttpd-mod-cgi.............................................. CGI module
< > lighttpd-mod-cml.............................. Cache Meta Language module (NEW)
< > lighttpd-mod-compress............................. Compress output module (NEW)
< > lighttpd-mod-deflate...................... Compress dynamic output module (NEW)
< > lighttpd-mod-evasive...................................... Evasive module (NEW)
< > lighttpd-mod-evhost...................... Enhanced Virtual-Hosting module (NEW)
< > lighttpd-mod-expire........................................ Expire module (NEW)
< > lighttpd-mod-extforward............................ Extract client module (NEW)
< > lighttpd-mod-fastcgi...................................... FastCGI module (NEW)
< > lighttpd-mod-flv_streaming.......................... FLV streaming module (NEW)
< > lighttpd-mod-magnet........................................ Magnet module (NEW)
< > lighttpd-mod-mysql_vhost.................... Mysql virtual hosting module (NEW)
< > lighttpd-mod-proxy.......................................... Proxy module (NEW)
< > lighttpd-mod-redirect............................. URL redirection module (NEW)
<*> lighttpd-mod-rewrite................................ URL rewriting module
< > lighttpd-mod-rrdtool...................................... RRDtool module (NEW)
< > lighttpd-mod-scgi............................................ SCGI module (NEW)
< > lighttpd-mod-secdownload................. Secure and fast download module (NEW)
< > lighttpd-mod-setenv.................. Environment variable setting module (NEW)
< > lighttpd-mod-simple_vhost.................. Simple virtual hosting module (NEW)
< > lighttpd-mod-ssi.............................................. SSI module (NEW)
< > lighttpd-mod-status......................... Server status display module (NEW)
< > lighttpd-mod-trigger_b4_dl................ Trigger before download module (NEW)
< > lighttpd-mod-userdir............................... User directory module (NEW)
< > lighttpd-mod-usertrack.............................. User tracking module (NEW)
< > lighttpd-mod-webdav........................................ WebDAV module (NEW)
< > lighttpd-mod-wstunnel......................... Websocket tunneling module (NEW)
存檔並退出 OpenWrt Configuration
我們在最外層可以從 .config
看到 lighttpd 相關的 compiler flag
...
#
# Web Servers/Proxies
#
CONFIG_PACKAGE_lighttpd=y
CONFIG_LIGHTTPD_SSL=y
# CONFIG_PACKAGE_lighttpd-mod-access is not set
# CONFIG_PACKAGE_lighttpd-mod-accesslog is not set
# CONFIG_PACKAGE_lighttpd-mod-alias is not set
# CONFIG_PACKAGE_lighttpd-mod-auth is not set
CONFIG_PACKAGE_lighttpd-mod-cgi=y
# CONFIG_PACKAGE_lighttpd-mod-cml is not set
# CONFIG_PACKAGE_lighttpd-mod-compress is not set
# CONFIG_PACKAGE_lighttpd-mod-deflate is not set
# CONFIG_PACKAGE_lighttpd-mod-evasive is not set
# CONFIG_PACKAGE_lighttpd-mod-evhost is not set
# CONFIG_PACKAGE_lighttpd-mod-expire is not set
# CONFIG_PACKAGE_lighttpd-mod-extforward is not set
# CONFIG_PACKAGE_lighttpd-mod-fastcgi is not set
# CONFIG_PACKAGE_lighttpd-mod-flv_streaming is not set
# CONFIG_PACKAGE_lighttpd-mod-magnet is not set
# CONFIG_PACKAGE_lighttpd-mod-mysql_vhost is not set
# CONFIG_PACKAGE_lighttpd-mod-proxy is not set
# CONFIG_PACKAGE_lighttpd-mod-redirect is not set
CONFIG_PACKAGE_lighttpd-mod-rewrite=y
# CONFIG_PACKAGE_lighttpd-mod-rrdtool is not set
# CONFIG_PACKAGE_lighttpd-mod-scgi is not set
# CONFIG_PACKAGE_lighttpd-mod-secdownload is not set
# CONFIG_PACKAGE_lighttpd-mod-setenv is not set
# CONFIG_PACKAGE_lighttpd-mod-simple_vhost is not set
# CONFIG_PACKAGE_lighttpd-mod-ssi is not set
# CONFIG_PACKAGE_lighttpd-mod-status is not set
# CONFIG_PACKAGE_lighttpd-mod-trigger_b4_dl is not set
# CONFIG_PACKAGE_lighttpd-mod-userdir is not set
# CONFIG_PACKAGE_lighttpd-mod-usertrack is not set
# CONFIG_PACKAGE_lighttpd-mod-webdav is not set
# CONFIG_PACKAGE_lighttpd-mod-wstunnel is not set
# CONFIG_PACKAGE_nginx-all-module is not set
# CONFIG_PACKAGE_nginx-mod-luci is not set
# CONFIG_PACKAGE_nginx-mod-luci-ssl is not set
CONFIG_PACKAGE_nginx-ssl=y
...
參考該檔案來修改 m360p_defconfig
diff --git a/m360p_defconfig b/m360p_defconfig
index 64e6cf9..c58e369 100644
--- a/m360p_defconfig
+++ b/m360p_defconfig
@@ -3241,6 +3241,10 @@ CONFIG_PACKAGE_xl2tpd=y
#
# Web Servers/Proxies
#
+CONFIG_PACKAGE_lighttpd=y
+CONFIG_LIGHTTPD_SSL=y
+CONFIG_PACKAGE_lighttpd-mod-cgi=y
+CONFIG_PACKAGE_lighttpd-mod-rewrite=y
# CONFIG_PACKAGE_sockd is not set
# CONFIG_PACKAGE_socksify is not set
CONFIG_PACKAGE_uhttpd=y
退出 M360P build 的 docker container 後再進入
cd /home/user source proenv.sh 直接在外層下 make
➜ ~ ./360.sh
user@10972b0a698a:/$ cd /home/user/
user@10972b0a698a:~$ source proenv.sh
...
#
# configuration written to .config
#
user@10972b0a698a:~$ make
make[1] world
make[2] target/compile
make[3] -C target/linux compile
...
等唄
出事了
...
make[4]: Entering directory `/home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lighttpd-1.4.53'
cd . && /bin/bash /home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lighttpd-1.4.53/missing --run automake-1.11 --foreign
configure.ac:24: require Automake 1.13, but have 1.11.6
make[4]: *** [Makefile.in] Error 1
make[4]: Leaving directory `/home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lighttpd-1.4.53'
make[3]: *** [/home/user/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lighttpd-1.4.53/.built] Error 2
make[3]: Leaving directory `/home/user/package/net/lighttpd'
make[2]: *** [package/net/lighttpd/compile] Error 2
make[2]: Leaving directory `/home/user'
make[1]: *** [/home/user/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/user'
make: *** [world] Error 2
user@10972b0a698a:~$
mistrastar 給的 toolchain 裡的 automake 版本太舊...
update toolchain 太花時間了
試著換個舊一點的 lighttpd package 好了
我看就從 M330 複製過去算了