Sunday, 30 November 2008

Cross Compiling for MediaMVP

I have a couple of Hauppauge Media MVP media players and I want to turn one into a customised photo view for our son - it will have to be very simple because he will not press buttons, so I want it to just start as soon as it is switched on, and provide a customised "Hello Benjamin" screen as it boots.

The mvpmc project should provide most of what I need, so I just wanted to build a cross compiler and have a play. I downloaded the binary distribution and got it running ok (needed a dhcp and tftp server on my little computer in the atic to do that), and the binary distribution of mvpmc works fine.
I downloaded the source. It says it is supposed to build its own toolchain if you do not have one, but this did not work - it ran for a long time, then complained about bits of the toolchain not being there.

I thought I was too clever for that and I would just do it myself using crosstool. This failed with obscure syntax errors, which was hard to believe.
I eventually read that building cross compilers with recent versions of gcc is troublesome, so I installed an old one instead (gcc.3.4.6 from the Ubuntu repositories). It worked ok and built a PPC-405 cross compiler for me.
Unfortunately my "hello world" program compiled ok but would not run - the MVP responded with "not found" when I executed ./hello_world. I think this is because the MVP is using uClibc, but I had just build a cross compiler with gLibc. "oh dear...".
Next tried the Embedded Linux Development Kit (ELDK). Again "hello world" compiled ok, but got the same "not found" error.

Looks like I will have to find out why the mvp toolchain build failed.

Hunting a very long way back in the build log showed that the first error (that I spotted) was when it tried to download the linux headers to compile against. It looks like the uClibc website has been rearranged and the ones that the MVP needs have been moved to a "old-releases" directory. Downloading the file and putting it in ~/downloads like the mvpmc build script does resulted in the build running apparently ok - still hasn't finished though....

OK, it's finished now, and the new toolchain compiles a "hello world" that runs ok!

Now I just have to strip out the mvpmc code down to a very simple viewer, and it should work.....sounds easy, but it's getting late now...
Post a Comment