premise:
1. Install the developer ROM
2. Install SSH for
the two steps of Xiaomi routers are common, so I won't talk about it here.
One, install opkg
mkdir -p /userdisk/xxx/opt
mount -o bind /userdisk/xxx/opt /opt
cd /userdisk/xxx
wget http://pkg.entware.net/binaries/mipsel/installer/installer.sh
chmod +x installer.sh
./installer.sh
xxx can be replaced with your favorite folder name.
Run opkg and install the software:
export PATH=/opt/sbin:/opt/bin:$PATH
opkg update
opkg install xxxx
Two, boot automatically mount
If you don’t boot up and mount automatically, the software installed with opkg will not run normally after restarting.
Edit /etc/rc.local,
add a line before exit 0 in vi /etc/rc.localmount -o bind /userdisk/xxx/opt /opt
Three, set environment variables
If environment variables are not set, the software cannot be found when running after restarting.
Edit /etc/profile and
add a line in vi /etc/profile :export PATH=/opt/sbin:/opt/bin:$PATH