qnap nas uboot emmc flash

tonyp tonypuryer at gmail.com
Thu Feb 6 02:38:32 CET 2020


I have borked my TS-228 QNAP nas from booting by messing with some files on
the emmc while it was mounted rw. 

Support is non-existent for this nas, so I'm attempting to recover it myself
but am a little lost.

I've got a serial hooked up and have tried loading the firmware from a usb
stick but am getting a "Error: unrecognized/unsupported machine ID (r1 =
0x0000138a)." when attempting to boot the kernel.

My steps so far - download and unzip the firmware. There are 3 folders -
META-INF, NASROOT (contains a few tar files) and system, as well as 9 files
- android.emmc.dtb, android.root.emmc.cpio.gz_pad.img, bluecore.audio,
config.txt, emmc.uImage, file_contexts, rescue.emmc.dtb,
rescue.root.emmc.cpio.gz_pad.img, rsa_key_2048.pem.

The file config.txt contains the following - 

# Package Configuration
secure_boot=0
fw = rescueDT rescue.emmc.dtb 0x01ff2000
fw = kernelDT android.emmc.dtb 0x01ff2000
fw = rescueRootFS rescue.root.emmc.cpio.gz_pad.img 0x02200000
fw = kernelRootFS android.root.emmc.cpio.gz_pad.img 0x02200000
fw = linuxKernel emmc.uImage 0x03000000
fw = audioKernel bluecore.audio 0x01b00000

So I tried running - 

usb start; usb dev 0

secure_boot=0; console=ttyS0,115200; fatload usb 0:1 0x01ff2000
rescue.emmc.dtb; fatload usb 0:1 0x03000000 emmc.uImage; bootm 0x03000000

and get the "Error: unrecognized/unsupported machine ID (r1 = 0x0000138a)."
when running it.

I also tried adding "fatload usb 0:1 0x02200000
rescue.root.emmc.cpio.gz_pad.img" to the command with the same result.

(It's a very old Uboot on this box by the way - U-Boot 2012.07 (Jan 27 2016
- 17:16:49)).

The env is - 

Realtek> env print
baudrate=115200
bootargs=console=ttyS0,115200 earlyprintk loglevel=4
bootcmd=bootr
bootdelay=0
ethact=r8168#0
ethaddr=00:10:20:30:40:50
fdt_loadaddr=0x01FF2000
gatewayip=192.168.100.254
ipaddr=192.168.1.20
kernel_loadaddr=0x03000000
mtd_part=mtdparts=rtk_nand:
netmask=255.255.255.0
rescue_audio=bluecore.audio
rescue_dtb=rescue.emmc.dtb
rescue_rootfs=rescue.root.emmc.cpio.gz_pad.img
rescue_vmlinux=emmc.uImage
rootfs_loadaddr=0x02200000
serverip=192.168.1.9

I did take a copy of the emmc before I played with it, and have the file,
mmcblk0 (3.64 GB) on my desktop.

Can anyone advise the best way to proceed? Keep trying to boot a kernel in
order to manually restore the mounted emmc partition, or just flash the
mmcblk0 file onto the emmc? 

I didn't want to flash it without advice because I'm very new to this sort
of thing and didn't want to flash the wrong offset and flash over uboot.
Then the device would be done for.

Thank you for any assistance anyone can offer me.

Regards, 

Tony P



--
Sent from: http://u-boot.10912.n7.nabble.com/


More information about the U-Boot mailing list