First compiled GPL code !

This article is obselete. See the post 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 next 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 : and the toolchain for cross-compiling
- Some A lot of time (more than 6 hours on my P4 2,4 GHz !)

Processing :
- Create a directory on your home directory and transfer your download in
mkdir wdtvgen3
cd wdtvgen3

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

- Uncrompress and configure WDTV GPL source code
tar xzfv PALACE_1.05.18_G.tgz
echo "export DIRECTFB_I=~/wdtvgen3/PALACE_1.05.18_G/src/libs/qt-everywhere-opensource-src/directfb" >> ~/.profile

- Exit and relog for loading environment variables, and verify

- Edit and patch the code (Western left a trap in their code :-) )
Open PALACE_1.05.18_G/src/libs/Makefile and comment (add a # at the beginning of the line) the line 168 "#LIBS_LIST_y += libsigcpp boost libtorrent-rasterbar mdnsresponder (generates errors during compiling and i don’t want bittorrent)

cd PALACE_1.05.18_G
make distclean

- Go to sleep …
make install
make firmware

- Open the wdtvlivegen3.ver file and increase the version number VERSION=’1.05.18_G’ to VERSION=’2.05.18_G’ (this is useful only if you reflash a previous GPL firmware)

- 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)

- 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 !

9 réflexions au sujet de « First compiled GPL code ! »

  1. Hi,
    I’m stucked while compiling all the stuff, I have problemst to compile python-2.7.1 included in package, is there solution for this issu:
    while compiling after make distclean, make, I get error:
    mips-linux-gnu-gcc: directory”: No such file or directory
    : warning: missing terminating ” character
    ./Modules/getbuildinfo.c: In function ‘_Py_svnversion’:
    ./Modules/getbuildinfo.c:48: error: missing terminating ” character
    ./Modules/getbuildinfo.c:48: error: expected expression before ‘;’ token
    make[3]: *** [Modules/getbuildinfo.o] Error 1
    make[3]: Leaving directory `/home/lmp/wdtvgen3/PALACE_1.05.18_G/src/libs/Python-2.7.1/Python-2.7.1′
    make[2]: *** [/home/lmp/wdtvgen3/PALACE_1.05.18_G/src/libs/../../src/libs/.python_compiled] Error 2
    make[2]: Leaving directory `/home/lmp/wdtvgen3/PALACE_1.05.18_G/src/libs’
    make[1]: *** [subdir-libs] Error 2
    make[1]: Leaving directory `/home/lmp/wdtvgen3/PALACE_1.05.18_G/src’
    make: *** [subdir-src] Error 2

    I have 32 bit ubuntu, and everything done like in post.
    Is there some way how to compile all the stuff? ;)

    • I tried to reproduce this problem without success.
      The message:
      directory “: No such file or directory
      I do think that a variable is not set correctly.
      I initially thought the problem could come from a space or a special character in the name of a parent folder. But with a space, the compilation does not start. And I could not test all the special characters but it’s the first thing to check. Removes all non-standard if any.

      • Hi,
        I’ve exactly the same error, have you fix it ?
        I need to have a remote access to the wdtv live without the webaccess so i found your easyphp but i can’t compil the gpl … thx for help

  2. Hello again,
    I usually have time only in weekends and here is my short story for last weekend.
    Thanks to your PhpShell advice, I was able to browse the file system, run an application from USB (I tried pure-ftp) and all were OK. I was trying to add some init scripts for Dropbear in /etc/init.d/ directory but failed several times. (Later on, I read in the forum that init.d scripts are not called during the boot.) During one that trial and errors (as you guess, I was flashing the sw each time) I encountered a problem.

    I accepted to update the firmware from the menu, the device is rebooted itself and displayed “This device’s firmware is changed after market, ……”, you know the message. And then nothing happened, it didn’t show the firmware update progress bar. I waited for a very long time, nothing is changed. Restarted the device, again the same message but no further steps. Triying to ping, but it doesn’t receive the IP no.

    Do you suggest something in this case? Do you think that I bricked the device and start to try what you explain in your other post telling unbricking via JTAG?

    I remember that you adviced me not to flash the firmware too many times. I was planning to run all the scripts and applications from USB once I enable SSH, telnet and FTP. But I couldn’t arrive that point.

    Waiting for your comments, if you have time..

    Best regards,


    • I do think you have bricked your WDTV. Try the procedure on my blog. This is a fairly complex procedure and requires attention to detail and a lot of felling.

      Good luck

  3. Hello,

    Thank you very much for your help. As today is saturday, I had a time to try wht you suggested. But I still couldn’t manage to access the WD via SSH or telnet.
    Here the list of what I did;

    * I enabled the config parameters of busybox (as below) and compiled the whole sw tree.

    * I downloaded the wdlx sw tre from the following svn server;

    * As directly copying the files after “make install” causes chksum error during “make firmware”, I copied the files you said in the following directories:

    aktasg@aktasg-ubuntu:~/wdtvgen3/PALACE_1.05.18_G/src/libs/rootfs_skeleton/generic/mandatory/usr/bin$ ls -al
    -rwxrwxrwx 1 aktasg aktasg 125124 2011-05-19 10:21 dropbearconvert
    -rwxrwxrwx 1 aktasg aktasg 130897 2011-05-19 10:21 dropbearkey
    aktasg@aktasg-ubuntu:~/wdtvgen3/PALACE_1.05.18_G/src/libs/rootfs_skeleton/generic/mandatory/usr/sbin$ ls -al
    -rwxr-xr-x 1 aktasg aktasg 259 2011-09-06 15:19 confcheck
    -rwxrwxrwx 1 aktasg aktasg 276890 2011-05-19 10:21 dropbear
    aktasg@aktasg-ubuntu:~/wdtvgen3/PALACE_1.05.18_G/src/libs/rootfs_skeleton/generic/mandatory/etc/init.d$ ls -al
    -rwxr-xr-x 1 aktasg aktasg 295 2011-09-06 15:19 do_make_ramdisk_and_remount_rootfs
    -rwxr-xr-x 1 aktasg aktasg 1091 2012-05-03 21:25 dropbear
    -rwxr-xr-x 1 aktasg aktasg 177 2011-09-06 15:19 options
    -rwxr-xr-x 1 aktasg aktasg 408 2011-09-06 15:19 rcS
    -rwxr-xr-x 1 aktasg aktasg 311 2011-09-06 15:19 S01sysinit
    -rwxrwxrwx 1 aktasg aktasg 1554 2011-09-22 01:36 S10dropbear
    -rwxr-xr-x 1 aktasg aktasg 1108 2011-09-06 15:19 S20urandom
    -rwxr-xr-x 1 aktasg aktasg 1111 2012-05-03 21:29 S45nettune
    -rwxr-xr-x 1 aktasg aktasg 768 2011-09-06 15:19 S50modules
    -rwxr-xr-x 1 aktasg aktasg 92 2011-09-06 15:19 S51proc_pipe
    -rwxr-xr-x 1 aktasg aktasg 263 2011-09-06 15:19 S70misc
    -rwxrwxrwx 1 aktasg aktasg 1266 2011-09-22 01:36 S75telnetd
    aktasg@aktasg-ubuntu:~/wdtvgen3/PALACE_1.05.18_G/src/libs/rootfs_skeleton/generic/mandatory/etc/dropbear$ ls -al
    lrwxrwxrwx 1 aktasg aktasg 26 2012-05-05 02:08 authorized_keys -> ../../conf/authorized_keys

    this one seems broken link. there is no ../../conf/authorized_keys to be linked. It is the same in wdlx tree that I downloaded from SVN.

    I run make install. And then created the following symbolic links;
    login -> busybox
    passwd-> busybox in the /home/aktasg/wdtvgen3/PALACE_1.05.18_G/build/root/bin directory.

    There is also telnetd symlink automatically created in /home/aktasg/wdtvgen3/PALACE_1.05.18_G/build/root/usr/sbin

    And I run make firmware, create the binaries, change the version number and flash the image to the device. When I restart, I see WDTV is running, I see the menu on the TV. But I cannot connect it via ssh or telnet.

    Is there anything I missed to do, or did something wrong? I suspect authorized_keys is broken link but I thought that it can be generated in run time.

    Could you comment on this please?

    By the way, what happens I try to flash the wdlxtv firmware directly? Does it work? I am asking this because you said that it is the same architecture.

    If what I wrote are not understandable via wordpress page, I can mail all the details if you wish..

    Many thanks in advance..


    • I advise you not to install the firmware directly on the Gen3 WDLXTV. This is the same architecture (MIPS) but not the same hardware. Many patches have been applied to the kernel to manage the flash memory, remote control, video … If you flash with WDLXTV, all functionality will not work and it can even plant the kernel at boot time and your Gen3 brick.

      As I have explained, I have not tested the telnetd and dropbear on Gen3. I would do it later but for now, I focus on the orginal firmware hack.
      I think I forgot to tell you about the dropbear configuration file /etc/dropbear and key file and dropbearkey dropbearconvert
      ‘re Trying to start the service manually dropbear (via JTAG or phpShell).
      Tape directly start command:
      dropbearkey-t rsa-s 2048-f /conf/rsa_key
      dropbearkey-t dss-f /conf/dss_key
      dropbearconvert dropbear openssh /conf/rsa_key/conf/id_rsa
      dropbear-p localhost: 22-p-r $ SSHPORT /conf/rsa_key-d /conf/dss_key || dropbear-r /conf/rsa_key-d /conf/dss_key

      For telnetd, I see that the script also uses logger, we must add it and recompile busybox.
      telnetd-l K-login && logger-s-t `basename $ 0` “telnetd started”

      Do not flash each time it is the best way to bricking your Gen3. Uses the command mount -o bind to replace an existing folder by another on a USB key.

      good luck

  4. You do not need to compile Dropbear. You can copy the executable directly from the svn WDLXTV. This is the same architecture. (/usr/bin/drop*, /usr/sbin/dropbear, /usr/sbin/telnetd)
    The important step to run telnet and dropbear is to activate functions in Busybox login and passwd (file PALACE_1.05.18_G/config/busybox-1.10.0-config line 395 and 400). Create symbolic links to BusyBox to login and passwd in the /bin directory. Add configuration files and boot from the SVN WDLXTV (/etc/init.d/S10dropbear, /etc/init.d/S75telnetd, /etc/dropbear).
    I did not test this procedure. I am currently working on the crack of the Gen3. So I can not test for now. Good luck.

  5. Hello,

    I tried the steps you mentioned, and compiled GPL firmware. Flashed it and its now operational. Thank you very much for your detailed explanations.

    As you guess, I also need to enable ssh or telnet in order to access the system, to develop something.

    I am currently trying to compile and add dropbear ssh to the filesystem.
    Could you also tell me the steps that I shoud follow to have dropbear in my file system? Could you send me file?

    Thanks in advance,

    Best regards,


Leave a Reply