DS-7608NI-I2/8P recover firmware

mdimitrov

n3wb
Dec 10, 2018
4
0
Bulgaria
After connecting the serial port, U boot keep loading the image with error for system halt.


U-Boot 2010.06-svn64409 (Jul 01 2021 - 08:52:03)

Hit ctrl+u to stop autoboot: 0
Mounting yaffs2 mount point/partnum: nand/0
Configures yaffs mount nand success!
Copy /nand/uImage to 0x42000000... [DONE]
Verifying RSA ... OK
## Booting kernel from Legacy Image at 42000000 ...
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

-- System halted

And when tftp update the device it is asking for uimage file for the upgrade.
What is the best approach for unbricking the NVR.

Any help appreciated.
 
Last edited:
And when tftp update the device it is asking for uimage file for the upgrade.
Is that when using a bootloader command, or when the NVR itself probes for a firmware update at power-on?
Do you know what version of firmware was installed on the NVR?

Also - what tftp updater are you using? With the firmware filesize greater than 32MB, the Hikvision tftp updater won't work.
The Scott Lamb clone would be needed.

 
In uboot command issued HKVS$ setenv ';tftp'

The result is:
TFTP from server 192.0.0.128; our IP address is 192.0.0.64
Download Filename 'uImage'.
Download to address: 0x40008000
Downloading: *
TFTP error: 'No such file or directory' (0)
Starting again

So the upgrade is not using the digicap.dav file. And i need dump as you suggested.
I don't know the firm version installed on the device. Reviving case is this NVR.
 
In uboot command issued HKVS$ setenv ';tftp'
Yes, that's to apply a uImage file.
Your bootloader transcript suggests the uImage is corrupt.
It's guess work which uImage to use not knowing the firmware version, but see attached from the K51 4.1.64 firmware.

If that works - but the main firmware is then found to be corrupt as well, see if the
setenv ';update'
command will apply a digicap.dav
K51 firmware here, for original I-series NVRs.

 

Attachments

TFTP from server 192.0.0.128; our IP address is 192.0.0.64
Download Filename 'uImage'.
Download to address: 0x40008000
Downloading: #################################################
done
Bytes transferred = 8837896 (86db08 hex)
MAC:
HKVS $ setenv ';update'
using update v3...
Mounting yaffs2 mount point/partnum: nand/0
Configures yaffs mount nand success!
Copy /nand/uImage to 0x42000000... [DONE]
the uImage support update_v3.
Verifying RSA ... OK
## Booting kernel from Legacy Image at 42000000 ...
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

-- System halted

The first step is OK but after the update command update is not applied. Strange case.
 
It looks like the tftp command only downloads uImage to memory and doesn't write it to flash.
Then the update command still loads the corrupt uImage from flash and fails on startup.
So the question is, how to apply the uImage to flash?
 
After trying and reading. The progress is after erasing environment variables.
with this unprivileged mode issue a command HKVS $ setenv ';erase_env' .

Ended up with update prompt after reboot.
U-Boot 2010.06-svn64409 (Jul 01 2021 - 08:52:03)

Hit ctrl+u to stop autoboot: 0

This program will upgrade software.
*******************************************************
  • ATTENTION!! PLEASE READ THIS NOTICE CAREFULLY! *
  • Don't reset machine,or anything that interrupt it. *
  • The upgrade process must finish in 10 minutes! *
  • If this program fails,machine might be unusable, *
  • and you will need to reflash again. *
  • If you find this too risky,power off machine now. *
*******************************************************

Now press [u/U] key to upgrade software:

After couple of tries with the prompts for entering IP of device and server nothing started as update no logs in the tftp for any files.

On this prompt need to pres B to drop to more privileged prompt of Uboot menu

Now press [u/U] key to upgrade software: b

Now after tftp digicap.dav the update pass but still dropping to system halted and LZMA data is corrupt.

Keep probing around.