Possible to Install linux on MyCloud Home ?
October 11, 2020 03:41PM
Hello all, I have a Mycloud home that has unfortunately stopped working. I removed the attached hard drive to try to recover data with no luck. However once I had the Mycloud home apart I noticed that it had 4 pin headers for a serial connection to be established. Luckily for me I have the serial to USB cable that I used on my pogoplug which ended up working. Upon powering the board on I realized that it actually had two different boot loaders preinstalled. One of them appears to be a u-boot version. This got me excited wondering if a Linux distro could be easily installed? or if it would have to have a kernel /rootfs custom built. I can provide more print out information if needed. Any advice or suggestions would be really appreciated .Thank you.

CPU  : Cortex-A53 quad core - AARCH32

Board: Realtek QA Board


This is what prints when you initially turn it on,

C1:80000000
C2
?
C1:80000000
C2
?
C1:80000000
C2
?
C1:80000000
C2
?
C1:80000000
C2
?
C3h
hwsetting size: 000005C0
C4
f
5-5
Goto FSBL: 0x10100000
<=============================================>
fsbl_main: sys_secure_type = 0x0000BEEE
fsbl_main: sys_boot_type = 0x00000001
fsbl_main: sys_boot_enc = 0x00000000
fsbl_main: sys_bisr_done = 0x00000000
sys_hwsetting_size:00000600
sys_bootcode_size:00067440
sys_secure_fsbl_size:00010B00
sys_secure_os_size:00000000
sys_bl31_size:00005040
sys_rsa_key_fw_size:00000000
sys_rsa_key_tee_size:00000000
sys_rescue_size:00026360

HwSetting:
hwsetting_blk_no:88120800
hwsetting_total_size:00000680
hwsetting_blk_count:00000680

Bootcode:
bootcode_blk_no:88120E80
bootcode_total_size:00067460
bootcode_blk_count:00067460

FSBL:
secure_fsbl_blk_no:881882E0
secure_fsbl_total_size:00010B20
secure_fsbl_blk_count:00010B20

TEE OS:
secure_os_blk_no:88198E00
secure_os_total_size:00000000
secure_os_blk_count:00000000

BL31:
bl31_blk_no:88198E00
bl31_total_size:00005060
bl31_blk_count:00005060

RSA Key Fw:
rsa_key_fw_blk_no:8819DE60
rsa_key_fw_total_size:00000000
rsa_key_fw_blk_count:00000000

RSA Key TEE:
rsa_key_tee_blk_no:8819DE60
rsa_key_tee_total_size:00000000
rsa_key_tee_blk_count:00000000

Rescue:
rescue_blk_no:8819DE60
rescue_total_size:00026380
rescue_blk_count:00026380
********** FW_TYPE_BOOTCODE **********
fwInfo->fwType: 00000001
fwInfo->isGolden: 00000001
fwInfo->ddrReadAddr: 00520000
fwInfo->ddrDestAddr: 00020000
fwInfo->flashType: 00000001
fwInfo->flashUnitSize: 00000001
fwInfo->flashOffset: 88120E80
fwInfo->dataSize: 00067460
body_size:00067440
flash_unit_no:88120E80
flash_unit_count:00067460
real_size:00067418
sha256 Fw
j bootcode jump address:00020000
64b


4.1.4

CPU  : Cortex-A53 quad core - AARCH32
Board: Realtek QA Board
[ERR] get_accessible_ddr_size: hw setting error. (impossible value 0x0)
[ERR] get_accessible_ddr_size: hw setting error. (impossible value 0x0)
DRAM:  0 Bytes
Watchdog: Disabled
Cache: Enabled
Non-Cache Region: 1 MB@0x07900000
nor flash id [0x00ef4014]
sector 256k en: 0
sector  64k en: 1
sector  32k en: 1
sector   4k en: 1
page_program  : 1
max capacity  : 0x00100000
spi type name : WINBOND_W25Q80BV_8Mbit
[SATA] enable SATA interface
[SATA] spread-spectrum disable
Factory: NOR
Factory: pp:0, seq#:0x1c, size:0x2400
------------can't find tmp/factory/000BootParam.h
Set HDMI TX OFF
In:    serial
Out:   serial
Err:   serial
Net:   Realtek PCIe GBE Family Controller mcfg = 0024
dev->name=r8168#0
*** Reboot-Action invalid ***
Hit Esc or Tab key to enter console mode or rescue linux:  0
------------can't find tmp/factory/recovery
======== Checking into android recovery ====

AHCI 0001.0301 32 slots 2 ports ? Gbps 0x3 impl SATA mode
flags: ncq pm led clo only pmp pio slum part
No port device detected!
Error, SATA device initialization failed!
bootr - boot realtek platform

Usage:
bootr [u/uz]
        u   - boot from usb
        uz  - boot from usb (use lzma image)
        m   - read fw from flash but boot manually (go all)

Enter console mode, disable watchdog ...

Realtek>

This is what happens when you type help with only the first bootloader active

Realtek> help
b2ndbc  - load 2nd stage bootcode
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bootr   - boot realtek platform
dcache  - enable or disable data cache
dhcp    - boot image via network using DHCP/TFTP protocol
env     - environment handling commands
factory - FACTORY sub system
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fatwrite- write file into a dos filesystem
fdt     - flattened device tree utility commands
gettime - get timer val elapsed
go      - start application at address 'addr' or start running fw
goru    - start rescue linux from usb
gpt     - GUID Partition Table
help    - print command description/usage
i2c     - I2C sub-system
icache  - enable or disable instruction cache
keyset  - keyset - write keyset file into factory area
loady   - load binary file over serial line (ymodem mode)
md      - memory display
mtest   - simple RAM read/write test
mtest2  - simple RAM read/write test
mw      - memory write (fill)
ping    - send ICMP ECHO_REQUEST to network host
reset   - Perform RESET of the CPU
rtkfat  - Realtek FAT32 format utility v1.0
rtkfdt  - RTK fdt utility
rtkgpt  - rtkgpt utility
rtkrng  - rng utility
rtkspi  - spi flash utility
sata    - SATA sub system
saveenv - save environment variables to persistent storage
source  - run script from memory
tftp    - download image from TFTP server
tftpput - TFTP put command, for uploading files to a server
uart_write- for uart mp tool burn mac and sn key

unzip   - unzip a memory region
usb     - USB sub-system
version - print monitor, compiler and linker version
wdpp    - Western Digital Boot Patition Tool

This is board infor

Realtek> bdinfo
arch_number = 0x0000138A
boot_params = 0x00100100
DRAM bank   = 0x00000000
-> start    = 0x00000000
-> size     = 0x00000000
ethaddr     = 00:00:C0:06:69:CE
ip_addr     = 192.168.100.1
baudrate    = 115200 bps
TLB addr    = 0x000E0000
*** bdinfo pll ***
SCPU  PLL   = 1201 MHz
SCPU        =  600 MHz
ACPU  PLL   =  549 MHz
ACPU        =  549 MHz
VCPU1  PLL   =  594 MHz
VCPU2  PLL   =  675 MHz
DDSA  PLL   =  432 MHz
DDSB  PLL   =  432 MHz
BUS  PLL   =  255 MHz
BUS_H  PLL   =  459 MHz
GPU   PLL   =  449 MHz
VODMA  PLL   =  405 MHz
*** bdinfo ddr ***
DDR        =  1600 MHz (0x1a)
[ERR] get_ddr_size: hw setting error. (impossible value 0xf)
[ERR] get_accessible_ddr_size: hw setting error. (impossible value 0x0)
[ERR] get_ddr_size: hw setting error. (impossible value 0xf)
[ERR] get_accessible_ddr_size: hw setting error. (impossible value 0x0)
DDR   SIZE =   0*2 =    0 MB  (Evaluated from DC1 0xb8008004/0x18008740)

this is me loading the 2nd bootloader

Realtek> b2ndbc
libfdt fdt_check_header(): FDT_ERR_BADMAGIC


EXPORT ENV AT 0x10000000, ENV size info:0x00002000,0x00001ffc,0x00000004
rtk_preload_bootimages_spi : header info
 0x00000600 0x00067440 0x00010b00 0x00000000
 0x00005040 0x00000000 0x00000000 0x00026360
 0x00000000
rtk_preload_bootimages_spi : load U-Boot 64 from 0x8819de60 to 0x01500000 with size 0x00026360
rtk_preload_bootimages_spi : load BL31 from 0x88198e00 to 0x10120000 with size 0x00005040
fdt_chosen: FDT_ERR_BADMAGIC
copy_2nd_bootloader_and_run : src:0x01500000, dst:0x00021000, size:0x00028000
Jumping to 2nd bootloader...


U-Boot 2015.07-g5a4a178-dirty (Jun 22 2016 - 11:33:46 +0800)

CPU  : Cortex-A53 Quad Core
Board: Realtek QA Board
[ERR] get_accessible_ddr_size: hw setting error. (impossible value 0x0)
[ERR] Fall back to using CONFIG_SYS_RAM_DCU1_SIZE
DRAM:  1 GiB
mapping memory 0x20000000-0x40000000 non-cached
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
rtk_plat_set_fw not port yet, use default configs
Not raw Image, Starting Decompress Image.gz...


Error: Bad gzipped data
Decompress FAIL!!
ERROR do_booti failed!

version

Realtek> ver

U-Boot 2015.07-g5a4a178-dirty (Jun 22 2016 - 11:33:46 +0800)
aarch64-linux-xgcc (Realtek ASDK64-4.9.3 Build 2180) 4.9.3 20150413 (prerelease)
GNU ld (Realtek ASDK64-4.9.3 Build 2180) 2.24.0.20141017

this is help with 2 bootloaders active

Realtek> help
?       - alias for 'help'
base    - print or set address offset
bdinfo  - print Board Info structure
booti   - boot arm64 Linux Image image from memory
bootm   - boot application image from memory
bootr   - boot realtek platform
cachetest- Stress cache operation
cmp     - memory compare
cp      - memory copy
dcache  - enable or disable data cache
editenv - edit environment variable
env     - environment handling commands
erase   - erase FLASH memory
exit    - exit script
false   - do nothing, unsuccessfully
fdt     - flattened device tree utility commands
flinfo  - print FLASH memory information
gettime - get timer val elapsed
gictest - Turn on GIC and send SGI to CPU
go      - start application at address 'addr'
help    - print command description/usage
icache  - enable or disable instruction cache
loadb   - load binary file over serial line (kermit mode)
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing address)
mw      - memory write (fill)
nm      - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
saveenv - save environment variables to persistent storage
setenv  - set environment variables
setexpr - set environment variable as the result of eval expression
showvar - print local hushshell variables
source  - run script from memory
test    - minimal test like /bin/sh
true    - do nothing, successfully
version - print monitor, compiler and linker version


this is printenv


Realtek> printenv

Security_Code=EXQ-PFX-DVC
baudrate=115200
bna=0
bootcmd=bootr
bootcode2nd_loadaddr=0x00021000
bootcode2ndtmp_loadaddr=0x01500000
bootdelay=0
bootstate=3
cbr=B
ethact=r8168#0
ethaddr=00:00:C0:06:69:CE
fdt_loadaddr=0x01F00000
fdtaddr=1f00000
filesize=A
gatewayip=192.168.100.254
gpt_ver=3
ipaddr=192.168.100.1
kernel_loadaddr=0x03000000
mtd_part=mtdparts=rtk_nand:
nbr=B
netmask=255.255.255.0
rescue_audio=bluecore.audio
rescue_dtb=rescue.sata.dtb
rescue_rootfs=rescue.root.sata.cpio.gz_pad.img
rescue_vmlinux=sata.uImage
rootfs_loadaddr=0x02200000
serial=WCC7K4VNZ0L8
serverip=192.168.100.2
ver=4.1.4

Environment size: 659/8188 bytes
Re: Possible to Install linux on MyCloud Home ?
October 11, 2020 04:23PM
alexio,

Definitely u-boot is the bootloader to. Cortex-A53 is 64-bit, but this runs in legacy mode AARCH32.

CPU  : Cortex-A53 quad core - AARCH32

Board: Realtek QA Board

Unfortunately, I don't have a kernel build for Realtek.

The Debian rootfs Debian-5.2.9-mvebu-tld-1-rootfs-bodhi.tar.bz2 can be used (it is a 32-bit armhf rootfs). But the kernel on it is Marvell MVEBU specific, so I'd doubt that you can get far in try using it.

Have you check mainline Debian to see if there is support? when I have time, I'll look into this to see what the status of Realtek SoC.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to Install linux on MyCloud Home ?
October 11, 2020 05:23PM
Realtek RTL SOC support has recently been added to the kernel. There are a few DTS files in arch/arm64/boot/dts/realtek. One is for a Synology NAS DiskStation DS418 so might be a good start if the SOC is the same. You did not post anything that indicates which of the various Realtek SOCs in the RTD series is being used here.
Re: Possible to Install linux on MyCloud Home ?
October 11, 2020 07:01PM
Ray was right!

Looks like this is rd1295 SoC.

https://forum.armbian.com/topic/9285-proof-of-concept-realtek-1295/page/4/

Any of these DTS will work

-rw-rw-r--  1 root root  426 Aug 21 04:15 rtd1295-mele-v9.dts
-rw-rw-r--  1 root root  434 Aug 21 04:15 rtd1295-probox2-ava.dts
-rw-rw-r--  1 root root  451 Aug 21 04:15 rtd1295-xnano-x5.dts
-rw-rw-r--  1 root root  495 Aug 21 04:15 rtd1295-zidoo-x9s.dts

So it is a definite yes. Mainline have supports ready for this box. At the end you would need a new DTS to properly identify this box. For example,

rtd1295-mycloud-home.dts

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Possible to Install linux on MyCloud Home ?
October 11, 2020 11:31PM
Okay great thank you both very much. I will start working on this and let you know how it goes . Thanks again
Author:

Your Email:


Subject:


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