chrishowells.co.uk

January 5, 2009

WD TV is a GPL violation

I first started looking at the WD TV because I was interested in buying one, and once I found out that it was running Linux, started to investigate if I could customise it to my needs.

Update:  9th Feb 2009. WD released a new source code package some time ago (WDTV_GPL_Code.zip version 1.01.02), but it’s still a GPL violation. See below.

Disclaimer: I Am Not A Lawyer, nor do I have expert knowledge of GPL enforcement. I am merely a free software enthusiast and *nix sysadmin.

Unfortunately the WD TV product, by the well known hard disk manufacturer Western Digital, appears to be violating the copyright of various free software projects, including those of the GNU and mtd-tools projects.

Of most concern to the GNU project is that a “toolchain” consisting of a binary-only version of gcc is provided. Of concern to mtd-tools is that the firmware contains a binary version of mtd-tools, but no source code appears to be provided.

Personally I think that it is unacceptable that WD is making money out of violating the GPL, and effectively distributing pirated software. There would be an uproar if WD was using pirated Microsoft software, for instance.

Information

The firmware and “source code” is available from
http://support.wdc.com/product/download.asp?groupid=1001&sid=112〈=en

The first problem is that the “source code” is only for version 1.00.01, while the binary version is 1.01.01.

If you download the firmware and unzip it, you will find the following file:

release-1.01.01/wdtv.bin

This is a cramfs image which can be mounted and examined using the following command:

sudo mount -t cramfs -o loop wdtv.bin -o offset=32 /mnt

(The first 32 bytes are an md5 checksum of the remainder of the rest of the wdtv.bin file).

Findings

* I do not own the product; as such I am uncertain whether it contains a written offer to provide the source code, as required by the GPL

* There are no suggestions or further offerings in WDTV_GPL_Code.zip to obtain the remainder of the source code

* The source code (WDTV_GPL_Code.zip) is incomplete and missing the scripts needed to build the product, which Western Digital are obligated to provide per section 3 of the GPL v2: “For an executable work, complete source code means [...] the scripts used to control compilation and installation of the executable”. There is no way that anyone could turn the source code that WD provide into something that can be installed on the device.

The source code package contains toolchain-89.tgz, which appears to be binary only release of gcc in the form of an ARM cross compiler.

chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25/toolchain-89$
arm-elf/bin/gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release)

Incidentally, I believe that this is NOT the correct compiler at all. The hardware contains the Sigma SMP8635LF, which is MIPS-based, not ARM at all. Additionally, from examining the firmware image as described above, the software appears to have been compiled using gcc 3.0, not 2.95 at all:

chris@thinky:/mnt/bin$ strings ntfs-3g | grep -i gcc
libgcc_s.so.1
GCC_3.0

* The binary firmware contains the utelnetd daemon, licensed under the GPL v2, but source code for this does not seem to be provided

* The binary firmware contains the mtd-tools (mkfs.jffs2 etc), licensed under the GPL v2, but source code for this does not seem to be provided

* I’m not too sure if this is a GPL violation, but the product is supplied with various proprietary kernel modules, which are essential for the functioning of the device.

I believe that there could well be patches to the kernel, but these are not supplied either. Running modinfo on one of the proprietary kernel modules reveals the following:
chris@thinky:/mnt/lib/modules$ modinfo llad.ko
filename: llad.ko
license: LGPL
author: Mambo standalone team
description: llad kernel module for standalone configuration
depends:
vermagic: 2.6.15-TvDock preempt MIPS32_R2 32BIT gcc-4.0
parm: max_dmapool_memory_size:Sets the maximum amount of memory shared by the all dmapools (i)
parm: max_dmabuffer_log2_size:Sets the dmapool buffers maximum size (ex: set 15 for 32kB) (i)
parm: major:Sets the major number (i)

This means that the module expects to load against a kernel called 2.6.15-TvDock, however searching for the string TvDock in the supplied kernel source produces no results. To my knowledge, building a kernel to report itself as “2.6.15-TvDock” would require patching the top level kernel Makefile (e.g. linux_kernel_2.6.15/Makefile), and changing the “EXTRAVERSION” line, yet the string “TvDock” is not mentioned in the entire source code package.
chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25$ tar xzzf linux_kernel_2.6.15.tar.gz
chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25$ cd linux_kernel_2.6.15
chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25/linux_kernel_2.6.15$ grep -ir tvdock *
chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25/linux_kernel_2.6.15$

I have diff’ed the kernel to a vanilla 2.6.15 from kernel.org and the diff is extensive (18k lines, 664KB) : you can grab it here.

There are various patches mentioned in the top level of the unpacked kernel.
chris@host:~/dock/TVDOCK_GPL_code_package.2008.9.25/linux_kernel_2.6.15$ ls | grep patch
README.0000.shared.patch
README.1000.tangox.patch
README.1001.pci.patch
README.1002.gpio.patch
README.1003.mbus.patch
README.1004.ide.patch
README.1005.tango2enet.patch
README.1006.usb.patch
README.1007.mtd.patch
README.1008.ir.patch
README.1009.fip.patch
README.1010.scard.patch
README.1011.udf.patch
README.1012.fb.patch
README.1013.frequency.patch
README.1014.ipfilter.patch
README.1015.cpucache.patch
README.1016.kmalloc.patch
README.1017.satasil.patch
README.1018.multirecv.patch
README.1019.zbf.patch
README.1020.binary-identity.patch
README.1021.rootfs-integration.patch
README.1022.cacheflush.patch
README.1024.bug.patch
README.1025.ddma.patch
README.1026.gcc41x.patch
README.1028.embeddedrd.patch
README.1032.net.patch
README.1034.ck7.patch

I’m not sure if these patches are in the above diff, determining if that is the case will take a while. Presumably they are in the compiled kernel, so if they aren’t, it may be violating the kernel developers’ copyright too. (One of the authors mentioned in the above files is Craig Qu, who appears to be a Sigma employee.)

Analysis of WDTV_GPL_Code.zip version 1.01.02

The updated released of WDTV_GPL_Code.zip was made in January 2009. It consists of three files: GPL.tgz, TVDOCK_GPL_code_package.2008.9.25.tar and TVDOCK_Project_Source_Code_License_List.doc.

Not much appears to have changed since the previous “source code” release, other than the addition of GPL.tgz.

The appear to have taken onboard my previous comments, and included the source code to utelnetd and mdtools.

It’s interesting to note that there is a smp86xx_toolchain_2.8.2.0, which includes a mipsel uClibc cross compiler. It looks like this could well be the correct compiler, but there is still no source code for gcc. So not only are WD violating the GPL of gcc once, they are now doing it twice, as they are still distributing the binary only arm cross compiler as well.

There are several shell scripts including make_ntfs-3g.sh, make_ntfsprogs.sh, make_utelnetd.sh, make_busybox.sh, make_dosfstools.sh, make_mkfs.jffs2.sh which could be construed as an attempt to distribute the scripts used to build it, but frankly they are an absolute joke.


chris@host:~/GPL/GPL$ cat make_busybox.sh
cd busybox-1.10.0
make clean
make
cd ..

Yes, even this four line script is broken. There is no shebang, and it won’t work if the current directory is elsewhere in the filesystem.

In Summary

WDTV is an amateruish product, and still in breach of copyright law. It’s hard to understand how this passed their legal department.

  1. WD are distributing a arm cross compiler without distributing the gcc source code, and the scripts used to build it
  2. WD are distributing an mipsel cross compiler without distributing the gcc source code, and the scripts used to build it
  3. The scripts to build the project as a whole are still missing
  4. It’s impossible to determine what else may be missing/incorrect, due to points 1-3, point 3 in particular

Once the above has been resolved, it should be possible to take the source code and compile the project in its entirety. This should be an exact copy of what is installed on the device, minus the propreitary components. If it isn’t, then something has gone wrong.

  • Share/Bookmark

6 Comments »

  1. Just too bad the WD isnt straightforward with the WDTV as the other MyBooks.
    I was hoping to replace my NMT/HDX but right now, i must say i am pretty happy to stick to NMT toolchain instead.

    Comment by edgecrush3r — January 16, 2009 @ 4:39 pm

  2. Hi!
    i owns a WDHDTV and it’s all true, on the source code there is no indication about how to compile or build it, no documents (only some generic readme files and the licenses of the tools included on the compressed file).
    It’s a pity, because it seems that the people of WD doesn’t understand that the best way to get a competitive product is free the source code; the WDHDTV is a great product, but the firmware has a lot of possible enhancements (file oprations, WI-FI,web navigator…), and a bunch of third-party developers could enhance it a lot

    Comment by ender wiggins — January 31, 2009 @ 2:57 am

  3. WD now has a new GPL’d source code package that contains the complete kit (toolchain and all)

    Comment by B0than — February 9, 2009 @ 4:11 am

  4. Have you thought about bringing this to the attention of http://gpl-violations.org/? I’d like to see a modded firmware cause apparently WD’s priority is not fixing bugs. At least that’s my impression when dealing with their support. My offer to fix translation bugs in the German GUI where repeatedly ignored and once I disproved them my TV is not the source of my graphical subtitle problems I got a standard answer about using compatibe formats only. Problem is, text subs support is broken as well.

    Comment by techflaws.org — February 10, 2009 @ 8:52 am

  5. B0than: Unfortunately the most recent “source code” release is still incomplete, as detailed above.

    techflaws.org: Yes, I have brought the issue to the attention of gpl-violations.org already. I would like to see modded firmware too.

    Comment by admin — February 10, 2009 @ 10:28 pm

  6. i’ve downloaded the new code package and the only change i’ve noticed are the .sh scripts on the GPL side. But there is no general script in order to get a functional version… i’ve contacted with WD support in order to know if they are going to free the whole GPL source code.

    Of course, i know that there is almost impossible that the WD support offers the full build system of the WD firmware (yes, i know, they are violating the GPL license, but i think that this point of view is really odd for the marketing and commercial guys of WD :-) ) , so i asked also for a middle solution: maybe the WD developers could implement some sort of plugins system with some api in order to allow third-party developers create some cool plugins. Of course, this option does not imply that WD can avoid his GPL obligations, but it could be a start for making some moddings to our WD Players…

    Comment by bean delphiki — February 11, 2009 @ 4:20 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress