Customize splash screen

When you switching to GPL firmware, Western splash screen is replaced by this warning message:
“Warning, This media player was modified aftermarket, bla bla bla…”
The splash screen is stored in the flash memory in the mtdblock6.
It is possible to replace this image with any other image of the same resolution (1280 x 720).
To replace the splash screen, follow these steps:

On WDTV Gen3, copy the contents of block 6 of the flash memory on a USB key:
dd if=/dev/mtdblock6 of=/tmp/media/usb/USB1140/6A3B-C56D/mtdblock6.bin bs=1024

Eject the USB key and plug it on your Ubuntu host
Copy mtdblock6 dump:
cd ~/wdtvgen3/GPL_PALACE_1.10.12_G
cp /media/KINGSTON/mtdblock6.bin .

Mount the dump to retrieve binary files:
mkdir temp
sudo mount mtdblock6.bin temp
mkdir mtdblock6
cp -v temp/* mtdblock6
rm mtdblock6/splash_picture.sdd

Download and untar utility gensddf to convert the image of your choice to SDDF format:
wget http://guimli.free.fr/download/gensddf/gensddf-0.1.0.tar.gz
tar xzfv gensddf-0.1.0.tar.gz
./gensddf PALACE_1.09.10_G/src/libs/RES_PALACE/splash_screen/splash_screen.bmp mtdblock6/splash_picture.sdd

recreate the firmware:
genromfs -d mtdblock6 -f mtdblock6.bin

Copy the resulting file to a USB stick:
cp mtdblock6.bin /media/KINGSTON

Plug the key on your WDTV Live and flash the firmware :
dd if=/tmp/media/usb/USB1140/6A3B-C56D/mtdblock6.bin of=/dev/mtdblock6 bs=1024

Reboot your WDTV Live and see !

Source code of gensddf and splash screen’s exemple can be found here. This program as been develloped in freepascal under Lazarus.

Compiling Homebrew 1.08.17 on Ubuntu 12.04

Warning : Flashing the WDTV Live Streaming (Gen3) will void its warranty and the online streaming service functionality will not be available anymore !
!!! Do it at your own risks, I WILL NOT be taken responsible for any damage caused to your device (such as brick) !!!

Why using GPL code ?
GPL code allows to add functionnality to your WDTV box (I will add SSHFS support in a previous article)

What you need ?
- A Physical or Virtual PC running Ubuntu version 8.04 or newer in 32 bits (64 bits returns an error during compiling)
- At least 6 Gb free space on your hard disk drive.
- The source from Western Digital : WDTV_LiveStreaming_GPL_Code_package_1.08.17.zip and the toolchain for cross-compiling GPL_toolchain_of_WDTV.zip
- A lot of time (more than 6 hours on my P4 2.8 GHz !)

Preparing the system :

- Install prerequired package
sudo apt-get install openssh-server vim automake libtool patch gettext libglib2.0-dev gawk cramfsprogs genromfs flex texi2html texinfo bison libncurses5-dev intltool build-essential subversion python-gtk2 unzip

- Modify sh interpreter (see README_PREREQUISITES in file WDTV_LiveStreaming_GPL_Code_package_1.08.17.zip)
cd /bin
sudo rm sh
sudo ln bash sh

- Create a directory in your home directory and download toolchain (cross-compiler)
cd
mkdir wdtvgen3
cd wdtvgen3
wget http://download.wdc.com/gpl/GPL_toolchain_of_WDTV.zip

- Uncompress and configure toolchain for cross-compiling
unzip GPL_toolchain_of_WDTV.zip
tar xzfv GPL_toolchain_of_WDTV/toolchain_binary/mips-4.3.tgz
sudo mv mips-4.3 /opt

- Patch automake (Only with Ubuntu 12.04. Not on older, not on newer, just with 12.04)
wget http://mirror.ovh.net/ubuntu//pool/main/a/automake1.11/automake_1.11.6-1ubuntu1_all.deb
sudo dpkg -i automake_1.11.6-1ubuntu1_all.deb

- Configure environnement variable
echo "export DIRECTFB_I=~/wdtvgen3/PALACE_1.08.17_G/src/libs/qt-everywhere-opensource-src/directfb" >> ~/.profile

Compiling homebrew :

- Download and decrompress WDTV GPL source code
wget http://download.wdc.com/gpl/WDTV_LiveStreaming_GPL_Code_package_1.08.17.zip
unzip WDTV_LiveStreaming_GPL_Code_package_1.08.17.zip
tar xzfv PALACE_1.08.17_G.tgz

- recheck the variable Directfb_i
export DIRECTFB_I=~/wdtvgen3/PALACE_1.08.17_G/src/libs/qt-everywhere-opensource-src/directfb
echo $DIRECTFB_I

- Patch WPA_Supplicant
cd ~/wdtvgen3/PALACE_1.08.17_G/src/libs/make
mv wpa_supplicant.mk wpa_supplicant_old.mk
wget http://guimli.free.fr/download/patch/wpa_supplicant.mk

- Patch Avahi (Use this Avahi patch only with Ubuntu 12.04 or newer !!!)
cd ~/wdtvgen3/PALACE_1.08.17_G/src/libs/avahi-0.6.30
mv avahi.patch avahi_old.patch
wget http://guimli.free.fr/download/patch/avahi.patch

- Compil source code
cd ~/wdtvgen3/PALACE_1.08.17_G
make distclean
make

- Wait 6h

- Copy binaries files to directory structure.
make install

- Build the firmware
make firmware

- Increase the version number in wdtvlivegen3.ver file (this is useful only if you reflash a GPL firmware with same version)
~/wdtvgen3/PALACE_1.08.17_G/build
sed -i 's/1.08.17/2.08.17/g' wdtvlivegen3.ver
cat wdtvlivegen3.ver

- Copy all files in the Palace_launch_1006 folder at the root of an USB key formatted in FAT32 (this is useful only if you flash from official firmware)
This Firmware delete the security key from your WDTV Live and switch your box in GPL mode.

- Flash your WDTV Live Streaming, wait for the GPL Warning and remove the USB key.

- Copy the 3 wdtvlivegen3 files in PALACE_1.05.18_G/build at the root of your USB key.

- Flash your WDTV Live Streaming !

You now have a GPL firmware !

Homebrew based on 1.10.12

This release contains three new problems that I had corrected before obtaining a functional firmware.
All these problems are caused by DMARender binary.
- The network configuration that is now in the /usr/local/bin/wpa_supplicant.realtek. So I create a new symbolic link name of this
- Configuration files for Apache are no longer generated. Suddenly, the httpd server can not find the configuration files and does not start. I redirected the symbolic link to the file httpd.conf /webserver/conf/httpd.conf.backup.
- And finally DMARender always NFS mounts in the /tmp/nfs but seeks media /tmp/media/nfs. So I once again changed the file /bin/mount to create a symbolic link when mounting NFS.

Firmware 1.10.12 G V1.03

I also included batch and log files to help you check the progress of your compilations or modification.

Writing a document using the mounting SSHFS is in progress