Quantcast
Channel: Linux Device Hacking
Viewing all 47139 articles
Browse latest View live

Re: UART Booting HowTo for Selected Kirkwood Devices

$
0
0
Would this work on a bricked Synology DS414?

I get console output but it’s stuck on the boot process and I think it needs uboot restoring.

I need some help but the Synology forums are rubbish.

Re: Need help with creating USB for the new uBoot

$
0
0
jeyrey,

> root@debian:~# uname -a
> Linux debian 2.6.32-5-kirkwood #1 Tue May 13
> 17:59:08 UTC 2014 armv5tel GNU/Linux

Cool! that will be adequate for installation of new u-boot and rootfs. The previous error was easy to fix, but it is OBE now.

> This is what mine gave:
>
> root@debian:~# dmesg | grep -i 'bad'
> [   22.284760] Scanning device for bad blocks
> [   22.289172] Bad eraseblock 7 at 0x0000000e0000
>

> It said that I should not flash the uboot. What
> should I do with it now?

You can flash u-boot image and u-boot env image. The bad block 7 is OK (It is reserved for future growth).

Re: UART Booting HowTo for Selected Kirkwood Devices

$
0
0
Rik Bignell,

> Would this work on a bricked Synology DS414?

Yes it would. This box is Armada XP.

DS414	Marvell Armada XP MV78230	Dual Core	2	Yes	Armadaxp	DDR3 1 GB

When you run kwboot command from your serial converter host, use option -a (this is specific for Armada XP).

If you need help while doing the unbricking, start a new thread in this sub-forum with subject "Unbricking Synology DS414 (Armada XP)".

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Hi vzhilov,

if you want to avoid using USB drive for booting you can repartition your mtd table so that your uImage space will be fitted with kernel 5.5 (usually bigger than 5MB). Don't forget to change the partitions in your dts file.

 #: name                 size		         offset		    mask_flags
 0: u-boot              0x000000500000		0x000000000000		1
 1: uImage              0x000000600000		0x000000500000		0
 2: uRamdisk            0x000000500000		0x000000b00000		0
 3: image.cfs           0x00000b900000		0x000001000000		0
 4: rescue_fw           0x000000f00000		0x00000c900000		0
 5: config              0x000001400000		0x00000d800000		0
 6: reserve1            0x000000a00000		0x00000ec00000		0
 7: reserve2            0x000000900000		0x00000f600000		0
setenv mtdparts mtdparts=armada-nand:5m(u-boot)ro,6m@5m(uImage),5m@11m(uRamdisk),185m@16m(image.cfs),15m@201m(rescue_fw),20m@216m(config),10m@236m(reserve1),9m@246m(reserve2)
saveenv

For your problem, i think it was somehow not enough memory for your uRamdisk, take a look at here
[    0.000000][     TO] INITRD: 0x00f00000+0x004b1000 overlaps in-use memory region - disabling initrd
You can try to assign another memory location for the uRamdisk, please try at 0x2000000
usb start
fatload usb 0:1 0xa00000 uImage
fatload usb 0:1 0x2000000 uRamdisk
bootm 0xa00000 0x2000000
If it works, you need to overwrite your bootcmd to make it persistent.
setenv bootargs root=/dev/ram console=ttyS0,115200
setenv bootcmd 'nand read.e 0x0a00000 0x0500000 0x0500000;nand read.e 0x2000000 0x0a00000 0x0500000;bootm 0x0a00000 0x2000000'
saveenv

In any case you need to patch and build a custom u-boot.bin, which allow you to enable "setenv" function (see CyberPK post)

I'm currently using kernel 5.5.3 from bodhi for my EX2 Ultra, everything works fine.

PS: I'm so glad if you can share your 5.5.3 kernel config to build a uImage which size less than 5MB.

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
dtd.2512,

> I'm currently using kernel 5.5.3 from bodhi for my
> EX2 Ultra, everything works fine.

Thanks for the feed back and helps above!

Could you post your DTS here, or the link to the DTS (is that from fox?). Is it the same one vzhilov is using? I'd like to include that in the next kernel build.

Re: Need help with creating USB for the new uBoot

$
0
0
Thanks bodhi. I have gone ahead and flashed the new uboot successfully! And here are what I did and encountered after that:

1. I was unable to reboot with the current usb stick (Linux debian 2.6.32-5-kirkwood). So I unpluged from the box and put it in my desktop to edit. Surprisingly, the stick was not recognized and I could not access it. This happened before and that was why I was unable to formatted for a few years. Somehow yesterday, I put it in the PC, it was detected and that was when I tried in again on the box and was able to boot and get into debian. So I think the USB stick is bad and am about to throw it away.

2. I then used the previous stick that I put Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi inside but was unable to boot earlier. Now it booted successfully. Yess!

3. The Debian-5.2.9 also detected my wireless adapter
[   27.480958] r8188eu 1-1.3:1.0 wlxxxxxxxxxxxxx: renamed from wlan0
but it renamed from wlan0 using the mac address. So it was not up by my current /etc/network/interfaces since it expected wlan0. So I am trying to prevent it from renaming by searching on the web and found that one way is to install grub. I was unable to install it:
root@debian:~# apt-get install grub
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package grub is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  grub2-common

E: Package 'grub' has no installation candidate
I am sure there are many other (simple) ways to disable name changing but I don't know. Can you advise on this which is the best method to get wlan0 back from name changing?

Also, is it possible to setup console via ip address and without a serial cable? If so, could you guide me to the right place? Many thanks.

Re: Need help with creating USB for the new uBoot

$
0
0
jeyrey,

> Thanks bodhi. I have gone ahead and flashed the
> new uboot successfully! And here are what I did
> and encountered after that:

Cool!


> 2. I then used the previous stick that I put
> Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi inside
> but was unable to boot earlier. Now it booted
> successfully. Yess!

That's how you suppose to do it. The new rootfs is ready made to boot with new u-boot.


> So I am trying to prevent it from renaming by
> searching on the web and found that one way is to
> install grub.

For ARM box such as this box, Grub does not apply. U-boot is the boot loader. You should be able to use the old naming convention. Let's see if I can find it.

Usually systemd will rename the network device names, but it does not apply here if you did not activate systemd.

> Also, is it possible to setup console via ip
> address and without a serial cable? If so, could
> you guide me to the right place? Many thanks.

Yes, that's netconsole. As stated in Step 10.

Quote

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'

If you have serial console and does not disconnect it, the output will go to netconsole and serial console, back and forth depending on where u-boot progress is (so you need 2 consoles to see all logging). So when testing netconsole, you should disconnect serial console and vice versa, to see the unified log.

Re: HowTo: Stora - Debian Stretch and OMV4

$
0
0
Hello,
i have some time to spend around to my nas stora so i tried to install debian 10 with OMV5. No problem during installation but OMV5 has some problems ... however, on balance, with both versions of OMV (with all the circus of systemd daemons) the system becomes a little more lazy.

So, at the end, I decided to restart from zero and configure my stora without OMV and using builtin sysvinit.
Ok, coming to the point, you built the system to be primarily run on USB devices, right? So syslogd stores the logs in ram, but since my system is installed on hard disk it is logical that the logs are stored on files (as you suggested).

Could the pre-installed syslogd to store logs on files or it has been compiled so that it only works on ram? (I see that no syslog.conf file exists).
In both cases, what do you suggest me to do?

Thanks in avance.

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
I'm attaching my config file, slightly changed from bodhi to make the size of kernel a bit less.

Here is the .dts file from Fox I'm using:

/*
 * Device Tree file for Marvell Armada 375 evaluation board
 * (DB-88F6720)
 *
 *  Copyright (C) 2014 Marvell
 *
 * Gregory CLEMENT <gregory.clement@free-electrons.com>
 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 * This file is dual-licensed: you can use it either under the terms
 * of the GPL or the X11 license, at your option. Note that this dual
 * licensing only applies to this file, and not this project as a
 * whole.
 *
 *  a) This file is free software; you can redistribute it and/or
 *     modify it under the terms of the GNU General Public License as
 *     published by the Free Software Foundation; either version 2 of the
 *     License, or (at your option) any later version.
 *
 *     This file is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 * Or, alternatively,
 *
 *  b) Permission is hereby granted, free of charge, to any person
 *     obtaining a copy of this software and associated documentation
 *     files (the "Software"), to deal in the Software without
 *     restriction, including without limitation the rights to use,
 *     copy, modify, merge, publish, distribute, sublicense, and/or
 *     sell copies of the Software, and to permit persons to whom the
 *     Software is furnished to do so, subject to the following
 *     conditions:
 *
 *     The above copyright notice and this permission notice shall be
 *     included in all copies or substantial portions of the Software.
 *
 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *     OTHER DEALINGS IN THE SOFTWARE.
 */

/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "armada-385.dtsi"

/ {
	model = "WD MyCloud Ex2 Ultra: Marvell Armada 385";
	compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada380";

	chosen {
		stdout-path = "serial0:115200n8";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00000000 0x40000000>; /* 512 MB */
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;

		internal-regs {
			i2c@11000 {
				status = "okay";
				clock-frequency = <100000>;
				
				/*
				eeprom@54 {
					compatible = "atmel,24c64";
					reg = <0x54>;
				};
				*/
			};

			i2c@11100 {
				status = "okay";
				clock-frequency = <100000>;
			};
			
			sdhci@d8000 {
				broken-cd;
				wp-inverted;
				bus-width = <8>;
				status = "disabled";
				no-1-8-v;
			};

			serial@12000 {
				status = "okay";
			};

			serial@12100 {
				status = "okay";
			};

			pinctrl@18000 {
			/*
				sata_sd_pins: sata-sd-pins {
					marvell,pins = "mpp63", "mpp66";
					marvell,function = "gpio";
				};
			*/
				/* use only one pin for UART1, as mpp20 is used by sata0 */
				uart1_pins: uart-pins-1 {
					marvell,pins = "mpp19";
					marvell,function = "ua1";
				};

				xhci0_vbus_pins: xhci0-vbus-pins {
					marvell,pins = "mpp26";
					marvell,function = "gpio";
				};

				xhci1_vbus_pins: xhci1-vbus-pins {
					marvell,pins = "mpp27";
					marvell,function = "gpio";
				};

				sata0_pins: sata-pins-0 {
					marvell,pins = "mpp55";
					marvell,function = "sata0";
				};

				sata1_pins: sata-pins-1 {
					marvell,pins = "mpp56";
					marvell,function = "sata1";
				};

				led_pins: led-pins {
					marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58";
					marvell,function = "gpio";
				};

				btn_pins: btn-pins {
					marvell,pins = "mpp50";
					marvell,function = "gpio";
				};
			};

			mdio@72004 {
				phy0: ethernet-phy@0 {
					marvell,reg-init = <3 16 0 0x101e>;	// Init eth leds
					reg = <0>;
				};
			};

			ethernet@34000 {
				phy = <&phy0>;
				phy-mode = "sgmii";
				buffer-manager = <&bm>;
				bm,pool-long = <0>;
				bm,pool-short = <1>;
				status = "okay";
			};

			rtc@a3800 {
				status = "okay";
			};

			usb0: usb@58000 {
				status = "okay";
			};
			
			sata@a8000 {
				pinctrl-names = "default";
				//pinctrl-0 = <&sata0_pins &sata1_pins>;
				#address-cells = <1>;
				#size-cells = <0>;
				status = "okay";
				/*
				sata0: sata-port@0 {
					reg = <0>;
					target-supply = <&reg_5v_sata0>;
				};
				
				sata1: sata-port@1 {
					reg = <0>;
					target-supply = <&reg_5v_sata1>;
				};
				*/
			};
			
			nfc: flash@d0000 {
				status = "okay";
				num-cs = <1>;
				nand-ecc-strength = <4>;
				nand-ecc-step-size = <512>;
				marvell,nand-keep-config;
				marvell,nand-enable-arbiter;
				nand-on-flash-bbt;

				partitions {
					compatible = "fixed-partitions";
					#address-cells = <1>;
					#size-cells = <1>;

					partition@0 {
						label = "u-boot";
						reg = <0x0000000 0x00500000>;
						read-only;
					};

					partition@500000 {
						label = "uImage";
						reg = <0x00500000 0x00500000>;
					};

					partition@a00000 {
						label = "uRamdisk";
						reg = <0x00a00000 0x00500000>;
					};

					partition@f00000 {
						label = "image.cfs";
						reg = <0x00f00000 0x0b900000>;
					};

					partition@c800000 {
						label = "Recovery";
						reg = <0x0c800000 0x00f00000>;
					};

					partition@d70000 {
						label = "config";
						reg = <0x0d700000 0x01400000>;
					};

					partition@eb00000 {
						label = "reserve1";
						reg = <0x0eb00000 0x00a00000>;
					};

					partition@f500000 {
						label = "reserve2";
						reg = <0x0f500000 0x00a00000>;
					};
				};
			};
			
			crypto@9D000 {
				status = "okay";
			};

			usb3@f0000 {
				usb-phy = <&usb3_0_phy>;
				status = "okay";
			};

			usb3@f8000 {
				usb-phy = <&usb3_1_phy>;
				status = "okay";
			};
		};
		
		/*pcie {
			status = "okay";
			pcie@1,0 {
				status = "okay";
			};

			pcie@2,0 {
				status = "okay";
			};

			pcie@3,0 {
				status = "okay";
			};
		};
		*/
	};
	
	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins>;

		// Triggers for kernel v4.14:
		// [none] timer oneshot disk-activity ide-disk mtd nand-disk heartbeat backlight gpio cpu cpu0 cpu1 default-on panic
		hdd1-red {
			label = "Disk1:red";
			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "disk-activity";
		};
		hdd2-red {
			label = "Disk2:red";
			gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "panic";
		};
		hdd1-blue {
			label = "Disk1:blue";
			gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
			default-state = "keep";
			//linux,default-trigger = "gpio";
		};
		hdd2-blue {
			label = "Disk2:blue";
			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
			default-state = "keep";
			//linux,default-trigger = "gpio";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&btn_pins>;
		#address-cells = <1>;
		#size-cells = <0>;

		btn-reset {
			label = "Reset";
			linux,code = <0x198>; // Restart=0x198, Power=0x116
			gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
			gpio-key,wakeup;
		};
	};

	usb3_0_phy: usb3_0_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_0_vbus>;
	};
	
	usb3_1_phy: usb3_1_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_1_vbus>;
	};

	reg_usb3_0_vbus: usb3-vbus0 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus0";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci0_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
	};

	reg_usb3_1_vbus: usb3-vbus1 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus1";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci1_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
	};
/*
	reg_sata0: pwr-sata0 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata0";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
	};

	reg_5v_sata0: v5-sata0 {
		compatible = "regulator-fixed";
		regulator-name = "v5.0-sata0";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_sata0>;
	};

	reg_12v_sata0: v12-sata0 {
		compatible = "regulator-fixed";
		regulator-name = "v12.0-sata0";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		vin-supply = <&reg_sata0>;
	};
	
	reg_sata1: pwr-sata1 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata1";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
	};

	reg_5v_sata1: v5-sata1 {
		compatible = "regulator-fixed";
		regulator-name = "v5.0-sata1";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_sata1>;
	};

	reg_12v_sata1: v12-sata1 {
		compatible = "regulator-fixed";
		regulator-name = "v12.0-sata1";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		vin-supply = <&reg_sata1>;
	};
	*/
};
/*
&ahci0 {
	status = "okay";
};

&ahci1 {
	status = "okay";
};
*/

&cesa {
	status = "okay";
};

&bm {
	status = "okay";
};

&bm_bppi {
	status = "okay";
};

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Hi bodhi,

I used the patch from Evgeny Kolesnikov with some minor modifications to make the DTS file for my Ex2 Ultra
https://lkml.org/lkml/2019/7/22/1053

Just build it with your 5.5.3 kernel and boot the new uImage from USB. Many thanks to your work.

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Quote
You can try to assign another memory location for the uRamdisk, please try at 0x2000000

Yes, that worked!

I will try now your instructions to make it persistent. But what is the reason for
Quote
overlaps in-use memory region - disabling initrd

Does it mean that Kernel is still too big? Or I need to make uRamdisk smaller? Or the only solution is to patch the U-Boot?

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Hi vzhilov,

Quote
Does it mean that Kernel is still too big? Or I need to make uRamdisk smaller? Or the only solution is to patch the U-Boot?

I currently don't have enough time to find out what exactly it is, but there is another discussion about the same problem in the forum. Take a look at here, maybe you can fix it, I would be glad to hear back from you.
https://forum.doozan.com/read.php?2,85284,85534#msg-85534

To save your time for building custom u-boot, you can use the u-boot patch in attachment.

Btw: thanks for your kernel config file, I just tested it and have the same problem when uRamdisk locales at 0xf00000, otherwise seems like everything works fine.

NSA325 - 5.5.1 kernel update problems

$
0
0
Dear all,

I have been running Debian on my NSA325 for a while now (latest uBoot installed).

I recently updated from Strech to Buster using Bodhis rootfs with Kernel 5.2.9. This works like a charm; I didn't have to change any uBoot settings and was able to boot and run it.

However, updating the Kernel to 5.5.1 renders the machine unbootable. I followed bodhis instructions for the kernel update precisely (option 4a, with DTB file).

This never happened before (I conducted 5+ kernel updates under Stretch).

Any idea what I might have done wrong? Or has anyone else experienced issues with NSA325 and kernel 5.5.1?

Thank you in advance!

Re: HowTo: Stora - Debian Stretch and OMV4

$
0
0
ok, i searched the forum again and again and finally I found this::


Here is the config file for syslogd. If that SYSLOG_OPTS line is commented out like below, 
then the system logging will be back to disk (var/log). 

cat /etc/default/busybox-syslogd

# Defaults for busybox-syslogd initscript
# This is a POSIX shell fragment sourced by /etc/init.d/busybox-syslogd

# Additional options that are passed to the daemons.  Default is to log
# to ring buffer (to be read with logread(1)) and drop duplicates.
SYSLOG_OPTS="-C128"
KLOG_OPTS=""


Temporarily remove the option by commenting it out.

#SYSLOG_OPTS="-C128"

And then restart busybox-syslogd, or reboot the system.


It is enough?

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Ok, I gave up trying to squize evertying into nand and decided to boot from flash drive as all you guys do.

When I boot from USB with reset button pressed I get kernel panic with

VFS: Cannot open root device "ram" on unknown-block(1,0)

But I still can boot with

usb start
fatload usb 0:1 0xa00000 boot\uImage
fatload usb 0:1 0x2000000 boot\uRamdisk
bootm 0xa00000 0x2000000

Is that what the patch needed for to fix that?

Do we loose any performance speed choosing USB vs NAND partitions?

Restore uboot for Synology DS414

$
0
0
Please help!

I had a working uboot but somehow it now just gets stuck on Modules Detected.


__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** LOADER **


U-Boot 2011.12-SYNO-d7bdf8d-2013-12-11 (Dec 11 2013 - 17:58:54) Marvell version: v2011.12 2013_Q1.2

Board: Synology AXP 78230 4-bay/2-bay
SoC: MV78230 B0
running 2 CPUs
Custom configuration
CPU: Marvell PJ4B (584) v7 (Rev 2) LE
CPU 0
CPU @ 1333 [MHz]
L2 @ 667 [MHz]
TClock @ 250 [MHz]
DDR @ 667 [MHz]
DDR 32Bit Width, FastPath Memory Access
DDR ECC Disabled
DRAM: 1 GiB

Map: Code: 0x3fefb000:0x3ff9f630
BSS: 0x3ffef33c
Stack: 0x3f9eaef8
Heap: 0x3f9eb000:0x3fefb000

MMC: MRVL_MMC: 0
SF: Detected M25P64 with page size 64 KiB, total 8 MiB
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Detected No Link.
PEX 1.1(2): Detected No Link.
PEX 1.2(3): Detected No Link.
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:


I think i need to follow this guide i found to boot uboot over UART but i keep getting an error:

pi@raspberrypi:~ $ kwboot -t -B 115200 /dev/ttyUSB0 -b uboot_DS414r1.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
0 % [+++++++++++++++++xmodem: Bad message

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Quote
vzhilov
Does it mean that Kernel is still too big? Or I need to make uRamdisk smaller? Or the only solution is to patch the U-Boot?

Yes, it is the only solution.
In short, the stock uboot is missing the saveenv command. Also, if it was available would store the settings over the kernel.
read my post for details: https://forum.doozan.com/read.php?2,28939,98649#msg-98649

please note that I use 0x2000020 in my env because at 0x2000000 is loaded the device mac.

also, take a look to my latest dts, it contains some fixes

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Western Digital My Cloud Expert Series EX2 Ultra
 * (BVBZ/Ranger Peak)
 *
 * Copyright (C) 2020
 *
 * Based on the code from:
 *
 * Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com>
 * Copyright (C) 2016 Martin Mueller <mm@sig21.net>
 * Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com>
 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 */

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include "armada-385.dtsi"

/ {
	model = "My Cloud Expert Series EX2 Ultra (BVBZ/Ranger Peak)";
	compatible = "wd,mcex2u", "marvell,armada385", "marvell,armada380";

	chosen {
		stdout-path = "console=ttyS0,115200 root=LABEL=rootfs earlyprintk";
	};

	memory {
		device_type = "memory";
		reg = <0x00000000 0x40000000>; /* 1024 MB */
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000        /* CESA0: PHYS=0xf1100000 size 64K */
			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000        /* CESA1: PHYS=0xf1110000 */
			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000       /*    BM: PHYS=0xf1200000 size 1M */
			  MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>;     /*   PNC: PHYS=0xf1300000 size 1M */

		internal-regs {
			timer@c200 {
				status = "okay";
			};

			i2c@11000 {
				status = "disabled";
			};

			i2c@11100 {
				status = "disabled";
			};

			uart0: serial@12000 {
				status = "okay";
			};

			/* Connected to Welltrend 6703F-OG240WT MCU
			 * which controls power, fan and other things
			 */
			uart1: serial@12100 {
				status = "okay";
			};

			poweroff@12100 {
				compatible = "uart-poweroff";
				reg = <0x12100 0x100>;
				clocks = <&coreclk 0>;
				baud = <19200>;
				cmd = [fa 03 03 01 00 00 fb];
				status = "okay";
			};

			restart@12100 {
				compatible = "uart-restart";
				reg = <0x12100 0x100>;
				clocks = <&coreclk 0>;
				baud = <19200>;
				cmd = [fa 03 03 02 00 00 fb];
				override;
				status = "okay";
			};
			
			pinctrl: pinctrl@18000 {
				xhci0_vbus_pins: xhci0-vbus-pins {
					marvell,pins = "mpp26";
					marvell,function = "gpio";
				};

				xhci1_vbus_pins: xhci1-vbus-pins {
					marvell,pins = "mpp27";
					marvell,function = "gpio";
				};

				sata0_pins: sata-pins-0 {
					marvell,pins = "mpp55";
					marvell,function = "gpio";
				};

				sata1_pins: sata-pins-1 {
					marvell,pins = "mpp56";
					marvell,function = "gpio";
				};

				sata_leds: sata-leds {
					marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58";
					marvell,function = "gpio";
				};

				btn_pins: btn-pins {
					marvell,pins = "mpp50";
					marvell,function = "gpio";
				};
			};

			usb0: usb@58000 {
				status = "okay";
			};

			eth2: ethernet@34000 {
				status = "okay";
				phy = <&phy0>;
				phy-mode = "sgmii";
				buffer-manager = <&bm>;
				bm,pool-long = <0>;
				bm,pool-short = <1>;
			};

			mdio: mdio@72004 {
				phy0: ethernet-phy@0 {
					/* Init ETH LEDs */
					marvell,reg-init = <3 16 0 0x101e>;
					reg = <0>;
				};
			};

			cesa: crypto@90000 {
				status = "okay";
			};

			rtc: rtc@a3800 {
				status = "okay";
			};

			ahci0: sata@a8000 {
				pinctrl-names = "default";
				pinctrl-0 = <&sata0_pins>, <&sata1_pins>;
				status = "okay";
				#address-cells = <1>;
				#size-cells = <0>;

				sata0: sata-port@0 {
					reg = <0>;
					target-supply = <&reg_sata0>;
				};

				sata1: sata-port@1 {
					reg = <1>;
					target-supply = <&reg_sata1>;
				};

			};

			bm: bm@c8000 {
				status = "okay";
			};

			nand_controller: nand-controller@d0000 {
				status = "okay";

				nand: nand@0 {
					reg = <0>;
					label = "pxa3xx_nand-0";
					nand-rb = <0>;
					marvell,nand-keep-config;
					#marvell,nand-enable-arbiter; //optional
					nand-on-flash-bbt;
					nand-ecc-strength = <4>;
					nand-ecc-step-size = <512>;

					partitions {
						compatible = "fixed-partitions";
						#address-cells = <1>;
						#size-cells = <1>;

						partition@00000000 {
							label = "U-Boot";
							reg = <0x00000000 0x00500000>;    /*   5 MB */
							read-only;
						};

						partition@00500000 {
							label = "uImage";
							reg = <0x00500000 0x00500000>;    /*   5 MB */
						};

						partition@00a00000 {
							label = "uRamdisk";
							reg = <0x00a00000 0x00500000>;    /*   5 MB */
						};
							
						partition@00f00000 {
							label = "image.cfs";
							reg = <0x00f00000 0x0b900000>;    /* 185 MB */
						};

						partition@c800000 {
							label = "rescue fw";
							reg = <0x0c800000 0x00f00000>;    /*  15 MB */
						};
							
						partition@d70000 {
							label = "config";
							reg = <0x0d700000 0x01400000>;    /*  20 MB */
						};
							
						partition@eb00000 {
							label = "reserve1";
							reg = <0x0eb00000 0x00a00000>;    /*  10 MB */
						};
							
						partition@f500000 {
							label = "reserve2";
							reg = <0x0f500000 0x00a00000>;    /*  10 MB */
						};
					};
				};
			};

			usb3_0: usb3@f0000 {
				usb-phy = <&usb3_0_phy>;
				status = "okay";
			};

			usb3_1: usb3@f8000 {
				usb-phy = <&usb3_1_phy>;
				status = "okay";
			};
		};

		bm_bppi: bm-bppi {
			status = "okay";
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&sata_leds>;

		sata1-red-led {
			label = "wdmcex2u:red:hdd1";
			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
			default-state = keep;
			panic-indicator;
		};
		sata2-red-led {
			label = "wdmcex2u:red:hdd2";
			gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
			default-state = keep;
			panic-indicator;
		};
		sata1-blue-led {
			label = "wdmcex2u:blue:hdd1";
			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
			default-state = keep;
		};
		sata2-blue-led {
			label = "wdmcex2u:blue:hdd2";
			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
			default-state = keep;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&btn_pins>;
		#address-cells = <1>;
		#size-cells = <0>;

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;  // Restart=0x198, Power=0x116
			gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
			wakeup-source;
		};
	};

	usb3_0_phy: usb3_0_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_0_vbus>;
	};

	usb3_1_phy: usb3_1_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_1_vbus>;
	};

	reg_usb3_0_vbus: usb3-vbus0 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus0";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci0_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
	};

	reg_usb3_1_vbus: usb3-vbus1 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus1";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci1_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
	};

	reg_sata0: pwr-sata0 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata0";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
	};
	
	reg_sata1: pwr-sata1 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata1";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
	};
};

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Western Digital My Cloud Mirror Gen 2
 * (BWVZ/Grand Teton)
 *
 * Copyright (C) 2020
 *
 * Based on the code from:
 *
 * Copyright (C) 2019 Evgeny Kolesnikov <evgenyz@gmail.com>
 * Copyright (C) 2016 Martin Mueller <mm@sig21.net>
 * Copyright (C) 2013 Gregory CLEMENT <gregory.clement@free-electrons.com>
 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 */

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include "armada-385.dtsi"

/ {
	model = "WD MyCloud Mirror Gen 2 (BWVZ/Grand Teton)";
	compatible = "wd,mcmg2", "marvell,armada385", "marvell,armada380";

	chosen {
		stdout-path = "console=ttyS0,115200";
	};

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>; /* 512 MB */
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000        /* CESA0: PHYS=0xf1100000 size 64K */
			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000        /* CESA1: PHYS=0xf1110000 */
			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000       /*    BM: PHYS=0xf1200000 size 1M */
			  MBUS_ID(0x0b, 0x04) 0 0xf1300000 0x100000>;     /*   PNC: PHYS=0xf1300000 size 1M */

		internal-regs {
			timer@c200 {
				status = "okay";
			};

			i2c@11000 {
				status = "disabled";
			};

			i2c@11100 {
				status = "disabled";
			};

			uart0: serial@12000 {
				status = "okay";
			};

			/* Connected to Welltrend 6703F-OG240WT MCU
			 * which controls power, fan and other things
			 */
			uart1: serial@12100 {
				status = "okay";
			};

			poweroff@12100 {
				compatible = "uart-poweroff";
				reg = <0x12100 0x100>;
				clocks = <&coreclk 0>;
				baud = <19200>;
				cmd = [fa 03 03 01 00 00 fb];
				status = "okay";
			};

			restart@12100 {
				compatible = "uart-restart";
				reg = <0x12100 0x100>;
				clocks = <&coreclk 0>;
				baud = <19200>;
				cmd = [fa 03 03 02 00 00 fb];
				override;
				status = "okay";
			};
			
			pinctrl: pinctrl@18000 {
				xhci0_vbus_pins: xhci0-vbus-pins {
					marvell,pins = "mpp26";
					marvell,function = "gpio";
				};

				xhci1_vbus_pins: xhci1-vbus-pins {
					marvell,pins = "mpp27";
					marvell,function = "gpio";
				};

				sata0_pins: sata-pins-0 {
					marvell,pins = "mpp55";
					marvell,function = "gpio";
				};

				sata1_pins: sata-pins-1 {
					marvell,pins = "mpp56";
					marvell,function = "gpio";
				};

				sata_leds: sata-leds {
					marvell,pins = "mpp43", "mpp52", "mpp53", "mpp54", "mpp48", "mpp58";
					marvell,function = "gpio";
				};

				btn_pins: btn-pins {
					marvell,pins = "mpp50";
					marvell,function = "gpio";
				};
			};

			usb0: usb@58000 {
				status = "okay";
			};

			eth2: ethernet@34000 {
				status = "okay";
				phy = <&phy0>;
				phy-mode = "sgmii";
				buffer-manager = <&bm>;
				bm,pool-long = <0>;
				bm,pool-short = <1>;
			};

			mdio: mdio@72004 {
				phy0: ethernet-phy@0 {
					/* Init ETH LEDs */
					marvell,reg-init = <3 16 0 0x101e>;
					reg = <0>;
				};
			};

			cesa: crypto@90000 {
				status = "okay";
			};

			rtc: rtc@a3800 {
				status = "okay";
			};

			ahci0: sata@a8000 {
				pinctrl-names = "default";
				pinctrl-0 = <&sata0_pins>, <&sata1_pins>;
				status = "okay";
				#address-cells = <1>;
				#size-cells = <0>;

				sata0: sata-port@0 {
					reg = <0>;
					target-supply = <&reg_sata0>;
				};

				sata1: sata-port@1 {
					reg = <1>;
					target-supply = <&reg_sata1>;
				};

			};

			bm: bm@c8000 {
				status = "okay";
			};

			nand_controller: nand-controller@d0000 {
				status = "okay";

				nand: nand@0 {
					reg = <0>;
					label = "pxa3xx_nand-0";
					nand-rb = <0>;
					marvell,nand-keep-config;
					#marvell,nand-enable-arbiter; //optional
					nand-on-flash-bbt;
					nand-ecc-strength = <4>;
					nand-ecc-step-size = <512>;

					partitions {
						compatible = "fixed-partitions";
						#address-cells = <1>;
						#size-cells = <1>;

						partition@00000000 {
							label = "U-Boot";
							reg = <0x00000000 0x00500000>;    /*   5 MB */
							read-only;
						};

						partition@00500000 {
							label = "uImage";
							reg = <0x00500000 0x00500000>;    /*   5 MB */
						};

						partition@00a00000 {
							label = "uRamdisk";
							reg = <0x00a00000 0x00500000>;    /*   5 MB */
						};
							
						partition@00f00000 {
							label = "image.cfs";
							reg = <0x00f00000 0x0b900000>;    /* 185 MB */
						};

						partition@c800000 {
							label = "rescue fw";
							reg = <0x0c800000 0x00f00000>;    /*  15 MB */
						};
							
						partition@d70000 {
							label = "config";
							reg = <0x0d700000 0x01400000>;    /*  20 MB */
						};
							
						partition@eb00000 {
							label = "reserve1";
							reg = <0x0eb00000 0x00a00000>;    /*  10 MB */
						};
							
						partition@f500000 {
							label = "reserve2";
							reg = <0x0f500000 0x00a00000>;    /*  10 MB */
						};
					};
				};
			};

			usb3_0: usb3@f0000 {
				usb-phy = <&usb3_0_phy>;
				status = "okay";
			};

			usb3_1: usb3@f8000 {
				usb-phy = <&usb3_1_phy>;
				status = "okay";
			};
		};

		bm_bppi: bm-bppi {
			status = "okay";
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&sata_leds>;

		sata1-red-led {
			label = "wdmcmg2:red:hdd1";
			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
			default-state = keep;
			panic-indicator;
		};
		sata2-red-led {
			label = "wdmcmg2:red:hdd2";
			gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
			default-state = keep;
			panic-indicator;
		};
		sata1-blue-led {
			label = "wdmcmg2:blue:hdd1";
			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
			default-state = keep;
		};
		sata2-blue-led {
			label = "wdmcmg2:blue:hdd2";
			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
			default-state = keep;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&btn_pins>;
		#address-cells = <1>;
		#size-cells = <0>;

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;  // Restart=0x198, Power=0x116
			gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
			debounce-interval = <60>;
			wakeup-source;
		};
	};

	usb3_0_phy: usb3_0_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_0_vbus>;
	};

	usb3_1_phy: usb3_1_phy {
		compatible = "usb-nop-xceiv";
		vcc-supply = <&reg_usb3_1_vbus>;
	};

	reg_usb3_0_vbus: usb3-vbus0 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus0";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci0_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
	};

	reg_usb3_1_vbus: usb3-vbus1 {
		compatible = "regulator-fixed";
		regulator-name = "usb3-vbus1";
		pinctrl-names = "default";
		pinctrl-0 = <&xhci1_vbus_pins>;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		enable-active-high;
		regulator-always-on;
		gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>;
	};

	reg_sata0: pwr-sata0 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata0";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
	};
	
	reg_sata1: pwr-sata1 {
		compatible = "regulator-fixed";
		regulator-name = "pwr_en_sata1";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		enable-active-high;
		regulator-boot-on;
		gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
	};
};

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
Thank you.

Ok, I will take your last version of .dts file for Ex2-Ultra, config from @bodhi and will recompile the kernel again.

Do I have to do below before I compile:

patch -p1 -d linux-stable < GrandTeton-20170708.patch

to patch U-Boot and unblock `setev`?

For the uRamdisk I still would like to have Busybox with minimal setup which only decrypts the HDDs and switches the boot process over there. So it goes Kernel (USB or NAND) -> Ramdisk (USB or NAND) -> Encrypted Rootfs (HDD). I would like to leave uncencrypted as less as possible. This is how it was working with the old 4.14 kernel for me.

Re: Debian on WD MyCloud EX2 Ultra

$
0
0
With your kernel config, I just built an uImage less than 5MB and successfully boot it without USB or repartition mtdparts. The only thing I changed was "bootcmd" variable as following, also stock "bootcmd" at 0xa00000 0xf00000 does not work.
setenv bootcmd 'nand read.e 0x02000020 0x0500000 0x0500000; nand read.e 0x2900000 0x0a00000 0x0500000; bootm 0x02000020 0x2900000'
saveenv

Quote
When I boot from USB with reset button pressed I get kernel panic with ...
If you plan to boot from USB, you also need to change the boot environment. An example is from the post of CyberPK as following:
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
This will first try to boot from the USB if there is one, otherwise from NAND.
Have a look at the new DTS from me or from CyberPK, the DTS from Fox seems too old.

To build your uboot, download the GPL Software from WD Website, e.g. here
https://downloads.wdc.com/gpl/WDMyCloud_Ex2Ultra_GPL_v2.31.204_20191206.tar.gz

Extract WDMyCloud_Ex2Ultra_GPL_v2.31.204_20191206.tar.gz
You need 2 folders "u-boot" and "toolchain"
Go to "u-boot" and extract "u-boot-2013.01-2014_T3.0p2.tar.gz"
Go to "toolchain" and extract "armv7-marvell-linux-gnueabi-softfp_i686_64K_Dev_20131002.tar.gz"
Change variable PATH in u-boot/u-boot-2013.01-2014_T3.0p2/xbuid.sh to correct path of "armv7-marvell-linux-gnueabi-softfp_i686_64K_Dev_20131002/bin"
For x64: sudo apt install gcc-multilib
cp GrandTeton-20170708.patch u-boot/u-boot-2013.01-2014_T3.0p2
cd u-boot/u-boot-2013.01-2014_T3.0p2
patch -p1 < GrandTeton-20170708.patch
sudo ./xbuid.sh build
Or use my patched u-boot for my EX2 Ultra at the attachment.


For full details see the post of CyberPK at
https://forum.doozan.com/read.php?2,28939,98649#msg-98649. All credits goes to him.

Re: Restore uboot for Synology DS414

$
0
0
bignellrp,


> pi@raspberrypi:~ $ kwboot -t -B 115200
> /dev/ttyUSB0 -b uboot_DS414r1.bin -p
> Sending boot message. Please reboot the
> target...-
> Sending boot image...
> 0 % [+++++++++++++++++xmodem: Bad message

That's actually a good sign. The handshake did not occur, but the box has attempted to.

As I said in your original post, this box is Armada XP, sp you need to use option -a.

kwboot -t -B 115200 /dev/ttyUSB0 -b uboot_DS414r1.bin -p -a

If you see "xmodem bad message" again, just recall the command and execute it right away. It might take several tries until the box BootROM handshake with kwboot.
Viewing all 47139 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>