Saturday, April 25, 2009

uShare Revisited

Quick update, My MyBook died before christmas so was sent away for a replacement. It took aaaaages for the replacement to come back and I've been using an older tower with Ubuntu in the meantime.

I'm finally getting round to transferring everything back to the new MyBook and for some reason, ushare isn't working, despite following my own instructions here. (The very thing this blog was for).

Anyway, not sure what all the problems were, but I've had to alter the ushare.sh script in /etc/init.d in the following ways:

USHARE_OPTIONS has been altered to be "x -f /etc/ushare.conf". Without the -f option, the config file is meant to be loaded as a set of environment variables which ushare sees and uses. This wasn't working, so the -f option forces the config file to be loaded by ushare.

I also had to change the way the check_shares function was called. Changed from $(check_shares) to simply check_shares, the CONFIG_FILE is now read (although that's slightly redundant since ushare stil didn't use the variables set). The original method just wasn't loading the values.

so my ushare.sh now looks like so:


[gordon]$ more /etc/ushare.conf
# /etc/ushare.conf
# Configuration file for uShare

# uShare UPnP Friendly Name (default is 'uShare').
USHARE_NAME="Anya uShare Media Server"

# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
USHARE_IFACE=eth0

# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
USHARE_PORT=

# Port to listen for Telnet connections
# Ex : USHARE_TELNET_PORT=1337
USHARE_TELNET_PORT=

# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
USHARE_DIR=/shares/internal/VIDEO

# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
# This option overrides that behaviour and adds the non-iconv'ed string into
# the media list, with the assumption that the renderer will be able to
# handle it. Devices like Noxon 2 have no problem with strings being passed
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
USHARE_OVERRIDE_ICONV_ERR=

# Enable Web interface (yes/no)
ENABLE_WEB=

# Enable Telnet control interface (yes/no)
ENABLE_TELNET=no

# Use XboX 360 compatibility mode (yes/no)
ENABLE_XBOX=yes

# Use DLNA profile (yes/no)
# This is needed for PlayStation3 to work (among other devices)
ENABLE_DLNA=no

See that comment about my MyBook dying, coming soon: "How to do backups!"


Wednesday, February 4, 2009

Cross Compilation 04

It's been a while. My MyBook died, Western Digital took an age to get a replacement back, and when they did it has the new 2.x firmware which doesn't include a native gcc on the box. So I either have to install optware or... get a working cross compiler going. I've had some major insights into cross compilation, specifically regarding the difference between the BUILD, HOST and TARGET variables. I've also stepped back from buildroot for a moment to focus on going through the steps from the ground up. I'm now following this tutorial from IBM whih pretty much covers it all.

I've run into a problem at the moment where I'm trying to build uClibc instead of glibc, as covered in the guide. I have the error

ubuntu > arm-linux-uclibc-gcc -Wall ... -mlittle-endian ... -c arm/resolve.S -o arm/resolve.o
as: unrecognized option: -EL

It looks like I'm using the native (ubuntu i386) assembler rather than the cross compiler one. I think this is because at this stage I've only built a minimal gcc suite and this doesn't include a separate assembler (if any at all).

For tomorrow, I need to complete the tutorial, building glibc, and then using that to build a compelte gcc suite. Hopefully with that I can then build my uClibc library.

I'll then have two C libraries available andjust need to make sure the correct one is used when cross compilin for the MyBook.