1.修改LibreELEC系統鏡像html
LibreELEC系統鏡像爲只讀,沒法建立opt文件夾。
mac系統下安裝brew,而後brew install squashfs
插入SD卡在終端中輸入以下:linux
cd /Volumes/LIBREELEC mkdir -p new/opt mksquashfs new SYSTEM -all-root rm -rf new
如今LibreELEC系統鏡像就會生成一個opt文件夾,每次LibreELEC升級都須要從新建立這個opt文件夾。ssh
2.啓動LIbreELEC系統並登入SSHui
在LibreELEC的系統設置中開啓ssh,而後在終端中輸入ssh root@LibreELEC.local
輸入密碼後登入LibreELEC.net
3.安裝Entwarehtm
儘管/根目錄仍是隻讀,可是/storage是可讀寫的,因此先建立/storage/opt,而後把/opt掛載到/storage/opt,而後安裝opkg,在終端中輸入以下:ip
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/來查看支持的設備類型
能夠選擇的有ci
[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/optget
輸入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
啓動開機自動掛載it
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
原文來自: https://www.linuxprobe.com/install-libreelec-entware.html