Quotebodhi Other devices uses 19200n8, do you mean WD NAS devices? I guess since mcm-daemon is only for WD devices, yes I mean other WD NAS devices use 19200 and the EX2100 uses 115200 for MCU baud rate.by hmartin - Debian
Quotebodhi I was hoping that it would work for hmartin on EX2100. But it seems there is some problem in the EX2100. Sorry it took me so long. I finally figured out the many issues preventing mcm-daemon from working on the EX2100. I wrote about it here. Maybe you can try the modified mcm-daemon on EX4100 and see if it works? I put the modified mcm-daemon on GitHub if anyone wants to foby hmartin - Debian
After some further investigation I have determined the MCU in the EX2100 communicates at 115200n8 not 19200n8 as on other devices. Using strace, I was able to find what up_modify_baudrate was doing. Big suspense, it's not modifying the baud rate... open("/dev/ttyS1", O_RDWR|O_NOCTTY|O_LARGEFILE) = 3 ioctl(3, TCFLSH, 0) = 0 ioctl(3, SNDCTL_TMR_START or TCby hmartin - Debian
Peacemaker Wrote: ------------------------------------------------------- > Have you looked at the sources of the mcm-daemon > for the mcm2 / ex2u? > Its doing same things: setting the baudrate of > ttyS1 > Sendung hex commands for e.g fan, temp, > powercontrol. Yes, I have. mcm-daemon doesn't work on the EX2100 for some reason. Even the stock OS has no workinby hmartin - Debian
Usually it is not possible to reassign the built-in uart connection on these boards to use it to communicate with another board. The built in uart is used by the SoC to output boot messages (e.g. u-boot, OS booting) and once the OS is booted it is used for a console access. While it *might* be possible to remove the tty from the uart port so you can use it with a program like minicom or screenby hmartin - Debian
Quotebodhi I'll look into compiling this daemon and after that you can test it on your box. I compiled mcm-daemon, but it doesn't work on the EX2100 yet (I am still investigating uP communication problems). Perhaps you can try it on the EX4100. Recommend running with debug and foreground flags so you can see what's happening: ./mcm-daemon -d -f -c mcm-daemon.ini Edit:by hmartin - Debian
Oh also I noticed that the assignment of ethernet ports in the dts are reversed from what is written on the back. eth0: port labelled "2" (bottom port) eth1: port labelled "1" (top port) Sorry for any confusion this caused people.by hmartin - Debian
I have more details to add. I found the uart debug header of the Welltrend microcontroller. It's JP3 on the EX2100. The pinout is as follows (pin 1 is facing the front of the device, toward the RTC coin cell): 1: Tx (connect to uart Rx) 2: NC 3: VCC? 4: GND 5: Rx? (doesn't seem to listen) The UART baud rate seems to be 115200. Here is the output through a stock boot to WDby hmartin - Debian
Quotehmartin I have not removed the RTC battery yet. As far as I know it's buried somewhere deep inside the EX2100, which I haven't disassembled. I was able to remove the RTC battery. It doesn't make any difference. The issue is not that the MCU is stuck in some invalid state.by hmartin - Debian
Quotebodhi I think it means some MCU states are persistent. So even stock OS did not reset it correctly. Have you tried removing the RTC battery? I have not removed the RTC battery yet. As far as I know it's buried somewhere deep inside the EX2100, which I haven't disassembled. I'm not convinced this is an issue with the MCU, given that u-boot is still able to successfully coby hmartin - Debian
I fixed the EX2100 dts to work with both onboard Ethernet interfaces! MCU communications still broken in Linux.by hmartin - Debian
There are some additional commands in the u-boot source which are not documented in the mcm-daemon. Here they are (transferred into the format of mcm.h): char EnableHd1Cmd[] = {0xfa, 0x06, 0x01, 0x00, 0x01, 0x01, 0xfb}; char EnableHd2Cmd[] = {0xfa, 0x06, 0x01, 0x01, 0x01, 0x01, 0xfb}; There is a strange comment about powering off the NAS ("power off nas") which I don't uby hmartin - Debian
Quotebodhi And it is not unsual for the GPL to be different source than the one they flashed in the FW release. They are not legally obligated to release the same exact source code GPL as the binary they install in the FW. I've seen this before. Really? I thought the GPL required them to release the source code of the firmware version running on the device. Otherwise what's the poinby hmartin - Debian
Thanks for the tips, I think there is something wrong with my u-boot build for EX2100 though. It seems that Linux cannot communicate with the MCU. The Western Digital firmware is not correctly reading the system temperature, cannot set the fan speed, and does not properly shut off: sysinfod: Disk2(sda) detected. sysinfod: inform: Disk1 failed on. sysinfod: inform: Disk1 non-healthy on. sby hmartin - Debian
Interesting. Perhaps the commands for this MCU are different from the ones noted for the mcm-daemon. I can't explain why it isn't working quite as expected, but I modified u-boot with the following commands just after "Enable HD1" and "Enable HD2": printf("Make Power LED flash orange\n"); serial2_putc(0xfa); serial2_putc(0x26); serial2_putcby hmartin - Debian
I thought I would finally get around to permanently using Debian on my EX2100. This means fixing up the DTB to support the dual gigabit NICs, and getting the mcm-daemon running to make the fan quiet. Unfortunately, I cannot get either to work! Here the is networking config on the EX2100: Load WD Yosemite Serdes Config: board SerDes lanes topology details: | Lane # | Speed | Typeby hmartin - Debian
Quotebodhi What you said is extremely interesting! I need you to describe a little more. I am also interested to hear a bit more about kwboot on the MCM Gen 2, since the first posts from mcmg2 showed a lot of trouble getting it to kwboot. However I want to caution something: I don't think the issues we are having with the EX2100 and EX4100 kwboot are due to a poor connection. You'by hmartin - Debian
Quotemcmg2 why is samba.service masked? This thread is only about getting u-boot working on the My Cloud Mirror Gen 2. If you have general Linux questions about packages within Debian, please start a new thread. Let's keep this focused on u-boot. @bodhi: do you anticipate any differences in the boot arguments for the My Cloud Mirror Gen 2 from the EX4100? Could mcmg2 use the bootcmdby hmartin - Debian
Quotemcmg2 please advise me to skip kwboot. Download the attached file and decompress. If you run mtd_debug and you see the following, then you cannot proceed: root@debian:~# mtd_debug info /dev/mtd0 mtd.type = MTD_NANDFLASH mtd.flags = MTD_CAP_ROM mtd.size = 5242880 (5M) mtd.erasesize = 131072 (128K) mtd.writesize = 2048 (2K) mtd.oobsize = 64 regions = 0 You must boot with theby hmartin - Debian
Quotemcmg2 it shows 512MB not 2GB Huh, not what I was expecting but at least it's correct for this box. Here's the change: --- a/tools/marvell/bin_hdr/inc/common/ddr3_hws_hw_training_def.h +++ b/tools/marvell/bin_hdr/inc/common/ddr3_hws_hw_training_def.h @@ -97,7 +97,7 @@ #define REG_SDRAM_ADDRESS_CTRL_ADDR 0x1410 #define REG_SDRAM_ADDRESS_SIby hmartin - Debian
Quotebodhi So somewhere under /tools/marvell/bin_hdr. You're right, it seems to be in tools/marvell/bin_hdr/inc/common/ddr3_hws_hw_training_def.h This is mentioned by Stefan Roese on the u-boot mailing list when he added support for AXP: https://lists.denx.de/pipermail/u-boot/2014-October/193274.html My guesstimates aren't that good, since the code is reading a value from a reby hmartin - Debian
Quotebodhi I'm wondering if hmartin has seen this MCU controlled poweroff behavior in the EX2100... I have not yet built mcm daemon or used the patched kernel from MM, but I can confirm the same behaviour is on the EX2100. If you do not have the MicroP support implemented, then once the Marvell CPU halts power is retained to the rest of the device. Lights still on, fan still spinning, etcby hmartin - Debian
Quotebodhi Could you tell me (or survey) how any WD boxes have MCU shutdown? I don't know, since I only own the EX2100. Thus far I have read it applies to the MCM Gen 2, EX2 Ultra, EX2100 and EX4100. I would guess any Western Digital NAS product that supports "Wake On LAN" will have this MCU, since that is how they're implementing the functionality. Here's my undby hmartin - Debian
Quotemcmg2 From MM page, do I need to patch kernel AND use mcm-daemon to turn it off? Yes, you will need to patch the kernel for power off to work as expected: https://github.com/c-MM/mcm-daemon/blob/master/kernel/4.8.12/poweroff-restart.diff There is a microcontroller (MCU) inside Western Digital NAS products which controls the power to the device. The kernel will correctly shut down theby hmartin - Debian
Yes so as bodhi said, the filesystem was corrupted because the kernel thought it had 1GB of RAM when only 512MB existed. So, you saved the env in modified u-boot and can read them back in Debian. Once I fix the memory size issue I will provide u-boot to write to NAND and then you don't need to kwboot anymore. Until then you should hopefully still be able to use Debian normally since weby hmartin - Debian
Quotebodhi this u-boot has a wrong RAM size I checked my patch, and I didn't change the memory size in u-boot. Maybe this is a mistake in the Western Digital GPL archive... Quotebodhi There might be an option in the u-boot build script? I don't recall any options to change the memory size or device, but I will check when I am back at my build system. According to this Stackby hmartin - Debian
First, before you do anything to u-boot envs, you should save all the mtd partitions. Run the following commands in Debian and make sure the files are saved to the USB stick. It would be a good idea to also backup the files to another computer. nanddump --noecc --omitoob -f mtd0 /dev/mtd0 nanddump --noecc --omitoob -f mtd1 /dev/mtd1 nanddump --noecc --omitoob -f mtd2 /dev/mtd2 nanddump --noby hmartin - Debian
Quotebodhi I have not seen the Mirror Gen 2 DTS before so not sure. Let hmartin help you. Implying I have any idea about hardware I have never seen ;-) Quotemcmg2 I used dtb file on this page by hmartin. I built the file you linked to from Google Drive. I have no idea if this is the correct DTS for the My Cloud Mirror Gen 2 or not. Seems like not! Please try the attached DTB. It'by hmartin - Debian
After reviewing the source more and looking at the u-boot changes for ClearFrog, it seems that Western Digital has maybe disabled USB in u-boot. However this doesn't make any sense to me, since I assume MCM Gen 2 still allows for USB firmware recovery, and I do not see in u-boot source where they are enabling USB before loading the kernel/ramdisk from USB. ClearFrog source has #define ENVby hmartin - Debian
Quotemcmg2 hmartin, are you still working on patched uboot? Yes, I am still working on u-boot for the My Cloud Mirror Gen 2. However until we figure out why USB is not being initialized during u-boot, there cannot be any progress toward booting Debian from USB. I am not really sure how to proceed from here. I do not own the MCM Gen 2, and according to the u-boot source, USB should be acby hmartin - Debian