[GUIDE] Building packages for the new firmware... someone tried it?

The errors you report are not necessarily errors. I avoided them by patching the scripts, I had not yet time to update the guide with the patched scripts. Also, I should better have a look to the latest firmware to see if they changed anything.

Anyway, ignore those errors: unless the build process fails for other reasons, you can go on to build from the jessie repository.

UPDATE : after better looking at your error messages, the last one (from chroot) is suspect and I guess the build process stops after it. Iā€™m not sure right now why it happens, however if you have some patience I may try to post here the patched scripts within some weeks (itā€™s holiday time ;-))

Mauromol, thanks for your answer.
First at all, I have a lot of time and patience because I donĀ“t need to change the firmware now.

Sorry for donĀ“t say that the error is the last line

chroot: failed to run command `/bin/bash': No such file or directory

It is when setup.sh execute, 8 lines before the end,Ā Ā  Ā 

sudo chroot $debian_output_dir /bin/bash -x <<'EOF'

andĀ 

Ā  debian_output_dir = /root/wdmc-build/64k-jessie/buildĀ 

Hi there, Iā€™m getting the following when trying to install gcj-jre-headless:

The following packages have unmet dependencies:
 gcj-jre-headless : Depends: gcj-4.7-jre-headless (>= 4.7.2-1~) but it is not installable

Any ideas?

edthepenguin wrote:

Hi there, Iā€™m getting the following when trying to install gcj-jre-headless:

 

The following packages have unmet dependencies:
gcj-jre-headless : Depends: gcj-4.7-jre-headless (>= 4.7.2-1~) but it is not installable

 

Any ideas?

You have to build package gcj-4.7-jre-headless and install it before gcj-jre-headless.

Here is the patched scripts Iā€™m using to build packages.

Improvements over the ones provided by WD:

  • in setup.sh the detection of the host system architecture is broken in WD scripts; this causes two problems: QEMU executable is not copied properly on the chrooted system, and hence package compiling often segfaults (manual solution provided in my original guide); also, some special mount points are not mounted and unmounted properly on each build attempt, producing annoying warnings
  • in build-armhf-package.sh, the installation of the patched binutils was skipping binutils-dev package, which may be required by other packages on building (it happened to me); this may cause the download of a non-patched binutils-dev package, with the risk to obtain a non-properly built package

To use these patched scripts, download this file:

https://www.dropbox.com/s/tnhzrtbinolmais/WD%20MyCloud%2064k%20build%20patched%20scripts.tgz?dl=0

and unpack it in the folder of the build environment youā€™re using (ex.: 64k-wheezy). For instance:

# cd /root/wdmc-build/64k-wheezy
# wget https://www.dropbox.com/s/tnhzrtbinolmais/WD%20MyCloud%2064k%20build%20patched%20scripts.tgz?dl=0
# cp setup.sh setup.sh.backup
# cp build-armhf-package.sh build-armhf-package.sh.backup
# tar xzvf WD\ MyCloud\ 64k\ build\ patched\ scripts.tgz?dl=0

This will backup the original scripts as .backup and unpack the patched scripts.

Now proceed as usual.

IMPORTANT: as usual, USE AT YOUR OWN RISK! No warranty of any kind!

NOTE : Another important thing to note is that to build jessie packages it might be required to build a new patched version of binutils, becase the one provided by WD has become old: if a package you want to build depends on a newer version of binutils, it might download the newer unpatched version of binutils and hence produce an invalid package (i.e.: a package that wonā€™t run properly on the My Cloud).

Follow the instructions in ./binutils/README-binutils-64k-pagesize.txt to know how to build a newer patched version (the procedure is very much similar to the one used to build standard packages).

For your convenience, I built version 2.24.51.20140903-1 some months ago (the one provided by WD in the sources for firmware version 4.00.00-607 was 2.24.51.20140425-1), here it is the link to download it:

https://www.dropbox.com/s/znsnscpsugqtlkb/binutils-armhf-64k.tar.gz?dl=0

Simply download it inside ./bintuils directory by replacing the original tar.gz file with the same name (*) provided by WD (make a backup of it before overwriting, for safety) and build packages in the usual way. This version might have become old meanwhile, but itā€™s certainly newer than the original one provided by WD.

(*) beware, if using wget it seems like the downloaded file has ā€œ?dl=0ā€ suffix appended to its name. Remove it after downloading!

IMPORTANT: as usual, USE AT YOUR OWN RISK! No warranty of any kind!

Please note that all that Iā€™m saying was tested with firmware versions 4.00.00-607 and 4.00.01-623 and the build environment was set up with the GPL source code package for firmware version 4.00.00-607 provided by WD (I checked there are no changes to these files in the GPL source code package for firmware version 4.00.01-623). I have not checked yet whether source code packages for newer firmware versions have differences regarding the build procedure of custom packages, nor I have tested my own built packages on these newer firmware versions to see if they still work, because I havenā€™t updated my MyCloud unit yet.

Hope this helps.

Mauro.

peretro wrote:

Sorry for donĀ“t say that the error is the last line

chroot: failed to run command `/bin/bashā€™: No such file or directory

 

Iā€™m not sure why this happens to you. What I can suggest is to try to follow my last message to download and use my patched scripts and binutils and see if they fix this problem. If you still get that errorā€¦ sorry, the best I can suggest is to try to follow again my original guide from scratch and then download and use my patched scriptsā€¦ good luck!

1 Like

@Nazar78

For someone who has the setup of building V4 compatible apps for the wd cloud. What source files would be needed to make a V3 app compatible with V4? more specfically im talking about ā€œFlexgetā€. Its a python app, no deb. However i did manage to collect all the files/packages that were needed and installe during flexgetā€™s install on my V3 wd drive.

Could these collected files be used to make V4 compatible Flexget app?

Thanks

Which Debian packages are needed by Flexget?

It doesnā€™t use Debs rather .tars and Python packagaes
They are all in this zip

https://www.dropbox.com/s/mvq6ucwado0cdcv/flex_all_packages.zip?dl=0

They are quite a lotā€¦ you should review them one by one. Consider that, in general:

  • python libraries and applications are architecture independent, so they can be used in the new firmware without any change; however you must build and install the required python version (Iā€™m not sure tiā€™s already available on the package provided by WD, you should testā€¦ if I remember well, I had to build python for installing pyLoad)
  • if any other tar contains native binary applications of applications that needs to be compiled, then they should be (re)compiled for the new firmware; if you want/need to (re)compile them on the unit itself, then you should build (following this guide) and install on the unit all the required compilers and this may become a complex task; if I remember well, Nazar did something about this by cross compiling Transmission from its tar source, so maybe you could inspire from his work (make a search on this forum)

mauromol wrote:


peretro wrote:

Sorry for donĀ“t say that the error is the last line

chroot: failed to run command `/bin/bashā€™: No such file or directory

 


 

Iā€™m not sure why this happens to you. What I can suggest is to try to follow my last message to download and use my patched scripts and binutils and see if they fix this problem. If you still get that errorā€¦ sorry, the best I can suggest is to try to follow again my original guide from scratch and then download and use my patched scriptsā€¦ good luck!

Ok, I am going to follow your message and I will retry to obtain the .deb of several applications, with the last firmware.

Thanks again.

Hi,Ā 

could you please share the packages you created to install amule?

Many Thanks,

Ā KV


king_virduk wrote:

Hi, 

could you please share the packages you created to install amule?

Many Thanks,

 

 KV


    The .deb files that you need to install amule-daemon are in:
    https://www.dropbox.com/s/d7hxwcx6pw2ry07/Amule-wd-v04.01.00.408.tar.gz?dl=0

    I used the procedure of mauromol describe in this message and was obtained with the v04.01.00.408 firmware files.

IMPORTANT: USE AT YOUR OWN RISK! No warranty of any kind!

Could I use this to build a package of an application that is not available through apt-get (i.e: nzbget 14.0)?

Do you think that it is possible to build package from a Raspberry Pi ? (running on Raspbian?)

I need to install something to monitor my network usage on my WDMyCloud (such as ntopng or equivalent). So if someone has compiled such kind of application you could also just share it :)Ā 

what about ps3netsrv ?

https://github.com/dirkvdb/ps3netsrvā€“

Hi, thanks a lof for the guide! I would have been totally lost without it.

I have created a Vagrant / VirtualBox based virtual machine and scriptsto automate all that you described, shared at GitHub (it supports only 64k Wheezy and Jessie). The main part is theĀ  install.sh script. (Those interested in the background of this project: see Backup WD MyCloud to S3/Glacier with duplicity (build instructions included).)

Best regards, Jakub

Hi, I have experienced the same problem temporarily for Jessie (but not wheezy). When I run my install.sh for the first time, it failed with this error but later it was ok. When I compared the ā€œokā€ and freshly prepared build directories, theyĀ  differed in the fresh one missing usr/bin/qemu-arm-static (in /wdmc-build/64k-jessie/build); copying it over fixed the problem.

However I am not able to replicate the problem anymore, even if I start from scratch (I use a virtual machine for the builds so it is easy to destroy and start anew).

Have a look at my setup and install.sh script here: https://github.com/jakubholynet/blog/tree/master/miniprojects/mycloud-duplicity-backup/mycloud-build-vm

Could not someone share some precompiled binaries, especially ImageMagick?

I am completely unfamiliar with the compilation process, and havenā€™t got resources to do it.

Any one tried to build crashplan? If so, I would very much appreciate any tips/notes.Ā Does it require a lot of prerequisite packages to be built? TIA.