⬆️ ⬇️

How to turn a media player into a nettop?

Enjoy your day.



FullHD media players have already ceased to be a novelty among media content playback devices. On the market, you can find a huge number of devices and models with different hardware characteristics and different firmware.



This article will discuss how to teach the media player not only to play video and music, download torrents and be a network “ball”, but also to maintain services of varying degrees of need.



As an experimental rabbit there will be a media player based on the Realtek RTD1186DD chipset. The types of players on this chipset are just a wild amount. The stores feature models from iNeXT, iconBIT, BlueTimes, Evaaa, Dune, Xtreamer, Digma, 3Q, Egreat and many others. Everyone has reviews on the Internet.

')

My home media player, which successfully passed the execution , is called BlueTimes Eva Vision. After some time after the purchase of the media player, the desire to twist and turn all the same took over.



The main characteristics of the device that are interesting in this article:



Controlling the player via telnet turned out to be terribly inconvenient, and I began to look for how to write down on the ssh media player. After searching for some time, I came across the package management system Ipkg . Thanks to ipkg, you can install packages assembled for mipsel architecture in the usual way.



The file system of the media player consists of two file systems: yaffs (/ data) and squashfs (/ system).



All packages Ipkg installs to / opt, which initially looks at / system / rtl_rootfs / bin / opt (referred to as read only squashfs). Therefore, you need to transfer / opt to the yaffs file system. This can be done by making changes to the firmware .



To work with the firmware you need to install several utilities:

~#sudo apt-get install subversion cvs ~#svn checkout http://unyaffs.googlecode.com/svn/trunk/ unyaffs-read-only ~#cd unyaffs-read-only ~/unyaffs-read-only#gcc -o unyaffs unyaffs.c ~/unyaffs-read-only#sudo cp unyaffs /usr/local/sbin ~/unyaffs-read-only#sudo apt-get install mtd-utils ~/unyaffs-read-only#export CVSROOT=:pserver:anonymous@cvs.aleph1.co.uk:/home/aleph1/cvs cvs logon ~/unyaffs-read-only#cvs checkout yaffs2 ~/unyaffs-read-only#cd yaffs2/utils ~/unyaffs-read-only/yaffs2/utils#make ~/unyaffs-read-only/yaffs2/utils#sudo cp mkyaffs2image mkyaffsimage /usr/local/sbin ~#sudo apt-get install zlib1g-dev ~#wget http://internode.dl.sourceforge.net/project/squashfs/squashfs/squashfs4.0/squashfs4.0.tar.gz ~#tar xzvf squashfs4.0.tar.gz ~#cd squashfs4.0/squashfs-tools ~/squashfs4.0/squashfs-tools#make install 




For convenience, I made two scripts (put in / tmp)
unpack.sh
 #!/bin/bash rm -rf install rm -rf squashfs1 rm -rf yaffs2_2 mkdir install cd install tar -xf ../install.img cd .. unsquashfs -dest squashfs1 ./install/package5/squashfs1.img rm ./install/package5/squashfs1.img cd .. 


pack.sh
 #!/bin/bash rm ./install/package5/squashfs1.img mksquashfs squashfs1 ./install/package5/squashfs1.img cd install rm ../install_new.img tar -cf ../install_new.img * cd .. 




Copy the downloaded firmware in / tmp install.img and run ./unpack



Next, you need to move / opt to the read-write section. Open the file vim squashfs1 / etc / init.venus.sh and make the following changes:

 24,25c24,27 < < ln -s /system/rtk_rootfs/bin/opt /opt --- > if [ ! -d /data/opt ]; then > cp -R /system/rtk_rootfs/bin/opt /data/ > fi > ln -s /data/opt /opt 


We pack the firmware back by running the script ./pack.sh



Install the firmware on the player in the usual way.



An example installation package looks like this:

 /opt/bin#./ipkg update /opt/bin#./ipkg list /opt/bin#./ipkg install openssh 


Well, after the mechanism is adjusted, bash, svn were added.

Further use options diverge. You can host a small site, you can arrange a svn \ git repository. In general, there are a lot of packages in ipkg and everyone will surely find something useful for themselves. I have downloaded several ports to the media player on my dir-615 and now I have my own closed SVN mini repository.



Naturally, we should not forget that the memory on the media player is not very much, and the processor is not i7. You should always use the measure, but each has its own measure.

Source: https://habr.com/ru/post/146150/



All Articles