Sign up here and you can log into the forum!

UMSP "Bookmarks" / Downloading?

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

Re: UMSP "Bookmarks" / Downloading?   

Postby voiper99 » Thu Jun 09, 2011 5:33 am

mad_ady wrote:Yes, however - if your app bin depends/is integrated with a different app bin you can have custom scripts bundled with your app bin to do the necessary configurations on the other side (e.g. - enable a virtual host under apache (copy the config file) and restart apache). The scripts are run when the app bin is started.


ahh that makes sense.

OK so I've downloaded Bind9 binary - http://www.bind9.net/download - and it has the README and version files at the root of the directory (along with a whole lot of other files). Now, the test-app in this tutorial - http://wiki.wdlxtv.com/Creating_an_app_bin - only has the READ me and version files in the root. Does this mean that these are the only two files that can reside in the root, or is that just the way the example app was set up?

Now, using the tutorial I linked to above, is creating an app bin seriously as easy as:

    1. Extract the Bind9 binary in to a directory, e.g my-bind-app
    2. Enter the mkcramfs-16k my-bind-app/ bind9.app.bin command
    3. Put the resulting bind9.app.bin file in to the root directory of an attached USB drive
    4. Reboot the WDTV Live

(Actually it would be better to use ext3 as you'd need to change the configuration file(s) in order to get bind9 working the way you want it to).

Is it really that easy? The reason why I ask is because Bind9 has all of these configure, config, Make, install, etc files.
voiper99
Donor
 
Posts: 51
Joined: Sun Jul 18, 2010 2:33 pm

Re: UMSP "Bookmarks" / Downloading?   

Postby mad_ady » Thu Jun 09, 2011 7:13 am

It is that easy, but as they say, the devil is in the details :)

So, to get some things straight you have to know:
1. How to compile an application from source under regular linux (./configure; make; make install).
2. You will need to setup a cross compiler for MIPS (get scratchbox or the WD development toolkit on WD's site). This is why you can't get a binary version of that program to work. Even if it is a binary compiled for MIPS, chances are it will depend on libraries of different version than the libraries on the wdtv.
3. Cross compile your application for the mips platform. This may require changes to your Makefile and tweaking the compiler arguments until you get it right
4. Putting the application in a standalone folder (this can be done with make install if you specify that folder as installation PREFIX during configure)
5. Pack the app.bin (this is the easy step)

Step 6 is the most complicated one... It states - test your application and do debugging on the wdtv to make sure:
a) all the dependencies are met (ldd is your friend)
b) there are no differences in glibc or other system libraries (if you compile it against the WD toolkit it should be ok)
c) everything works

Until you get step 6 right, you may have to redo steps 1-5.

Now, this is the generic method of trying to get things done and should work for most software.

The alternate method (the way iftop and mc were generated if I remember correctly) is to setup optware on your wdtv, and download the binaries from optware (ipkg get bind9 -- or something similar). Assuming that the desired package exists, you should be able to get a compiled version (the hard work done by somebody else) that runs on the wdtv. Next, you "only" need to extract it from optware and package it in an app.bin. So, you need to do steps 4, 5 and 6 from above.
The most common problem here is differences in libraries (6b) which will prevent the binary to run on the wdtv, outside of optware.

For optware - here's a good starting point: http://forum.wdlxtv.com/viewtopic.php?f=40&t=2637
http://forum.wdlxtv.com/viewtopic.php?f=43&t=494
For the cross-compiler method start here: http://forum.wdlxtv.com/viewtopic.php?f=43&t=3108

Disclaimer - I never built/compiled/cross-compiled anything for the wdtv, so I'm just speaking from my experience based on what I read on the forum :)
There's a lot of reading to do, but it's not impossible.

Good luck!
User avatar
mad_ady
Developer
 
Posts: 4573
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP "Bookmarks" / Downloading?   

Postby b-rad.cc » Thu Jun 09, 2011 7:34 am

uhmmm...Hijack? ;)
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: UMSP "Bookmarks" / Downloading?   

Postby mad_ady » Thu Jun 09, 2011 7:47 am

Hijacking you own post is not hijacking - the same way as installing custom firmware on your i*/sony device is not breaking the law :P
User avatar
mad_ady
Developer
 
Posts: 4573
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: UMSP "Bookmarks" / Downloading?   

Postby b-rad.cc » Thu Jun 09, 2011 7:51 am

lol damn, forgot about regulation 27.c.FF.01.bc01 :lol:
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Re: UMSP "Bookmarks" / Downloading?   

Postby voiper99 » Fri Jun 10, 2011 7:59 am

OK let's see if I've got this right:

mad_ady wrote:So, to get some things straight you have to know:
1. How to compile an application from source under regular linux (./configure; make; make install).


Check!

mad_ady wrote:2. You will need to setup a cross compiler for MIPS (get scratchbox or the WD development toolkit on WD's site). This is why you can't get a binary version of that program to work. Even if it is a binary compiled for MIPS, chances are it will depend on libraries of different version than the libraries on the wdtv.


OK so I've done a lot of reading and this is what I've come up with. Cross Compiling allows a program's source code to be altered so that it suits the OS and/or CPU architecture that the code is being installed on. That way the developer only has to write the code once and the compiler does the rest. If I recall correctly, Cross Compiling (as opposed to Compiling) is when you use one system to compile for another, e.g a Linux PC compiling for an embedded device (such as the WDTV :)) this is because the embedded devices lack the horsepower that their PC counterparts have.

In regards to a compiler for MIPS, you've mentioned scratchbox and the WD development toolkit. I have looked in to both of these options (ScratchBox2), WD Development Toolkit and I also found this, Brad's Virtual Machine.

Now my question is, which would be the best to use? It looks like a couple of the guys were having trouble getting ScratchBox working. I don't know how to actually implement the WDTV tools, and Brad's virtual machine is quite old, so I'm not too sure if it is outdated.

In regards to the WDTV tools, I have uploaded the readme here. My question is, if I go down that path and follow the readme's instructions, what do I do when I get to the end? How and where do I compile my binaries and how do I then turn them in to .bin files?

mad_ady wrote:3. Cross compile your application for the mips platform. This may require changes to your Makefile and tweaking the compiler arguments until you get it right
4. Putting the application in a standalone folder (this can be done with make install if you specify that folder as installation PREFIX during configure)
5. Pack the app.bin (this is the easy step)

Step 6 is the most complicated one... It states - test your application and do debugging on the wdtv to make sure:
a) all the dependencies are met (ldd is your friend)
b) there are no differences in glibc or other system libraries (if you compile it against the WD toolkit it should be ok)
c) everything works

Until you get step 6 right, you may have to redo steps 1-5.

Now, this is the generic method of trying to get things done and should work for most software.


OK, not a problem :)
voiper99
Donor
 
Posts: 51
Joined: Sun Jul 18, 2010 2:33 pm

Re: UMSP "Bookmarks" / Downloading?   

Postby b-rad.cc » Fri Jun 10, 2011 8:05 am

use whatever works for you and check the wiki for the app.bin guide.

Theres also threads dealing specifically with the subject matter of this whole page...having content like this in a 2500% unrelated thread doesn't not help anyone trying to find useful information in the future.
PM's are for private matters only, please post public matters on the forum to help others who might have the same issue.
:mrgreen:
User avatar
b-rad.cc
WDLXTV Team
 
Posts: 3003
Joined: Sat Apr 03, 2010 9:35 am
Location: New York

Previous

Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 2 guests