Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) December 17, 2017 04:32AM |
Registered: 10 years ago Posts: 143 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) December 18, 2017 03:50PM |
Registered: 7 years ago Posts: 7 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) December 18, 2017 03:51PM |
Registered: 7 years ago Posts: 7 |
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) February 11, 2018 07:49PM |
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) February 12, 2018 09:50AM |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) February 13, 2018 09:36PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 14, 2018 04:07AM |
Registered: 7 years ago Posts: 7 |
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 15, 2018 11:25AM |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 15, 2018 02:51PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 15, 2018 03:09PM |
Registered: 10 years ago Posts: 143 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 15, 2018 03:22PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 02, 2018 10:43AM |
Registered: 6 years ago Posts: 50 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 06, 2018 07:53AM |
Registered: 6 years ago Posts: 10 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 07, 2018 02:57PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 08, 2018 08:12PM |
Registered: 6 years ago Posts: 50 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 08, 2018 10:09PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) September 16, 2018 12:31PM |
Registered: 6 years ago Posts: 50 |
Fran
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) October 12, 2018 05:51PM |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) October 12, 2018 06:36PM |
Admin Registered: 13 years ago Posts: 19,107 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) - How to debian and OMV 5 leaving functional WD My Cloud OS March 26, 2020 12:03PM |
Registered: 6 years ago Posts: 50 |
hexdump -C -s 0x02000000 -n 18 -v /dev/mem
#define CONFIG_UBOOT_SIZE 0x100000 #define CONFIG_SPARE_AREA 0x400000 ... /* Boot from NAND settings */ ... #define CONFIG_ENV_SIZE 0x80000 /* environment takes one erase block */ #define CONFIG_ENV_OFFSET nand_get_env_offs() /* environment starts here */
... blocksize = nand_info[0].erasesize; #0x20000 ... offset = CONFIG_UBOOT_SIZE + CONFIG_SPARE_AREA; #0x100000 + 0x400000 = 0x500000 ... offset = ( (offset + (blocksize - 1)) & (~(blocksize-1)) ); #( (0x500000 + (0x20000 - 1)) & (~(0x20000-1)) ) = 0x500000
0x00000000-0x00500000 : "U-Boot" 0x00500000-0x00a00000 : "uImage" 0x00a00000-0x00f00000 : "uRamdisk" 0x00f00000-0x0c800000 : "image.cfs" 0x0c800000-0x0d700000 : "rescue fw" 0x0d700000-0x0eb00000 : "config" 0x0eb00000-0x0f500000 : "reserve1" 0x0f500000-0x0ff00000 : "reserve2"
echo "/dev/mtd1 0 0x80000 0x20000 4" > /etc/fw_env.config
setenv("bootcmd","nand read.e 0xa00000 0x500000 0x500000;nand read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000 0xf00000");
#if 0 //ALPHA_CUSTOMIZE #define ENV_USB_ACTIVE "1" #else #define ENV_USB_ACTIVE "0" #endif
setenv("usbActive", ENV_USB_ACTIVE);
./kwboot -f -t -B 115200 /dev/ttyUSB0 -b u-boot-a38x-GrandTeton_2014T3_PQ-nand-uart.bin -s 0 -q 1
usb start bubt u-boot-a38x-GrandTeton_2014T3_PQ-nand.bin nand usb reset
setenv set_bootargs_stock 'setenv bootargs root=/dev/ram console=ttyS0,115200' setenv bootcmd_stock 'echo Booting from stock ... ; run set_bootargs_stock; printenv bootargs; nand read.e 0xa00000 0x500000 0x500000;nand read.e 0xf00000 0xa00000 0x500000;bootm 0xa00000 0xf00000' setenv bootdev 'usb' setenv device '0:1' setenv load_image_addr '0x02000020' setenv load_initrd_addr '0x2900000' setenv load_image 'echo loading Image ...; ext2load $bootdev $device $load_image_addr /boot/uImage' setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd' setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial init=/bin/systemd"' setenv bootcmd_usb 'echo Booting from USB ...; usb start; run usb_set_bootargs; if run load_image; then if run load_initrd; then bootm $load_image_addr $load_initrd_addr; else bootm $load_image_addr; fi; fi; usb stop' setenv bootcmd 'setenv fdt_skip_update yes; setenv usbActive 0; run bootcmd_usb; setenv usbActive 1; run bootcmd_usb; setenv fdt_skip_update no; run bootcmd_stock; reset' saveenv reset
gcc -I . -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp -o armada-385-wd-mcmg2.dts armada-385-db.dts dtc -I dts -O dtb armada-385-wd-mcmg2
I was tring to add this: soc { ranges = <MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>; /* PNC: PHYS=0xf1300000 size 1M */ internal-regs { /* PnC and BM */ bm_pnc@c0000 { compatible = "marvell,neta_bm_pnc"; reg = <0xc8000 0xAC 0xb8000 0x48>; clocks = <&gateclk 13>, <&gateclk 29>; /*neta_cap_bm, bitmap of NETA dynamic capabilities, such as PNC, BM, HWF and PME PNC--0x1, BM--0x2, HWF--0x4, PME--0x8*/ neta_cap_bm = <0x3>; pnc_tcam_size = <1024>; }; } }
/root/set_persistent_mac_address3 #1) Backup partitions mkdir backup cd backup nanddump --noecc --omitoob -f U-Boot.bin /dev/mtd0 nanddump --noecc --omitoob -s 0x100000 -l 0x80000 -f ubootenv.bin /dev/mtd0 nanddump --noecc --omitoob -f uImage.bin /dev/mtd1 nanddump --noecc --omitoob -f uRamdisk.bin /dev/mtd2 nanddump --noecc --omitoob -f image.cfs.bin /dev/mtd3 nanddump --noecc --omitoob -f rescue_fw.bin /dev/mtd4 nanddump --noecc --omitoob -f config.bin /dev/mtd5 nanddump --noecc --omitoob -f reserve1.bin /dev/mtd6 nanddump --noecc --omitoob -f reserve2.bin /dev/mtd7 reboot
cat <<EOF > /etc/apt/sources.list.d/openmediavault.list deb http://packages.openmediavault.org/public arrakis main # deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis main ## Uncomment the following line to add software from the proposed repository. # deb http://packages.openmediavault.org/public arrakis-proposed main # deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis-proposed main ## This software is not part of OpenMediaVault, but is offered by third-party ## developers as a service to OpenMediaVault users. # deb http://packages.openmediavault.org/public arrakis partner # deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis partner EOF export LANG=C.UTF-8 export DEBIAN_FRONTEND=noninteractive export APT_LISTCHANGES_FRONTEND=none wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" apt-get update apt-get --yes --auto-remove --show-upgraded \ --allow-downgrades --allow-change-held-packages \ --no-install-recommends \ --option Dpkg::Options::="--force-confdef" \ --option DPkg::Options::="--force-confold" \ install postfix openmediavault-keyring openmediavault # Initialize the system and database. omv-initsystem # Rebuild configurations. omv-mkconf interfaces omv-mkconf issue # Display the login information. cat /etc/issue
cat <<EOF > /etc/apt/sources.list.d/openmediavault.list deb https://packages.openmediavault.org/public usul main # deb https://downloads.sourceforge.net/project/openmediavault/packages usul main ## Uncomment the following line to add software from the proposed repository. # deb https://packages.openmediavault.org/public usul-proposed main # deb https://downloads.sourceforge.net/project/openmediavault/packages usul-proposed main ## This software is not part of OpenMediaVault, but is offered by third-party ## developers as a service to OpenMediaVault users. # deb https://packages.openmediavault.org/public usul partner # deb https://downloads.sourceforge.net/project/openmediavault/packages usul partner EOF apt update apt upgrade -y export LANG=C.UTF-8 export DEBIAN_FRONTEND=noninteractive export APT_LISTCHANGES_FRONTEND=none wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" apt-get update apt-get --yes --auto-remove --show-upgraded \ --allow-downgrades --allow-change-held-packages \ --no-install-recommends \ --option Dpkg::Options::="--force-confdef" \ --option DPkg::Options::="--force-confold" \ install openmediavault-keyring openmediavault # Populate the database. omv-confdbadm populate # Display the login information. cat /etc/issue
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash
flash_erase /dev/mtd0 0 0 nandwrite -p /dev/mtd0 u-boot.bin flash_erase /dev/mtd1 0 0 nandwrite -p /dev/mtd1 uImage flash_erase /dev/mtd2 0 0 nandwrite -p /dev/mtd2 uRamdisk flash_erase /dev/mtd3 0 0 nandwrite -p /dev/mtd3 image.cfs
mkdir test modprobe nandsim first_id_byte=0xAD second_id_byte=0xDA cat /proc/mtd | grep -i "NAND Simulator" modprobe ubi flash_erase /dev/mtdX 0 0 ubiformat /dev/mtdX -y -f config.bin ubiattach -p /dev/mtdX mount -t ubifs ubiX test
nanddump --noecc --omitoob -f config.bin /dev/mtd5 nanddump --noecc --omitoob -f reserve1.bin /dev/mtd6 nanddump --noecc --omitoob -f reserve2.bin /dev/mtd7 mkdir config reserved1 reserved2 ubiattach -p /dev/mtd5ro ubiattach -p /dev/mtd6ro ubiattach -p /dev/mtd7ro mount -t ubifs ubi0_0 config mount -t ubifs ubi1_0 reserved1 mount -t ubifs ubi2_0 reserved2 tar -zcvpf config.tar.gz config tar -zcvpf reserved1.tar.gz reserved1 tar -zcvpf reserved2.tar.gz reserved2 umount config reserved1 reserved2 ubidetach -p /dev/mtd5ro ubidetach -p /dev/mtd6ro ubidetach -p /dev/mtd7ro flash_erase /dev/mtd5 0 0 flash_erase /dev/mtd6 0 0 flash_erase /dev/mtd7 0 0 nandwrite -p /dev/mtd5 config.bin nandwrite -p /dev/mtd6 reserve1.bin nandwrite -p /dev/mtd7 reserve2.bin
echo "/dev/mtd0 0x100000 0x80000 0x20000 4" > /etc/fw_env.config
nanddump --noecc --omitoob -s 0x100000 -l 0x80000 -f ubootenv.bin /dev/mtd0
nandwrite -p /dev/mtd0 -s 0x100000 ubootenv.bin
flash_erase /dev/mtd0 0x100000 0x80000
mtd_debug info /dev/mtd0
mtd.flags = MTD_CAP_ROM
mtd.flags = MTD_CAP_NANDFLASH
#run twice# stty -F /dev/ttyS1 raw speed 19200 stty -F /dev/ttyS1 raw speed 19200 # instart poweroff echo -n -e '\xfa\x03\x03\x01\x00\x00\xfb' > /dev/ttyS1 or echo -n -e '\xfa\x03\x03\x01\x01\x01\xfb' > /dev/ttyS1 # instart restart echo -n -e '\xfa\x03\x03\x02\x00\x00\xfb' > /dev/ttyS1 or echo -n -e '\xfa\x03\x03\x02\x01\x0a\xfb' > /dev/ttyS1 #FAN #speed is encoded in 4th byte from 0 to 255 # for minimum fan speed echo -n -e '\xfa\x02\x00\x00\x00\x00\xfb' > /dev/ttyS1 # for maximum fan speed echo -n -e '\xfa\x02\x00\xff\x00\x00\xfb' > /dev/ttyS1
cat /dev/input/event0 evtest /dev/input/event0 cat /sys/kernel/debug/gpio ls /proc/device-tree/keys/
export STICK=sdb echo -e "1 100M 0xb\n,4000M" | sudo sfdisk /dev/$STICK sudo mkfs.vfat -F32 /dev/"$STICK"1 sudo mkfs.ext4 /dev/"$STICK"2 sudo mount /dev/"$STICK"1 /mnt/ sudo mkdir /mnt/boot sudo cp output/uImage uRamdisk /mnt/boot sudo umount /mnt sudo mount /dev/"$STICK"2 /mnt/ sudo cp output/uImage uInitrd-wd385 mcm-daemon_1.03_armhf.deb output/modules.tgz /mnt sudo umount /mnt
wget http://ftp.debian.org/debian/dists/stable/main/installer-armhf/current/images/netboot/initrd.gz mkdir $INITRD_INSTALLER cd $INITRD_INSTALLER gzip -d < ../initrd.gz | cpio --extract --verbose --make-directories --no-absolute-filenames cat > preseed.cfg <<EOL d-i anna/choose_modules string network-console d-i preseed/early_command string anna-install network-console d-i network-console/password password test d-i network-console/password-again password test d-i network-console/start select continue d-i netcfg/disable_autoconfig boolean true d-i netcfg/choose_interface select eth0 d-i netcfg/get_ipaddress string 192.168.10.100 d-i netcfg/get_netmask string 255.255.255.0 d-i netcfg/get_gateway string 192.168.10.1 d-i netcfg/get_nameservers string 8.8.8.8 d-i netcfg/confirm_static boolean true #d-i netcfg/get_hostname string NAS d-i netcfg/get_hostname string WDMyCloudMirrorGen2 d-i netcfg/get_domain string EOL rm -rf lib/modules/ find . | cpio -H newc --create --verbose | gzip -9 > ../initrd_preseed.gz cd .. mkimage -A arm -T ramdisk -n "debian installer with preseed" -c gzip -d initrd_preseed.gz uRamdisk
usb reset; fatload usb 0:1 0xa00000 boot/uImage; fatload usb 0:1 0x2000000 boot/uRamdisk; bootm 0xa00000 0x2000000
mkdir /media/drive mount /dev/sda2 /media/drive ln -s /media/drive/lib/modules/ /lib/modules exit
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) - How to debian leaving functional WD My Cloud OS March 26, 2020 10:09PM |
Admin Registered: 13 years ago Posts: 19,107 |
dmesg cat /proc/mtd
uname -a cat /etc/debian_version
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) - How to debian leaving functional WD My Cloud OS March 28, 2020 05:57PM |
Registered: 6 years ago Posts: 50 |
> dmesg > cat /proc/mtd >
root@debian:~# cat /proc/mtd dev: size erasesize name mtd0: 00500000 00020000 "U-Boot" mtd1: 00500000 00020000 "uImage" mtd2: 00500000 00020000 "uRamdisk" mtd3: 0b900000 00020000 "image.cfs" mtd4: 00f00000 00020000 "rescue fw" mtd5: 01400000 00020000 "config" mtd6: 00a00000 00020000 "reserve1" mtd7: 00a00000 00020000 "reserve2"
> uname -a > cat /etc/debian_version >
root@debian:~# uname -a Linux debian 5.5.3-mvebu-tld-1 #1.0 SMP PREEMPT Sat Mar 28 01:45:13 CET 2020 armv7l GNU/Linux root@debian:~# cat /etc/debian_version 10.3
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) - How to debian leaving functional WD My Cloud OS March 28, 2020 06:12PM |
Admin Registered: 13 years ago Posts: 19,107 |
> root@debian:~# cat /proc/mtd > dev: size erasesize name > mtd0: 00500000 00020000 "U-Boot" > mtd1: 00500000 00020000 "uImage" > mtd2: 00500000 00020000 "uRamdisk" > mtd3: 0b900000 00020000 "image.cfs" > mtd4: 00f00000 00020000 "rescue fw" > mtd5: 01400000 00020000 "config" > mtd6: 00a00000 00020000 "reserve1" > mtd7: 00a00000 00020000 "reserve2" >>
> > uname -a > > cat /etc/debian_version > >>
> root@debian:~# uname -a > Linux debian 5.5.3-mvebu-tld-1 #1.0 SMP PREEMPT > Sat Mar 28 01:45:13 CET 2020 armv7l GNU/Linux > root@debian:~# cat /etc/debian_version > 10.3 >>
5.5.3-mvebu-tld-1-cpk-1
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) - How to debian leaving functional WD My Cloud OS March 28, 2020 09:16PM |
Registered: 6 years ago Posts: 50 |
> 5.5.3-mvebu-tld-1-cpk-1 >
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 30, 2020 01:45PM |
Registered: 6 years ago Posts: 50 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 30, 2020 06:03PM |
Admin Registered: 13 years ago Posts: 19,107 |
Quote
none usb-gadget usb-host rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usbport timer oneshot disk-activity disk-read disk-write [ide-disk1] ide-disk2 mtd nand-disk heartbeat gpio default-on flash torch panic f1072004.mdio-mii:01:link f1072004.mdio-mii:01:1Gbps f1072004.mdio-mii:01:100Mbps f1072004.mdio-mii:01:10Mbps
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; misc { label = "status:white:misc"; gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; linux,default-trigger = "ide-disk1"; }; }; regulators { compatible = "simple-bus"; #address-cells = <1>;
Quote
https://forum.doozan.com/read.php?2,32146
Credits:
...
- Thanks to MM and Peacemaker who have developed and tested the mcm-daemon in: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton). I plan to investigate and make use of MM and Peacemaker works, hopefully for all of WD Mycloud boxes.
....
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 31, 2020 01:20PM |
Registered: 6 years ago Posts: 50 |
sata1-blue { label = "wdmcmg2:blue:detecthdd1"; gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; linux,default-trigger = "gpio"; linux,default-inverted = "1"; };
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 31, 2020 01:41PM |
Registered: 6 years ago Posts: 258 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 31, 2020 01:51PM |
Registered: 6 years ago Posts: 50 |
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton) March 31, 2020 01:54PM |
Registered: 6 years ago Posts: 258 |