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 !

6 réflexions au sujet de « Compiling Homebrew 1.08.17 on Ubuntu 12.04 »

    • This is very good news that b-rad is currently working on the Gen3!
      I tested it and I put a news. It is especially necessary that I look at how he has successfully run code on a non-flashed Gen3!

  1. Hi I was wondering if these methods described in the thread will work for the newer wdtv firmwares or are they specific to 1.08.17 only? I have just gotten my wdtv and don’t care much for the services and would rather be able to add homebrew to my device. Any help is appreciated. Thanks

    • This post just shows the methodology for compiling a homebrew and stages. These methods can be applied perfectly to any version of the GPL firmware.
      However, each firmware has own bugs. I recommend you to read the article on firmware 1.12.04 bugs and follow the command file that I put at your disposal with the firmware.

Leave a Reply