Read the “Instructions to rebuild a Debian package” section of the WD-Readme.txt

One of the posts suggested reading this file, but it is a 500MB download the explodes into a 1+GB file.

To save others the download, I provide the text of that file here:

Modification of or tampering with the Software, including but not limited to any Open Source Software, is solely at Your own risk. Western Digital is not responsible for any such modification or tampering. Western Digital will not support any product in which You have or have attempted to modify the Software supplied by Western Digital.

Sequoia 64K GPL source - version 04.00.00-607

Package contains:
* packages
kernel_3.2.26
barebox-2011.06.0
samba-4.0.0
build_tools
* sources
jquery.timezone
forked-daapd-0.19
libupnp-1.6.6
netatalk-3.0.3
taglib-1.9.1
libav-9.12
* WD-README.txt
* Copyright_Info.txt

------------------------------------------------
Western Digital provides source code for GPL packages modified by Western Digital via its support website at http://support.wdc.com/download/gpl/. When applicable, build instructions for modified packages are distributed in the README/INSTALL files provided in the appropriate package folder. Prebuilt packages have been built with the 64k memory page size toolchain provided at packages/build_tools/compilers.

Other packages are integrated as binaries directly from the Debian distribution without modification. Below is an example of how to rebuild a Debian created binary if desired.

Instructions to rebuild a Debian package

The WD My Cloud device firmware versions 04.00.00 and later use a modified version of Debian Linux which uses 64K sized memory pages. In order to build Debian packages for use on a 64K page-size device, an “qemu-emulated native” build system is used, which contains the binutils package modified for 64K page-size alignment.

Prerequisites:

- x86 PC with 64-bit Ubuntu or Debian installed
- packages qemu-user-static and binfmt-support installed on host build system
- Modified binutils package with 64K page size support. A pre-built version is included in binutils directory. There is no need to re-build binutils, however, instructions are provided in the source package (see binutils/README-binutils-64K-pagesize.txt).

Run the script:

./build-armhf64k-package.sh <package_name> <suite>

Where:

<package_name> is the name of the package you would like to build.
<suite> is the Debian suite version. E.g., “wheezy” (i.e. stable) or “jessie” (i.e. testing).

After a successful build, the Debian build artifacts (.deb files) for the package will appear in the directory “build/root”. The artifacts may then be copied to a WD My Cloud device, and installed through the standard Debian install mechanism (dpkg -i).

3 Likes

Thanks for sharing your experience with the WD Community.

i looked through out the WD GPL folder and i could not locate the file: build-armhf64k-package.sh

Can someone help please. Im going to attempt rebuilding transmission or btsync.

thanks

It’s here: “.\gpl-source-sequoia-04.00.00-607\packages\build_tools\debian\build-armhf-package.sh”

Yeh thanks i had found it eventually. So for the past 2 hours i’ve been trying to use it to rebuild “transmssion” But no luck so far.

I have 64 bit ubuntu running in a VM. I installed the packages required as per WD document, namely  qemu-user-static and binfmt-support.

Now im no Linux expert at all…I could be doing this wrong. but when i try to rebuild transmission, it starts wroking on it for like 5 mins and then eventually fails:

I run:    ./build-armhf-package.sh --pagesize=64k transmission wheezy

The entire build log is several thousand lines i think. I’ll put it on drop box soon and paste link here

EDIT: Log file for the build process

https://dl.dropboxusercontent.com/u/4883446/nohup.out

I’m trying to build something simpler locally, like telnet, iperf, perl packages etc to get this thing going. Seems there’s an issue with the bootstrap, not 64k compatible locally? Chroot to the bootstrap will have the “Killed” issues. So I directly binded bin, usr, lib etc to the build dirs. Now messed up my local libs till i/o errors, need to redump the image back to the disk. Will continue another day…

i think the “setup.sh” script in the build_tools folder might also needs to be run. I cant figure it out.

it says:

setup.sh <bootstrap_tar> <debian_output_dir>

This sets up a Debian bootstrap chroot directory given a bootstrap_tar file.

It will automatically install the proper qemu static emulator as required.

I see that the bootstrap tars are also available in “bootstrap” folder

Crappy of WD to provide 1 liner inforamtion about these tools…

Why dont you go the extra mile and provide us with an Ubunt VM pre configured so that we can build 3rd party apps…If you are not going to support 3rd party apps atleast support your own tools and help customers set it up!!!

The setup.sh is being called somewhere in build-armhf-package.sh.