Barebox dump for My Cloud Gen1

Hello,

I search a working dump of barebox loader for My Cloud Gen1. I connect UART and no booting.

Do you share a dump ?

Try this.
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.01.10 18:29:17 =~=~=~=~=~=~=~=~=~=~=~=

barebox 2011.06.0 (Dec 9 2013 - 12:04:46)

Board: Mindspeed C2000
c2k_spi_probe
cfi_probe: cfi_flash base: 0xc0000000 size: 0x04000000
## Unknown FLASH on Bank at 0xc0000000 - Size = 0x00000000 = 0 MB
Using ENV from SPI Flash.
e[44me[37mp=============================================================================q
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::WWWWWWWWW::::WWWWWWW::::::::WWWWWWW::DDDDDDDDDDDDDDDDD::::::::::::expressionless:
|:::::::::::WWWWWWWW::::WWWWWWWW:::::::WWWWWWW::DDDDDDDDDDDDDDDDDDDD::::::::::expressionless:
|:::::::::::WWWWWWWW:::WWWWWWWWW::::::WWWWWWW::DDDDDDDDDDDDDDDDDDDDDD:::::::::expressionless:
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::DDDDDDDDDDD::::::::expressionless:
|:::::::::::WWWWWWW:::WWWWWWWWWW::::WWWWWWW::DDDDDDDDD:::::::DDDDDDDDD::::::::expressionless:
|:::::::::::WWWWWWW::WWWWWWWWWWW:::WWWWWWW::DDDDDDDDD::::::::DDDDDDDDD::::::::expressionless:
|:::::::::::WWWWWW::WWWWWW::WWWWW:WWWWWWW::DDDDDDDDDD:::::::DDDDDDDDDD::::::::expressionless:
|:::::::::::WWWWWWWWWWWWW:::WWWWWWWWWWWW::DDDDDDDDDD::::::DDDDDDDDDDD:::::::::expressionless:
|:::::::::::WWWWWWWWWWWW::::WWWWWWWWWWW::DDDDDDDDDDD:::DDDDDDDDDDDDD::::::::::expressionless:
|:::::::::::WWWWWWWWWWW:::::WWWWWWWWWW::DDDDDDDDDDDDDDDDDDDDDDDDDD::::::::::::expressionless:
|:::::::::::WWWWWWWWWW::::::WWWWWWWWW::DDDDDDDDDDDDDDDDDDDDDDDDD::::::::::::::expressionless:
|:::::::::::WWWWWWWWW:::::::WWWWWWWW::DDDDDDDDDDDDDDDDDDDDDDDD::::::::::::::::expressionless:
|:::::::::::WWWWWWWW::::::::WWWWWWW::DDDDDDDDDDDDDDDDDDDD:::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
|:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::expressionless:
b=============================================================================de[40me[37m

1 0

Copying Barebox from SPI Flash
BB Copying Done
## Starting Barebox at 0x01000000 …

barebox 2011.06.0-svn10510-dirty3 (Dec 9 2013 - 12:04:00)

Board: Mindspeed C2000
c2k_spi_probe
c2k_otp_probe.
cbus_baseaddr: 9c000000, ddr_baseaddr: 03800000, ddr_phys_baseaddr: 03800000
class init complete
tmu init complete
bmu1 init: done
bmu2 init: done
util init complete
GPI1 init complete
GPI2 init complete
HGPI init complete
HIF rx desc: base_va: 03e80000, base_pa: 03e80000
HIF tx desc: base_va: 03e80400, base_pa: 03e80400
HIF init complete
bmu1 enabled
bmu2 enabled
pfe_hw_init: done
pfe_firmware_init
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: class firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 10
pfe_firmware_init: tmu firmware loaded
pfe_load_elf
pfe_load_elf no of sections: 14
pfe_firmware_init: util firmware loaded
miidev_restart_aneg for PHY4
miidev_restart_aneg for PHY0
Using ENV from SPI Flash.
nand_probe: comcerto_nand base: 0xc8300000 size: 0x2048 MB
NAND type unknown: 00,00
No NAND device found!!!
Malloc space: 0x00b00000 -> 0x01000000 (size 5 MB)
Stack space : 0x00af8000 -> 0x00b00000 (size 32 kB)
running /env/bin/init…
Button VAR: btn_status set to 0
[INFO] Waiting for WD Magic Packet (5 sec): CTRL+C to skip…
Hit any key to stop autoboot: 1 0
init_sata:
serdes: 24Mhz ref clk
Serdes 1 : CMU OK
Serdes 1 : Lane OK
Serdes 2 : CMU OK
Serdes 2 : Lane OK
cap 0x6f26ff81 port_map 0x3 n_ports 2
SSTS=00000123, loop_count: 0
P#SERR 0x4050002
IS 0x0
Port 0 control: 0x320
Port 0 status: 0x123
SSTS=00000000, loop_count: 0
P#SERR 0x0
IS 0x0
Port 1 control: 0x320
Port 1 status: 0x0
GHC 0x80000000
GHC 0x80000002
ahci_init_one: SUCCESS

SATA Controller Info:

AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
Enter start port: 0
Port 0 status: 123
cmd_slot = 0xb06000
cmd_tbl_dma = 0xb06500
Exit start port 0
ahci_exec_ata_cmd: 512 byte transferred.
Device support LBA48

pio 0003, udma 007f

ahci_exec_ata_cmd: 0 byte transferred.

SATA Device Info:

Serial Number : WD-WX51H3408742
Product model number : WDC WD60EFRX-68MYMN0
Firmware version : 82.00A82
Capacity : -1163856720 sectors
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 1024 byte transferred.
sataenv: partition 7 loading size 522
Button VAR: btn_status set to 0
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 512 byte transferred.
ahci_exec_ata_cmd: 10485760 byte transferred.
Success: 20480 sectors read into address 03008000 from sector 0x0089d000
Verifying Checksum … OK
Image Name: Linux-3.2.26
Created: 2015-07-09 18:30:50 UTC
Image Type: ()
Data Size: 3806072 Bytes = 3.6 MB
Load Address: 0f008000
Entry Point: 0f008000
OK

Starting kernel …

commandline: console=ttyS0,115200n8, init=/sbin/init root=/dev/md0 raid=autodetect rootfstype=ext3 rw noinitrd debug initcall_debug swapaccount=1 panic=3 mac_addr=00:90:A9:D1:68:81 model=sq serial=WX51H3408742 board_test= btn_status=0
arch_number: 1094
Uncompressing Linux… done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.2.26 (root@steveh-ubuntu) (gcc version 4.7.3 20130102 (prerelease) (crosstool-NG linaro-1.13.1+bzr - Linaro GCC 2013.01) ) #1 SMP Thu Jul 9 11:14:15 PDT 2015 wd-2.4-rel
[ 0.000000] CPU: ARMv7 Processor [412fc091] revision 1 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: Comcerto 2000 EVM
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] Comcerto: zone_dma mapping size=2c00000 type=10
[ 0.000000] On node 0 totalpages: 3776
[ 0.000000] free_area_init_node: node 0, pgdat c47cc4c0, node_mem_map c4850000
[ 0.000000] DMA zone: 1 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 703 pages, LIFO batch:0
[ 0.000000] Normal zone: 2 pages used for memmap
[ 0.000000] Normal zone: 3070 pages, LIFO batch:0
[ 0.000000] PERCPU: Embedded 2 pages/cpu @c48a0000 s71488 r8192 d51392 u131072
[ 0.000000] pcpu-alloc: s71488 r8192 d51392 u131072 alloc=2*65536
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 3773
[ 0.000000] Kernel command line: console=ttyS0,115200n8, init=/sbin/init root=/dev/md0 raid=autodetect rootfstype=ext3 rw noinitrd debug initcall_debug swapaccount=1 panic=3 mac_addr=00:90:A9:D1:68:81 model=sq serial=WX51H3408742 board_test= btn_status=0
[ 0.000000] PID hash table entries: 1024 (order: -4, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 1, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 0, 65536 bytes)
[ 0.000000] Memory: 44MB 192MB = 236MB total
[ 0.000000] Memory: 232000k/232000k available, 30144k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0x00000000 ( 64 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xf0000000 ( 504 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xc3000000 - 0xc4000000 ( 16 MB)
[ 0.000000] .text : 0xc4008000 - 0xc471338c (7213 kB)
[ 0.000000] .init : 0xc4720000 - 0xc4771740 ( 326 kB)
[ 0.000000] .data : 0xc4780000 - 0xc47cf688 ( 318 kB)
[ 0.000000] .bss : 0xc47cf6ac - 0xc484eb6c ( 510 kB)

Thanks for bootlog… :slight_smile:

I need a image, content of nand flash (U13 in PCB). I think it is a /dev/mtd0

You can try do a dump with command ?

dd if=/dev/mtd0 of=/root/barebox.bin

I need barebox.bin file.

There is no /dev/mtd0 on the gen1. There is a /dev/md0. But a dd if=/dev/md0 of=/root/barebox.bin reads zero bytes.

I see. You can paste output ls /dev/ command ?

MAKEDEV fd md port sda sda8 shm ttyS3 usbdev2.2
block full md0 ppp sda1 sdb stderr ubi_ctrl vga_arbiter
bus fuse md1 ptmx sda2 sdb1 stdin urandom xconsole
cachefiles input mem pts sda3 sdc stdout usbdev1.1 zero
char kmem net random sda4 sdc1 tty usbdev1.2
console kmsg network_latency rfkill sda5 sg0 ttyS0 usbdev1.5
cpu_dma_latency log network_throughput root sda6 sg1 ttyS1 usbdev1.6
disk loop0 null rtc0 sda7 sg2 ttyS2 usbdev2.1

I think the issue is that this user thinks that the rootFS is stored on NAND. (Like many router firmwares)

The MyCloud units are strange ducks in this respect. They DO indeed use uBoot, but that is as far as it goes. The baked in uBoot is configured to boot from SATA. It loads the kernel image and initial ramdisk directly from a partition on the sata device.

The stock linux on the device does not need MTD drivers, because the root fs is not hosted from NAND. Only the bootloader sits on flash memory, and you do not need to modify it, as it is not signature enforcing. It will happily boot whatever kernel you put there.

If you are interested in getting at the kernel image and initial ramdisk, they are in uBoot container files (special LZMA compressed files used by uBoot) in /boot/boot called uImage and uRamdisk. You can use a tool like uImage.py ( https://sourceforge.net/projects/uimage/files/ ) to unwrap the lzma archives, then you can use whatever on them. (The above script “Uncontainerizes” them, but they are still lzma compressed archives. If you unLZMA the files, you get an uncompressed raw kernel image, and an uncompressed CPIO initrd.)

Gen1 have SPI flash with barebox(not uBoot), rootfs and kernel is on SATA.

I thnik my barebox is broken because there are no boot log, no command line on UART. Totaly brick. Mayby is a hardware fault, but i want to do software stuff first.

Kernel will not boot until I flash worked barebox. So, to read barebox you need unsolder SPI flash and read content, another option is compile from WD GPL source.