-
Notifications
You must be signed in to change notification settings - Fork 19
Tutorial install sqliteboy on ACRyan Playon!HD Mini2 ACRPV73800
In this tutorial, we will install SQLiteBoy on ACRyan Playon!HD Mini2 ACRPV73800. This is a great Media Player from ACRyan (http://acryan.com/sg/buy-now/5-playonhd-mini-2.html). It is based on Linux (MIPS). Thanks to ACRyan to let the telnet server running!
You will need 1 USB Flash Disk (1GB+ recommended), because there is not enough free space on the device to install Python. The USB Flash Disk should be formatted as EXT3 (let's assume first partition). You can choose to do it from Playon (fdisk and mkfs.ext3 are installed, reboot is needed), but it would be easier to do it from another linux system.
1. Plug the formatted USB Flash Disk into Playon. Turn Playon on.
2. Make sure that Playon is connected to the Internet.
3. You need to know the IP Address of Playon. Then, telnet to PlayOn and login as root. By default, there is no password (we will set it).
telnet <Playon IP Address>
4. Run mount command and check the output. You will see that the USB Flash Disk is already mounted (probably at /tmp/usbmounts/sda1). Remember the mount point.
mount
5. Mount /opt. On my Playon, /opt is already there, and symlinked to /usr/local/etc/opt. Create /usr/local/etc/opt directory and mount (bind) mount point of USB Flash Disk (step 4 above, /tmp/usbmounts/sda1 for example) to /usr/local/etc/opt.
ls -al /opt
lrwxrwxrwx 1 root root 18 Apr 18 2011 /opt -> /usr/local/etc/opt
mkdir /usr/local/etc/opt/
mount -o bind /tmp/usbmounts/sda1 /usr/local/etc/opt
6. Install uClibc and ipkg. We will use packages from http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/
cd /opt
mkdir temp
cd temp
wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk -O out.gz
gzip -dc out.gz | tar xvf - ./data.tar.gz
gzip -dc data.tar.gz | tar xvf - -C /
rm data.tar.gz out.gz
wget http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk -O out.gz
gzip -dc out.gz | tar xvf - ./data.tar.gz
gzip -dc data.tar.gz | tar xvf - -C /
rm data.tar.gz out.gz
cd /opt
rmdir temp
7. Update packages
/opt/bin/ipkg update
8. Install packages
/opt/bin/ipkg install openssl python27 py27-setuptools git lynx
9. Install web.py (using easy_install)
/opt/bin/easy_install-2.7 web.py
10. Install sqliteboy, run and allow access from all (database: /opt/data.db, adjust accordingly).
cd /opt
/opt/bin/git clone https://github.com/nopri/sqliteboy.git
cd /opt/sqliteboy
/opt/bin/python2.7 sqliteboy.py /opt/data.db
From another telnet session, run these commands to enable extended features and allow access from all:
/opt/bin/lynx http://localhost:11738
(always (a) accept cookie)
(enable extended features)
(quit lynx)
/opt/bin/lynx http://localhost:11738
(always (a) accept cookie)
(login as admin)
(set hosts, allow all (select all, right-arrow, space, save) )
(quit lynx)
exit
(quit from this telnet session)
Back to main telnet session. Press Ctrl-C to quit SQLiteBoy server.
11. Automatically run SQLiteBoy on system boot.
cd /usr/local/etc/
cp rcS rcS.orig
vi rcS
(append these lines, save, quit)
sleep 60
mount -o bind /tmp/usbmounts/sda1 /usr/local/etc/opt
cd /opt/sqliteboy
/opt/bin/python2.7 sqliteboy.py /opt/data.db > /opt/sqliteboy.log 2>&1 &
12. Set root password. Replace "password" with "real password". Please note that on some firmware versions (probably newer), we could not remount root fs rw and use passwd to modify root password. In my case, since /etc/passwd is a symlink to /usr/local/etc/passwd, we can use openssl to generate the password, and manually edit the actual file.
echo "password" | /opt/bin/openssl passwd -1 -stdin
(copy/remember the output)
vi /usr/local/etc/passwd
(paste the output to second field of root line. Fields are separated
by colon. Then save and quit from vi)
13. Reboot playon. Then, please wait around 2 minutes for SQLiteBoy to be ready.
reboot
Thank You :)