IPC-HFW1230SP Нужна помощь с прошивкой камеры!

Все вопросы по IP камерам, IP серверам и по программному обеспечению для IP видеонаблюдения.
Ответить
zloysabak
Новичок
Сообщения: 1
Зарегистрирован: 10 окт 2021, 14:23

IPC-HFW1230SP Нужна помощь с прошивкой камеры!

Сообщение zloysabak » 10 окт 2021, 14:59

Доброго времени суток! Прошу прощения если спросил не на этом форуме! Имеется камера Росте****м ipc-hfw1230sp. По понятным причинам хотелось бы залить в нее родную прошивку от Dahua (DH IPC-HFW1230sp). Удалось подключиться к камере через serial port (UART). От нехватки знаний в этой сфере немного опасаюсь напартачить :oops:

Вот лог загрузки камеры.

Код: Выделить всё

Terminal log file
Date: 30.09.2021 - 15:20:54
-----------------------------------------------


hi3516cv300 System startup


U-Boot 2010.06 (Jun 01 2020 - 08:37:05)

Check Flash Memory Controller v100 ... Found
SPI Nand(cs 0) ID: 0xc8 0x21 Name:"F50L1G41A"
Block:128KB Page:2KB Chip:128MB*1 OOB:64B ECC:8bit/512
ECC provided by Flash Memory Controller
SPI Nand total size: 128MB
MMC:
EMMC/MMC/SD controller initialization.
Card did not respond to voltage select!
No EMMC/MMC/SD device found !
*** Warning - bad CRC or NAND, using default environment

In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 1  0
Set gpio: 60->0
Set gpio: 0->0
Set gpio: 72->1
Set gpio: 27->1
Set gpio: 73->1
No mmc found

NAND read: device 0 offset 0x200000, size 0x500000
5242880 bytes read: OK
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.18.20
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4691075 Bytes = 4.5 MiB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image ... OK
OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Linux version 3.18.20 (root@runner-moogncr-project-22-concurrent-0) (gcc version 4.9.4 20150629 (prerelease) (Hisilicon_v500_20170615) ) #1 Fri Jul 10 15:16:29 UTC 2020
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
Machine model: Hisilicon Hi3516CV300 DEMO Board
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyAMA0,115200 rootfstype=ramfs mtdparts=hinand:1024K(boot),1024K(tech),5120K(kernel),16384K(app),-(config) hw_type=407 ubi.mtd=3,2048
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 57236K/65536K available (4177K kernel code, 192K rwdata, 1116K rodata, 1808K init, 290K bss, 8300K reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
vmalloc : 0xc4800000 - 0xff000000 ( 936 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0533a48 (5295 kB)
.init : 0xc0534000 - 0xc06f8000 (1808 kB)
.data : 0xc06f8000 - 0xc0728360 ( 193 kB)
.bss : 0xc0728360 - 0xc0770c18 ( 291 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:16 nr_irqs:16 16
VIC @c4800000: id 0x00641190, vendor 0x41
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns
Console: colour dummy device 80x30
Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x803fe3a0 - 0x803fe3f8
devtmpfs: initialized
VFP support v0.3: not present
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12100000.uart: ttyAMA0 at MMIO 0x12100000 (irq = 21, base_baud = 0) is a PL011 rev2
console [ttyAMA0] enabled
SCSI subsystem initialized
ssp-pl022 12120000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 12120000.spi: mapped registers from 0x12120000 to c486c000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switched to clocksource arm,sp804
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
futex hash table entries: 256 (order: -1, 3072 bytes)
jffs2: version 2.2. (NAND) В© 2001-2006 Red Hat, Inc.
msgmni has been set to 111
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pinctrl-single 12040000.pinmux: 66 pins at pa c48d4000 size 264
pinctrl-single 12040800.pinconf: 76 pins at pa c48d6800 size 304
pl061_gpio 12140000.gpio: PL061 GPIO chip @0x12140000 registered
pl061_gpio 12141000.gpio: PL061 GPIO chip @0x12141000 registered
pl061_gpio 12142000.gpio: PL061 GPIO chip @0x12142000 registered
pl061_gpio 12143000.gpio: PL061 GPIO chip @0x12143000 registered
pl061_gpio 12144000.gpio: PL061 GPIO chip @0x12144000 registered
pl061_gpio 12145000.gpio: PL061 GPIO chip @0x12145000 registered
pl061_gpio 12146000.gpio: PL061 GPIO chip @0x12146000 registered
pl061_gpio 12147000.gpio: PL061 GPIO chip @0x12147000 registered
pl061_gpio 12148000.gpio: PL061 GPIO chip @0x12148000 registered
brd: module loaded
hisi-sfc hisi_spi_nor.0: unrecognized JEDEC id bytes: ff, c8, 21
hisi-sfc hisi_spi_nor.0: spi nor register fail!
hisi-sfc: probe of hisi_spi_nor.0 failed with error -2
SPI Nand ID Table Version 2.2
SPI Nand(cs 0) ID: 0xc8 0x21
nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x21
nand: GD/ESMT F50L1G41A
nand: 128MiB, SLC, page size: 2048
Nand(Auto): OOB:64B ECC:8bit/512
nand: ECC provided by Flash Memory Controller
5 cmdlinepart partitions found on MTD device hinand
5 cmdlinepart partitions found on MTD device hinand
Creating 5 MTD partitions on "hinand":
0x000000000000-0x000000100000 : "boot"
0x000000100000-0x000000200000 : "tech"
0x000000200000-0x000000700000 : "kernel"
0x000000700000-0x000001700000 : "app"
0x000001700000-0x000008000000 : "config"
libphy: hisi_femac_mii_bus: probed
hisi-femac 10050000.ethernet: phy_id=0x001cc816, phy_addr=1, phy_mode=rmii
hisi-femac 10050000.ethernet: using random MAC address 5e:e5:95:4e:d3:f7
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ehci-platform 10120000.ehci: EHCI Host Controller
ehci-platform 10120000.ehci: new USB bus registered, assigned bus number 1
ehci-platform 10120000.ehci: irq 31, io mem 0x10120000
ehci-platform 10120000.ehci: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform: OHCI generic platform driver
ohci-platform 10110000.ohci: Generic Platform OHCI controller
ohci-platform 10110000.ohci: new USB bus registered, assigned bus number 2
ohci-platform 10110000.ohci: irq 32, io mem 0x10110000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
hibvt-i2c 12110000.i2c: hibvt-i2c0@100000hz registered
hibvt-i2c 12112000.i2c: hibvt-i2c1@100000hz registered
himci: mmc host probe
himci: mmc host probe
himci: mmc host probe
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
UBI: attaching mtd3 to ubi0
UBI: scanning is finished
UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 16, need 20
UBI: attached mtd3 (name "app", size 16 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 128, bad PEBs: 0, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 146250124
UBI: available PEBs: 0, total reserved PEBs: 128, PEBs reserved for bad PEB handling: 16
UBI: background thread "ubi_bgt0d" started, PID 37
Freeing unused kernel memory: 1808K (c0534000 - c06f8000)
Ответ на printenv

Код: Выделить всё

printenv
bootargs=mem=64M console=ttyAMA0,115200 rootfstype=ramfs mtdparts=hinand:1024K(boot),1024K(tech),5120K(kernel),16384K(app),-(config) hw_type=407 ubi.mtd=3,2048
bootcmd=hi_gpio $(hi_gpios); fwupdate mmc 0:1 firmware.bin --enable-legacy-fw --with-props; nand read 0x82000000 0x200000 0x500000; bootm 0x82000000; setenv bootargs $(bootargs) bkp=1; nand read 0x82000000 0x700000 0x500000; bootm 0x82000000
bootdelay=1
baudrate=115200
ethaddr=00:00:23:34:45:66
ipaddr=192.168.1.10
serverip=192.168.1.2
netmask=255.255.255.0
bootfile="uImage"
hi_gpios=60! 0! 72 27 73
stdin=serial
stdout=serial
stderr=serial
verify=n
ver=U-Boot 2010.06 (Jun 01 2020 - 08:37:05)

Environment size: 656/131068 bytes
hi3516cv300-vc #
А у оригинала подобное этому

Код: Выделить всё

>printenv
bootdelay=3
baudrate=115200
ipaddr=192.168.1.108
autoload=yes
gatewayip=192.168.1.1
netmask=255.255.255.0
dh_keyboard=1
appauto=1
sysbackup=1
logserver=127.0.0.1
loglevel=4
autosip=192.168.254.254
autolip=192.168.1.108
autogw=192.168.1.1
autonm=255.255.255.0
pd=tftp 0x02000000 pd-x.squashfs.img; flwrite
ethact=ambarella mac
BSN=2F04BC4PAA01112
HWID=IPC-HFW2220R-VFS:01:02:02:33:18:00:01:00:00:00:04:258:00:00:00:00:00:00:00:00:100
hwidEx=00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00
devalias=IPC-HFW2220R-VFS
da=tftp 0x2000000 dhboot.bin.img; flwrite; tftp dhboot-min.bin.img;flwrite
dr=tftp 0x2000000 romfs-x.squashfs.img; flwrite
dk=tftp 0x2000000 kernel.img; flwrite
du=tftp 0x2000000 user-x.squashfs.img; flwrite
dw=tftp 0x2000000 web-x.squashfs.img; flwrite
dc=tftp 0x2000000 custom-x.squashfs.img; flwrite
dt=tftp 0x2000000 data-x.squashfs.img; flwrite
dp=tftp 0x02000000 partition-x.cramfs.img;flwrite
up=tftp 0x2000000 update.img; flwrite
tk=tftp 0x200100 hawthorn.dts.dtb;tftp 0x2000000 uImage;bootm 0x2000000
bootcmd=sf read 0x200100 0x8000 0x8000;sf read 0x2000000 0xf0000 0x180000;bootm 0x2000000
bootargs=console=ttyS0,115200 mem=110M root=/dev/mtdblock5 rootfstype=squashfs init=/linuxrc
ID=
ethaddr=3C:EF:8C:CC:A9:06
filesize=20040
fileaddr=2000000
serverip=192.168.1.70
stdin=serial
stdout=serial
stderr=serial

Environment size: 1348/131068 bytes
Я скачал DH_IPC-HX2X3X-Rhea_MultiLang_PN_Stream2_V2.800.0000002.0.R.190111

В ней файлы
  • check.img
    custom-x.squashfs.img
    dhboot.bin.img
    dhboot-min.bin.img
    dhboot-min-halfstart.bin.img
    Install
    kernel.img
    partition-x.cramfs.img
    pd-x.squashfs.img
    romfs-x.squashfs.img
    sign.img
    user-x.squashfs.img
    web-x.squashfs.img
Как вернуть оригинальную прошивку на место? Может можно сделать что-то с помощью setenv, saveenv, nand read/write? Возможность заливать в нее что либо только через TFTP (все настроено) Еще слышал что имеется некая защита от перезаписи или что-то в этом роде :dash: Если окирпичится то значит так тому и быть, все равно толку нет от нее когда просто лежит. Заранее спасибо

Ответить

Вернуться в «IP видеонаблюдение»