Adding software packages to the HP Media Vault (this information is for the MV1 only)
For Series MV2, please see the MV2 hacking page.
Update: June 12, 2007 These instructions were updated to remove the need to mount /shares/Volume1/ShareApps/opt to /opt.
A few of the successful NAS hacking projects include the Maxtor Open-MSS and Linksys NSLU2. Both have attracted active developer communities along with a variety of open source packages that can be downloaded and run on these platforms. So far, most of the hacking on the Media Vault has been limited to a few programs like Firefly (mt-daapd) as well as Twonkyvision which are alternative media streaming packages to the standard DLNA server that comes with the Media Vault. However, there hasn't been any standardization and people are beginning to notice debris accumulating in their FileShare folders and everyone is taking a slightly different approach to hiding the resulting disorganization.
I would like to propose a standard location to place files and libraries so that a consistent set of instructions could be written and followed in order to add functionality to the HP Media Vault, hopefully using something like the ipkg package manager. I recently came across a page by Tin Lau on hacking the Simpltech Simpleshare NAS which has some common features with the Media Vault, namely the Broadcom 478x MIPS-based processor and underlying reference design. I thought he had some very good ideas on the way he set up the directories. Although there some differences in the UI between the SimpleShare and the HP Media Vault, it may be possible to share pre-compiled packages made for the SimpleTech device with the HP Media Vault. I've looked at the Maxtor MSS and optware package used in WRT libraries for the mipsel binaries, but it appears some of those are compiled for a newer version of glibc (2.2.5) and thus are not compatible with the SimpleTech and HP Media Vault libraries which use glibc version 2.2.3. I think that in order to be compatible, the binaries for the HP Media Vault and SimpleTech will need to be compiled against the version 2.2.3 libraries.
Here are a few proposals:
All new software should be added to a new share separate from the default shares. I propose we set up a new share called ShareApps on Volume1 for this.
Under that share, there will be a folder called 'opt'.
Under 'opt', there will be folders that include bin, lib, and etc.
The standard startup script (startup.sh) kept in /shares/Volume1 will contain a simple instruction to call another startup script called "ext-script.sh" that will be located in ShareApps. This will make it much easier to edit that script because Volume1 cannot be mounted to a PC or Linux system, but the ShareApps folder can be mounted and thus the files are easy to access and modify. You should use an editor such as Notepad++ on a Windows PC for editing the ext-script.sh file and save it in Unix format. If you save it in DOS format, it will not run properly. Windows or DOS mode adds two characters, a <cr> (0D hex) carriage return and a <lf> (0A hex) line feed to the end of each line. Unix uses a single <lf> character to end the lines. In some cases, such as configuration files it may not matter which format you use, but with shell scripts it does, so make sure to save any shell scripts with Unix format.
In short, the file startup.sh will contain these lines:
The file ext-script.sh will contain lines similar to this format:
#other commands to start up services can go here...
For example, if the application is Twonkymedia's server, the directory_with_app would be 'twonky', and the application_startup_command would be 'twonkymedia'. If the application were Firefly, the directory_with_app would be 'firefly' and the application_startup_command would be 'mt-daapd -c mt-daapd.conf'
The /shares/Volume1/SharedApps/opt/lib should contain these two library files:
They can be found here. Unzip them and put them in that folder. Some applications will require more shared libraries to be added to the Media Vault. Put them in the directory and the LD_LIBRARY_PATH will cause the programs to search there first when locating shared libraries.
These files are compilied with version 2.2.3 glibc libraries, but they are not stripped down to the essentials, like the ones found in /lib on the HP Media Vault. Since they are the same version used by the firmware, the Media Vault programs will work with them.
I would be willing to host the files for an HP Media Vault ipkg manager on the k0lee.com domain if anyone wants to figure out how to make up ipkg packages.
Return to the HP Media Vault FAQ