|
WD MyCloud Gen2 (Glacier, Armada 375) January 19, 2020 08:02AM |
Registered: 5 years ago Posts: 3 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 875) January 20, 2020 01:19AM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 875) January 20, 2020 04:45AM |
Registered: 5 years ago Posts: 3 |
root@debian:~# cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x0000 0x80000 0x20000 4
root@debian:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
root@debian:~# env Setting up linux-image-5.3.5-mvebu-tld-1 (1.0) ... update-initramfs: Generating /boot/initrd.img-5.3.5-mvebu-tld-1 I: The initramfs will attempt to resume from /dev/sda1 I: (UUID=5cb40a04-5278-4546-9eeb-b6fc1ebfaf8f) I: Set the RESUME variable to override this. root@debian:/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.3.5-mvebu-tld-1 -d zImage.fdt uImage Image Name: Linux-5.3.5-mvebu-tld-1 Created: Wed Aug 26 03:57:56 2020 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5070468 Bytes = 4951.63 KiB = 4.84 MiB Load Address: 00008000 Entry Point: 00008000 root@debian:/boot# mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.3.5-mvebu-tld-1 -d initrd.img-5.3.5-mvebu-tld-1 uInitrd Image Name: initramfs-5.3.5-mvebu-tld-1 Created: Wed Aug 26 03:58:40 2020 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 12600745 Bytes = 12305.42 KiB = 12.02 MiB Load Address: 00000000 Entry Point: 00000000 root@debian:/boot# root@debian:/boot# root@debian:/boot# env SHELL=/bin/bash PWD=/boot LOGNAME=root XDG_SESSION_TYPE=tty HOME=/root LANG=C.UTF-8 SSH_CONNECTION=192.168.50.106 61962 192.168.50.100 22 XDG_SESSION_CLASS=user TERM=xterm USER=root SHLVL=1 XDG_SESSION_ID=c3 XDG_RUNTIME_DIR=/run/user/0 SSH_CLIENT=192.168.50.106 61962 22 LC_ALL=C.UTF-8 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus MAIL=/var/mail/root SSH_TTY=/dev/pts/1 _=/usr/bin/env OLDPWD=/root
|
Re: WD MyCloud Gen2 (Glacier, Armada 875) January 20, 2020 12:28PM |
Admin Registered: 14 years ago Posts: 20,027 |
dmesg cat /proc/mtd cd /boot ls -lart *
|
Re: WD MyCloud Gen2 (Glacier, Armada 875) January 20, 2020 05:04PM |
Registered: 5 years ago Posts: 3 |
fw_setenv usb_set_bootargs 'setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial init=/bin/systemd"'
|
Re: WD MyCloud Gen2 (Glacier, Armada 875) January 20, 2020 05:18PM |
Admin Registered: 14 years ago Posts: 20,027 |
> fw_setenv usb_set_bootargs 'setenv bootargs > "console=ttyS0,115200 root=LABEL=rootfs > rootdelay=10 $mtdparts earlyprintk=serial > init=/bin/systemd"' >>
Warning: Bad CRC, using default environment
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 21, 2020 10:17AM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 21, 2020 04:03PM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 05:22AM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 05:29AM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 05:41AM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 02:45PM |
Admin Registered: 14 years ago Posts: 20,027 |
Quote
> DTS were compiled (4.18 and 4.19) and are binary
> identical as fox-exe
Quote
- 5.2.9 Bohdi's kernel with fox-exe dts ( mvpp2 f10f0000.ethernet eth0: could not attach PHY (-22))
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 03:25PM |
Registered: 10 years ago Posts: 54 |
root@wdmc:~# ifdown eth0 Killed old client process Internet Systems Consortium DHCP Client 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/00:90:a9:e9:64:60 Sending on LPF/eth0/00:90:a9:e9:64:60 Sending on Socket/fallback DHCPRELEASE of 192.168.2.52 on eth0 to 192.168.2.1 port 67 send_packet: Network is unreachable send_packet: please consult README file regarding broadcast address. dhclient.c:2878: Failed to send 300 byte long packet over fallback interface. root@wdmc:~# root@wdmc:~# ifup eth0 Internet Systems Consortium DHCP Client 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ [ 128.576145] mvpp2 f10f0000.ethernet eth0: could not attach PHY (-22) RTNETLINK answers: Invalid argument Listening on LPF/eth0/00:90:a9:e9:64:60 Sending on LPF/eth0/00:90:a9:e9:64:60 Sending on Socket/fallback DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8 send_packet: Network is down dhclient.c:2445: Failed to send 300 byte long packet over eth0 interface.
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 04:54PM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 22, 2020 06:38PM |
Registered: 10 years ago Posts: 54 |
/*
* Device Tree file for WD MyCloud based on Marvell Armada 375
* (DB-88F6720)
*
* Copyright (C) 2014 Marvell
*
* Gregory CLEMENT <gregory.clement@free-electrons.com>
* Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Allester Fox <fox.axon@gmail.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-375.dtsi"
/ {
model = "WD MyCloud Gen2";
compatible = "marvell,a375-db", "marvell,armada375";
chosen {
stdout-path = "serial0:115200n8";
};
memory@0 {
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, 0x09) 0 0xf1100000 0x10000
MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>;
};
gpio-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&sys_led_pins>;
system-red {
label = "system-red";
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; // chip, pin, state (1=active-low)
default-state = "keep";
};
system-green {
label = "system-green";
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; // 43 (mpp43) - 32 (gpio in chip) = 11 (pin in this chip)
linux,default-trigger = "ide-disk1";
//default-state = "on";
};
system-blue {
label = "system-blue";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
//linux,default-trigger = "default-off";
default-state = "on";
};
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&btn_reset_pins>;
#address-cells = <1>;
#size-cells = <0>;
btn-reset {
label = "btn-reset";
gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; // 44-32=12
linux,code = <198>; // KEY_RESTART, from: include/uapi/linux/input-event-codes.h
gpio-key,wakeup;
//autorepeat;
};
};
usb3_phy: usb3-phy {
compatible = "usb-nop-xceiv";
vcc-supply = <&usb3_vbus>;
};
usb3_vbus: usb3-vbus {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&usb3_vbus_pins>;
regulator-name = "usb3-vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
regulator-always-on;
gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
};
};
&spi0 {
pinctrl-0 = <&spi0_pins>;
pinctrl-names = "default";
status = "okay";
spi-flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mxicy,mx25l8005", "jedec,spi-nor";
reg = <0>; /* Chip select 0 */
spi-max-frequency = <108000000>;
partition@0 {
label = "u-boot";
reg = <0x0 0x100000>;
};
};
};
&i2c0 {
status = "okay";
clock-frequency = <100000>;
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
};
&i2c1 {
status = "okay";
clock-frequency = <100000>;
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";
};
&uart0 {
status = "okay";
};
&pinctrl {
sys_led_pins: sys-led-pins {
marvell,pins = "mpp20", "mpp43", "mpp22"; // R G B
marvell,function = "gpio";
};
btn_reset_pins: btn-reset-pins {
marvell,pins = "mpp44";
marvell,function = "gpio";
};
usb3_vbus_pins: usb3-vbus-pins {
marvell,pins = "mpp13";
marvell,function = "gpio";
};
};
&sata {
status = "okay";
nr-ports = <1>;
};
&usb1 {
status = "okay";
};
&usb2 {
status = "okay";
};
&mdio {
phy0: ethernet-phy@0 {
reg = <0>;
};
};
ðernet {
status = "okay";
};
ð0 {
status = "okay";
phy = <&phy0>;
phy-mode = "rgmii-id";
};
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) January 23, 2020 04:46AM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 27, 2020 06:33PM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 27, 2020 08:21PM |
Admin Registered: 14 years ago Posts: 20,027 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 04:09AM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 03:51PM |
Admin Registered: 14 years ago Posts: 20,027 |
Quote
Making non-default load adresses persistent will require ugly hacks on this box
Quote
When kernel and initrd is loaded by hand into non overlaping adresses, kernel runs fine.
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 04:33PM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 05:11PM |
Admin Registered: 14 years ago Posts: 20,027 |
printenv
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 05:31PM |
Registered: 10 years ago Posts: 54 |
CASset=max
MALLOC_len=5
MPmode=SMP
autoload=no
baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=host1 host0
bootargs=root=/dev/sda2 console=ttyS0,115200
bootargs_dflt=$console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel
bootargs_end=:10.4.50.254:255.255.255.0:Armada375:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=usb reset; fatload usb 0:1 0xa00000 /boot/uImage; fatload usb 0:1 0xf00000 /boot/uRamdisk; bootm 0xa00000 0xf00000
bootcmd_auto=stage_boot $boot_order
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot
bootcmd_host0=setenv devnum 0; run host_boot
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000;
bootdelay=2
bootm_size=0x10000000
cacheShare=no
console=console=ttyS0,115200
device_partition=0:1
disL2Cache=yes
disL2Prefetch=yes
disaMvPnp=no
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
eeeEnable=no
enaClockGating=no
enaCpuStream=no
enaDCPref=yes
enaFPU=yes
enaICPref=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:00:11:22:33:45
eth1mtu=1500
eth2addr=00:50:43:cc:22:19
eth2mtu=1500
eth3addr=00:00:11:22:33:46
eth3mtu=1500
eth5addr=00:00:11:22:33:47
ethact=egiga0
ethaddr=00:90:A9:E9:64:60
ethmtu=1500
ethprime=egiga0
fdt_addr=2040000
fdt_addr_r=0xc00000
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-375-db.dtb
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
ide_path=/
image_name=uImage
initrd_name=uInitrd
ipaddr=1.2.3.4
kernel_addr_r=0x1000000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
loadaddr=0x02000000
mtdids=spi0=spi_flash
mtdparts=mtdparts=spi_flash:4m(boot),-(spi-rootfs)
mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500
mv_pon_addr=00:50:43:19:22:cc
netbsd_en=no
netretry=no
pcieTune=no
pexMode=RC
pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm
pxefile_addr_r=0x2000
ramdisk_addr_r=0x2000000
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
sata_delay_reset=0
sata_dma_mode=yes
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
script_addr_r=3000000
script_name=boot.scr
scriptaddr=0x1000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
setL2CacheWT=no
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usbActive=0
usbType=3
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81
Environment size: 5038/65532 bytes
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
bootargs=root=/dev/sda2 console=ttyS0,115200
bootcmd=usb reset; fatload usb 0:1 0xa00000 /boot/uImage; fatload usb 0:1 0x1000000 /boot/uRamdisk; bootm 0xa00000 0x1000000
Last to rows were entered by me and stored in flash properly with fw_setenv (the last one is ignored, always loads uRamdisk to 0xf00000)|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 28, 2020 06:30PM |
Admin Registered: 14 years ago Posts: 20,027 |
bootcmd=usb reset; fatload usb 0:1 0xa00000 /boot/uImage; fatload usb 0:1 0xf00000 /boot/uRamdisk; bootm 0xa00000 0xf00000Is that correct? How was it saved before?
setenv initrd_high 0xffffffff boot
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 29, 2020 04:08AM |
Registered: 10 years ago Posts: 54 |
CASset=max MALLOC_len=5 MPmode=SMP autoload=no baudrate=115200 boot_order=hd_scr usb_scr mmc_scr hd_img usb_img mmc_img pxe net_img net_scr bootargs=root=/dev/ram console=ttyS0,115200 bootargs_dflt=$console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel bootargs_end=:10.4.50.254:255.255.255.0:Armada375:eth0:none bootargs_root=root=/dev/nfs rw bootcmd=usb reset; fatload usb 0:1 0xa00000 /boot/uImage; fatload usb 0:1 0xf00000 /boot/uRamdisk; bootm 0xa00000 0xf00000 bootcmd_auto=stage_boot $boot_order bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_boot=tftpboot 0x2000000 $image_name; setenv bootargs $console $nandEcc $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr; bootcmd_fdt_edit=tftpboot $fdtaddr $fdtfile; fdt addr $fdtaddr; setenv bootcmd $bootcmd_fdt_boot bootcmd_lgcy=tftpboot 0x2000000 $image_name; setenv bootargs $bootargs_dflt; bootm 0x2000000; bootdelay=1 cacheShare=no console=console=ttyS0,115200 device_partition=0:1 disL2Cache=yes disL2Prefetch=yes disaMvPnp=no eeeEnable=no enaClockGating=no enaCpuStream=no enaDCPref=yes enaFPU=yes enaICPref=yes enaMonExt=no enaWrAllo=no eth1addr=00:50:43:b2:30:1b eth1mtu=1500 eth2addr=00:50:43:b2:1a:1b eth2mtu=1500 eth3addr=00:50:43:30:1a:b2 eth3mtu=1500 ethact=egiga0 ethaddr=00:90:A9:E9:64:60 ethmtu=1500 ethprime=egiga0 fdt_addr=2040000 fdt_skip_update=no fdtaddr=0x1000000 fdtfile=armada-375-db.dtb ide_path=/ image_name=uImage initrd_name=uInitrd ipaddr=2.76.78.201 kernel_addr_r=2080000 lcd0_enable=0 lcd0_params=640x480-16@60 lcd_panel=0 loadaddr=0x02000000 loads_echo=0 mtdids=spi0=spi_flash mtdparts=mtdparts=spi_flash:4m(boot),-(spi-rootfs) mvNetConfig=mv_net_config=4,(00:50:43:11:11:11,0:1:2:3),mtu=1500 mv_pon_addr=00:50:43:1b:1a:b2 netbsd_en=no netmask=255.0.0.0 netretry=no pcieTune=no pexMode=RC pxe_files_load=:default.arm-armadaxp-db:default.arm-armadaxp:default.arm pxefile_addr_r=3100000 ramdisk_addr_r=2880000 rootpath=/srv/nfs/ sata_delay_reset=0 sata_dma_mode=yes script_addr_r=3000000 script_name=boot.scr serverip=192.168.1.1 setL2CacheWT=no standalone=fsload 0x2000000 $image_name;setenv bootargs $console $nandEcc $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000; stderr=serial stdin=serial stdout=serial usb0Mode=host usbActive=0 usbType=3 vxworks_en=no yuk_ethaddr=00:00:00:EE:51:81 Environment size: 3077/65532 bytes
setenv bootargs root=/dev/sda2 console=ttyS0,115200 setenv usbActive 1 setenv usbType 2 usb start fatload usb 0:1 0xa00000 boot/uImage fatload usb 0:1 0x2000000 boot/uRamdisk bootm 0xa00000 0x2000000
# MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xf0000 0x10000 0x10000 1flash is almost empty and fw_printenv shows
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
fw_setenv bootargs 'root=/dev/sda2 console=ttyS0,115200' Warning: Bad CRC, using default environmentand it fixes CRC and adds bootargs
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000
bootargs=root=/dev/sda2 console=ttyS0,115200
and writes to flash
no effectQuote
setenv initrd_high 0xffffffff boot
Marvell>> setenv initrd_high 0xffffffff
Marvell>> boot
(Re)start USB...
USB0: Port (usbActive) : 0 Interface (usbType = 3) : USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
## Booting image at 00a00000 ...
### Loading Firmware from USB 2.0 Disk ###
(Re)start USB...
USB0: Port (usbActive) : 1 Interface (usbType = 2) : USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
reading /boot/uImage
5181396 bytes read in 501 ms (9.9 MiB/s)
reading /boot/uRamdisk
9659113 bytes read in 912 ms (10.1 MiB/s)
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
Image Name: Linux-5.10.3-mvebu-tld-1
Created: 2020-12-28 22:09:37 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5181332 Bytes = 4.9 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
Image Name: initramfs-5.10.3-mvebu-tld-1
Created: 2020-12-28 22:10:01 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 9659049 Bytes = 9.2 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 29, 2020 04:30PM |
Admin Registered: 14 years ago Posts: 20,027 |
fw_setenv distro_bootcmd 'echo running distro boot command; setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done'
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 29, 2020 04:32PM |
Admin Registered: 14 years ago Posts: 20,027 |
Quote
I don't understand how it works - my fw_env.config looks like this
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xf0000 0x10000 0x10000 1
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 29, 2020 04:44PM |
Admin Registered: 14 years ago Posts: 20,027 |
Starting kernel ...
setenv bootargs root=/dev/sda2 console=ttyS0,115200 mtdparts=spi1.0:4m(boot),-(spi-rootfs) earlyprintk=serial' setenv usbActive 1 setenv usbType 2 usb start fatload usb 0:1 0xa00000 boot/uImage fatload usb 0:1 0x2000000 boot/uRamdisk bootm 0xa00000 0x2000000
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 29, 2020 07:11PM |
Registered: 10 years ago Posts: 54 |
|
Re: WD MyCloud Gen2 (Glacier, Armada 375) December 30, 2020 04:37PM |
Admin Registered: 14 years ago Posts: 20,027 |