Обновление прошивки Dahua DH-NVR5208
Re: Обновление прошивки Dahua DH-NVR5208
теперь запускайте tftp сервер, распакуйте в него прошивку и командами run dr, run dc, run dl и т.д. заливайте прошивку по-блочно, предварительно сохраните текущий дамп
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
Что-то в Help не увидел команду dd. Как слить, на пожарный случай, прошивку, что сейчас стоит?
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
Какой правильный формат команды bootm, чтобы правильно сделать дамп прошивки ? То есть резервную копию (бэкап)? Размер флеш 32768 кб — 0x2000000h ( 33554432 dес)
Запутался в адресах флеши. Как правильно сформировать команду для её бэкапа? Логи внизу.
TI8168_EVM# sf probe 0
SPI: info: found S25FL256S (32MiB)
32768 KiB S25FL256S at 0:0 is now current device
TI8168_EVM# bootm ?
bootm - boot application image from memory
Usage:
bootm [addr [arg ...]]
- boot application image stored in memory
passing arguments 'arg ...'; when booting a Linux kernel,
'arg' can be the address of an initrd image
Sub-commands to do part of the bootm sequence. The sub-commands must be
issued in the order below (it's ok to not issue all sub-commands):
start [addr [arg ...]]
loados - load OS image
cmdline - OS specific command line processing/setup
bdt - OS specific bd_t processing
prep - OS specific prep before relocation or go
go - start OS
TI8168_EVM# help
? - alias for 'help'
askenv - get environment variables from stdin
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
editenv - edit environment variable
eracfg - eracfg - erase config partition
eralogo - eralogo - erase logo partition
exit - exit script
false - do nothing, unsuccessfully
flwrite - flwrite - write data into FLASH memory
fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
help - print command description/usage
iminfo - print header information for application image
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
lip - lip - set local ip address but not save to flash
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
mac - mac - set mac address and save to flash
mac1 - mac1 - set mac address and save to flash
md - memory display
mm - memory modify (auto-incrementing address)
mtest - simple RAM read/write test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sf - SPI flash sub-system
showvar - print local hushshell variables
sip - sip - set server ip address but not save to flash
sleep - delay execution for some time
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true - do nothing, successfully
version - print monitor version
TI8168_EVM# printenv
bootargs=mem=270M console=ttyO0,115200n8 rootfstype=cramfs root=/dev/mtdblock1 n otifyk.vpssm3_sva=0xBFD00000 pcie=gen1 bpa2parts=dma:97M:0x8ac00000
bootcmd=fsload;bootm
bootdelay=3
dh_keyboard=1
load_modules=1
appauto=1
logserver=127.0.0.1
da=tftp 0x81000000 u-boot.bin.img; flwrite
dr=tftp 0x81000000 romfs-x.cramfs.img; flwrite
du=tftp 0x81000000 user-x.cramfs.img; flwrite
dw=tftp 0x81000000 web-x.cramfs.img; flwrite
dl=tftp 0x81000000 logo-x.cramfs.img; flwrite
ds=tftp 0x81000000 slave-x.cramfs.img; flwrite
dc=tftp 0x81000000 custom-x.cramfs.img; flwrite
up=tftp 0x81000000 update.img; flwrite
tk=tftp 0x81000000 uImage; bootm
baudrate=115200
eth1addr=20:32:04:01:50:38
ipaddr=255.255.255.255
serverip=255.255.255.255
autoload=no
gatewayip=255.255.255.255
netmask=255.255.0.0
verify=yes
bootfile=/boot/uImage
cramfsaddr=0x8460000
loadaddr=0x81000000
ethact=DaVinci EMAC
ID=PA3KF021W00068
ethaddr=90:02:A9:B4:69:94
stdin=serial
stdout=serial
stderr=serial
Environment size: 962/131068 bytes
Запутался в адресах флеши. Как правильно сформировать команду для её бэкапа? Логи внизу.
TI8168_EVM# sf probe 0
SPI: info: found S25FL256S (32MiB)
32768 KiB S25FL256S at 0:0 is now current device
TI8168_EVM# bootm ?
bootm - boot application image from memory
Usage:
bootm [addr [arg ...]]
- boot application image stored in memory
passing arguments 'arg ...'; when booting a Linux kernel,
'arg' can be the address of an initrd image
Sub-commands to do part of the bootm sequence. The sub-commands must be
issued in the order below (it's ok to not issue all sub-commands):
start [addr [arg ...]]
loados - load OS image
cmdline - OS specific command line processing/setup
bdt - OS specific bd_t processing
prep - OS specific prep before relocation or go
go - start OS
TI8168_EVM# help
? - alias for 'help'
askenv - get environment variables from stdin
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
editenv - edit environment variable
eracfg - eracfg - erase config partition
eralogo - eralogo - erase logo partition
exit - exit script
false - do nothing, unsuccessfully
flwrite - flwrite - write data into FLASH memory
fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
help - print command description/usage
iminfo - print header information for application image
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
lip - lip - set local ip address but not save to flash
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
mac - mac - set mac address and save to flash
mac1 - mac1 - set mac address and save to flash
md - memory display
mm - memory modify (auto-incrementing address)
mtest - simple RAM read/write test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sf - SPI flash sub-system
showvar - print local hushshell variables
sip - sip - set server ip address but not save to flash
sleep - delay execution for some time
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true - do nothing, successfully
version - print monitor version
TI8168_EVM# printenv
bootargs=mem=270M console=ttyO0,115200n8 rootfstype=cramfs root=/dev/mtdblock1 n otifyk.vpssm3_sva=0xBFD00000 pcie=gen1 bpa2parts=dma:97M:0x8ac00000
bootcmd=fsload;bootm
bootdelay=3
dh_keyboard=1
load_modules=1
appauto=1
logserver=127.0.0.1
da=tftp 0x81000000 u-boot.bin.img; flwrite
dr=tftp 0x81000000 romfs-x.cramfs.img; flwrite
du=tftp 0x81000000 user-x.cramfs.img; flwrite
dw=tftp 0x81000000 web-x.cramfs.img; flwrite
dl=tftp 0x81000000 logo-x.cramfs.img; flwrite
ds=tftp 0x81000000 slave-x.cramfs.img; flwrite
dc=tftp 0x81000000 custom-x.cramfs.img; flwrite
up=tftp 0x81000000 update.img; flwrite
tk=tftp 0x81000000 uImage; bootm
baudrate=115200
eth1addr=20:32:04:01:50:38
ipaddr=255.255.255.255
serverip=255.255.255.255
autoload=no
gatewayip=255.255.255.255
netmask=255.255.0.0
verify=yes
bootfile=/boot/uImage
cramfsaddr=0x8460000
loadaddr=0x81000000
ethact=DaVinci EMAC
ID=PA3KF021W00068
ethaddr=90:02:A9:B4:69:94
stdin=serial
stdout=serial
stderr=serial
Environment size: 962/131068 bytes
Re: Обновление прошивки Dahua DH-NVR5208
слив дампа размером 32М
sf probe 0
sf read 0x81000000 0 0x2000000
tftp 0x81000000 fw.img 0x2000000
sf probe 0
sf read 0x81000000 0 0x2000000
tftp 0x81000000 fw.img 0x2000000
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
Уточните вторую строку:
sf read 0x81000000 0x0 0x2000000
sf read 0x81000000 0x0 0x2000000
Re: Обновление прошивки Dahua DH-NVR5208
бэкап получился?
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
PuTTY после остановки загрузки вываливается в нормальную загрузку ОС после 3 минут простоя из командного интерфейса. Как увеличить время работы в командном интерфейсе?
Нет бэкап пока не получается. TFTP сервер работает нормально. Даю команды:
set serverip 192.168.0.3
setenv ipaddr 192.168.0.236
setenv netmask 255.255.255.0
sf probe 0
sf read 0x81000000 0x0 0x2000000
tftp 0x81000000 192.168.0.3 fw.img 0x2000000
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
TI8168_EVM#
Пинг сервера проходит
TI8168_EVM# ping 192.168.0.3
Using DaVinci EMAC device
host 192.168.0.3 is alive
(Не нравится формат последней команды
tftp 0x81000000 192.168.0.3 fw.img 0x2000000 )
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
Так и не пойму правильный формат этой команды какой?
Нет бэкап пока не получается. TFTP сервер работает нормально. Даю команды:
set serverip 192.168.0.3
setenv ipaddr 192.168.0.236
setenv netmask 255.255.255.0
sf probe 0
sf read 0x81000000 0x0 0x2000000
tftp 0x81000000 192.168.0.3 fw.img 0x2000000
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
TI8168_EVM#
Пинг сервера проходит
TI8168_EVM# ping 192.168.0.3
Using DaVinci EMAC device
host 192.168.0.3 is alive
(Не нравится формат последней команды
tftp 0x81000000 192.168.0.3 fw.img 0x2000000 )
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
Так и не пойму правильный формат этой команды какой?
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
В Telnet так файл ложит в директорию:
(none) login: root
Password:
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) built-in shell (ash)
Platform: DM8168, Revision: 2202
Enter 'help' for a list of built-in commands.
~ # tftp 0x81000000 192.168.0.3 fw.img 0x2000000
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
~ # ls
bin dev home linuxrc nfs sbin slave usr
boot etc lib mnt proc share sys var
~ # cd etc
/etc # ls -l
total 30
drwxr-xr-x 1 504 248 24 Jan 1 1970 Wireless
-rwxr-xr-x 1 504 248 30 Jan 1 1970 fs-version
-rwxr-xr-x 1 504 248 190 Jan 1 1970 fstab
-rwxr-xr-x 1 504 248 9 Jan 1 1970 group
drwxr-xr-x 1 504 248 56 Jan 1 1970 init.d
-rwxr-xr-x 1 504 248 3569 Jan 1 1970 inittab
-rwxr-xr-x 1 504 248 0 Jan 1 1970 mactab
-rwxr-xr-x 1 504 248 23 Jan 1 1970 memstat.conf
-rwxr-xr-x 1 504 248 102 Jan 1 1970 mtab
-rwxr-xr-x 1 504 248 59 Jan 1 1970 passwd
-rwxr-xr-x 1 504 248 38 Jan 1 1970 passwd-
drwxr-xr-x 1 504 248 132 Jan 1 1970 ppp
-rwxr-xr-x 1 504 248 517 Jan 1 1970 profile
-rwxr-xr-x 1 504 248 2478 Jan 1 1970 protocols
lrwxrwxrwx 1 504 248 27 Jan 1 1970 resolv.conf -> /mnt/mtd/Config/resolv.conf
-rwxr-xr-x 1 504 248 15958 Jan 1 1970 services
lrwxrwxrwx 1 504 248 27 Jan 1 1970 udhcpd.conf -> /mnt/mtd/Config/udhcpd.conf
/etc # tftp -p 192.168.0.3 ./mtab
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
/etc # tftp -p 192.168.0.3 -l ./mtab
(none) login: root
Password:
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) built-in shell (ash)
Platform: DM8168, Revision: 2202
Enter 'help' for a list of built-in commands.
~ # tftp 0x81000000 192.168.0.3 fw.img 0x2000000
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
~ # ls
bin dev home linuxrc nfs sbin slave usr
boot etc lib mnt proc share sys var
~ # cd etc
/etc # ls -l
total 30
drwxr-xr-x 1 504 248 24 Jan 1 1970 Wireless
-rwxr-xr-x 1 504 248 30 Jan 1 1970 fs-version
-rwxr-xr-x 1 504 248 190 Jan 1 1970 fstab
-rwxr-xr-x 1 504 248 9 Jan 1 1970 group
drwxr-xr-x 1 504 248 56 Jan 1 1970 init.d
-rwxr-xr-x 1 504 248 3569 Jan 1 1970 inittab
-rwxr-xr-x 1 504 248 0 Jan 1 1970 mactab
-rwxr-xr-x 1 504 248 23 Jan 1 1970 memstat.conf
-rwxr-xr-x 1 504 248 102 Jan 1 1970 mtab
-rwxr-xr-x 1 504 248 59 Jan 1 1970 passwd
-rwxr-xr-x 1 504 248 38 Jan 1 1970 passwd-
drwxr-xr-x 1 504 248 132 Jan 1 1970 ppp
-rwxr-xr-x 1 504 248 517 Jan 1 1970 profile
-rwxr-xr-x 1 504 248 2478 Jan 1 1970 protocols
lrwxrwxrwx 1 504 248 27 Jan 1 1970 resolv.conf -> /mnt/mtd/Config/resolv.conf
-rwxr-xr-x 1 504 248 15958 Jan 1 1970 services
lrwxrwxrwx 1 504 248 27 Jan 1 1970 udhcpd.conf -> /mnt/mtd/Config/udhcpd.conf
/etc # tftp -p 192.168.0.3 ./mtab
BusyBox v1.18.4 (2013-09-07 16:28:49 CST) multi-call binary.
Usage: tftp [OPTIONS] HOST [PORT]
Transfer a file from/to tftp server
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
/etc # tftp -p 192.168.0.3 -l ./mtab
Re: Обновление прошивки Dahua DH-NVR5208
ваш бут не умеет заливать файлы, а зачем вы команды для бута вводите в консоль линукса - вообще не понятно... cat /dev/mtdblock0 /tmp/0, и так пока все мтд не пройдете, и потом можете файлы заливать по сети или на флешку
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
Где в логах и какой командой увидеть, что U-boot данной версии прошивки Dahua DH-NVR5208 не умеет заливать файлы?
Re: Обновление прошивки Dahua DH-NVR5208
Ну как где?
Вы даете команду, она не выполняется:
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
Вы даете команду, она не выполняется:
TI8168_EVM# tftp 0x81000000 192.168.0.3 fw.img 0x2000000
tftpboot - boot image via network using TFTP protocol
Usage:
tftpboot [loadAddress] [[hostIPaddr:]bootfilename]
-
- Постоянный посетитель
- Сообщения: 89
- Зарегистрирован: 12 мар 2018, 21:17
- Откуда: Днепр
- Контактная информация:
Re: Обновление прошивки Dahua DH-NVR5208
Эта команда даётся наугад. Я не знаю её правильный формат. Другими командами TFTP сервер принимает другие файлы с регистратора в свою директорию.