Как стать автором
Обновить

Жемчужина с барахолки или реверс-инжиниринг IP-камеры DCS-5220A1

Время на прочтение 29 мин
Количество просмотров 27K
Лето благополучно закончилось, а значит приходит время покидать насиженные места, родные дачные кооперативы и стаями отправляться в город. Все бы хорошо, но как-то боязно оставлять на целых полгода хозяйство без присмотра. Задался и я подобным вопросом. В итоге решил оборудовать участок нехитрым комплектом из веб-камеры и доступа в интернет (скорее всего 3G). Начал, как водится, с малого — с поиска подходящей по бюджету камеры. Бюджет мой составлял примерно около 20$.


Что-то нормальное в эту сумму попасть не могло, в принципе, поэтому оставались варианты вроде «DIR-320+openwrt+UVC камера из ноутбука» запаянные в герметичный полиэтиленовый пакет и подвешенные на дерево. Но как-то вечером я просматривая объявления местной барахолки натолкнулся на продажу IP-камеры D-link DCS-5220A1, да еще и функцией PTZ за какие-то смешные 10$. Для тех, кто не в курсе, приведу выдержку из википедии
Pan-tilt-zoom-камера (PTZ-камера) — камера, которая поддерживает удалённое управление направлением и зумом. PTZ — это аббревиатура от панорамирования, наклона и зума (pan, tilt, zoom), которая описывает возможности управления камерой.
Да, насторожился. Но жаба пересилила, а ей вторила самоуверенность («да неужели не разберемся?!»). Камера оказалась старой, но с отличным светочувствительным сенсором (как-раз то что нужно, чтобы наблюдать ситуацию вечером). Решено и камера у меня на столе.



Сначала [+]:

  1. Шикарная ночная чувствительность (без всяких ИК-подсветок) — 0.5 Lux @ f1.4
  2. PTZ (хотя зум только цифровой)
  3. WiFi реализовано картой miniPCI RT2560F. На aliexpress можно найти уже 802.11n (например AR9160, заменить и гнать видеопоток в максимальном качестве (камера поддерживает mpeg4 и H.263)
  4. Поддержка вещания по RTSP, HTTP и т.д.
  5. Поддержка UPnP
  6. Золота на плату не жалели, слой на всех контактах капитальный.
  7. На борту свой веб-сервер. И система на базе linux, т.к. выложены даже какие-то исходники. Правда, ни по SSH, ни по telnet достучаться изначально не удалось.

Потом замеченные [-]:

  1. Максимум разрешения — это 640х480. Камера, как видно адская (сразу думал что вообще подключена по lvds, уж очень похож разъем.
  2. Сложности с первичным подключением. Камера подключается к компу _только через хаб_ или кабелем кроссовером. И неизвестно какой IP адрес.

Стоит сразу отметить, что в интернете по поводу именно моей модели информации было мизерное количество — страничка на сайте d-link и все. Поэтому я решил первым делом вскрыть корпус, благо держалось все на трех винтах. Кстати, милым мне показалось наличие на нижней части корпуса стандартного крепления для фотоштатива (1/4"). В общем после снятия крышки я увидел вот такую картину:


Картинки с подписями элементов



Фотографии с авторскими пометками, это дает о себе знать прошлое в мастерской по ремонту сотовых. Все время делаешь себе cолюшены на случай прихода аналогичной модели :). Вдоволь посмотрев на плату, я собрал все обратно и решил посмотреть как камера будет работать с родным ПО (благо с сервера d-link удалось скачать какие-то огромные пакеты).

Несмотря на внимательно изучение сначала русского, потом и английского мануала, мне так и не стало ясно, как обнаружить камеру. Пришлось искать на антресолях старый хаб, подключать к нему камеру, устанавливать wireshark и слушать ethernet. Прослушивание дало ip-адрес «192.168.0.99». Забив его в ручные настройки программы d-link Network Camera Installation, камера подхватилась. Для работы с подобными камера предназначена другая утилита от d-link D-ViewCam. В ней также пришлось вводить адрес вручную, камера обнаружилась и я даже смог проверить работу PTZ. Камера действительно неплохо управляется и ездит вправо-влево/вверх-вниз с разрешением «один зубчик передаточной шестеренки» :). Правда постоянно щелкать мышкой немного утомляет.

Погуглив, я нашел документ "URL command for DCS-5220, DCS-2120", где написано, что можно управлять камерой командой: http:///cgi-bin/camctrl.cgi? [move=][&speedpan=][&speedtilt=], где value = up/down/left/right/home+ -5 — для шага в один зубчик шестеренки привода.
В принципе, вроде как должно было бы быть все, но червь сомнения не давал покоя. unix же на борту, ну какой веб-интерфейс. Посмотрев камеры-аналоги и почитав forum.openwrt.org была найдена уязвимость, позволяющая веб-запросом включить в камере телнет. Все что для этого было нужно, так это написать в строке браузера
http://<адрес камеры>/cgi/admin/telnetd.cgi?command=on

После окончания работы с камерой, настоятельно рекомендую выключить телнет, делается это аналогичным образом, через запрос
http://<адрес камеры>/cgi/admin/telnetd.cgi?command=off

В чистом итоге, телнет-сессия дала гораздо больше ответов, чем все официальные сайты (и даже официальный канал Телеграм :) ) вместе взятые. Ниже информация об аппаратных особенностях данной камеры, собранная через telnet и консоль UART:):

Вывод dmesg
~ $ 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 -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
~ $ 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/
~ $ 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
~ $ 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
uname -a
Linux Network-Camera 2.4.26-vrs1 #1742 Fri Jul 20 09:20:51 CST 2007 armv4l unknown


Вывод 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
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


На заметку/напоминание всем кто решится повторять подобные эксперименты — к выходу UART подключайтесь через преобразователь уровней (у меня это был FTDI232).

Внимательно проанализировав консольные логи загрузки, стало примерно ясно, что ядро напрямую распаковывается в оперативную память. Теоретически, на сайте можно найти GPL прошивки если не для всех, то по крайней мере, для многих продуктов d-link. Но именно для моей модели cкачать последнюю прошивку не удалось. Ладно, взял первую попавшуюся (файл *.pkg) и скормил ее binwalk.

Получилось следующее:

$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

Перед тем, как заниматься дальнейшими изысканиями, по диагонали посмотрел есть ли какие-то упоминания о разборке и/или пересборке прошивок для таких камер. Натолкнулся на ресурс Firmware unpackers for IP cameras, где собраны скрипты для распаковки прошивок IP-камер D-Link и аналогичных им по железной начинке камер Trendnet. К сожалению, моей модели там в наличии не было. На всякий случай попробовал написать автору. К моему удивлению, последний ответил, и подтвердил информацию выданную binwalk — внутри прошивки простые архивы. Запуск binwalk с ключом -e дал следующую картину:



Простенькие TAR архивы легко извлекаются командой tar -xvf. Содержимое там следующее:

Содержимое файла 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

Содержимое файла 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

Так как внутри — ничего интересного не обнаружилось, было решено лезть внутрь initrd.img . Для анализа достаточно просто смонтировать образ командой:
$ sudo mount -o loop initrd.img /home/imagefile/

Внутри стандартный набор, готовый к редактированию любознательным исследователем :)
$ ls
bin dev drivers etc home lib linuxrc lost+found mnt proc root sbin tmp usr var

Попутно я установил, что прошивки для камеры 5220 ревизии A1 и ревизии A2 идентичны и полностью взаимозаменяемы. А вот прошивки от ревизии B к камерам с аппаратным обеспечением ревизии А категорически не подходят.

В общем, теоретически подогнать прошивку под свои нужды не составляет труда. Так же, как и добавить необходимый драйвер (при замене miniPCI карты например). Прошить камеру можно через стандартный интерфейс программы D-ViewCam или Installation Wizard (о которых я говорил в самом начале).

Но есть и другой вариант. Закинуть готовую прошивку (заранее переименованную во flash.pkg) на внутренний фтп камеры (сервер фтп должен стартовать с телнет-сервером, но в целях безопасности телнет по-умолчанию отключен и требует принудительного запуска спец. запросом). Возможно ничего из этого не выйдет — не хватило времени проверить. Все, что есть — это лог процесса прошивки из стандартного приложения, снятый с помощью wireshark:

wireshark-еd процесс прошивки
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>

На этом все, написать решил по причине полного отсутствия какой-либо информации по данной разновидности камер и чтобы статья служила напоминанием о том, что надо бы до конца разобраться с прошивкой. Буду рад, если кто-то подтвердит или опровергнет мои домыслы.


Примечание: изначально, являясь ярым поклонником openwrt, признаюсь, что внутрь камеры полез для того, чтобы выяснить можно ли туда установить openwrt. Ответ — можно, сетевой функционал сохраниться, но полностью пропадет PTZ-функционал. Поэтому — лучше модифицировать существующие прошивки. Но тему на форуме openwrt.org я сохранил, и туда же выкладываю все новое, что удается узнать об d-link DCS-5220.

Важно! Все обновления и промежуточные заметки из которых потом плавно формируются хабра-статьи теперь можно увидеть в моем телеграм-канале lab66. Подписывайтесь, чтобы не ожидать очередную статью, а сразу быть в курсе всех изысканий :)
Теги:
Хабы:
Если эта публикация вас вдохновила и вы хотите поддержать автора — не стесняйтесь нажать на кнопку
+47
Комментарии 47
Комментарии Комментарии 47

Публикации

Истории

Ближайшие события

Московский туристический хакатон
Дата 23 марта – 7 апреля
Место
Москва Онлайн