D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Nice little Linux based media player device

 

Neil Williams wrote:
On Thu, 05 Nov 2009 11:15:28 +0000
Rob Beard <rob@xxxxxxxxxxxxx> wrote:

I'm wondering how if it's possible to cross-compile anything to run
on this little box.  It only has 16MB flash but it does have Ethernet
and USB.

Emdebian does have cross-compilers for MIPS. You need to check whether
this is mips or mipsel or one of the dozen other mips tweaks (which
aren't fully supported by Debian). MIPS is not a particularly cohesive
architecture set. :-(

I think it's mipsel, what I do know is it's a Realtek System On a Chip CPU, although I guess that doesn't help much. I'll try and do a bit more digging.
I'm guessing that some of the settings are stored in flash on the device, I've found some readable configuration files, but my knowledge of cross-compiling for other CPUs is limited at best.

It's simply a case of having the cross-compiler installed and then
passing the right arguments to ./configure:

$ dpkg-architecture -qDEB_BUILD_GNU_TYPE

then put that into the --build and use --host for the device arch:

$ dpkg-architecture -amipsel -qDEB_HOST_GNU_TYPE

For Debian-style little-endian MIPS, building on amd64:

$ ./configure --build x86_64-linux-gnu --host mipsel-linux-gnu

Then 'make' and 'make install' as normal.

Only specify --host when cross-compiling.

Other build systems like CMake can be more tricky. Kernels and similar
may need the Makefile to be edited to set the architecture but the
values needed will be the same.
Thanks Neil,

I'll take a look.

Rob


--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html