mercredi 10 septembre 2025, 00:56 UTC+2

Vous n’êtes pas connecté.

  • Connexion
  • S’inscrire

1

mardi 13 mai 2025, 02:26

What USB adpater is required to restore the boot loader using the JTAG interface (not TTL/serial)

Hi,

Well, to put a long story short, I flashed a bad/wrong rd.gz onto an ICYBOX IB-NAS4220. I obtained the image from https://downloads.openwrt.org/releases/2…/gemini/generic. I unpacked the raidsonic_ib-4220-b-squashfs-factory.bin file, then uploaded (tftp) zImage kernel, hddapp.tgz, and rd.gz ramdisk image via the boot menu from the serial interface as usual.

The rd.gz was much smaller compared to other openwrt versions:
19.07: 6.3 MB
19.10: 4.3 MB
23.05: 1.4 MB
24.10: 2.0 MB

Uploading and flashing zImage and hddapp.tgz worked fine, but 24.10 rd.gz did not:

Code source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
                   	Boot Menu
==============================================================================
0: Reboot                               	1: Start the Kernel Code
2: List Image                           	3: Delete Image
4: Create New Image                     	5: Enter Command Line Interface
6: Set IP Address                       	7: Set MAC Address
8: Show Configuration                   	F: Create Default FIS
X: Upgrade Boot                         	Y: Upgrade Kernel
Z: Upgrade Firmware                     	A: Upgrade Application
R: Upgrade RAM Disk

=> Select: Z


1  : Download by X-modem
2  : Download by TFTP
ESC: Return
==> 2
TFTP Server IP Address: 192.168.2.10
Image Path and name(e.g. /images/zImage): rd.gz
TFTP Download rd.gz from 192.168.2.10 ......................

Successful to download by TFTP! Size=1976743

Unknown image header!!
Are you sure to continue (Y/N) ? y
Do not power-off this device while flash programming is proceeding!!
==> enter ^C to abort program flash 0x30000000 within 3 seconds ......

Erase flash (0x30000000): Size=16777216 .......................................................
......................................................................... OK!
Program flash (0x30000000): Size=1976743 ................ OK!

Start Update FIS data......
Erase flash (0x30fe0000): Size=131072 . OK!
Program flash (0x30fe0000): Size=5120 . OK!
Successful to upgrade (0x30000000)!


It was silly to press Y to continue but I did. I did not expect such outcome. It obviously erased the flash starting at 0x30000000, thereby overwriting the boot loader. I understand that the JTAG interface is the only option left now to restore the boot loader, then access the boot loader from the serial console, and upload the 3 images as usual.

Since this is an old and rather obsolete NAS box, I wouldn't want to invest much money. Perhaps there is a cheap China USB to JTAG adapter that I could use for such purpose. Any ideas? One suggestion I received was to get an adapter with a FTDI FT232R chip. However, all adapters I can find with such Chip are for USB/TTL. I was able to use a CH341A (green) programmer in serial mode (TTL) to access the boot menu. However, this is no longer possible.

I found some FT232H Multifunction USB to JTAG. Would this do?

Thanks!

2

mardi 13 mai 2025, 06:38

I found the following:

https://nas-forum.org/index.php?page=Thread&threadID=21
https://nas-forum.org/index.php?page=Thr…D=1664#post1664

The above is valuable information, but the URLs are no longer valid.

I would prefer a USB solution, however, it appears the model mentioned is no longer available, perhaps replaced by some newer device. I understand that the adapter can be used for USB/TTL and JTAG using the latest NAS Flash tool. But I'm not sure what adapter to get.

Searching for "wiggler jtag" on eBay does not return anything. I can build the unbuffered LPT adapter and that looks straight forward. I may have some old PC with an LPT port lying around collecting nothing but dust.

3

mardi 13 mai 2025, 07:35

But with the TDO pin not known according to https://nas-forum.org/index.php?page=Thread&threadID=608, I guess this won't work, or what is the solution?

4

mardi 13 mai 2025, 07:53

OK, I just discovered https://nas-forum.org/index.php?page=Thread&postID=3914&l=2

I guess that's the way to pursue....

HWguru

NAS2000-Team

Messages: 1 039

Localisation: Wien

5

lundi 2 juin 2025, 23:45

Hello, sorry for the delay - I missed your post.
You have to look for an adapter with a FTDI FT232RL chip. With that it should work fine.
Best regards,
HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!