DS-2CD2132F-I failing to boot

Red_Wolf_2

n3wb
Dec 20, 2015
13
1
Hey everyone,
Bit of a long shot, but as Hikvision support have been monumentally unhelpful despite having non grey-import cameras, figured I might try my luck here.

I have a DS-2CD2132F-I camera that fails to boot properly. Running 5.2.0 firmware, the unit boots linux ok but won't start the davinci process to bring the various services (web, etc) online.

Below is a log from the davinci process that I managed to get by modifying the initrun.sh script to get it to log to a file on temporary storage.

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

========capture_mode_pal=17, capture_mode_ntsc=18===============.
powerLineFrequencyMode = 0
@@@motion PAL!!!!!!!!!!!!!!!!!
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

get samplerate [2]
get samplerate [2]
get samplerate [2]
get samplerate [2]
get samplerate [2]
get samplerate [2]
get samplerate [2]
get samplerate [2]
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

get 0-0-0-0.000000-0-0-0
[12-21 23:18:13][pid:839][SYSINIT][ERROR]device not support RS485
[12-21 23:18:13][pid:839][HW_IF][ERROR]transfer_485_config_options error [options:57]
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

<DSP> DBG:init_dsp_lib() begin
<DSP> DBG:init_dsp_lib() end
[12-21 23:18:18][pid:839][DSP][ERROR][2]g_pdsp->audioTBShare.frameLen=80, g_pdsp->audioTBShare.totalFrame=128..
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

[12-21 23:18:18][pid:839][HW_IF][ERROR]<read_fixed_noise_info_from_flash> (CFG_MAGIC != read.magicNumber(ffffffff)
<DSP> DBG:setup_dsp() begin
<DSP> DBG:init_cmem_module:cached_size=33030144(31M),noncached_size=6815744(6M)
init_cmem_module:CMEM_cmdline=insmod /dav/cmemk.ko phys_start=0xc6600000 phys_end=0xc8c00000 pools=1x33030144,1x6815744

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

gdma Init Successful
b_fd=0,b_smd=1,b_scd=0
channel 1 is not 1 or 2<DSP> DBG:DSP start with Vout:Enabled,Audio:Disabled,VT:Disabled,MD:Enabled, vsync_guard:Enabled,vout_osd: Disabled, oversampling:Disabled, roi: Enabled, primacy: Disabled . hdr mode Enabled qr Disabled
<DSP> DBG:dsp_object.device_mode 0
<DSP> DBG:enc channel cnt 2, delay mode 0
Use CMEM buffer!
goto_idle done
pDspInitPara->VideoInitParam.capture_mode 134414356
find_video_mode sucusss!! mode 134414356 p_mode_table.vin_mode 13 vin_object.vin_fps 20.000000 vin w 2048 h 1536
set mode 13 type 21
vin_mode 2048*1536 vin_mode_temp 2048*1536 vin_mode_temp2 2048*1536#######pDspInitPara vout enable 1
<VidThrd> DBG:update_encode_fps_ctrl: Begin chan=0,maxRate(maxFps)=20.000000,fps=0x1
<VidThrd> DBG:update_encode_fps_ctrl: f_frame_rate=1.000000,clockStep=45000
<VidThrd> DBG:update_encode_fps_ctrl:Finally chan=0,fps=0x1,fpsFlg=0x1,frmPerSec=1,fpsCounter=0,fpsCycle=20,g_md_interval 5 ms
<VidThrd> DBG:update_encode_fps_ctrl: Begin chan=1,maxRate(maxFps)=20.000000,fps=0x14
<VidThrd> DBG:update_encode_fps_ctrl: f_frame_rate=20.000000,clockStep=2250
<VidThrd> DBG:update_encode_fps_ctrl:f_frame_rate=20.000000,[20].clockStep=2250,[20]
<VidThrd> DBG:update_encode_fps_ctrl:Finally chan=1,fps=0x14,fpsFlg=0xfffff,frmPerSec=20,fpsCounter=0,fpsCycle=20,g_md_interval 5 ms
<VidThrd> DBG:update_video_config_param: chan=1,encode_type=1, (2048x1536), mirror type0, I inerval 50, bps 3010,quality 60 i_quant 29, complexity 1 rate_type 0,p_encode_param->f_frame_rate 20.000000,svc mode 0 qp 6
<chan 1> in None MotionJPEG, skip!
<VidThrd> DBG:update_encode_fps_ctrl: Begin chan=2,maxRate(maxFps)=20.000000,fps=0x14
<VidThrd> DBG:update_encode_fps_ctrl: f_frame_rate=20.000000,clockStep=2250
<VidThrd> DBG:update_encode_fps_ctrl:f_frame_rate=20.000000,[20].clockStep=2250,[20]
<VidThrd> DBG:update_encode_fps_ctrl:Finally chan=2,fps=0x14,fpsFlg=0xfffff,frmPerSec=20,fpsCounter=0,fpsCycle=20,g_md_interval 5 ms
<VidThrd> DBG:update_video_config_param: chan=2,encode_type=1, (352x288), mirror type0, I inerval 50, bps 752,quality 60 i_quant 29, complexity 1 rate_type 0,p_encode_param->f_frame_rate 20.000000,svc mode 0 qp 6
<chan 2> in None MotionJPEG, skip!

overlay: start = 0x43b1f000, total size = 0x100000 ( bytes)
b_rotate 0 overlay_level64 width 2048 height 1536
osd_width 1280 osd_scale_first 64 total 81920
b_rotate 0 overlay_level16 width 352 height 288
osd_width 256 osd_scale_first 16 sub total 4096
init osd area success
init osd memory ok
<OSD> DBG:Left=0 pChar->pos=4000000
<SetOsd()> line=0 y=64 line_char_count=16, valid char count 24,osd_lines 0
<SetOsd()> line=1 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=2 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=3 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=4 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=5 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=6 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=7 y=0 line_char_count=0, valid char count 0,osd_lines 0
chan 1, osd size 0 osd_size_changed 1
chan 2, osd size 0 osd_size_changed 1
b_rotate 0 overlay_level16 width 2048 height 1536
osd_width 1280 osd_scale_first 16 total 20480
b_rotate 0 overlay_level16 width 352 height 288
osd_width 256 osd_scale_first 16 sub total 4096
init osd area success
<OSD> DBG:setosd ok
<OSD> DBG:setosd:END. chan=0,flgOsd=0x1, bStart=1
<OSD> DBG:Left=0 pChar->pos=4000000
<SetOsd()> line=0 y=64 line_char_count=16, valid char count 24,osd_lines 0
<SetOsd()> line=1 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=2 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=3 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=4 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=5 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=6 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=7 y=0 line_char_count=0, valid char count 0,osd_lines 0
chan 1, osd size 0 osd_size_changed 0
chan 2, osd size 0 osd_size_changed 0
<OSD> DBG:setosd ok
<OSD> DBG:setosd:END. chan=1,flgOsd=0x3, bStart=1
<OSD> DBG:Left=0 pChar->pos=4000000
<SetOsd()> line=0 y=64 line_char_count=16, valid char count 24,osd_lines 0
<SetOsd()> line=1 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=2 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=3 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=4 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=5 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=6 y=0 line_char_count=0, valid char count 0,osd_lines 0
<SetOsd()> line=7 y=0 line_char_count=0, valid char count 0,osd_lines 0
chan 1, osd size 0 osd_size_changed 0
chan 2, osd size 0 osd_size_changed 0
<OSD> DBG:setosd ok
<OSD> DBG:setosd:END. chan=2,flgOsd=0x7, bStart=1
init osd success
<VidThrd> DBG:setup_video_input begin
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

<VidThrd> DBG:set framerate 20.000000
<VidThrd> DBG:set framerate 25600000
<VidThrd> DBG:init_vin done
sink 2 is DBus-LCD
sink_type 1, chan 1, sink_info type 2 sink_info.source_id 1
sink 1 is DBus-All
sink_type 1, chan 1, sink_info type 2 sink_info.source_id 0
sink 0 is CVBS
sink_type 1, chan 1, sink_info type 1 sink_info.source_id 1
sinkid 0
<config_vout_flip> rotate_type 0
<DspThrd> DBG:#######vout enable 1
sink 2 is DBus-LCD
sink_type 2, chan 0, sink_info type 2 sink_info.source_id 1
sink 1 is DBus-All
sink_type 2, chan 0, sink_info type 2 sink_info.source_id 0
sink 0 is CVBS
sink_type 2, chan 0, sink_info type 1 sink_info.source_id 1
sinkid 1
<config_vout_flip> rotate_type 0
<DspThrd> DBG:#######vout enable 1
init_vout0 done
bsb_mem = 0x43e03000, size = 0x400000
<VidThrd> DBG:Stream [0] change frame rate 1/20
h264 main profile !
<VidThrd> DBG:Stream [1] change frame rate 20/20
h264 main profile !
<VidThrd> DBG:Stream [2] change frame rate 20/20
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param

davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param


As the davinci process doesn't seem to start, the camera ends up rebooting after a few minutes. Looking at the filesystem and process list, there is apparently some sort of watchdog process that causes this.

Interestingly, while iptables locks down SSH and the like, the same can't be said for IPv6, where the firewall rules are left entirely blank and open. Convenient way to get around the fact that davinci doesn't get to assigning an IP address from config.

If anyone has any ideas other than RMA (the camera is 30ft above the ground, so retrieving it is not easy), I'm listening... I've tried the SADP tool already (finds nothing), and a variety of different firmwares but all have failed to boot completely with the same failure in davinci.
 
If it's non grey import presumably it's legitimate world region? And you've not made any changes to the flash etc?

TFTP 5.2.0 or 5.2.5 or 5.3.0 to it?
 
while iptables locks down SSH and the like
iptables -F
will flush the rules and unblock the dropbear SSH client.
I don't see anything that relates to a boot issue in that log.
Is there anything more useful in the kernel log?
cat /proc/kmsg
then Control-C to exit
or
dmesg
Sometimes a useful indicator is the firmware version as shown by SADP.
If it shows 4.0.8 and may have 'min-system' in the serial number, the camera is running in a recovery 'min-system' mode where only a basic kernel is running - no web services.
But telnet should be active, and tftp, so allowing some messing with the internals.
If this is the case, a suitable firmware update (5.2.5 or lower) should fix it.
 
Tried TFTPing the baseline 5.2.0, 5.2.5 and 5.3.0 to it, but all gave the same result. While the flash would complete successfully, the bootup wouldn't initialise davinci completely. 5.3.0 was the first to enforce some form of password other than 12345 on SSH, which limited what I could extract from whatever they use instead of davinci in those images.

The initial failure occurred with no changes to the system. The camera stopped reporting in to the NVR for some hours, then came back and recorded for about an hour, then went completely dead.
 
iptables -F
will flush the rules and unblock the dropbear SSH client.
I don't see anything that relates to a boot issue in that log.
Is there anything more useful in the kernel log?
cat /proc/kmsg
then Control-C to exit
or
dmesg
Sometimes a useful indicator is the firmware version as shown by SADP.
If it shows 4.0.8 and may have 'min-system' in the serial number, the camera is running in a recovery 'min-system' mode where only a basic kernel is running - no web services.
But telnet should be active, and tftp, so allowing some messing with the internals.
If this is the case, a suitable firmware update (5.2.5 or lower) should fix it.


I'll see what I can get from /proc/kmsg, but as I recall it was nothing spectacular. I compared it to a functional camera and saw no different or additional messages anywhere in the bootup.
SADP won't detect the camera, and I did use iptables -F, as well as modifying the initrun.sh script to allocate a failsafe IPv4 IP (192.0.0.64) so I could get in through more traditional means.

The main issue appears to be davinci itself. Rather than getting to the stage where it finishes initialising the video streams, it just stops and won't go any further. That includes reading the config and setting up services and interfaces as it normally would.

I suspect the fix will be to RMA the unit, but given I need to get an elevated work platform just to get to it, I'm trying to exhaust all possible firmware/software options first... If anyone knows of a way to get davinci to spit out more useful debug information, I'd love to give that a try too.
 
5.3.0 was the first to enforce some form of password other than 12345 on SSH,
The newer default password is 123456789abc and following that is the 'device activation' requirement to create a strong password before the device will fully operate.
SADP won't detect the camera
That suggests something very basic. SADP sees the camera even in 'recovery mode' before davinci etc are running.
I'd bet there are some clues in kmsg.
 
Output from dmesg:

# dmesg[ 0.000000] Linux version 2.6.38.8 (root@HIK-RD-CI-Frontend) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70) )
[ 0.000000] #26 PREEMPT Mon Jul 21 16:58:36 CST 2014
[ 0.000000] CPU: ARMv6-compatible processor [4117b365] revision 5 (ARMv6TEJ), cr=00c5387f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: Coconut
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] Ambarella: AHB = 0x60000000[0xf0000000],0x01000000 0
[ 0.000000] Ambarella: APB = 0x70000000[0xf1000000],0x01000000 0
[ 0.000000] Ambarella: PPM = 0xc0000000[0xe0000000],0x00200000 9
[ 0.000000] Ambarella: BSB = 0xc8c00000[0xe8c00000],0x00400000 9
[ 0.000000] Ambarella: DSP = 0xc9000000[0xe9000000],0x07000000 9
[ 0.000000] Ambarella: HAL = 0xc00a0000[0xfee00000],0x0000e708 9
[ 0.000000] On node 0 totalpages: 25344
[ 0.000000] free_area_init_node: node 0, pgdat c04dd020, node_mem_map c0503000
[ 0.000000] Normal zone: 198 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 25146 pages, LIFO batch:7
[ 0.000000] bootmem_init: high_memory = 0xc8a00000
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 25146
[ 0.000000] Kernel command line: console=ttyS0 initrd=0xc0a00000,0x400000 rw root=/dev/ram dbg=0 KRN_PRT=pri RMD_PRT=pri reserved=0xc6500000,0x100000,99 video=amb0fb:720x480,720x480,1,0
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 99MB = 99MB total
[ 0.000000] Memory: 91192k/91192k available, 10184k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xfe600000 - 0xfee00000 ( 8 MB)
[ 0.000000] vmalloc : 0xc9000000 - 0xe0000000 ( 368 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8a00000 ( 138 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc002d000 ( 148 kB)
[ 0.000000] .text : 0xc002d000 - 0xc04aa000 (4596 kB)
[ 0.000000] .data : 0xc04aa000 - 0xc04dd6c0 ( 206 kB)
[ 0.000000] Preemptable hierarchical RCU implementation.
[ 0.000000] RCU-based detection of stalled CPUs is disabled.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.000000] NR_IRQS:224
[ 0.000000] sched_clock: 32 bits at 72MHz, resolution 13ns, wraps every 59652ms
[ 0.000000] sched_clock: wrong multiply/shift: 1864135111>>27 vs calculated 3728270222>>28
[ 0.000000] sched_clock: fix multiply/shift to avoid scheduler hiccups
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttyS0] enabled
[ 0.000590] Calibrating delay loop... 525.92 BogoMIPS (lpj=2629632)
[ 0.260138] pid_max: default: 32768 minimum: 301
[ 0.260561] Mount-cache hash table entries: 512
[ 0.261347] CPU: Testing write buffer coherency: ok
[ 0.268078] NET: Registered protocol family 16
[ 0.279036] Ambarella Coconut:
[ 0.279072] chip id: 5100
[ 0.279087] board type: 3
[ 0.279101] board revision: 10
[ 0.279113] chip name: a5m
[ 0.279125] HAL version: 176869
[ 0.279141] reference clock: 24000000
[ 0.279158] system configuration: 0x177804ea
[ 0.279175] boot type: 0x00000002
[ 0.279189] hif type: 0x00000000
[ 0.307549] bio: create slab <bio-0> at 0
[ 0.310119] ambarella-spi ambarella-spi.0: ambarella SPI Controller 0 created
[ 0.321322] ambarella-i2c ambarella-i2c.0: Ambarella Media Processor I2C adapter[i2c-0] probed!
[ 0.322904] ambarella-i2c ambarella-i2c.1: Ambarella Media Processor I2C adapter[i2c-1] probed!
[ 0.324362] i2c i2c-0: Added multiplexed i2c bus 2
[ 0.324404] ambarella-i2cmux ambarella-i2cmux.0: mux on ambarella-i2c adapter
[ 0.327393] Advanced Linux Sound Architecture Driver Version 1.0.23.
[ 0.331484] cfg80211: Calling CRDA to update world regulatory domain
[ 0.333165] Switching to clocksource ambarella-cs-timer
[ 0.340204] Switched to NOHz mode on CPU #0
[ 0.397877] NET: Registered protocol family 2
[ 0.398237] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.399154] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.399359] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.399505] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.399526] TCP reno registered
[ 0.399553] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.399600] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400227] NET: Registered protocol family 1
[ 0.401146] RPC: Registered udp transport module.
[ 0.401183] RPC: Registered tcp transport module.
[ 0.401203] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.401726] Trying to unpack rootfs image as initramfs...
[ 0.404350] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.438502] Freeing initrd memory: 4096K
[ 0.441556] [ kernel version: svn-84868 ]
[ 0.441662] mmc0 power register success!
[ 0.441706] mmc1 power register success!
[ 0.441844] reboot times :1
[ 0.465043] msgmni has been set to 186
[ 0.473765] alg: No test for stdrng (krng)
[ 0.473927] io scheduler noop registered
[ 0.473957] io scheduler deadline registered
[ 0.474136] io scheduler cfq registered (default)
[ 0.477894] ambarella-fb ambarella-fb.0: probe p[720x480] v[720x576] c[1] b[0] l[736] @ [0xc5980000:0x00068000]!
[ 0.479757] ambarella-uart.0: ttyS0 at MMIO 0x70005000 (irq = 9) is a ambuart
[ 0.516524] brd: module loaded
[ 0.531070] loop: module loaded
[ 0.534694] NAND device: Manufacturer ID: 0x98, Chip ID: 0xd1 (Toshiba NAND 128MiB 3,3V 8-bit)
[ 0.534741] ambarella_nand_config_flash: 0x02e00140, 0x02c00140
[ 0.535168] Bad block table found at page 65472, version 0x01
[ 0.535697] Bad block table found at page 65408, version 0x01
[ 0.541617] ambarella-nand ambarella-nand: ambarella_nand_probe: Partition infomation found!
[ 0.541684] Creating 18 MTD partitions on "ambnand":
[ 0.541721] 0x000000000000-0x000000020000 : "bst"
[ 0.545986] 0x000000020000-0x000000120000 : "ptb"
[ 0.549812] 0x000000120000-0x000000220000 : "bld"
[ 0.553894] 0x000000220000-0x000000320000 : "hal"
[ 0.557797] 0x000000320000-0x000000420000 : "ano_ptb"
[ 0.561728] 0x000000420000-0x0000004a0000 : "env"
[ 0.566022] 0x0000004a0000-0x000000520000 : "param"
[ 0.570068] 0x000000520000-0x000000620000 : "dpt"
[ 0.574448] 0x000000620000-0x000001020000 : "rcvy"
[ 0.578666] 0x000001020000-0x000001820000 : "krn_pri"
[ 0.582585] 0x000001820000-0x000002020000 : "krn_sec"
[ 0.586845] 0x000002020000-0x000002420000 : "rmd_pri"
[ 0.590851] 0x000002420000-0x000002820000 : "rmd_sec"
[ 0.595217] 0x000002820000-0x000004020000 : "app_pri"
[ 0.599376] 0x000004020000-0x000005820000 : "app_sec"
[ 0.603857] 0x000005820000-0x000005c20000 : "cfg_pri"
[ 0.608018] 0x000005c20000-0x000006020000 : "cfg_sec"
[ 0.612352] 0x000006020000-0x000007020000 : "dbg"
[ 0.623975] PPP generic driver version 2.4.2
[ 0.625394] PPP Deflate Compression module registered
[ 0.625435] PPP BSD Compression module registered
[ 0.819917] Ambarella MII Bus: probed
[ 0.821609] ambarella-eth ambarella-eth.0: MAC Address[c4:2f:90:45:d7:e1].
[ 0.822358] console [netcon0] enabled
[ 0.822387] netconsole: network logging started
[ 0.824191] mousedev: PS/2 mouse device common for all mice
[ 0.825262] input: AmbInput as /devices/virtual/input/input0
[ 0.826307] ambarella_gpio_irq_set_wake: irq[75] = girq[11] = 1
[ 0.826352] ambarella-input ambarella-input: AmbInput probed!
[ 0.827390] ambarella-adc ambarella-adc: ADC Host Controller [polling mode] probed!
[ 0.829086] ambarella-rtc ambarella-rtc: rtc core: registered ambarella-rtc as rtc0
[ 0.829684] i2c /dev entries driver
[ 0.834826] ambarella-wdt ambarella-wdt: Ambarella Media Processor Watch Dog Timer[ambarella-wdt].
[ 0.841611] ALSA device list:
[ 0.841645] No soundcards found.
[ 0.841825] Netfilter messages via NETLINK v0.30.
[ 0.842029] nf_conntrack version 0.5.0 (1488 buckets, 5952 max)
[ 0.842695] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 0.842870] TCP cubic registered
[ 0.843601] NET: Registered protocol family 10
[ 0.846176] Mobile IPv6
[ 0.846313] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 0.846576] IPv6 over IPv4 tunneling driver
[ 0.850454] NET: Registered protocol family 17
[ 0.851281] sctp: Hash tables configured (established 4096 bind 8192)
[ 0.851634] sctp: sctp_init_sock(sk: c58d7b20)
[ 0.851759] lib80211: common routines for IEEE802.11 drivers
[ 0.851791] lib80211_crypt: registered algorithm 'NULL'
[ 0.856205] ambarella-rtc ambarella-rtc: setting system clock to 2015-12-29 22:28:53 UTC (1451428133)
[ 0.857056] RAMDISK: gzip image found at block 0
[ 1.642713] VFS: Mounted root (ext2 filesystem) on device 1:0.
[ 1.642925] Freeing init memory: 148K
[ 3.692348] UBI: attaching mtd13 to ubi1
[ 3.692389] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 3.692416] UBI: logical eraseblock size: 129024 bytes
[ 3.692436] UBI: smallest flash I/O unit: 2048
[ 3.692453] UBI: sub-page size: 512
[ 3.692471] UBI: VID header offset: 512 (aligned 512)
[ 3.692490] UBI: data offset: 2048
[ 3.752334] UBI: max. sequence number: 400
[ 3.773412] UBI: attached mtd13 to ubi1
[ 3.773445] UBI: MTD device name: "app_pri"
[ 3.773466] UBI: MTD device size: 24 MiB
[ 3.773484] UBI: number of good PEBs: 192
[ 3.773499] UBI: number of bad PEBs: 0
[ 3.773515] UBI: number of corrupted PEBs: 0
[ 3.773530] UBI: max. allowed volumes: 128
[ 3.773546] UBI: wear-leveling threshold: 4096
[ 3.773561] UBI: number of internal volumes: 1
[ 3.773577] UBI: number of user volumes: 1
[ 3.773592] UBI: available PEBs: 0
[ 3.773607] UBI: total number of reserved PEBs: 192
[ 3.773624] UBI: number of PEBs reserved for bad PEB handling: 2
[ 3.773644] UBI: max/mean erase counter: 77/45
[ 3.773659] UBI: image sequence number: 902162140
[ 3.778064] UBI: background thread "ubi_bgt1d" started, PID 630
[ 3.862286] UBIFS: recovery needed
[ 3.886942] UBIFS: recovery completed
[ 3.886990] UBIFS: mounted UBI device 1, volume 0, name "app_pri"
[ 3.887021] UBIFS: file system size: 22837248 bytes (22302 KiB, 21 MiB, 177 LEBs)
[ 3.887051] UBIFS: journal size: 1161216 bytes (1134 KiB, 1 MiB, 9 LEBs)
[ 3.887074] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 3.887093] UBIFS: default compressor: lzo
[ 3.887111] UBIFS: reserved for root: 1078659 bytes (1053 KiB)
[ 7.199884] UBI: attaching mtd15 to ubi3
[ 7.199927] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 7.199952] UBI: logical eraseblock size: 129024 bytes
[ 7.199970] UBI: smallest flash I/O unit: 2048
[ 7.199986] UBI: sub-page size: 512
[ 7.200003] UBI: VID header offset: 512 (aligned 512)
[ 7.200023] UBI: data offset: 2048
[ 7.208757] UBI: max. sequence number: 117
[ 7.232283] UBI: attached mtd15 to ubi3
[ 7.232316] UBI: MTD device name: "cfg_pri"
[ 7.232340] UBI: MTD device size: 4 MiB
[ 7.232357] UBI: number of good PEBs: 32
[ 7.232373] UBI: number of bad PEBs: 0
[ 7.232388] UBI: number of corrupted PEBs: 0
[ 7.232404] UBI: max. allowed volumes: 128
[ 7.232420] UBI: wear-leveling threshold: 4096
[ 7.232436] UBI: number of internal volumes: 1
[ 7.232451] UBI: number of user volumes: 1
[ 7.232466] UBI: available PEBs: 0
[ 7.232481] UBI: total number of reserved PEBs: 32
[ 7.232499] UBI: number of PEBs reserved for bad PEB handling: 2
[ 7.232519] UBI: max/mean erase counter: 118/100
[ 7.232534] UBI: image sequence number: 420224134
[ 7.240774] UBI: background thread "ubi_bgt3d" started, PID 641
[ 7.316076] UBIFS: recovery needed
[ 7.372303] UBIFS: recovery completed
[ 7.372350] UBIFS: mounted UBI device 3, volume 0, name "cfg_pri"
[ 7.372378] UBIFS: file system size: 2193408 bytes (2142 KiB, 2 MiB, 17 LEBs)
[ 7.372404] UBIFS: journal size: 1032193 bytes (1008 KiB, 0 MiB, 6 LEBs)
[ 7.372428] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 7.372448] UBIFS: default compressor: lzo
[ 7.372465] UBIFS: reserved for root: 103599 bytes (101 KiB)
[ 7.458358] UBI: attaching mtd16 to ubi4
[ 7.458401] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 7.458426] UBI: logical eraseblock size: 129024 bytes
[ 7.458445] UBI: smallest flash I/O unit: 2048
[ 7.458461] UBI: sub-page size: 512
[ 7.458479] UBI: VID header offset: 512 (aligned 512)
[ 7.458497] UBI: data offset: 2048
[ 7.467116] UBI: max. sequence number: 118
[ 7.490575] UBI: attached mtd16 to ubi4
[ 7.490609] UBI: MTD device name: "cfg_sec"
[ 7.490634] UBI: MTD device size: 4 MiB
[ 7.490650] UBI: number of good PEBs: 32
[ 7.490665] UBI: number of bad PEBs: 0
[ 7.490681] UBI: number of corrupted PEBs: 0
[ 7.490696] UBI: max. allowed volumes: 128
[ 7.490712] UBI: wear-leveling threshold: 4096
[ 7.490727] UBI: number of internal volumes: 1
[ 7.490743] UBI: number of user volumes: 1
[ 7.490758] UBI: available PEBs: 0
[ 7.490773] UBI: total number of reserved PEBs: 32
[ 7.490790] UBI: number of PEBs reserved for bad PEB handling: 2
[ 7.490809] UBI: max/mean erase counter: 106/102
[ 7.490825] UBI: image sequence number: 575997899
[ 7.493385] UBI: background thread "ubi_bgt4d" started, PID 651
[ 7.574198] UBIFS: recovery needed
[ 7.617379] UBIFS: recovery completed
[ 7.617430] UBIFS: mounted UBI device 4, volume 0, name "cfg_sec"
[ 7.617457] UBIFS: file system size: 2193408 bytes (2142 KiB, 2 MiB, 17 LEBs)
[ 7.617484] UBIFS: journal size: 1032193 bytes (1008 KiB, 0 MiB, 6 LEBs)
[ 7.617508] UBIFS: media format: w4/r0 (latest is w4/r0)
[ 7.617527] UBIFS: default compressor: lzo
[ 7.617544] UBIFS: reserved for root: 103599 bytes (101 KiB)
[ 8.808604] net eth0: Could not find default PHY in 9.
[ 8.808646] net eth0: Try PHY[3] whose id is 0x001cc816!
[ 8.812035] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 10.803635] PHY: 0:03 - Link is Up - 100/Full
[ 10.803853] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 16.457726] dsp: module license 'Proprietary' taints kernel.
[ 16.457765] Disabling lock debugging due to kernel taint
[ 16.536940] img: aaa_fifo2_base malloc c2a50000
[ 16.958056] >>>>>> DSP LOG ADDR START PHY 0xc0080000
[ 16.958092] Init software HR timer for DSP communication
[ 16.987980] cdev_init rs485_fops ...
[ 16.988034] adding uart1, minor = 0
[ 16.991602] Successfully insmod uart232 module!
[ 17.134411] amba_debug_init 248:248.
[ 21.433316] eth0: no IPv6 routers present
[ 31.841654] AMBARELLA SoC Audio DUMMY Codec
[ 31.843179] asoc: AMBARELLA_DUMMY_CODEC <-> ambarella-i2s.0 mapping ok
[ 32.178275] ========== SD Driver Build Date: Nov 7 2014, Time: 13:45:54 ==========
[ 32.178468] SD card slot0 + slot1, card detect mode:HW
[ 32.178717] ambarella-sd ambarella-sd.0: Slot0 use bounce buffer[0xc1460000<->0xc1660000]
[ 32.178760] ambarella-sd ambarella-sd.0: Slot0 req_size=131072, segs=32, seg_size=131072
[ 32.178932] ambarella-sd ambarella-sd.0: Slot1 use bounce buffer[0xc1500000<->0xc1700000]
[ 32.178968] ambarella-sd ambarella-sd.0: Slot1 req_size=131072, segs=32, seg_size=131072
[ 32.263550] ambarella-sd ambarella-sd.0: Ambarella SD/MMC[0] probed 2 slots, 0x09e130b0!
[ 32.882596] MT9T002 sensor ID is 0x2604
[ 32.933436] CMEMK module: built on Aug 23 2012 at 17:05:43
[ 32.933483] Reference Linux version 2.6.38
[ 32.933502] File /mnt/data_bsp/data_yuhuanhuan/raptor/a5s_svn2/kernel/hik_drivers/cmem/src/module/cmemk.c
[ 32.941028] cmemk initialized

Output from /proc/kmsg

# cat /proc/kmsg
<5>[ 0.000000] Linux version 2.6.38.8 (root@HIK-RD-CI-Frontend) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70) )
<5>[ 0.000000] #26 PREEMPT Mon Jul 21 16:58:36 CST 2014
<4>[ 0.000000] CPU: ARMv6-compatible processor [4117b365] revision 5 (ARMv6TEJ), cr=00c5387f
<4>[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
<4>[ 0.000000] Machine: Coconut
<4>[ 0.000000] Memory policy: ECC disabled, Data cache writeback
<6>[ 0.000000] Ambarella: AHB = 0x60000000[0xf0000000],0x01000000 0
<6>[ 0.000000] Ambarella: APB = 0x70000000[0xf1000000],0x01000000 0
<6>[ 0.000000] Ambarella: PPM = 0xc0000000[0xe0000000],0x00200000 9
<6>[ 0.000000] Ambarella: BSB = 0xc8c00000[0xe8c00000],0x00400000 9
<6>[ 0.000000] Ambarella: DSP = 0xc9000000[0xe9000000],0x07000000 9
<6>[ 0.000000] Ambarella: HAL = 0xc00a0000[0xfee00000],0x0000e708 9
<7>[ 0.000000] On node 0 totalpages: 25344
<7>[ 0.000000] free_area_init_node: node 0, pgdat c04dd020, node_mem_map c0503000
<7>[ 0.000000] Normal zone: 198 pages used for memmap
<7>[ 0.000000] Normal zone: 0 pages reserved
<7>[ 0.000000] Normal zone: 25146 pages, LIFO batch:7
<4>[ 0.000000] bootmem_init: high_memory = 0xc8a00000
<7>[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>[ 0.000000] pcpu-alloc: [0] 0
<4>[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 25146
<5>[ 0.000000] Kernel command line: console=ttyS0 initrd=0xc0a00000,0x400000 rw root=/dev/ram dbg=0 KRN_PRT=pri RMD_PRT=pri reserved=0xc6500000,0x100000,99 video=amb0fb:720x480,720x480,1,0
<6>[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
<6>[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>[ 0.000000] Memory: 99MB = 99MB total
<5>[ 0.000000] Memory: 91192k/91192k available, 10184k reserved, 0K highmem
<5>[ 0.000000] Virtual kernel memory layout:
<5>[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
<5>[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
<5>[ 0.000000] DMA : 0xfe600000 - 0xfee00000 ( 8 MB)
<5>[ 0.000000] vmalloc : 0xc9000000 - 0xe0000000 ( 368 MB)
<5>[ 0.000000] lowmem : 0xc0000000 - 0xc8a00000 ( 138 MB)
<5>[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
<5>[ 0.000000] .init : 0xc0008000 - 0xc002d000 ( 148 kB)
<5>[ 0.000000] .text : 0xc002d000 - 0xc04aa000 (4596 kB)
<5>[ 0.000000] .data : 0xc04aa000 - 0xc04dd6c0 ( 206 kB)
<6>[ 0.000000] Preemptable hierarchical RCU implementation.
<6>[ 0.000000] RCU-based detection of stalled CPUs is disabled.
<6>[ 0.000000] Verbose stalled-CPUs detection is disabled.
<6>[ 0.000000] NR_IRQS:224
<6>[ 0.000000] sched_clock: 32 bits at 72MHz, resolution 13ns, wraps every 59652ms
<2>[ 0.000000] sched_clock: wrong multiply/shift: 1864135111>>27 vs calculated 3728270222>>28
<2>[ 0.000000] sched_clock: fix multiply/shift to avoid scheduler hiccups
<4>[ 0.000000] Console: colour dummy device 80x30
<6>[ 0.000000] console [ttyS0] enabled
<6>[ 0.000590] Calibrating delay loop... 525.92 BogoMIPS (lpj=2629632)
<6>[ 0.260138] pid_max: default: 32768 minimum: 301
<4>[ 0.260561] Mount-cache hash table entries: 512
<6>[ 0.261347] CPU: Testing write buffer coherency: ok
<6>[ 0.268078] NET: Registered protocol family 16
<6>[ 0.279036] Ambarella Coconut:
<6>[ 0.279072] chip id: 5100
<6>[ 0.279087] board type: 3
<6>[ 0.279101] board revision: 10
<6>[ 0.279113] chip name: a5m
<6>[ 0.279125] HAL version: 176869
<6>[ 0.279141] reference clock: 24000000
<6>[ 0.279158] system configuration: 0x177804ea
<6>[ 0.279175] boot type: 0x00000002
<6>[ 0.279189] hif type: 0x00000000
<4>[ 0.307549] bio: create slab <bio-0> at 0
<6>[ 0.310119] ambarella-spi ambarella-spi.0: ambarella SPI Controller 0 created
<5>[ 0.321322] ambarella-i2c ambarella-i2c.0: Ambarella Media Processor I2C adapter[i2c-0] probed!
<5>[ 0.322904] ambarella-i2c ambarella-i2c.1: Ambarella Media Processor I2C adapter[i2c-1] probed!
<6>[ 0.324362] i2c i2c-0: Added multiplexed i2c bus 2
<6>[ 0.324404] ambarella-i2cmux ambarella-i2cmux.0: mux on ambarella-i2c adapter
<6>[ 0.327393] Advanced Linux Sound Architecture Driver Version 1.0.23.
<6>[ 0.331484] cfg80211: Calling CRDA to update world regulatory domain
<6>[ 0.333165] Switching to clocksource ambarella-cs-timer
<6>[ 0.340204] Switched to NOHz mode on CPU #0
<6>[ 0.397877] NET: Registered protocol family 2
<6>[ 0.398237] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>[ 0.399154] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
<6>[ 0.399359] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
<6>[ 0.399505] TCP: Hash tables configured (established 4096 bind 4096)
<6>[ 0.399526] TCP reno registered
<6>[ 0.399553] UDP hash table entries: 256 (order: 0, 4096 bytes)
<6>[ 0.399600] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
<6>[ 0.400227] NET: Registered protocol family 1
<6>[ 0.401146] RPC: Registered udp transport module.
<6>[ 0.401183] RPC: Registered tcp transport module.
<6>[ 0.401203] RPC: Registered tcp NFSv4.1 backchannel transport module.
<6>[ 0.401726] Trying to unpack rootfs image as initramfs...
<6>[ 0.404350] rootfs image is not initramfs (no cpio magic); looks like an initrd
<6>[ 0.438502] Freeing initrd memory: 4096K
<0>[ 0.441556] [ kernel version: svn-84868 ]
<4>[ 0.441662] mmc0 power register success!
<4>[ 0.441706] mmc1 power register success!
<6>[ 0.441844] reboot times :1
<6>[ 0.465043] msgmni has been set to 186
<6>[ 0.473765] alg: No test for stdrng (krng)
<6>[ 0.473927] io scheduler noop registered
<6>[ 0.473957] io scheduler deadline registered
<6>[ 0.474136] io scheduler cfq registered (default)
<6>[ 0.477894] ambarella-fb ambarella-fb.0: probe p[720x480] v[720x576] c[1] b[0] l[736] @ [0xc5980000:0x00068000]!
<6>[ 0.479757] ambarella-uart.0: ttyS0 at MMIO 0x70005000 (irq = 9) is a ambuart
<6>[ 0.516524] brd: module loaded
<6>[ 0.531070] loop: module loaded
<6>[ 0.534694] NAND device: Manufacturer ID: 0x98, Chip ID: 0xd1 (Toshiba NAND 128MiB 3,3V 8-bit)
<4>[ 0.534741] ambarella_nand_config_flash: 0x02e00140, 0x02c00140
<7>[ 0.535168] Bad block table found at page 65472, version 0x01
<7>[ 0.535697] Bad block table found at page 65408, version 0x01
<6>[ 0.541617] ambarella-nand ambarella-nand: ambarella_nand_probe: Partition infomation found!
<5>[ 0.541684] Creating 18 MTD partitions on "ambnand":
<5>[ 0.541721] 0x000000000000-0x000000020000 : "bst"
<5>[ 0.545986] 0x000000020000-0x000000120000 : "ptb"
<5>[ 0.549812] 0x000000120000-0x000000220000 : "bld"
<5>[ 0.553894] 0x000000220000-0x000000320000 : "hal"
<5>[ 0.557797] 0x000000320000-0x000000420000 : "ano_ptb"
<5>[ 0.561728] 0x000000420000-0x0000004a0000 : "env"
<5>[ 0.566022] 0x0000004a0000-0x000000520000 : "param"
<5>[ 0.570068] 0x000000520000-0x000000620000 : "dpt"
<5>[ 0.574448] 0x000000620000-0x000001020000 : "rcvy"
<5>[ 0.578666] 0x000001020000-0x000001820000 : "krn_pri"
<5>[ 0.582585] 0x000001820000-0x000002020000 : "krn_sec"
<5>[ 0.586845] 0x000002020000-0x000002420000 : "rmd_pri"
<5>[ 0.590851] 0x000002420000-0x000002820000 : "rmd_sec"
<5>[ 0.595217] 0x000002820000-0x000004020000 : "app_pri"
<5>[ 0.599376] 0x000004020000-0x000005820000 : "app_sec"
<5>[ 0.603857] 0x000005820000-0x000005c20000 : "cfg_pri"
<5>[ 0.608018] 0x000005c20000-0x000006020000 : "cfg_sec"
<5>[ 0.612352] 0x000006020000-0x000007020000 : "dbg"
<6>[ 0.623975] PPP generic driver version 2.4.2
<6>[ 0.625394] PPP Deflate Compression module registered
<6>[ 0.625435] PPP BSD Compression module registered
<6>[ 0.819917] Ambarella MII Bus: probed
<5>[ 0.821609] ambarella-eth ambarella-eth.0: MAC Address[c4:2f:90:45:d7:e1].
<6>[ 0.822358] console [netcon0] enabled
<6>[ 0.822387] netconsole: network logging started
<6>[ 0.824191] mousedev: PS/2 mouse device common for all mice
<6>[ 0.825262] input: AmbInput as /devices/virtual/input/input0
<6>[ 0.826307] ambarella_gpio_irq_set_wake: irq[75] = girq[11] = 1
<5>[ 0.826352] ambarella-input ambarella-input: AmbInput probed!
<5>[ 0.827390] ambarella-adc ambarella-adc: ADC Host Controller [polling mode] probed!
<6>[ 0.829086] ambarella-rtc ambarella-rtc: rtc core: registered ambarella-rtc as rtc0
<6>[ 0.829684] i2c /dev entries driver
<5>[ 0.834826] ambarella-wdt ambarella-wdt: Ambarella Media Processor Watch Dog Timer[ambarella-wdt].
<6>[ 0.841611] ALSA device list:
<6>[ 0.841645] No soundcards found.
<6>[ 0.841825] Netfilter messages via NETLINK v0.30.
<6>[ 0.842029] nf_conntrack version 0.5.0 (1488 buckets, 5952 max)
<6>[ 0.842695] ip_tables: (C) 2000-2006 Netfilter Core Team
<6>[ 0.842870] TCP cubic registered
<6>[ 0.843601] NET: Registered protocol family 10
<6>[ 0.846176] Mobile IPv6
<6>[ 0.846313] ip6_tables: (C) 2000-2006 Netfilter Core Team
<6>[ 0.846576] IPv6 over IPv4 tunneling driver
<6>[ 0.850454] NET: Registered protocol family 17
<6>[ 0.851281] sctp: Hash tables configured (established 4096 bind 8192)
<7>[ 0.851634] sctp: sctp_init_sock(sk: c58d7b20)
<6>[ 0.851759] lib80211: common routines for IEEE802.11 drivers
<7>[ 0.851791] lib80211_crypt: registered algorithm 'NULL'
<6>[ 0.856205] ambarella-rtc ambarella-rtc: setting system clock to 2015-12-29 22:28:53 UTC (1451428133)
<5>[ 0.857056] RAMDISK: gzip image found at block 0
<4>[ 1.642713] VFS: Mounted root (ext2 filesystem) on device 1:0.
<6>[ 1.642925] Freeing init memory: 148K
<5>[ 3.692348] UBI: attaching mtd13 to ubi1
<5>[ 3.692389] UBI: physical eraseblock size: 131072 bytes (128 KiB)
<5>[ 3.692416] UBI: logical eraseblock size: 129024 bytes
<5>[ 3.692436] UBI: smallest flash I/O unit: 2048
<5>[ 3.692453] UBI: sub-page size: 512
<5>[ 3.692471] UBI: VID header offset: 512 (aligned 512)
<5>[ 3.692490] UBI: data offset: 2048
<5>[ 3.752334] UBI: max. sequence number: 400
<5>[ 3.773412] UBI: attached mtd13 to ubi1
<5>[ 3.773445] UBI: MTD device name: "app_pri"
<5>[ 3.773466] UBI: MTD device size: 24 MiB
<5>[ 3.773484] UBI: number of good PEBs: 192
<5>[ 3.773499] UBI: number of bad PEBs: 0
<5>[ 3.773515] UBI: number of corrupted PEBs: 0
<5>[ 3.773530] UBI: max. allowed volumes: 128
<5>[ 3.773546] UBI: wear-leveling threshold: 4096
<5>[ 3.773561] UBI: number of internal volumes: 1
<5>[ 3.773577] UBI: number of user volumes: 1
<5>[ 3.773592] UBI: available PEBs: 0
<5>[ 3.773607] UBI: total number of reserved PEBs: 192
<5>[ 3.773624] UBI: number of PEBs reserved for bad PEB handling: 2
<5>[ 3.773644] UBI: max/mean erase counter: 77/45
<5>[ 3.773659] UBI: image sequence number: 902162140
<5>[ 3.778064] UBI: background thread "ubi_bgt1d" started, PID 630
<5>[ 3.862286] UBIFS: recovery needed
<5>[ 3.886942] UBIFS: recovery completed
<5>[ 3.886990] UBIFS: mounted UBI device 1, volume 0, name "app_pri"
<5>[ 3.887021] UBIFS: file system size: 22837248 bytes (22302 KiB, 21 MiB, 177 LEBs)
<5>[ 3.887051] UBIFS: journal size: 1161216 bytes (1134 KiB, 1 MiB, 9 LEBs)
<5>[ 3.887074] UBIFS: media format: w4/r0 (latest is w4/r0)
<5>[ 3.887093] UBIFS: default compressor: lzo
<5>[ 3.887111] UBIFS: reserved for root: 1078659 bytes (1053 KiB)
<5>[ 7.199884] UBI: attaching mtd15 to ubi3
<5>[ 7.199927] UBI: physical eraseblock size: 131072 bytes (128 KiB)
<5>[ 7.199952] UBI: logical eraseblock size: 129024 bytes
<5>[ 7.199970] UBI: smallest flash I/O unit: 2048
<5>[ 7.199986] UBI: sub-page size: 512
<5>[ 7.200003] UBI: VID header offset: 512 (aligned 512)
<5>[ 7.200023] UBI: data offset: 2048
<5>[ 7.208757] UBI: max. sequence number: 117
<5>[ 7.232283] UBI: attached mtd15 to ubi3
<5>[ 7.232316] UBI: MTD device name: "cfg_pri"
<5>[ 7.232340] UBI: MTD device size: 4 MiB
<5>[ 7.232357] UBI: number of good PEBs: 32
<5>[ 7.232373] UBI: number of bad PEBs: 0
<5>[ 7.232388] UBI: number of corrupted PEBs: 0
<5>[ 7.232404] UBI: max. allowed volumes: 128
<5>[ 7.232420] UBI: wear-leveling threshold: 4096
<5>[ 7.232436] UBI: number of internal volumes: 1
<5>[ 7.232451] UBI: number of user volumes: 1
<5>[ 7.232466] UBI: available PEBs: 0
<5>[ 7.232481] UBI: total number of reserved PEBs: 32
<5>[ 7.232499] UBI: number of PEBs reserved for bad PEB handling: 2
<5>[ 7.232519] UBI: max/mean erase counter: 118/100
<5>[ 7.232534] UBI: image sequence number: 420224134
<5>[ 7.240774] UBI: background thread "ubi_bgt3d" started, PID 641
<5>[ 7.316076] UBIFS: recovery needed
<5>[ 7.372303] UBIFS: recovery completed
<5>[ 7.372350] UBIFS: mounted UBI device 3, volume 0, name "cfg_pri"
<5>[ 7.372378] UBIFS: file system size: 2193408 bytes (2142 KiB, 2 MiB, 17 LEBs)
<5>[ 7.372404] UBIFS: journal size: 1032193 bytes (1008 KiB, 0 MiB, 6 LEBs)
<5>[ 7.372428] UBIFS: media format: w4/r0 (latest is w4/r0)
<5>[ 7.372448] UBIFS: default compressor: lzo
<5>[ 7.372465] UBIFS: reserved for root: 103599 bytes (101 KiB)
<5>[ 7.458358] UBI: attaching mtd16 to ubi4
<5>[ 7.458401] UBI: physical eraseblock size: 131072 bytes (128 KiB)
<5>[ 7.458426] UBI: logical eraseblock size: 129024 bytes
<5>[ 7.458445] UBI: smallest flash I/O unit: 2048
<5>[ 7.458461] UBI: sub-page size: 512
<5>[ 7.458479] UBI: VID header offset: 512 (aligned 512)
<5>[ 7.458497] UBI: data offset: 2048
<5>[ 7.467116] UBI: max. sequence number: 118
<5>[ 7.490575] UBI: attached mtd16 to ubi4
<5>[ 7.490609] UBI: MTD device name: "cfg_sec"
<5>[ 7.490634] UBI: MTD device size: 4 MiB
<5>[ 7.490650] UBI: number of good PEBs: 32
<5>[ 7.490665] UBI: number of bad PEBs: 0
<5>[ 7.490681] UBI: number of corrupted PEBs: 0
<5>[ 7.490696] UBI: max. allowed volumes: 128
<5>[ 7.490712] UBI: wear-leveling threshold: 4096
<5>[ 7.490727] UBI: number of internal volumes: 1
<5>[ 7.490743] UBI: number of user volumes: 1
<5>[ 7.490758] UBI: available PEBs: 0
<5>[ 7.490773] UBI: total number of reserved PEBs: 32
<5>[ 7.490790] UBI: number of PEBs reserved for bad PEB handling: 2
<5>[ 7.490809] UBI: max/mean erase counter: 106/102
<5>[ 7.490825] UBI: image sequence number: 575997899
<5>[ 7.493385] UBI: background thread "ubi_bgt4d" started, PID 651
<5>[ 7.574198] UBIFS: recovery needed
<5>[ 7.617379] UBIFS: recovery completed
<5>[ 7.617430] UBIFS: mounted UBI device 4, volume 0, name "cfg_sec"
<5>[ 7.617457] UBIFS: file system size: 2193408 bytes (2142 KiB, 2 MiB, 17 LEBs)
<5>[ 7.617484] UBIFS: journal size: 1032193 bytes (1008 KiB, 0 MiB, 6 LEBs)
<5>[ 7.617508] UBIFS: media format: w4/r0 (latest is w4/r0)
<5>[ 7.617527] UBIFS: default compressor: lzo
<5>[ 7.617544] UBIFS: reserved for root: 103599 bytes (101 KiB)
<5>[ 8.808604] net eth0: Could not find default PHY in 9.
<5>[ 8.808646] net eth0: Try PHY[3] whose id is 0x001cc816!
<6>[ 8.812035] ADDRCONF(NETDEV_UP): eth0: link is not ready
<6>[ 10.803635] PHY: 0:03 - Link is Up - 100/Full
<6>[ 10.803853] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
<4>[ 16.457726] dsp: module license 'Proprietary' taints kernel.
<4>[ 16.457765] Disabling lock debugging due to kernel taint
<4>[ 16.536940] img: aaa_fifo2_base malloc c2a50000
<4>[ 16.958056] >>>>>> DSP LOG ADDR START PHY 0xc0080000
<7>[ 16.958092] Init software HR timer for DSP communication
<6>[ 16.987980] cdev_init rs485_fops ...
<6>[ 16.988034] adding uart1, minor = 0
<6>[ 16.991602] Successfully insmod uart232 module!
<6>[ 17.134411] amba_debug_init 248:248.
<7>[ 21.433316] eth0: no IPv6 routers present
<6>[ 31.841654] AMBARELLA SoC Audio DUMMY Codec
<6>[ 31.843179] asoc: AMBARELLA_DUMMY_CODEC <-> ambarella-i2s.0 mapping ok
<4>[ 32.178275] ========== SD Driver Build Date: Nov 7 2014, Time: 13:45:54 ==========
<6>[ 32.178468] SD card slot0 + slot1, card detect mode:HW
<5>[ 32.178717] ambarella-sd ambarella-sd.0: Slot0 use bounce buffer[0xc1460000<->0xc1660000]
<5>[ 32.178760] ambarella-sd ambarella-sd.0: Slot0 req_size=131072, segs=32, seg_size=131072
<5>[ 32.178932] ambarella-sd ambarella-sd.0: Slot1 use bounce buffer[0xc1500000<->0xc1700000]
<5>[ 32.178968] ambarella-sd ambarella-sd.0: Slot1 req_size=131072, segs=32, seg_size=131072
<5>[ 32.263550] ambarella-sd ambarella-sd.0: Ambarella SD/MMC[0] probed 2 slots, 0x09e130b0!
<4>[ 32.882596] MT9T002 sensor ID is 0x2604
<6>[ 32.933436] CMEMK module: built on Aug 23 2012 at 17:05:43
<6>[ 32.933483] Reference Linux version 2.6.38
<6>[ 32.933502] File /mnt/data_bsp/data_yuhuanhuan/raptor/a5s_svn2/kernel/hik_drivers/cmem/src/module/cmemk.c
<6>[ 32.941028] cmemk initialized

Both of which are near identical (not surprising really)

netstat...

# netstat -ntla
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 :::22 :::* LISTEN

Even with the device booted and with me SSHed in, I get no response from the SADPtool. I can see it broadcasting on the network, but it never gets a reply.
 
Ok, loaded 5.3.0 on, which seems to have a different way of launching davinci. The password in this case is not even set, but you do need to wait a little bit before connecting using SSH or it will insist the password is incorrect (even when it isn't).
Needed to hack the startup script to get rid of that awful psh thing too.

Sadly still nothing useful from any of the debug logs, turns out davinci seems to be logging via daemon_fsp_app somehow, but I'm still getting the same issue with it sticking just after trying to init the video device.

sinkid 1
<config_vout_flip> rotate_type 0
<DspThrd> DBG:#######vout enable 1
init_vout0 done
bsb_mem = 0x43f3c000, size = 0x400000
<VidThrd> DBG:Stream [0] change frame rate 1/25
h264 main profile !
<VidThrd> DBG:Stream [1] change frame rate 25/25
h264 main profile !
<VidThrd> DBG:Stream [2] change frame rate 25/25
davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param


davinci receive cmd_query_davinci_param.
S: cmd_query_davinci_param


davinci receive cmd_query_davinci_param.
 
I know you said it's non-grey import but I would try TFTPing Chinese to it. If that works where English doesn't I think you've found the problem.

Might not work obviously but it's another thing to try.
 
I'll give the chinese firmwares a run in a few hours to see if it gets anything out of the camera. Sadly I'm not holding particularly high hopes, and without some sort of more detailed error messages from the unit as to why it just stops, I'm a bit stuck for what else to do...
 
No luck with the chinese firmware, it wouldn't even load successfully, so I'm guessing its failing a checksum somewhere instead. Loading EN firmware works perfectly however. Going to try the earliest version of firmware I can find to see if it will give me further debug information.
 
No luck with the chinese firmware, it wouldn't even load successfully, so I'm guessing its failing a checksum somewhere instead. Loading EN firmware works perfectly however. Going to try the earliest version of firmware I can find to see if it will give me further debug information.

Gone back to 5.2.0 firmware again, as 5.3.0 was more restrictive. Does anyone know what the t1 utility on the camera does? It appears to be some sort of testing software, but putty doesn't handle chinese fonts at all well, so I have no idea what the tests actually do. Anyone care to investigate?
 
Interesting, running the t1 application and fumbling through unknown menus, I got the following:

# t1
**************************************************
* HIKVISION IPC ▒▒▒▒▒▒Գ▒▒▒ *
**************************************************


BUILD: Jun 13 2014-13:18:18
T1 test menu:
[0] ▒▒▒▒▒▒▒▒▒▒▒▒
[1] ▒▒▒Ա▒▒▒(һ▒▒һ▒▒)
[2] ▒▒▒Ա▒▒▒(▒▒▒▒▒▒▒)
[3] ▒▒▒▒RS485
[4] ▒▒▒▒RTCʱ▒▒
[5] ▒▒▒▒ǹ▒▒IRCUT▒▒▒▒▒▒▒▒ƶ▒
[6] ▒▒▒▒ǹ▒▒IRCUT▒▒▒▒▒▒ƶ▒
[7] ▒▒▒▒ǹ▒▒IRCUT▒▒▒▒▒▒ƶ▒
[8] ▒▒▒԰▒▒▒IRCUT▒▒▒▒▒▒▒▒ƶ▒
[9] ▒▒▒԰▒▒▒IRCUT▒▒▒▒▒▒ƶ▒
[a] ▒▒▒԰▒▒▒IRCUT▒▒▒▒▒▒ƶ▒
▒▒▒Ը▒λǰ▒▒оƬ▒▒▒
[c] ▒▒▒Իָ▒▒豸ȱʡ▒▒▒▒▒▒▒
[d] ▒▒▒▒SDӲ▒▒
[n] ▒▒ȡһЩ▒豸▒▒Ϣ
[h] ▒▒▒▒˵▒
[q] ▒˳▒▒▒▒


▒▒ѡ▒▒▒▒▒▒▒(Ĭ▒▒ֵ=0): n
<T1> ERR:▒▒▒▒▒▒Ϣ▒▒ǰ▒▒▒▒▒▒▒▒▒÷Ƿ▒,ȷ▒▒▒▒ȷ▒▒▒ boot_parms.videoinType=21.
<T1> DBG:▒豸ǰ▒▒▒▒▒▒=0
<T1> DBG:▒豸▒Ƿ▒֧▒ֺ▒▒▒(1:֧▒֡▒0:▒▒֧▒▒)=1
<T1> DBG:▒豸▒Ƿ▒֧▒ֵ綯▒▒ͷ▒▒▒▒=0
<T1> DBG:▒豸▒Ƿ▒wifi(1:֧▒֡▒0:▒▒֧▒▒)=0
<T1> DBG:▒豸▒Ƿ▒֧▒▒▒▒Ƶ(1:֧▒֡▒0:▒▒֧▒▒)=0
<T1> DBG:▒豸▒Ƿ▒֧▒ֱ▒▒▒▒▒▒(1:֧▒֡▒0:▒▒֧▒▒)=0

I wonder what that error boot parameter is about?

EDIT:
Turns out all the cameras have it, working or not. Apparently unrelated.
 
Last edited by a moderator:
Perhaps a 'language mismatch', which isn't always noted, especially at the web GUI.
If so, Hiktools 'lang' option is your friend. https://www.ipcamtalk.com/showthrea...anguage-extract-files-and-create-own-firmware

I suspect it isn't a language issue, davinci never even gets to the point of running the services for webgui (or anything else for that matter).

One of the clear differentiators between the working cameras and the dead one is the amount of ram davinci uses. On functional cameras it sits around 387-400mb of ram, whereas on the dead camera it only uses 187mb. It doesn't seem to be initialising the actual video streams.

At this point I'm pretty much resigned to having to pull the camera down and figure out if there is something physically wrong with it, prior to RMAing it. Hikvision have remained uncommunicative, and apparently have no diagnostic tools to help me out. I suspect it is more likely they don't want to help.
 
No luck with the chinese firmware, it wouldn't even load successfully, so I'm guessing its failing a checksum somewhere instead.
I was referring to this with the comment about a potential language mismatch.

On functional cameras it sits around 387-400mb of ram
I don't know where you are getting this, as the cameras don't have that much RAM.
# free
total used free shared buffers
Mem: 95436 79516 15920 0 296
-/+ buffers: 79220 16216
Swap: 0 0 0
#
 
The clue is in the virtual memory :P

# cat /proc/meminfo
MemTotal: 95436 kB
MemFree: 15260 kB
Buffers: 528 kB
Cached: 51508 kB
SwapCached: 0 kB
Active: 23132 kB
Inactive: 33960 kB
Active(anon): 5056 kB
Inactive(anon): 76 kB
Active(file): 18076 kB
Inactive(file): 33884 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 16 kB
Writeback: 0 kB
AnonPages: 5084 kB
Mapped: 3788 kB
Shmem: 76 kB
Slab: 9328 kB
SReclaimable: 2044 kB
SUnreclaim: 7284 kB
KernelStack: 616 kB
PageTables: 720 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 47716 kB
Committed_AS: 37428 kB
VmallocTotal: 376832 kB
VmallocUsed: 41760 kB
VmallocChunk: 321532 kB


718 root 0 DW [encode_guard]
826 root 6404 S /home/process/daemon_fsp_app
830 root 1908 S /bin/execSystemCmd
831 root 10692 S /home/process/net_process
840 root 187m D /home/davinci
846 root 0 SW [flush-ubifs_1_0]
847 root 0 SW [flush-ubifs_3_0]
848 root 0 SW [flush-ubifs_4_0]
852 root 2856 S /sbin/dropbear


For the functional unit however...

MemTotal: 95436 kB
MemFree: 4292 kB
Buffers: 532 kB
Cached: 51816 kB
SwapCached: 0 kB
Active: 33692 kB
Inactive: 33640 kB
Active(anon): 14984 kB
Inactive(anon): 108 kB
Active(file): 18708 kB
Inactive(file): 33532 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 16 kB
Writeback: 0 kB
AnonPages: 15012 kB
Mapped: 7184 kB
Shmem: 108 kB
Slab: 9300 kB
SReclaimable: 2068 kB
SUnreclaim: 7232 kB
KernelStack: 1160 kB
PageTables: 996 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 47716 kB
Committed_AS: 254432 kB
VmallocTotal: 376832 kB
VmallocUsed: 41760 kB
VmallocChunk: 321532 kB






716 root 0 DW [encode_guard]
824 root 6404 S /home/process/daemon_fsp_app
828 root 1908 S /bin/execSystemCmd
829 root 15056 S /home/process/net_process
838 root 398m S {main} /home/davinci
844 root 0 SW [flush-ubifs_1_0]
845 root 0 SW [flush-ubifs_3_0]
846 root 0 SW [flush-ubifs_4_0]
878 root 0 SW [kworker/u:2]
965 root 2856 S /sbin/dropbear

In essence, ps w gives somewhat misleading results. The result it gives is actually the VmPeak memory value.

Speaking of /proc/process/blah I remembered to do a cat /proc/838/stack for the good camera and cat /proc/840/stack for the bad, as follows:

# cd /proc/838
# cat stack
[<c0067f20>] hrtimer_nanosleep+0xa0/0x120
[<c0068034>] sys_nanosleep+0x94/0xb0
[<c002df20>] ret_fast_syscall+0x0/0x30
[<ffffffff>] 0xffffffff

Working as normal...




# cd /proc/840
# cat stack
[<bf038498>] wait_dsp_state+0x8c/0xa0 [iav]
[<bf03afa0>] iav_enable_preview+0x42c/0x7bc [iav]
[<bf03fa34>] __iav_encode_ioctl+0x3d4/0x29d0 [iav]
[<bf035a64>] iav_ioctl+0x77c/0xaf4 [iav]
[<c00c2dcc>] vfs_ioctl+0x2c/0x48
[<c00c390c>] do_vfs_ioctl+0x538/0x58c
[<c00c39a0>] sys_ioctl+0x40/0x64
[<c002df20>] ret_fast_syscall+0x0/0x30
[<ffffffff>] 0xffffffff

Not working.

If I'm reading it right, it looks like the not working camera is stuck waiting for the preview to activate, but the correct state is never being reached?