天天看點

N1 刷入 armbian傳回值應為 net.ipv4.tcp_available_congestion_control = reno cubic bbr傳回值應為 net.ipv4.tcp_congestion_control = bbr傳回值應為 net.core.default_qdisc = fq傳回值應包含 tcp_bbr 子產品

注意:操作以下步驟前,必須将N1出廠系統降級為2.19及以下版本,然後開啟adb,并且已經刷入webpad官改固件(例子中使用的是2.2版),才可繼續進行。

1.連接配接HDMI,網線,先不要插電源線

(1) 注意事項 & 準備工作

**** 千萬不要在安卓系統開機的情況下插入U盤,否則U盤中的檔案權限會被安卓系統篡改!

**** 一定要在關機狀态下插入U盤!

a. 燒錄軟體為:Etcher
	b. 燒錄系統版本為:Armbian_5.77_Aml-s905_Debian_stretch_default_5.0.2_20190401.img
	c. 燒錄後,将恩山xiangsm大神dtb檔案考入boot/atb路徑下,在PC端進入以下路徑檔案/boot/uenv.ini
	   将第一行最後的檔案名改為meson-gxl-s905d-phicomm-n1-xiangsm.dtb
	d. 燒錄後如彈出提示請格式化,請将其直接關閉,不要格式化


	在不插U盤的情況下(隻連接配接滑鼠!HDMI,網線,電源線)
	在PC端,以管理者權限打開cmd,在C:/WINDOWS/路徑下,輸入以下代碼:
		adb connect 192.168.1.xxx(ip位址以實際為準)
		adb shell reboot update		
	進入recovery模式,選擇 power off 關機
	
	執行過以上步驟後,下次插電後即可直接U盤啟動!
	
( 如未能從U盤啟動,則在android啟動剛開始一瞬間拔掉U盤,
   進入android後,在PC端再次執行上文的 adb connect 和 reboot update 指令
   在顯示器黑屏後2秒左右在遠離HDMI的接口插入U盤,則可以進行U盤啟動!)
           

拔掉滑鼠,在N1端插入燒錄好的USB2.0的U盤(插入遠離HDMI接口的一端)

(2) 連接配接USB鍵盤(近HDMI的接口),現在插上電源線直接冷啟動,N1從U盤啟動。

(3) 啟動後,進入指令行模式(因版本而定,也可選擇帶desktop的固件)。

可用putty連接配接N1的ip位址進行遠端登陸。

預設使用者名為root,預設密碼1234

2.重新設定登陸密碼,至Please provide a user name 處,按Ctrl+C退出putty連接配接,重新用新密碼登陸。ls -l /确認一下目錄權限沒有被安卓篡改,都是root使用者即可。

3.将armbian刷入emmc

真正有效的刷寫方式是執行如下指令:

nand–sata-install

它可以完成所有刷寫emmc所需的事情,完成後halt關機拔掉U盤,所有刷機工作就結束了。

如果你想重刷armbian系統,那麼還是U盤啟動armbian,重新執行nand-sata-install即可完整覆寫掉emmc中的資料,網上的教程一般是教你ddbr或者線刷先恢複到安卓系統再重來,這都是胡扯。

4.如不進行步驟3,則可以将系統運作在插入的U盤上。步驟3和4可以根據實際場景需要,進行二選一

5.armbian常用配置

armbian-config 可以用來配置網絡、時區、語言、常用軟體等内容

nmcli 檢視/配置網絡端口

uptime 系統使用狀況,如運作時長、負載

armbianmonitor -m 實時檢視系統負載

解決syslog中每10s出現一次ttyS0服務啟動失敗的日志

systemctl disable [email protected]

systemctl stop [email protected]

ddbr 備份/恢複emmc寫入的系統

啟用bbr

/etc/sysctl.conf末尾添加下面兩行

net.core.default_qdisc=fq

net.ipv4.tcp_congestion_control=bbr

sudo sysctl -p

通過以下指令檢查 BBR 是否啟動:

sysctl net.ipv4.tcp_available_congestion_control

傳回值應為 net.ipv4.tcp_available_congestion_control = reno cubic bbr

sysctl net.ipv4.tcp_congestion_control

傳回值應為 net.ipv4.tcp_congestion_control = bbr

sysctl net.core.default_qdisc

傳回值應為 net.core.default_qdisc = fq

lsmod | grep bbr

傳回值應包含 tcp_bbr 子產品

關閉 [email protected] 服務

syslog 中每 10s 出現一次 ttyS0 服務啟動失敗的日志。不理它也沒關系,但看着不舒服,是以:

systemctl disable [email protected]

6.安裝後,如遇執行 sudo apt-get update 報錯:

Err:1 http://httpredir.debian.org/debian stretch InRelease

Could not resolve ‘httpredir.debian.org’

Err:2 http://httpredir.debian.org/debian stretch-updates InRelease

Could not resolve ‘httpredir.debian.org’

Err:3 http://httpredir.debian.org/debian stretch-backports InRelease

Could not resolve ‘httpredir.debian.org’

Err:4 http://security.debian.org stretch/updates InRelease

Could not resolve ‘security.debian.org’

Err:5 http://apt.armbian.com stretch InRelease

Could not resolve ‘apt.armbian.com’

Reading package lists… Done

Building dependency tree

Reading state information… Done

3 packages can be upgraded. Run ‘apt list --upgradable’ to see them.

W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch/InRelease Could not resolve ‘httpredir.debian.org’

W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch-updates/InRelease Could not resolve ‘httpredir.debian.org’

W: Failed to fetch http://httpredir.debian.org/debian/dists/stretch-backports/InRelease Could not resolve ‘httpredir.debian.org’

W: Failed to fetch http://security.debian.org/dists/stretch/updates/InRelease Could not resolve ‘security.debian.org’

W: Failed to fetch http://apt.armbian.com/dists/stretch/InRelease Could not resolve ‘apt.armbian.com’

W: Some index files failed to download. They have been ignored, or old ones used instead.

則:

The problem was related to DNS. I’ve fixed it by adding DNS nameservers as follow:

$ sudo vi /etc/resolv.conf

Modify or enter nameserver as follows:

nameserver 8.8.8.8

nameserver 4.2.2.4

即可解決。

關于家用NAS刷OMV

如果無法在 armbian-config 中安裝 OMV(各種奇怪報錯和關聯性問題等),則有可能需要在剛刷完5.77版armbian後第一時間進入armbian-config進行OMV安裝,即可解決。

給N1設定一個固定IP隻需

指令行輸入 armbian-config

選 network

選 eth0

選 ip

選 static

然後按需求填寫即可。

Wi-Fi設定指令行輸入 armbian-config

選 network

選 eth0

選 WiFi

找到對應WiFi信号回車

輸入密碼選OK

如果第一次沒連上,可以多嘗試幾次

參考連結:

https://bbs.hassbian.com/thread-5631-1-1.html

https://yadi.sk/d/pHxaRAs-tZiei/5.99/default

https://www.right.com.cn/forum/thread-344896-1-1.html

https://www.right.com.cn/forum/thread-389277-1-1.html

https://www.nmza.net/archives/phicomm-n1-armbian.html

https://www.znds.com/tv-1153270-1-1.html

https://github.com/kasicass/blog/blob/master/debian/2018_11_19_armbian_on_n1_box.md

https://zhuanlan.zhihu.com/p/38456769

https://www.right.com.cn/forum/thread-324242-1-1.html

https://newsw.online/topic/3/n1%E5%AE%89%E8%A3%85armbian%E4%BD%9C%E7%BD%91%E5%85%B3%E6%8C%87%E5%8D%97

https://www.tok9.com/archives/407/

https://www.shephe.com/2019/07/phicomm-n1-armbian-omv-nas/

https://www.troyqi.com/archives/353/%E8%B6%85%E5%A5%BD%E7%8E%A9%E7%9A%84%E5%B0%8F%E6%9C%BA%E5%99%A8%EF%BC%8C%E6%96%90%E8%AE%AFn1%E5%AE%89%E8%A3%85armbian/

https://www.leonlu.cc/hobby/note005-phicomm-p1-linux/

https://forum.armbian.com/topic/6533-solved-broken-repositories/

https://www.right.com.cn/forum/thread-510423-1-1.html

https://www.right.com.cn/forum/thread-342558-1-1.html

https://zhuanlan.zhihu.com/p/54905523

https://www.right.com.cn/forum/thread-342558-1-1.html

以上及未羅列大神在此一并謝過

繼續閱讀