Pearl from the flea market or reverse engineering of the DCS-5220A1 IP camera

The summer ended well, which means it is time to leave their homes, native summer cooperatives and flocks to go to the city. Everything would be fine, but somehow it is scary to leave farming for as many as six months unattended. I asked myself a similar question. As a result, I decided to equip the site with a simple set of a webcam and Internet access (most likely 3G). He started, as usual, from a small one - with a search for a suitable budget camera. My budget was about $ 20.


Something normal could not get into this amount, in principle, so there were options like “DIR-320 + openwrt + UVC camera from a laptop” sealed in a sealed plastic bag and suspended from wood. But one evening I was browsing through ads of the local flea market and came across the sale of the D-link DCS-5220A1 IP camera, and also the PTZ function for some funny $ 10. For those who do not know, give an excerpt from Wikipedia
Pan-tilt-zoom-camera (PTZ-camera) - a camera that supports remote control of the direction and zoom. PTZ is an abbreviation of pan, tilt and zoom (pan, tilt, zoom), which describes how to control the camera.
Yes, alert. But the toad overpowered, and self-confidence echoed her (“really, we won’t figure it out ?!”). The camera turned out to be old, but with an excellent light-sensitive sensor (just what is needed to observe the situation in the evening). Solved and the camera on my desk.



First [+]:

  1. Elegant night sensitivity (without any infrared illumination) - 0.5 Lux @ f1.4
  2. PTZ (although the zoom is only digital)
  3. WiFi is implemented by miniPCI RT2560F card. Aliexpress can already find 802.11n (for example AR9160 , replace and drive the video stream in maximum quality (the camera supports mpeg4 and H.263)
  4. Supports RTSP, HTTP, etc.
  5. UPnP support
  6. Gold was not spared a fee, the layer on all contacts is capital.
  7. On board your web server. And the system is based on linux, because even some source codes are uploaded . However, initially it was not possible to get through to either SSH or telnet.

Then noticed [-]:

  1. The maximum resolution is 640x480. The camera, apparently hellish (immediately thought that generally connected by lvds, the connector is very similar.
  2. Difficulties with the primary connection. The camera connects to the computer _ only through a hub_ or a crossover cable. And no one knows what the IP address.

It should be immediately noted that on the Internet about my particular information model there was a scanty amount - a page on the d-link website and that's it. So I decided first of all to open the case, the benefit was kept on all three screws. By the way, the presence of a standard mount for a photo pole (1/4 ") on the bottom of the case seemed to me sweet. In general, after removing the cover, I saw the following picture:


Pictures with captions of elements



Photos with the author's notes, it gives about the past to know the cell repair shop. All the time you make yourself solutions for the case of the arrival of a similar model :). Having a good look at the board, I collected everything back and decided to see how the camera would work with the native software (since I could download some huge packages from the d-link server).

Despite carefully studying the first Russian, then the English manual, I did not understand how to find the camera. I had to search the mezzanine for an old hub, connect a camera to it, install wireshark and listen to ethernet. Listening gave the ip-address "192.168.0.99". Having scored it in the manual settings of the d-link Network Camera Installation program, the camera picked up. To work with such a camera, another utility from d-link D-ViewCam is intended. It also had to enter the address manually, the camera showed up and I was even able to check the operation of the PTZ. The camera is really well controlled and goes right-left / up-down with a resolution of "one gear of the gear wheel" :). The truth is constantly clicking a little tiring.

Googling, I found the document " URL command for DCS-5220, DCS-2120"where it is written that you can control the camera with the command: http: ///cgi-bin/camctrl.cgi? [move =] [& speedpan =] [& speedtilt =], where value = up / down / left / right / home + - 5 - for a step in one gear of the drive gear.
In principle, it seems like everything should have been, but the worm of doubt did not give rest. Unix is ​​on board, well, what a web interface. After looking at analog cameras and reading forum.openwrt.org A vulnerability was discovered that allows a web request to enable telnet in the camera. All that was needed for this was to write it in the browser's line
http: // <camera address> /cgi/admin/telnetd.cgi?command=on

After finishing work with the camera, I strongly recommend turning off the telnet, this is done in a similar way, via a request
http: // <camera address> /cgi/admin/telnetd.cgi?command=off

In the net result, the telnet session gave far more answers than all the official sites (and even the official Telegram channel :)) combined. Below is information about the hardware features of this camera, collected via telnet and UART console:

Dmesg output
~ $ dmesg
Linux version 2.4.26-vrs1 (root@rd1-1) (gcc version 3.3.2) #1742 Fri Jul 20 09:20:51 CST 2007
CPU: FA526id(wb) revision 1
Machine: Vivotek VVTK1000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 6144
zone(0): 6144 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw initrd=0x800000,4194304 mem=24M ahbclk=110592000 pciclk=27648000
Relocating machine vectors to 0xffff0000
IRQ timer at interrupt number 0x08 clock 55296000
Calibrating delay loop... 136.80 BogoMIPS
Memory: 24MB = 24MB total
Memory: 18172KB available (1496K code, 430K data, 68K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xf9890000 (irq = 3) is a NULL
ttyS01 at 0xf98b0000 (irq = 4) is a NULL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VVTK1000 flash device: 800000 at 10000000
init_vvtk1000_flash_map() -- type: cfi_probe
VVTK1000 flash: Found 1 x16 devices at 0x0 in 8-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Using VVTK1000 partition definition
Creating 2 MTD partitions on "VVTK1000 flash":
0x00000000-0x00600000 : "kernel"
0x00600000-0x00800000 : "jffs2"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 68K
IRQ UART at interrupt number 0x3
WDT device driver version 1.0.0.1
GPIOI2C device driver version 1.0.0.5
RTC device driver version 1.0.0.1
GPIO Device Driver version 1.1.0.0.
I2C slave device driver version 1.1.0.0. (H/W Rev. 0x10500)
Queue driver installed !!
MTR device driver version 1.0.0.4
I2S w UDA1345TS driver v 1.1.0.1. Copyright 2004 Vivotek, Inc.
i2s_intc_value: 0x0000a431
i2s_intc_value: 0x0000a431
hwinfo 1.1.0.0 initialized.
CFC Device Driver version 1.0.0.0.
VVDC_Clk_init_module: VVDC Clock Delay is 0x00503030.
VVDC_Clk_cleanup_module: Module removed ok!
8139too Fast Ethernet driver 0.9.26
eth0: RealTek RTL8139 at 0xc28b7000, 00:ab:cd:ab:cd:ef, IRQ 1
eth0: Identified 8139 chip type 'RTL-8100B/8139D'
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
enable_irq(31) unbalanced from c2880b18
enable_irq(29) unbalanced from c288639c
enable_irq(30) unbalanced from c2884330
enable_irq(7) unbalanced from c2896c54
upnpdd: unhandled page fault at pc=0x0000c840, lr=0xbf7ffd40 (bad address=0xdf7ffcbc, code 5)
pc : [0000c840] lr : [bf7ffd40] Tainted: P
sp : bf7ffc54 ip : 07ffffff fp : 0001bec0
r10: 000170e8 r9 : 00000000 r8 : 00002802
r7 : 00017550 r6 : 00000000 r5 : df7ffd3c r4 : 00000001
r3 : 00000020 r2 : 00000040 r1 : 00000006 r0 : bf7ffd40
Flags: nzCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00B0C000 DAC: 00000015


Df output -h
~ # df -h
Filesystem Size Used Available Use% Mounted on
/dev/ramdisk 4.9M 4.7M 0 100% /
/dev/mtdblock1 2.0M 896.0k 1.1M 44% /mnt/flash
none 10.0M 16.0k 10.0M 0% /mnt/ramdisk


Ps ax output
~ $ ps ax
PID Uid VmSize Stat Command
1 root 344 S init
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
7 root SW [mtdblockd]
30 root SWN [jffs2_gcd_mtd1]
80 root 260 S /sbin/watchdog 60 5
89 root 200 S /usr/sbin/hresetd /dev/gpio4
179 root 320 S /sbin/syslogd -m 0 -o 64000
196 root 336 S /usr/sbin/drmd
198 root 336 S /usr/sbin/drmd
199 root 336 S /usr/sbin/drmd
233 root 312 S /usr/sbin/inetd /etc/inetd.conf
254 root 316 S /usr/sbin/urecorder
265 root 320 S /usr/sbin/smbrecorder
288 root 260 S /usr/sbin/swatchdog -t 60 -p /var/run/swatchdog.farseer.pid -a /usr/bin/soft-reboot-bg
293 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
294 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
296 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
297 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
298 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
299 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
300 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
321 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
322 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
323 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
329 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
330 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
337 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
338 root 2716 S /usr/sbin/farseer.out -d -c /tmp/farseer.fifo
354 root 372 S /usr/sbin/crond -l 0
435 root 188 S /usr/sbin/ledctrl /dev/cfc2 1000000
454 root 836 S /bin/sh /usr/bin/detectnet
458 root 364 S /sbin/getty -L ttyS0 38400 vt100
21042 root 372 S telnetd
21045 admin 440 S -sh
21207 root Z [sh]
21208 root 268 S sleep 2
21212 admin 364 R ps ax


Ls / dev / output
~ $ ls /dev/
cfc0 dsp0 gpio2 gpio_i2c hda13 hda4 i2c mtd0 ptmx ptyp4 ram2 stdin tty1 tty7 ttyp1 ttyp7 watchdog
cfc1 dsp1 gpio3 hda hda14 hda5 i2c_slave mtd1 pts ptyp5 ram3 stdout tty2 ttyAM0 ttyp2 urandom wdt
cfc2 fd gpio4 hda1 hda15 hda6 i2s mtdblock1 ptyp0 ptyp6 ramdisk tracer tty3 ttyAM1 ttyp3 vma_ae zero
cmmap gpio gpio5 hda10 hda16 hda7 log mtr1 ptyp1 ptyp7 random tracerU tty4 ttyS0 ttyp4 vma_be
console gpio0 gpio6 hda11 hda2 hda8 mem null ptyp2 ram0 rtc tty tty5 ttyS1 ttyp5 vma_me
dsp gpio1 gpio7 hda12 hda3 hda9 mmap ppp ptyp3 ram1 stderr tty0 tty6 ttyp0 ttyp6 vma_vpe


Lsmod output
~ $ lsmod
Module Size Used by Tainted: P
8139too 12460 1
mii 2344 0 [8139too]
cfc 1264 1
hwinfo 2200 0 (unused)
vaudio 4112 1
motor 5424 1
mmap 1136 1
cmmap 1128 1
vma_ae 2792 0 (unused)
vma_be 2856 2
vma_me 2616 4
vma_vpe 4040 1
i2c_slave 3304 0 (unused)
gpio 2552 8
rtc 2908 0 (unused)
gpio_i2c 2584 1 [rtc]
wdt 992 1


Uname -a output
uname -a
Linux Network-Camera 2.4.26-vrs1 #1742 Fri Jul 20 09:20:51 CST 2007 armv4l unknown


Output cat / proc / cpuinfo
~ $ cat /proc/cpuinfo
Processor : FA526id(wb) rev 1 (v4l)
BogoMIPS : 136.80
Features : swp half thumb
Hardware : Vivotek VVTK1000
Revision : 0000
Serial : 0000000000000000




UART output
The system is going down NOW
Sending SIGTERM to all processes.
Sending SIGKILL to all processes.
Please stand by while rebooting the system.flushing ide devices:
Restarting system.
ARMboot 1.1.0 (Nov 23 2006 - 17:31:45)
Vivotek EVM version 1.6.0.0 (System:110592000, UART:18432000)
ARMboot code: 00000000 ~ 000355f8
DRAM Configuration:
Bank #0 at 0x10000000 32 MB
Bank #1 at 0x00000000 0 KB
Flash: 8 MB
VVTK1000 PCI Driver for ARMBoot
....Found PCI Device at (0,0,0) ID=0x4321159B
parameter: 68 45 00503030
....Found PCI Device at (11,0,0) ID=0x813910EC
ethaddr: 00:AB:CD:AB:CD:EF
Hit any key to stop autoboot: 1 0
## Booting image at 10020000 ...
Image Name: linux-2.4.26
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2934880 Bytes = 2866 kB = 2 MB
Load Address: 00408000
Entry Point: 00408000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
Uncompressing Linux............................................................. done, booting the kernel.
Linux version 2.4.26-vrs1 (klaymen@rd1-2.vivotek.tw) (gcc version 3.3.2) #1 Mon Oct 20 20:33:14 CST 2008
CPU: FA526id(wb) revision 1
Machine: Vivotek VVTK1000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 6144
zone(0): 6144 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw initrd=0x800000,4194304 mem=24M ahbclk=110592000 pciclk=27648000
IRQ timer at interrupt number 0x08 clock 55296000
Calibrating delay loop... 136.80 BogoMIPS
Memory: 24MB = 24MB total
Memory: 18172KB available (1496K code, 430K data, 68K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xf9890000 (irq = 3) is a NULL
ttyS01 at 0xf98b0000 (irq = 4) is a NULL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VVTK1000 flash device: 800000 at 10000000
init_vvtk1000_flash_map() -- type: cfi_probe
VVTK1000 flash: Found 1 x16 devices at 0x0 in 8-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Using VVTK1000 partition definition
Creating 2 MTD partitions on "VVTK1000 flash":
0x00000000-0x00600000 : "kernel"
0x00600000-0x00800000 : "jffs2"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 68K
IRQ UART at interrupt number 0x3
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Starting pid 10, console /dev/ttyS0: '/etc/init.d/rcS'
ifconfig: Warning: cannot open /proc/net/dev. Limited output.: No such file or directory
ifconfig: eth0: error fetching interface information: Device not found
Using /drivers/wdt.o
WDT device driver version 1.0.0.1
Using /drivers/gpio_i2c.o
GPIOI2C device driver version 1.0.0.5
Using /drivers/rtc.o
RTC device driver version 1.0.0.1
Using /drivers/gpio.o
GPIO Device Driver version 1.1.0.0.
Using /drivers/i2c_slave.o
I2C slave device driver version 1.1.0.0. (H/W Rev. 0x10500)
Using /drivers/vma_vpe.o
Using /drivers/vma_me.o
Queue driver installed !!
Using /drivers/vma_be.o
Using /drivers/vma_ae.o
Using /drivers/cmmap.o
Using /drivers/mmap.o
Using /drivers/motor.o
MTR device driver version 1.0.0.4
Using /drivers/vaudio.o
I2S driver v 1.4.0.1. Copyright 2004 Vivotek, Inc.
for UDA1345
i2s_intc_value: 0x0000a430
i2s_intc_value: 0x0000a430
Using /drivers/hwinfo.o
hwinfo 1.1.0.0 initialized.
Using /drivers/cfc.o
CFC Device Driver version 1.0.0.0.
/etc/init.d/rcS: 44: /mnt/flash/patch/apply_patch: not found
Starting restore: update system configuration...
cp: unable to remove `./etc/rcK.d/K07bootlogger': Success
cp: unable to remove `./etc/rcK.d/K97smbrecord': No such file or directory
cp: unable to remove `./etc/rcK.d/K69upnpdd': No such file or directory
cp: unable to remove `./etc/rcK.d/K94watchdog': No such file or directory
cp: unable to remove `./etc/rcK.d/K44inetd': No such file or directory
cp: unable to remove `./etc/rcK.d/K88sysklogd': No such file or directory
cp: unable to remove `./etc/rcK.d/K09eventd': No such file or directory
cp: unable to remove `./etc/rcK.d/K60ddnsc': No such file or directory
cp: unable to remove `./etc/rcK.d/K67upnpigdcp': No such file or directory
cp: unable to remove `./etc/rcK.d/K20urecorder': No such file or directory
cp: unable to remove `./etc/rcK.d/K95led': No such file or directory
cp: unable to remove `./etc/rcK.d/K05heartbeat': No such file or directory
cp: unable to remove `./etc/rcK.d/K90network': No such file or directory
cp: unable to remove `./etc/rcK.d/K93hresetd': No such file or directory
cp: unable to remove `./etc/rcK.d/K96restore': No such file or directory
cp: unable to remove `./etc/rcK.d/K10farseer': No such file or directory
cp: unable to remove `./etc/rcK.d/K75netfs~': No such file or directory
cp: unable to remove `./etc/rcK.d/K40bbcrond': No such file or directory
cp: unable to remove `./etc/rcK.d/K21smbrecorder': No such file or directory
cp: unable to remove `./etc/rcK.d/K70drmd': No such file or directory
modifying root privilege...
The system is going down NOW !!
The system is going down NOW !!
Starting led: /dev/cfc0 1
Starting watchdog: .
Starting hresetd:
Sendi
Sending SIGKILL to all processes.
Please stand by while rebooting the system.
flushing ide devices:
Restarting system.
ARMboot 1.1.0 (Nov 23 2006 - 17:31:45)
Vivotek EVM version 1.6.0.0 (System:110592000, UART:18432000)
ARMboot code: 00000000 ~ 000355f8
DRAM Configuration:
Bank #0 at 0x10000000 32 MB
Bank #1 at 0x00000000 0 KB
Flash: 8 MB
VVTK1000 PCI Driver for ARMBoot
....Found PCI Device at (0,0,0) ID=0x4321159B
ARMboot 1.1.0 (Nov 23 2006 - 17:31:45)
Vivotek EVM version 1.6.0.0 (System:110592000, UART:18432000)
ARMboot code: 00000000 ~ 000355f8
DRAM Configuration:
Bank #0 at 0x10000000 32 MB
Bank #1 at 0x00000000 0 KB
Flash: 8 MB
VVTK1000 PCI Driver for ARMBoot
....Found PCI Device at (0,0,0) ID=0x4321159B
parameter: 68 45 00503030
....Found PCI Device at (11,0,0) ID=0x813910EC
ethaddr: 00:AB:CD:AB:CD:EF
Hit any key to stop autoboot: 1 0
## Booting image at 10020000 ...
Image Name: linux-2.4.26
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2934880 Bytes = 2866 kB = 2 MB
Load Address: 00408000
Entry Point: 00408000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
Uncompressing Linux............................................................. done, booting the kernel.
Linux version 2.4.26-vrs1 (klaymen@rd1-2.vivotek.tw) (gcc version 3.3.2) #1 Mon Oct 20 20:33:14 CST 2008
CPU: FA526id(wb) revision 1
Machine: Vivotek VVTK1000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 6144
zone(0): 6144 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw initrd=0x800000,4194304 mem=24M ahbclk=110592000 pciclk=27648000
IRQ timer at interrupt number 0x08 clock 55296000
Calibrating delay loop... 136.80 BogoMIPS
Memory: 24MB = 24MB total
Memory: 18172KB available (1496K code, 430K data, 68K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xf9890000 (irq = 3) is a NULL
ttyS01 at 0xf98b0000 (irq = 4) is a NULL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VVTK1000 flash device: 800000 at 10000000
init_vvtk1000_flash_map() -- type: cfi_probe
VVTK1000 flash: Found 1 x16 devices at 0x0 in 8-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Using VVTK1000 partition definition
Creating 2 MTD partitions on "VVTK1000 flash":
0x00000000-0x00600000 : "kernel"
0x00600000-0x00800000 : "jffs2"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 68K
IRQ UART at interrupt number 0x3
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Starting pid 10, console /dev/ttyS0: '/etc/init.d/rcS'
ifconfig: Warning: cannot open /proc/net/dev. Limited output.: No such file or directory
ifconfig: eth0: error fetching interface information: Device not found
Using /drivers/wdt.o
WDT device driver version 1.0.0.1
Using /drivers/gpio_i2c.o
GPIOI2C device driver version 1.0.0.5
Using /drivers/rtc.o
RTC device driver version 1.0.0.1
Using /drivers/gpio.o
GPIO Device Driver version 1.1.0.0.
Using /drivers/i2c_slave.o
I2C slave device driver version 1.1.0.0. (H/W Rev. 0x10500)
Using /drivers/vma_vpe.o
Using /drivers/vma_me.o
Queue driver installed !!
Using /drivers/vma_be.o
Using /drivers/vma_ae.o
Using /drivers/cmmap.o
Using /drivers/mmap.o
Using /drivers/motor.o
MTR device driver version 1.0.0.4
Using /drivers/vaudio.o
I2S driver v 1.4.0.1. Copyright 2004 Vivotek, Inc.
for UDA1345
i2s_intc_value: 0x0000a430
i2s_intc_value: 0x0000a430
Using /drivers/hwinfo.o
hwinfo 1.1.0.0 initialized.
Using /drivers/cfc.o
CFC Device Driver version 1.0.0.0.
/etc/init.d/rcS: 44: /mnt/flash/patch/apply_patch: not found
Starting restore: .
Starting led: /dev/cfc0 1
Starting watchdog: .
Starting hresetd: .
Starting synctime: .
Starting ptburn: .
Starting network: /dev/cfc1 1
Copied 256 bytes from address 0x00002000 in flash to /tmp/pci_scan_dump
Using /drivers/vvdc_clk.o
Warning: loaup0: 00000068
dilow0: 00000045
ngup1: 00000064
vlow1: 0000003f
vdVVDC_Clk_init_module: VVDC Clock Delay is 0x00503030.
c_clk will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
VVDC_Clk_cleanup_module: Module removed ok!
Using /lib/modules/2.4.26-vrs1/kernel/drivers/net/mii.o
Using /lib/modules/2.4.26-vrs1/kernel/drivers/net/8139too.o
8139too Fast Ethernet driver 0.9.26
eth0: RealTek RTL8139 at 0xc28b7000, 00:ab:cd:ab:cd:ef, IRQ 1
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
eth0: negotiated 100baseTx-FD, link ok
Usage: /usr/sbin/setdns dns1 dns2 ... dnsN
/dev/cfc1 0
Starting syslogd: .
run-parts: /etc/rcS.d/S50upnpigdcp exited with return code 1: Success
Starting inetd: .
Starting crond: .
Starting urecorder: .
Starting smbrecorder: .
Stop pan/tilt burning program...Stopping ptburn: no /usr/bin/ptburn found; none killed.
Starting swatchdog: .
Starting farseer.out: enable_irq(31) unbalanced from c2880b18
enable_irq(29) unbalanced from c288639c
enable_irq(30) unbalanced from c2884330
enable_irq(7) unbalanced from c2896c54
Starting ddnsc: DDNS client is disabled
run-parts: /etc/rcS.d/S86ddnsc exited with return code 1: Success
Starting upnpdd: enable 1
Starting drmd: .
Starting eventd: Stopping crond: stopped crond (pid 232).
Starting crond: .
Starting system boot messages: Sending startup log
BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Usage: rm [OPTION]... FILE...
rm: cannot remove `/mnt/ramdisk/eventd./*': No such file or directory
Starting ledctrl: /dev/cfc0 1
Starting smbmount: rm: cannot remove `/var/spool/cron/root-crontabs/smbmount.crontab': No such file or directory
Reloading configuration crond: .
lo no wireless extensions.
eth0 no wireless extensions.
cp: /mnt/flash/etc/daylight.c
Starting pid 491, console /dev/ttyS0: '/sbin/getty'
Network-Camera login:
The system pc : [00015230] lr : [0000e4d4] Tainted: P
issp : bf1ff020 ip : 4005ed4c fp : 00000003
gr10: 4005ea40 r9 : 00000000 r8 : 00000000
oir7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
ngr3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
dFlags: nZCvow IRQs on FIQs on Mode USER_32 Segment user
n Control: 397F Table: 00990000 DAC: 00000015
NOW pc : [00015230] lr : [0000e4d4] Tainted: P
!!sp : bf5ff940 ip : 4005ed4c fp : 00082f90
r10: 4005ea40 r9 : 00000000 r8 : 00000000
Ser7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
ndr3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
inFlags: nZCvg IRQs on FIQs on Mode USER_32 Segment user
SIControl: 397F Table: 00990000 DAC: 00000015
GTERM to all processes.
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : bffff528 ip : 4005ed4c fp : 00082d4c
r10: 4005ea40 r9 : 00000000 r8 : 00001000
r7 : 401237d0 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : 00001000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : befffbe0 ip : 4005ed4c fp : 000e60b0
r10: 4005ea40 r9 : 00000000 r8 : befffcc8
r7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : befffcc8 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : be9ff8e8 ip : 4005ed4c fp : 00000210
r10: 4005ea40 r9 : 00000000 r8 : 00000000
r7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : be7ff980 ip : 4005ed4c fp : 00000210
r10: 4005ea40 r9 : 00000000 r8 : 00000000
r7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : be5ffb58 ip : 4005ed4c fp : 00000022
r10: 4005ea40 r9 : 00000000 r8 : 00000000
r7 : be5ffca0 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
pc : [00015230] lr : [0000e4d4] Tainted: P
sp : be3ff9c0 ip : 4005ed4c fp : 00000210
r10: 4005ea40 r9 : 00000000 r8 : 00000000
r7 : 00000000 r6 : 0000000f r5 : 00086320 r4 : 00087d70
r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode USER_32 Segment user
Control: 397F Table: 00990000 DAC: 00000015
Sending SIGKILL to all processes.
Please stand by while rebooting the system.flushing ide devices:
Restarting system.
ARMboot 1.1.0 (Nov 23 2006 - 17:31:45)
Vivotek EVM version 1.6.0.0 (System:110592000, UART:18432000)
ARMboot code: 00000000 ~ 000355f8
DRAM Configuration:
Bank #0 at 0x10000000 32 MB
Bank #1 at 0x00000000 0 KB
Flash: 8 MB
VVTK1000 PCI Driver for ARMBoot
....Found PCI Device at (0,0,0) ID=0x4321159B
Erasing sector 1 ... ok.
parameter: 68 45 00503030
....Found PCI Device at (11,0,0) ID=0x813910EC
ethaddr: 00:AB:CD:AB:CD:EF
Hit any key to stop autoboot: 1 0
## Booting image at 10020000 ...
Image Name: linux-2.4.26
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2934880 Bytes = 2866 kB = 2 MB
Load Address: 00408000
Entry Point: 00408000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
Uncompressing Linux............................................................. done, booting the kernel.
Linux version 2.4.26-vrs1 (klaymen@rd1-2.vivotek.tw) (gcc version 3.3.2) #1 Mon Oct 20 20:33:14 CST 2008
CPU: FA526id(wb) revision 1
Machine: Vivotek VVTK1000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 6144
zone(0): 6144 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw initrd=0x800000,4194304 mem=24M ahbclk=110592000 pciclk=27648000
IRQ timer at interrupt number 0x08 clock 55296000
Calibrating delay loop... 136.80 BogoMIPS
Memory: 24MB = 24MB total
Memory: 18172KB available (1496K code, 430K data, 68K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xf9890000 (irq = 3) is a NULL
ttyS01 at 0xf98b0000 (irq = 4) is a NULL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VVTK1000 flash device: 800000 at 10000000
init_vvtk1000_flash_map() -- type: cfi_probe
VVTK1000 flash: Found 1 x16 devices at 0x0 in 8-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Using VVTK1000 partition definition
Creating 2 MTD partitions on "VVTK1000 flash":
0x00000000-0x00600000 : "kernel"
0x00600000-0x00800000 : "jffs2"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 68K
IRQ UART at interrupt number 0x3
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Starting pid 10, console /dev/ttyS0: '/etc/init.d/rcS'
ifconfig: Warning: cannot open /proc/net/dev. Limited output.: No such file or directory
ifconfig: eth0: error fetching interface information: Device not found
Using /drivers/wdt.o
WDT device driver version 1.0.0.1
Using /drivers/gpio_i2c.o
GPIOI2C device driver version 1.0.0.5
Using /drivers/rtc.o
RTC device driver version 1.0.0.1
Using /drivers/gpio.o
GPIO Device Driver version 1.1.0.0.
Using /drivers/i2c_slave.o
I2C slave device driver version 1.1.0.0. (H/W Rev. 0x10500)
Using /drivers/vma_vpe.o
Using /drivers/vma_me.o
Queue driver installed !!
Using /drivers/vma_be.o
Using /drivers/vma_ae.o
Using /drivers/cmmap.o
Using /drivers/mmap.o
Using /drivers/motor.o
MTR device driver version 1.0.0.4
Using /drivers/vaudio.o
I2S driver v 1.4.0.1. Copyright 2004 Vivotek, Inc.
for UDA1345
i2s_intc_value: 0x0000a430
i2s_intc_value: 0x0000a430
Using /drivers/hwinfo.o
hwinfo 1.1.0.0 initialized.
Using /drivers/cfc.o
CFC Device Driver version 1.0.0.0.
/etc/init.d/rcS: 44: /mnt/flash/patch/apply_patch: not found
Starting restore: restore default setting...
Erased 8192 bytes from address 0x00002000 in flash
The system is goi
Sending SIGKILL to all processes.
Please stand by while rebooting the system.
flushing ide devices:
Restarting system.
ARMboot 1.1.0 (Nov 23 2006 - 17:31:45)
Vivotek EVM version 1.6.0.0 (System:110592000, UART:18432000)
ARMboot code: 00000000 ~ 000355f8
DRAM Configuration:
Bank #0 at 0x10000000 32 MB
Bank #1 at 0x00000000 0 KB
Flash: 8 MB
VVTK1000 PCI Driver for ARMBoot
....Found PCI Device at (0,0,0) ID=0x4321159B
Erasing sector 1 ... ok.
parameter: 68 46 00503030
.....Found PCI Device at (11,0,0) ID=0x813910EC
ethaddr: 00:AB:CD:AB:CD:EF
Hit any key to stop autoboot: 1 0
## Booting image at 10020000 ...
Image Name: linux-2.4.26
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2934880 Bytes = 2866 kB = 2 MB
Load Address: 00408000
Entry Point: 00408000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
Uncompressing Linux............................................................. done, booting the kernel.
Linux version 2.4.26-vrs1 (klaymen@rd1-2.vivotek.tw) (gcc version 3.3.2) #1 Mon Oct 20 20:33:14 CST 2008
CPU: FA526id(wb) revision 1
Machine: Vivotek VVTK1000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 6144
zone(0): 6144 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw initrd=0x800000,4194304 mem=24M ahbclk=110592000 pciclk=27648000
IRQ timer at interrupt number 0x08 clock 55296000
Calibrating delay loop... 136.80 BogoMIPS
Memory: 24MB = 24MB total
Memory: 18172KB available (1496K code, 430K data, 68K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
PCI: bus0: Fast back to back transfers disabled
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xf9890000 (irq = 3) is a NULL
ttyS01 at 0xf98b0000 (irq = 4) is a NULL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VVTK1000 flash device: 800000 at 10000000
init_vvtk1000_flash_map() -- type: cfi_probe
VVTK1000 flash: Found 1 x16 devices at 0x0 in 8-bit mode
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Using VVTK1000 partition definition
Creating 2 MTD partitions on "VVTK1000 flash":
0x00000000-0x00600000 : "kernel"
0x00600000-0x00800000 : "jffs2"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 4096K
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 68K
IRQ UART at interrupt number 0x3
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
init started: BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Starting pid 10, console /dev/ttyS0: '/etc/init.d/rcS'
ifconfig: Warning: cannot open /proc/net/dev. Limited output.: No such file or directory
ifconfig: eth0: error fetching interface information: Device not found
Using /drivers/wdt.o
WDT device driver version 1.0.0.1
Using /drivers/gpio_i2c.o
GPIOI2C device driver version 1.0.0.5
Using /drivers/rtc.o
RTC device driver version 1.0.0.1
Using /drivers/gpio.o
GPIO Device Driver version 1.1.0.0.
Using /drivers/i2c_slave.o
I2C slave device driver version 1.1.0.0. (H/W Rev. 0x10500)
Using /drivers/vma_vpe.o
Using /drivers/vma_me.o
Queue driver installed !!
Using /drivers/vma_be.o
Using /drivers/vma_ae.o
Using /drivers/cmmap.o
Using /drivers/mmap.o
Using /drivers/motor.o
MTR device driver version 1.0.0.4
Using /drivers/vaudio.o
I2S driver v 1.4.0.1. Copyright 2004 Vivotek, Inc.
for UDA1345
i2s_intc_value: 0x0000a430
i2s_intc_value: 0x0000a430
Using /drivers/hwinfo.o
hwinfo 1.1.0.0 initialized.
Using /drivers/cfc.o
CFC Device Driver version 1.0.0.0.
/etc/init.d/rcS: 44: /mnt/flash/patch/apply_patch: not found
Starting restore: .
Starting led: /dev/cfc0 1
Starting watchdog: .
Starting hresetd: .
Starting synctime: .
Starting ptburn: .
Starting network: /dev/cfc1 1
Copied 256 bytes from address 0x00002000 in flash to /tmp/pci_scan_dump
Using /drivers/vvdc_clk.o
Warning: loaup0: 00000068
dilow0: 00000046
ngup1: 00000064
vlow1: 0000003e
vdVVDC_Clk_init_module: VVDC Clock Delay is 0x00503030.
c_clk will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modulesVVDC_Clk_cleanup_module: Module removed ok!
Using /lib/modules/2.4.26-vrs1/kernel/drivers/net/mii.o
Using /lib/modules/2.4.26-vrs1/kernel/drivers/net/8139too.o
8139too Fast Ethernet driver 0.9.26
eth0: RealTek RTL8139 at 0xc28b7000, 00:ab:cd:ab:cd:ef, IRQ 1
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
eth0: negotiated 100baseTx-FD, link ok
Usage: /usr/sbin/setdns dns1 dns2 ... dnsN
/dev/cfc1 0
Starting syslogd: .
run-parts: /etc/rcS.d/S50upnpigdcp exited with return code 1: Success
Starting inetd: .
Starting crond: .
Starting urecorder: .
Starting smbrecorder: .
Stop pan/tilt burning program...Stopping ptburn: no /usr/bin/ptburn found; none killed.
Starting swatchdog: .
Starting farseer.out: enable_irq(31) unbalanced from c2880b18
enable_irq(29) unbalanced from c288639c
enable_irq(30) unbalanced from c2884330
enable_irq(7) unbalanced from c2896c54
Starting ddnsc: DDNS client is disabled
run-parts: /etc/rcS.d/S86ddnsc exited with return code 1: Success
Starting upnpdd: enable 1
Starting drmd: .
Starting eventd: Stopping crond: stopped crond (pid 232).
Starting crond: .
Starting system boot messages: Sending startup log
BusyBox v1.00 (2006.01.16-08:12+0000) multi-call binary
Usage: rm [OPTION]... FILE...
rm: cannot remove `/mnt/ramdisk/eventd./*': No such file or directory
Starting ledctrl: /dev/cfc0 1
Starting smbmount: rm: cannot remove `/var/spool/cron/root-crontabs/smbmount.crontab': No such file or directory
Reloading configuration crond: .
lo no wireless extensions.
eth0 no wireless extensions.
cp: /mnt/flash/etc/daylight.crontab: No such file or directory
Starting pid 491, console /dev/ttyS0: '/sbin/getty'
Network-Camera login


To the note / reminder to all who dare to repeat such experiments - connect to the UART output via a level converter (I had it FTDI232).

Having carefully analyzed the console boot logs, it became approximately clear that the kernel is directly unpacked into RAM. Theoretically, the site can be found GPL firmware, if not for all, then at least for many d-link products. But it was for my model to download the latest firmware failed. Okay, I took the first one (* .pkg file) and fed it to binwalk.

It turned out the following:

$binwalk DCS-5220_A2_v1.05.pkg
DECIMAL HEXADECIMAL DESCRIPTION
__________________________________________
54_0x36_uImage header, OS Kernel Image, compression type: none, image name: "linux-2.4.26"
11770 _0x2DFA _gzip compressed data, maximum compression,
897238_0xDB0D6_gzip compressed data, maximum compression, file name: "initrd.img"
2935070_0x2CC91E_gzip compressed data

Before doing further research, I looked diagonally if there was any mention of disassembling and / or reassembling firmware for such cameras. I came across a resource of Firmware unpackers for IP cameras , which contains scripts for unpacking D-Link IP cameras firmwares and Trendnet cameras similar to them for iron stuffing. Unfortunately, my model was not available there. In any case, I tried to write to the author. To my surprise, the latter answered and confirmed the information given by the binwalk - there are simple archives inside the firmware. Running binwalk with the -e switch gave the following picture:



Simple TAR archives can be easily extracted with the tar -xvf command. The content there is as follows:

Contents of the file 2CC91E
www/
www/ret.html
www/logout.html
www/common.js
www/navbar/
www/navbar/statusnav.html
www/navbar/helpnav.html
www/navbar/setupnav.html
www/navbar/helpnav.js
www/navbar/topnav.html
www/navbar/maintainnav.html
www/navbar/homenav.html
www/client.html
www/help/
www/help/htool.html
www/help/menu.html
www/help/hadv.html
www/help/hhome.html
www/help/hstatus.html
www/plugindef.js
www/clientset.js
www/indexreal.html
www/RtspVaPgDec.cab
www/dlink.css
www/realqt.mov
www/index.html
www/camctrl.js
www/setup/
www/setup/accesslist.html
www/setup/devinfo.html
www/setup/config_index.html
www/setup/audiovideo.html
www/setup/wireless.html
www/setup/definepatrolname.js
www/setup/videoclip.html
www/setup/network.html
www/setup/edituser.html
www/setup/application.html
www/setup/accesslist.js
www/setup/firmwareupdate.html
www/setup/time_date.js
www/setup/wireless.js
www/setup/maintain.html
www/setup/netstat.js
www/setup/config.html
www/setup/recording.html
www/setup/ddns.js
www/setup/ddns.html
www/setup/network.js
www/setup/snapshot1.html
www/setup/security.html
www/setup/security.js
www/setup/audiovideo.js
www/setup/time_date.html
www/setup/wizard/
www/setup/wizard/wizardutil.js
www/setup/wizard/network.html
www/setup/wizard/wiznetwork.js
www/setup/wizard/wizard.html
www/setup/wizard/motion.html
www/setup/wizard/wizmotion.js
www/setup/patrolname.js
www/setup/image.html
www/setup/mailftp.html
www/setup/motion.html
www/setup/camctrl.html
www/setup/syslog.html
www/snapshot.html
www/webinfo.html
www/home.html
www/pic/
www/pic/ctrlhome.gif
www/pic/helpzoom.jpg
www/pic/helppause.jpg
www/pic/helpstop.jpg
www/pic/ctrldown.gif
www/pic/autopan.gif
www/pic/ctrlup_g.gif
www/pic/wlan_masthead.gif
www/pic/ctrlleft.gif
www/pic/sideright1.gif
www/pic/ctrldown_g.gif
www/pic/ctrlright_g.gif
www/pic/helpvolume.jpg
www/pic/ctrlhome_g.gif
www/pic/stop.gif
www/pic/ctrlleft_g.gif
www/pic/sideleft1.gif
www/pic/ctrlright.gif
www/pic/autopatrol.gif
www/pic/helpmute.jpg
www/pic/sideleft2.gif
www/pic/sideright2.gif
www/pic/short_modnum.gif
www/pic/ctrlup.gif
www/pic/wireless_bottom.gif

Contents of the file 378A40
setup/
setup/writewebpage
setup/writebootimage
setup/install
setup/writebootenv
setup/.svn/
setup/.svn/props/
setup/.svn/format
setup/.svn/prop-base/
setup/.svn/prop-base/writel1l2.svn-base
setup/.svn/prop-base/writewebpage.svn-base
setup/.svn/prop-base/writebootenv.svn-base
setup/.svn/prop-base/install.svn-base
setup/.svn/prop-base/writebootimage.svn-base
setup/.svn/all-wcprops
setup/.svn/entries
setup/.svn/text-base/
setup/.svn/text-base/writel1l2.svn-base
setup/.svn/text-base/writewebpage.svn-base
setup/.svn/text-base/writebootenv.svn-base
setup/.svn/text-base/install.svn-base
setup/.svn/text-base/writebootimage.svn-base
setup/.svn/tmp/
setup/.svn/tmp/props/
setup/.svn/tmp/prop-base/
setup/.svn/tmp/text-base/
setup/writel1l2

Since inside - nothing interesting was found, it was decided to climb inside the initrd.img . For analysis, simply mount the image with the command:
$ sudo mount -o loop initrd.img / home / imagefile /

Inside a standard set, ready for editing by a curious researcher :)
$ ls
bin drivers etc home lib linuxrc lost + found mnt proc root sbin tmp usr var

Along the way, I found that the firmware for camera 5220 revision A1 and revision A2 are identical and completely interchangeable. But the firmware from revision B to cameras with revision A hardware is absolutely not suitable.

In general, theoretically, adjusting the firmware to your needs is not difficult. As well as add the necessary driver (when replacing a miniPCI card for example). You can flash the camera through the standard interface of the D-ViewCam program or the Installation Wizard (which I mentioned at the very beginning).

But there is another option. Upload the finished firmware (renamed flash.pkg in advance) to the internal FTP of the camera (the FTP server must start from the telnet server, but for security reasons, the telnet is disabled by default and requires forced launch with a special request). Perhaps nothing will come of it - not enough time to check. All that is is the process log of the firmware from the standard application, taken using wireshark:

wireshark-ed firmware process
35 438.799789 192.168.0.99 192.168.0.56 FTP 114 Response: 220 Network-Camera FTP server (GNU inetutils 1.4.2) ready.
337 438.800105 192.168.0.56 192.168.0.99 FTP 66 Request: USER admin
339 438.803092 192.168.0.99 192.168.0.56 FTP 88 Response: 331 Password required for admin.
341 438.803503 192.168.0.56 192.168.0.99 FTP 61 Request: PASS
342 438.805896 192.168.0.99 192.168.0.56 FTP 81 Response: 230 User admin logged in.
344 438.806687 192.168.0.56 192.168.0.99 FTP 62 Request: TYPE I
345 438.818062 192.168.0.99 192.168.0.56 FTP 74 Response: 200 Type set to I.
347 438.818488 192.168.0.56 192.168.0.99 FTP 60 Request: PASV
348 438.820099 192.168.0.99 192.168.0.56 FTP 100 Response: 227 Entering Passive Mode (192,168,0,99,4,1)
353 438.821111 192.168.0.56 192.168.0.99 FTP 70 Request: STOR flash.pkg
354 438.838508 192.168.0.99 192.168.0.56 FTP 112 Response: 150 Opening BINARY mode data connection for 'flash.pkg'.
356 438.839333 192.168.0.99 192.168.0.56 FTP 81 Response: 214-firmware upgrade begin
358 438.843916 192.168.0.56 192.168.0.99 FTP-DATA 5894 [TCP Window Full] FTP Data: 5840 bytes (PASV) (STOR flash.pkg)
360 438.845280 192.168.0.56 192.168.0.99 FTP-DATA 2406 FTP Data: 2352 bytes (PASV) (STOR flash.pkg)
381 439.300480 192.168.0.99 192.168.0.56 FTP 123 Response: It will takes about 3-5 minutes.<br>
385 439.426777 192.168.0.99 192.168.0.56 FTP 128 Response: Do not turn off the power or remove the network cable during upgrade!<br>
391 439.926748 192.168.0.99 192.168.0.56 FTP 123 Response: System will restart automatically when upgrade is finished.<br>
395 440.399163 192.168.0.99 192.168.0.56 FTP 123 Response: Please wait...<br>
1763 460.987774 192.168.0.56 192.168.0.99 FTP-DATA 4671 FTP Data: 4617 bytes (PASV) (STOR flash.pkg)
1775 478.867766 192.168.0.99 192.168.0.56 FTP 69 Response: Processing<br>

That's all, I decided to write because of the complete absence of any information on this type of camera and that the article should serve as a reminder that it would be necessary to fully understand the firmware. I would be glad if someone confirms or refutes my conjectures.

Sergey Besarab ( Siarhei V. Besarab )

Note: initially, being an ardent admirer of openwrt, I confess that it was useful inside the camera to find out if openwrt can be installed there. The answer is that the network functionality can be preserved, but the PTZ functionality will completely disappear. Therefore, it is better to modify the existing firmware. But I saved the topic on the openwrt.org forum, and uploading everything new there that I can learn about d-link DCS-5220.

Also popular now: