An example of steps for
setting up cross - compiler, and solving the problem like "
http://www.bogus.net/~codex/dbnotes.html
and similar bugs
encountered in:
http://linux.chinaunix.net/bbs/viewthread.php?tid=912590
http://forum.niosforum.com/forum/index.php?showtopic=4523
Notes to self about the Dreambox. Thanks to the guys on
#dreambox for filling in some blanks here!
Prerequisites
and other general information on how to compile the CDK
Compiling
the CDK
Compiling/installing
a plugin
Notes
on choosing a harddisk
Sniffing
IP traffic
Upgrading
the firmware
Setting
up swap space
Enabling
full-duplex
Transcoding
from from MPEG TS to MPEG2
|
CDK compile prerequisites
More notes to appear as and when they arrive. The notes herein
are
based on a Linux development environment. I used Gentoo, though be
aware that you may use DAYS getting that baby up and running if you
install from source.
Make sure you have gettext 0.12.1 or later. Install latest
libtool, as of now, I used 1.4.3.
It's probably a good idea to add a development user and "sudo
su" to
this user when you work on the Dreambox stuff, but that's up to you, of
course.
Please note that this has been tried and tested as of 29th
June 2004 on
a Gentoo "current" machine running kernel 2.6.7, if you can't get this
to work, try joining the #dreambox channel on the serveirc.com network.
|
Compiling the CDK
mkdir $HOME/dreambox
mkdir $HOME/tuxbox-cvs
cd $HOME/tuxbox-cvs
export CVS_RSH=ssh
export CVS_RSH=ssh
cvs -d:pserver:[EMAIL PROTECTED]:/cvs/tuxbox -z3 co -P -r rel_1_0_0 .
cd apps/tuxbox/enigma
cvs update -dPA
add -DENABLE_PPPOE -DDISABLE_LIRC behind -fno-rtti
in apps/tuxbox/enigma/configure.ac
cd $HOME/tuxbox-cvs/cdk
./autogen.sh
./configure --prefix=$HOME/dreambox --with-cvsdir=$HOME/tuxbox-cvs --enable-maintainer-mode \
--with-hostruleset=standard --with-hardwareruleset=dreambox --with-targetruleset=flash
make .enigma
This will take a while, as the build will download certain things (such
as the linux kernel..), so I hope you have a reasonably fast Internet
connection. Sometimes you may see some downloads "hang". This happens
in particular to certain sourceforge.net addresses. well, this is
quickly remedied. Just halt the compile (ctrl+c) and download the
package from the next mirror manually (just copy the next command in
the "wget blah sourceforge blah | wget blah berlios.de blah" line (the
one containing e.g. berlios in this example). Then type "make .enigma"
again, and the compile will start where it left off.
|
Plugin compile notes
Here's how to compile a plugin. There is a demo plugin
already available to work from. Thanks to ZigZag for this info too!
cd $HOME/tuxbox-cvs/apps/tuxbox/plugins/enigma/demo
Change CXX = powerpc-tuxbox-linux-gnu-g++ to CXX
= ${HOME}/dreambox/cdk/bin/powerpc-tuxbox-linux-gnu-g++ in Makefile .
Add the following to Makefile :
SIGC_CFLAGS = -I${HOME}/dreambox/cdkroot/lib/sigc++-1.2/include \
-I${HOME}/dreambox/cdkroot/include/sigc++-1.2 \
-I${HOME}/tuxbox-cvs/apps/misc/libs/libxmltree
SIGC_LIBS = -L${HOME}/dreambox/cdkroot/lib -lsigc-1.2
Change directories:
cd $HOME/tuxbox-cvs/apps/tuxbox/plugins
Change RANLIB="powerpc-tuxbox-linux-gnu-ranlib" to RANLIB="$HOME/dreambox/cdk/bin/powerpc-tuxbox-linux-gnu-ranlib"
in libtool .
cd $HOME/tuxbox-cvs/apps/tuxbox/plugins/enigma/demo
make
In order to test this plugin, you'll need to FTP the
enigma_demo.cfg
and
.libs/enigma_demo.so
files in the demo directory to
/var/tuxbox/plugins
on the Dreambox. Then, selecting the plugin menu on your remote control
(you may have to restart your Dreambox), you should see the demo plugin
in the list of installed plugins. Now, go ahead and code some cool
plugins!
|
What drive should you use?
Use a 5400 rpm drive, e.g. Samsung 160GB. Make sure the drive
uses as little power as possible during spin-up and general use
(~500mA). Consider using a laptop drive. The DM7000 has a shit PSU
(power supply unit), so even with any modifications (Dream Multimedia
realised the error of their ways after the first version was released)
you should choose something that draws as little power as possible.
It'll emit less heat too.
|
Looking at IP traffic "over the air"
Connecting to the Dreambox directly on port 31338 can be
quite interesting. For example, if you make sure that the service type
for a data stream is changed to "TV" (using e.g. DreamboxEdit), you can
sniff what people are requesting over the air.
Connect to your Dreambox with DreamboxEdit (I used version
1.62). Select e.g. 19.2E,
Casablanca (12603,705 Mhz, H, Symbolrate 22000, FEC 5/6). Change the
type to TV. Unicast
streams here have PID 0x300, broadcast streams 0x200. If you use a
different provider,
these PID's vary.
Point your favourite browser (wget, for example) to: http://dreambox:31338/0x300
and you're good to go!
Use e.g. www.lyngsat.com
to search for other IP streams.
|
Upgrading the DM7000's flash
Upgrading the Dreambox DM7000 is best done via the network.
Some people
use DreamupLAN, but it didn't work for me.
Enable networking.
Use FTP, login using "root" and enter "dreambox" as
password. These are
the default login/passwords as of summer 2003; reset the Dreambox with
the flash erase option if you've changed your password and can't
remember.
Upload your new flash image as /var/tmp/root.cramfs .
Choose "Manual Upgrade" in the setup, wait for it to
flash.
Reboot with a flash erase (while the box is rebooting,
press and hold
the top left "up" button until the LCD says "Flash Erase", then release
the button).
If the box fails to flash, but "Dreambox Multimedia" appears
on the LCD after you reboot, all is not lost -- use the serial method.
NOTE: If your LCD says "UC0", you're shit out
of luck and will need to send the box back to Dream Multimedia, unless
you know how to use a JTAG interface.
If all your other avenues have been exhausted, try T-hydron's
Dreambox Blog.
|
Setting up swap memory
You can set up a swap file like this (example is for 128MByte):
Create the file to use as swap:
dd if=/dev/zero of=/hdd/swap bs=16k count=8192
Now initialise it as a swapfile:
mkswap -v1 /hdd/swap
Edit /var/tuxbox/start_enigma ,
place this at the start, just below the '#!/bin/sh '
line:
if [ -e /hdd/swap ]; then
/sbin/swapon /hdd/swap
fi
Your Dreambox will now use the swap file. Check to see if swap is in
use after rebooting your box:
reboot
Or, if you prefer, use the reboot option on the remote control. Wait
for the box to respond to telnet again, and ..
cat /proc/swaps
If something similar to this appears, you're good to go:
Filename Type Size Used Priority
/hdd/swap file 131064 388 -1
|
Configuring full-duplex
Add the following to start_enigma (see above) to force the
DM7000's ethernet port into full duplex mode:
echo 1 > /proc/sys/dev/eth0/swfdup
|
Transcoding (converting) an MPEG2
TS (Transport Stream) to an MPEG2 program stream
This is usually the first step if you want to burn your
recorded
programmes onto DVD or further conversion (e.g. DivX, XviD, (S)VCD,
etc.). Get "ProjectX" (http://forum.lucike.de/)
-- it's written in Java, so works on any machine that has the JRE (Java
Runtime Environment) installed.
I'm too lazy to give step-by-step instructions; it's all
pretty straight forward. You may also want to check out http://www.tillgerken.de/item/207
and http://www.doom9.net
|
|