2021-05-12 14:32:11
在LibreELEC上安裝Entware
1.修改LibreELEC系統映象
LibreELEC系統映象為唯讀,無法建立opt資料夾。
mac系統下安裝brew,然後brew install squashfs
插入SD卡在終端中輸入如下:
cd /Volumes/LIBREELEC
mkdir -p new/opt
mksquashfs new SYSTEM -all-root
rm -rf new
現在LibreELEC系統映象就會生成一個opt資料夾,每次LibreELEC升級都需要重新建立這個opt資料夾。
2.啟動LIbreELEC系統並登入SSH
在LibreELEC的系統設定中開啟ssh,然後在終端中輸入ssh root@LibreELEC.local
輸入密碼後登入LibreELEC
3.安裝Entware
儘管/根目錄還是唯讀,但是/storage是可讀寫的,所以先建立/storage/opt,然後把/opt掛載到/storage/opt,然後安裝opkg,在終端中輸入如下:
mkdir -p /storage/opt
mount -o bind /storage/opt /opt
wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | sh
export PATH=$PATH:/opt/bin:/opt/sbin
opkg update
opkg install coreutils-expr
這裡面的安裝指令碼需要根據你的裝置來修改
可以到http://bin.entware.net/來檢視支援的裝置型別
可以選擇的有
[aarch64-k3.10/](http://bin.entware.net/aarch64-k3.10/)
[armv5sf-k3.2/](http://bin.entware.net/armv5sf-k3.2/)
[armv7sf-k2.6/](http://bin.entware.net/armv7sf-k2.6/)
[armv7sf-k3.2/](http://bin.entware.net/armv7sf-k3.2/)
[mipselsf-k3.4/](http://bin.entware.net/mipselsf-k3.4/)
[mipssf-k3.4/](http://bin.entware.net/mipssf-k3.4/)
[x64-k3.2/](http://bin.entware.net/x64-k3.2/)
修改啟動項,LibreELEC啟動自動掛載/opt到/storage/opt
輸入nano -w /storage/.config/system.d/opt.mount
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
[Mount]
What=/storage/opt
Where=/opt
Type=none
Options=bind
[Install]
WantedBy=local-fs.target
啟動開機自動掛載
systemctl enable opt.mount
新增環境變數nano /storage/.profile
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export PATH=$PATH:/opt/bin:/opt/sbin
重新啟動系統,ssh登入,檢查/opt是否掛載ls /opt看是否有相應資料夾
輸入opkg list檢測環境變數是否設定成功
4.設定Entware啟動項
輸入nano -w /storage/.config/system.d/entware.service
[Unit]
Requires=network-online.service
[Service]
Type=oneshot
ExecStart=/opt/etc/init.d/rc.unslung start
ExecStop=/opt/etc/init.d/rc.unslung stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
開機自啟動systemctl enable entware.service
啟動服務systemctl start entware.service
5.安裝Entware應用
opkg list
opkg list | grep package
opkg install package
opkg uninstall package
LibreELEC 9.0 發布,基於Kodi 18.0開發的Linux發行版 https://www.linuxidc.com/Linux/2019-02/156687.htm
相關文章