Welcome! Log In Create A New Profile

Advanced

Debian on WD MyCloud EX 4100

Posted by saschadd 
Re: Debian on WD MyCloud EX 4100
July 26, 2017 04:57AM
saschadd,

> [info] Will now halt.
> [ 132.454942] reboot: System halted[/code]
>
> this should be the moment where i can turn off.

Yes. This is when the system shutdown was competely done.

>
> If i understand it right there is much more work t
> o do then expected because there are some implemen
> tations missing.
> Any chance that we get debian fully working on tha
> t box or will it be to much to do?

It's done! the mdt errors you have seems to be specific to your box. And it is benign, meaning you are not going to access the other mtds, except mtd0, then it is ok. mtd0 is all you need for booting Debian.


> Any news about the dts file?

The DTS file right now is OK to use. It is not completed, because we would need the GPIOs defined to control the LEDs. But other than that, You can start using the system. And as you are running it, you probably will find some minor stuff that we need to add.

I've found the GPIOs in the GPL. But the way WD engineers patched it, there is no way for me to tell which one is which :)) what a waste of braincells :) The only way for me to figure out this is to sit in front of the box and will take a lot of hours. But GPIOs really don't effect the normal operation, since the patched stock u-boot already initialized the hardware correctly.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on WD MyCloud EX 4100
July 31, 2017 04:55AM
bodhi Wrote:
> The DTS file right now is OK to use. It is not completed, because we would need the GPIOs defined to
> control the LEDs. But other than that, You can start using the system. And as you are running it, you probably will find some minor stuff that we need to add.

Thanks for the info. Well one major issue is the fan speed. For productive use i way to control the fan is needed as it is running at full speed all the time wich is annoying.
Minor issues are the LEDs and the shutdown because the box should run all the time when ready. One thing i am not sure if standby is working. Standby for harddrives and hardware for power saving over night would be nice to have as there will be times when the services the box provides are not needed.

> I've found the GPIOs in the GPL. But the way WD engineers patched it, there is no way for me to tell
> which one is which :)) what a waste of braincells :)
> The only way for me to figure out this is to sit in front of the box and will take a lot of hours. But GPIOs really don't
> effect the normal operation, since the patched stock u-boot already initialized the hardware correctly.

So i need to buy you an EX4100 for finding the GPIOs? ; )
Isnt there a script which tries all GPIOs and gives back feedback of found stuff?
There is a script for everything in Linux i think. ; )

-
happy hacking,

saschadd
Re: Debian on WD MyCloud EX 4100
July 31, 2017 05:30AM
saschadd,

Reading your post, I've just realized that I've forgot to add the WD EX4100 DTS to the new kernel I've just released, duh :) and the Mirror Gen2 DTS also, damn! I guess I will need to keep a reminder for the next kernel release.

If you upgrade the kernel to 4.12.4, you will need to copy or keep your current DTB file.

> Thanks for the info. Well one major issue is the f
> an speed. For productive use i way to control the
> fan is needed as it is running at full speed all t
> he time wich is annoying.

I guess that one of the not-so-minor things we should look into.

> Minor issues are the LEDs and the shutdown because
> the box should run all the time when ready.

Yeah, it is anoying when the LED does not light up correctly.

> One thing i am not sure if standby is working.
> Standby f
> or harddrives and hardware for power saving over n
> ight would be nice to have as there will be times
> when the services the box provides are not needed.

This is what you can do, nothing related to the kernel or DTS. You just use hdparm command to put your hard drive to sleep:
http://forum.doozan.com/read.php?2,24943,24944#msg-24944

Other hardware gadgets don't need to sleep.

> So i need to buy you an EX4100 for finding the GPI
> Os? ; )

Haha :) no, not needed.

> Isnt there a script which tries all GPIOs and give
> s back feedback of found stuff?
> There is a script for everything in Linux i think.
> ; )

Yes. It is doable. But the problem is those GPIOs need to be defined in the DTS, before you can brute force it. What I meant was I need to play with u-boot to be able to poke each and every one of those GPIOs to see which one is which. WD engineers, either on purpose or just being incompetent, did not document them, or even name them.

Even though the sam SoC is used in other boxes, such as the NAS326, GPIOs are board dependent and they are likely allocated differently.

I cannot write instruction for you to try, it's a little bit dangerous and unpredictable if you happened to poke the wrong memory location. So I'd usually test and risk bricking my box before I post the correct instruction :))

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Debian on WD MyCloud EX 4100
July 31, 2017 09:11PM
Re: Debian on WD MyCloud EX 4100
August 06, 2017 04:30AM
bodhi,

sorry for the delay, to much work to do. ;)

> What is the EX4100 fan behavior in u-boot? does it spin at nomal speed?

in u-boot it spins at full speed, at some point in booting the stock os it switches to slower speed.

> And how about inside stock OS? does it spin slower, and is there a fan control tool that you can run in the Web interface or at command line?

there is no fan control in the web interface.
at command line i cant find anything related to fan control or at least i dont really know what to search for.

EDIT: the command which causes the fan to slow down seems to be

chk_io v1.04.20141112

after that command in boot log the fan becomes quiet.

-
happy hacking,

saschadd



Edited 1 time(s). Last edit at 08/06/2017 07:04AM by saschadd.
Re: Debian on WD MyCloud EX 4100
August 06, 2017 07:14AM
saschadd,

There is a binary to run Fan Control in the GPL firmware section, similar to the Poweroff. We could potentially just take those binaries run them.

However, I think the best thing to do to make this kernel better is to use MM/Peacemaker works in the mcm-daemon.

I'll look into compiling this daemon and after that you can test it on your box.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 08/06/2017 07:18AM by bodhi.
Re: Debian on WD MyCloud EX 4100
August 06, 2017 07:18AM
If you want to try in stock OS, here is how they run fan_control

WDMyCloud_EX4100_GPL_v2.30.165_20170321/firmware/module/crfs/script/system_init

if [ -e /usr/sbin/fan_control ]; then
#======================
#       Fan Control
#======================
  fan_control b c
  if [ -e /tmp/hw_mode ]; then
    hw_mode_test_temper=`cat /tmp/hw_mode | grep temperature`
    if [ -n "$hw_mode_test_temper" ]; then
      fan_control -w c&
    else
      fan_control 0 c&
    fi
  else
    fan_control 0 c&
  fi
fi

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: