Need some help from the forum, I got this Nvr that was not booting some lights turn on on the board no network light on ethernet port and when connecting to tftp server the console just displayed a cursor jumping on the screen.
I managed to flash the primary bootloader with the CH341A programmer and this is what I have on the console now
Spi(cs1) ID: 0xEF 0x30 0x13 0x00 0x00 0x00
Special NAND id table Version 1.36
Nand ID: 0xEF 0xF1 0x80 0x95 0x00 0x00 0x00 0x00
stmmac_init,688,0x70431,3
MAC: 00-00-23-34-45-66
After this I flashed the bootloader
hisilicon # run da
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'u-boot_spi.bin.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 310256 (4bbf0 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:-29,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 310192 Bytes = 302.9 KiB
Load Address: a0000000
Entry Point: a0080000
Programing start at: 0xa0000000
write : 0
write : 0
write : 33
write : 66
write : 100
done
Erasing SPI flash, offset 0x00060000 size 128K ...done
Writing to SPI flash, offset 0x00060000 size 128K ...done
dh_wdt_start called
This is my printenv
hisilicon # printenv
bootargs=mem=96M, console=ttyAMA0,115200 rootfstype=cramfs root=/dev/mtdblock1
slave_bootargs=mem=64M console=ttyAMA0,115200
bootdelay=1
baudrate=115200
bootnandflash=0
key=000000000000
deviceid=0000000000000000
ethaddr=00:00:23:34:45:66
eth1addr=00:00:23:34:45:77
ver=U-Boot 2010.06-svn3003 (Dec 10 2017 - 23:35:02)
netmash=255.255.255.0
gateway=192.168.1.1
loadaddr=0x80004000
boottype=1
bootcmd=usbupdate
filesize=4BBF0
fileaddr=80004000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.108
serverip=192.168.254.254
sysbackup=0
da=tftp u-boot_spi.bin.img; flwrite
dr=tftp romfs-x.squashfs.img; flwrite
du=tftp user-x.squashfs.img; flwrite
dw=tftp web-x.squashfs.img; flwrite
dl=tftp logo-x.squashfs.img; flwrite
ds=tftp slave-x.squashfs.img; flwrite
dc=tftp custom-x.squashfs.img; flwrite
up=tftp update.img; flwrite
tk=tftp uImage; bootm
pm=tftp 575s_PMX.img; flwrite
dx=tftp u-boot_slave.bin.img; flwrite
db=tftp u-boot.bin.img; flwrite
restore=0
stdin=serial
stdout=serial
stderr=serial
verify=n
Now when I run dr or run up fails to write like this
hisilicon # run dr
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'romfs-x.squashfs.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 26099776 (18e4040 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:-29,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 26099712 Bytes = 24.9 MiB
Load Address: a0700000
Entry Point: a2100000
Programing start at: 0xa0700000
write : 0NAND read from offset 700000 failed -74
NAND write to offset 700000 failed -5
write flash error
dh_wdt_start called
hisilicon # run up
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'update.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 41767576 (27d5298 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:0,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 340488 Bytes = 332.5 KiB
Load Address: a0200000
Entry Point: a0300000
Programing start at: 0xa0200000
write : 0NAND read from offset 200000 failed -74
NAND write to offset 200000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 3850720 Bytes = 3.7 MiB
Load Address: a0300000
Entry Point: a0700000
Programing start at: 0xa0300000
write : 0NAND write to offset 300000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 26099712 Bytes = 24.9 MiB
Load Address: a0700000
Entry Point: a2100000
Programing start at: 0xa0700000
write : 0NAND read from offset 700000 failed -74
NAND write to offset 700000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 108176 Bytes = 105.6 KiB
Load Address: a2100000
Entry Point: a2200000
Programing start at: 0xa2100000
write : 0NAND read from offset 2100000 failed -74
NAND write to offset 2100000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 2395936 Bytes = 2.3 MiB
Load Address: a2200000
Entry Point: a2500000
Programing start at: 0xa2200000
write : 0NAND write to offset 2200000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 5509184 Bytes = 5.3 MiB
Load Address: a2500000
Entry Point: a3300000
Programing start at: 0xa2500000
write : 0NAND write to offset 2500000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 3432448 Bytes = 3.3 MiB
Load Address: a3300000
Entry Point: a3800000
Programing start at: 0xa3300000
write : 0NAND write to offset 3300000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 4096 Bytes = 4 KiB
Load Address: a3800000
Entry Point: a3a00000
Programing start at: 0xa3800000
write : 0NAND read from offset 3800000 failed -74
NAND write to offset 3800000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 12288 Bytes = 12 KiB
Load Address: a3a00000
Entry Point: a3c00000
Programing start at: 0xa3a00000
write : 0NAND write to offset 3a00000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 13824 Bytes = 13.5 KiB
Load Address: a3f00000
Entry Point: a3f40000
Programing start at: 0xa3f00000
write : 0NAND write to offset 3f00000 failed -5
write flash error
flash_do_flwrite,704
dh_wdt_start called
I managed to flash the primary bootloader with the CH341A programmer and this is what I have on the console now
Spi(cs1) ID: 0xEF 0x30 0x13 0x00 0x00 0x00
Special NAND id table Version 1.36
Nand ID: 0xEF 0xF1 0x80 0x95 0x00 0x00 0x00 0x00
stmmac_init,688,0x70431,3
MAC: 00-00-23-34-45-66
After this I flashed the bootloader
hisilicon # run da
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'u-boot_spi.bin.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 310256 (4bbf0 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:-29,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 310192 Bytes = 302.9 KiB
Load Address: a0000000
Entry Point: a0080000
Programing start at: 0xa0000000
write : 0
write : 0
write : 33
write : 66
write : 100
done
Erasing SPI flash, offset 0x00060000 size 128K ...done
Writing to SPI flash, offset 0x00060000 size 128K ...done
dh_wdt_start called
This is my printenv
hisilicon # printenv
bootargs=mem=96M, console=ttyAMA0,115200 rootfstype=cramfs root=/dev/mtdblock1
slave_bootargs=mem=64M console=ttyAMA0,115200
bootdelay=1
baudrate=115200
bootnandflash=0
key=000000000000
deviceid=0000000000000000
ethaddr=00:00:23:34:45:66
eth1addr=00:00:23:34:45:77
ver=U-Boot 2010.06-svn3003 (Dec 10 2017 - 23:35:02)
netmash=255.255.255.0
gateway=192.168.1.1
loadaddr=0x80004000
boottype=1
bootcmd=usbupdate
filesize=4BBF0
fileaddr=80004000
gatewayip=192.168.1.1
netmask=255.255.255.0
ipaddr=192.168.1.108
serverip=192.168.254.254
sysbackup=0
da=tftp u-boot_spi.bin.img; flwrite
dr=tftp romfs-x.squashfs.img; flwrite
du=tftp user-x.squashfs.img; flwrite
dw=tftp web-x.squashfs.img; flwrite
dl=tftp logo-x.squashfs.img; flwrite
ds=tftp slave-x.squashfs.img; flwrite
dc=tftp custom-x.squashfs.img; flwrite
up=tftp update.img; flwrite
tk=tftp uImage; bootm
pm=tftp 575s_PMX.img; flwrite
dx=tftp u-boot_slave.bin.img; flwrite
db=tftp u-boot.bin.img; flwrite
restore=0
stdin=serial
stdout=serial
stderr=serial
verify=n
Now when I run dr or run up fails to write like this
hisilicon # run dr
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'romfs-x.squashfs.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 26099776 (18e4040 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:-29,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 26099712 Bytes = 24.9 MiB
Load Address: a0700000
Entry Point: a2100000
Programing start at: 0xa0700000
write : 0NAND read from offset 700000 failed -74
NAND write to offset 700000 failed -5
write flash error
dh_wdt_start called
hisilicon # run up
stmmac_init,688,0x70431,3
get phy id:0x70431
MAC: 00-00-23-34-45-66
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Download Filename 'update.img'.
Download to address: 0x80004000
Downloading: *#################################################
done
Bytes transferred = 41767576 (27d5298 hex)
boottype=0:
dh_wdt_stop called
flash_do_flwrite,646,ret:0,flash_sn:0
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 340488 Bytes = 332.5 KiB
Load Address: a0200000
Entry Point: a0300000
Programing start at: 0xa0200000
write : 0NAND read from offset 200000 failed -74
NAND write to offset 200000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 3850720 Bytes = 3.7 MiB
Load Address: a0300000
Entry Point: a0700000
Programing start at: 0xa0300000
write : 0NAND write to offset 300000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 26099712 Bytes = 24.9 MiB
Load Address: a0700000
Entry Point: a2100000
Programing start at: 0xa0700000
write : 0NAND read from offset 700000 failed -74
NAND write to offset 700000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 108176 Bytes = 105.6 KiB
Load Address: a2100000
Entry Point: a2200000
Programing start at: 0xa2100000
write : 0NAND read from offset 2100000 failed -74
NAND write to offset 2100000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 2395936 Bytes = 2.3 MiB
Load Address: a2200000
Entry Point: a2500000
Programing start at: 0xa2200000
write : 0NAND write to offset 2200000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 5509184 Bytes = 5.3 MiB
Load Address: a2500000
Entry Point: a3300000
Programing start at: 0xa2500000
write : 0NAND write to offset 2500000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 3432448 Bytes = 3.3 MiB
Load Address: a3300000
Entry Point: a3800000
Programing start at: 0xa3300000
write : 0NAND write to offset 3300000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 4096 Bytes = 4 KiB
Load Address: a3800000
Entry Point: a3a00000
Programing start at: 0xa3800000
write : 0NAND read from offset 3800000 failed -74
NAND write to offset 3800000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Standalone Program (gzip compressed)
Data Size: 12288 Bytes = 12 KiB
Load Address: a3a00000
Entry Point: a3c00000
Programing start at: 0xa3a00000
write : 0NAND write to offset 3a00000 failed -5
write flash error
Header CRC Checking ... OK
Data CRC Checking ... OK
Image Name: NVR5XXX-4K
Image Type: ARM Linux Firmware (gzip compressed)
Data Size: 13824 Bytes = 13.5 KiB
Load Address: a3f00000
Entry Point: a3f40000
Programing start at: 0xa3f00000
write : 0NAND write to offset 3f00000 failed -5
write flash error
flash_do_flwrite,704
dh_wdt_start called