在LibreELEC上安裝Entware

1.修改LibreELEC系統(tǒng)鏡像

LibreELEC系統(tǒng)鏡像為只讀,無(wú)法創(chuàng)建opt文件夾。
mac系統(tǒng)下安裝brew,然后brew install squashfs
插入SD卡在終端中輸入如下:

cd /Volumes/LIBREELEC
mkdir -p new/opt
mksquashfs new SYSTEM -all-root
rm -rf new

現(xiàn)在LibreELEC系統(tǒng)鏡像就會(huì)生成一個(gè)opt文件夾,每次LibreELEC升級(jí)都需要重新創(chuàng)建這個(gè)opt文件夾。

2.啟動(dòng)LIbreELEC系統(tǒng)并登入SSH

在LibreELEC的系統(tǒng)設(shè)置中開(kāi)啟ssh,然后在終端中輸入ssh root@LibreELEC.local
輸入密碼后登入LibreELEC

3.安裝Entware

盡管/根目錄還是只讀,但是/storage是可讀寫的,所以先創(chuàng)建/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

這里面的安裝腳本需要根據(jù)你的設(shè)備來(lái)修改
可以到http://bin.entware.net/來(lái)查看支持的設(shè)備類型
可以選擇的有

[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/)  

修改啟動(dòng)項(xiàng),LibreELEC啟動(dòng)自動(dòng)掛載/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

啟動(dòng)開(kāi)機(jī)自動(dòng)掛載

systemctl enable opt.mount

添加環(huán)境變量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

重啟系統(tǒng),ssh登入,檢查/opt是否掛載ls /opt看是否有相應(yīng)文件夾
輸入opkg list檢測(cè)環(huán)境變量是否設(shè)置成功

4.設(shè)置Entware啟動(dòng)項(xiàng)

輸入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

開(kāi)機(jī)自啟動(dòng)systemctl enable entware.service
啟動(dòng)服務(wù)systemctl start entware.service

5.安裝Entware應(yīng)用

opkg list
opkg list | grep package
opkg install package
opkg uninstall package
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容