OpenHisiIpCam / br-hisicam

Buildroot based sample firmware for HiSilicon`s System-On-a-Chip ip cameras
http://www.openhisiipcam.org
Other
137 stars 25 forks source link

AK39XXEV300 #19

Closed mbober1 closed 3 years ago

mbober1 commented 3 years ago

I'm trying to backup oryginal firmware from my IP camera. I would like to configure it to work with some open source projects like Kerberos. RTSP and ONVIF is disabled by default. Web interface is handcaped too. I decieded connect to it by telnet, but any password is incorrect.

This is my logs when I am connected to TTL debug port using only ground and TX pin:

U-Boot 2013.10.0-AK_V3.1.00 (May 20 2020 - 04:47:31)

ramsize: 04000000 DRAM: 64 MiB efuse_read:0x00000002 8 MiB should_load_env cdh:env_relocate_spec, line:564 load env_relocate

total partitions: 8 In: serial Out: serial Err: serial Net: AKEthernet-0

device nor0 , # parts = 8

: name size offset mask_flags

0: UBOOT 0x0002e000 0x00000000 0 1: ENV 0x00001000 0x0002e000 0 2: BKENV 0x00001000 0x0002f000 0 3: DTB 0x00010000 0x00030000 0 4: KERNEL 0x001b0000 0x00040000 0 5: ROOTFS 0x000c0000 0x001f0000 0 6: APP 0x004d0000 0x002b0000 0 7: CONFIG 0x00080000 0x00780000 0

active partition: nor0,0 - (UBOOT) 0x0002e000 @ 0x00000000

KERNEL: size:0x001b0000, offset:0x00040000

SF: 1769472 bytes @ 0x40000 Read: OK

Booting kernel from Legacy Image at 80008000 ...

Image Name: Linux-4.4.192V1.6 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1605864 Bytes = 1.5 MiB Load Address: 80008000 Entry Point: 80008040 Verifying Checksum ... OK XIP Kernel Image ... OK kernel loaded at 0x80008000, end = 0x801900e8 using: FDT

Starting kernel ...

Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0x0 Linux version 4.4.192V1.6 (root@ubuntu) (gcc version 4.9.4 (Buildroot 2018.02.7-g7ef6f7c) ) #16 Fri Ma0 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f CPU: VIVT data cache, VIVT instruction cache Machine model: ak3919ev300_v601_f37 dev board Memory policy: Data cache writeback ANYKA CPU AK39XXEV330 (ID 0x20160101) Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttySAK0,115200n8 root=/dev/mtdblock5 rootfstype=squashfs init=/sbin/init M PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 33464K/65536K available (3154K kernel code, 117K rwdata, 988K rodata, 136K init, 188K bss, 320) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc4800000 - 0xff800000 ( 944 MB) lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc0413d44 (4144 kB) .init : 0xc0414000 - 0xc0436000 ( 136 kB) .data : 0xc0436000 - 0xc0453788 ( 118 kB) .bss : 0xc0453788 - 0xc0482878 ( 189 kB) SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 NR_IRQS:126 ak39ev330_clk: CPU(JCLK): 804(Mhz) ak39ev330_clk: MEMDDR2(DPHY): 402(Mhz) ak39ev330_clk: VCLK: 280(Mhz) ak-timer: ak_timer_init clocksource: ak_cs_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 159271703898 ns sched_clock: 32 bits at 12MHz, resolution 83ns, wraps every 178956970966ns Calibrating delay loop... 400.58 BogoMIPS (lpj=2002944) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok Setting up static identity map for 0x80008400 - 0x8000843c devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes) pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations On-chip L2 memory initialized ak-pinctrl 20170000.gpio: ak_pinctrl_probe 1962 ak_ev330_pinctrl: ak_pinctrl_probe irq: 15 media: Linux media interface: v0.10 Linux video capture interface: v2.00 clocksource: Switched to clocksource ak_cs_timer NET: Registered protocol family 2 TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 squashfs: version 4.0 (2009/01/31) Phillip Lougher jffs2: version 2.2. © 2001-2006 Red Hat, Inc. io scheduler noop registered (default) AKxx uart driver init, (c) 2013 ANYKA ttySAK0 at MMIO 0x20130000 (irq = 10, base_baud = 0) is a AK console [ttySAK0] enabled loop: module loaded Start to init Anyka SPI Flash... init Anyka SPI Nand Flash driver value:0 spi0 new hz is 35000000, div is 2(change). ak spiflash probe enter. akspi flash ID: 0x00c22017 ak-spiflash spi0.0: kh25l64 (8192 Kbytes) 8 cmdlinepart partitions found on MTD device spi0.0 Creating 8 MTD partitions on "spi0.0": 0x000000000000-0x00000002e000 : "UBOOT" 0x00000002e000-0x00000002f000 : "ENV" 0x00000002f000-0x000000030000 : "BKENV" 0x000000030000-0x000000040000 : "DTB" 0x000000040000-0x0000001f0000 : "KERNEL" 0x0000001f0000-0x0000002b0000 : "ROOTFS" 0x0000002b0000-0x000000780000 : "APP" 0x000000780000-0x000000800000 : "CONFIG" Init AK SPI Flash finish. akspi master SPI0 initialize success, use for PIO mode. i2c /dev entries driver ak_wdt_init: watchdog register... NET: Registered protocol family 17 sctp: Hash tables configured (established 512 bind 1024) ^@VFS: Mounted root (squashfs filesystem) readonly on device 31:5. devtmpfs: mounted Freeing unused kernel memory: 136K starting pid 300, tty '': '/etc/init.d/rcS' ^@mount all file system...


Love Linux ! ! ! 

/bin/mount -t squashfs /dev/mtdblock6 /usr /bin/mount -t jffs2 /dev/mtdblock7 /etc/jffs2 starting mdev... starting pid 328, tty '/dev/ttySAK0': '/sbin/getty -L ttySAK0 115200 vt100 ' ^@start telnet......
_ \/
/\ | \ | |\ \ / /| |/ / /\
/ \ | | | \ \/ / | ' / / \
/ /\ \ | . ' | \ / | < / /\ \
/ __
\ | |\ | | | | . \ / ___ \
/
/ _|| \| |
| ||_\// _\

ifconfig: SIOCGIFFLAGS: No such device wifi power down

anyka login: insmod: can't insert '/usr/modules/ak_rtc.ko': No such file or directory hwclock: can't open '/dev/misc/rtc': No such file or directory ak_uio: register uio device successfully with irq: 2! enter gpio_uart_probe ak_mac Ethernet Driver Configed MAC RMII interface! insmod mac device ok Reset MAC controller! eth0 owns a shared interrupt on netdev->irq 16 setting up the cable unplug timer start nfs driver... start sensor driver... akisp_init, cb0:c30c8078, cb1: (null) jxfxx_probe Apr 26 2020 22:09:57 i2c i2c-0: jxfxx Probed success, subdev:c3162e14 start sar-adc driver... TIMETICK->[APIS_Timer/src//Timetick.c]:212 task list is empty TIMETICK->[APIS_Timer/src//Timetick.c]:113 TIMETICK pid=453 tid=b6b1d4c0 begin

When I use 3 wires (GND, RX, TX) there is such a different output:

[+��env_relocate

total partitions: 8 In: serial Out: serial Err: serial Net: AKEthernet-0

device nor0 , # parts = 8

: name size offset mask_flags

0: UBOOT 0x0002e000 0x00000000 0 1: ENV 0x00001000 0x0002e000 0 2: BKENV 0x00001000 0x0002f000 0 3: DTB 0x00010000 0x00030000 0 4: KERNEL 0x001b0000 0x00040000 0 5: ROOTFS 0x000c0000 0x001f0000 0 6: APP 0x004d0000 0x002b0000 0 7: CONFIG 0x00080000 0x00780000 0

active partition: nor0,0 - (UBOOT) 0x0002e000 @ 0x00000000

KERNEL: size:0x001b0000, offset:0x00040000 � 1769472 bytes @ 0x40000 Read: OK

Booting kernel from Legacy Image at 80008000 ...

Image Name: Linux-4.4.192V1.6 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1605864 Bytes = 1.5 MiB Load Address: 80008000 Entry Point: 80008040 Verifying Checksum ... OK XIOK kernel loaded at 0x80008000, end = 0x801900e8 using: FDT

Starting kernel ...

Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0x0 Linux version 4.4.192V1.6 (root@ubuntu) (gcc version 4.9.4 (Buildroot 2018.02.7-g7ef6f7c) ) #16 Fri Ma0 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f CPU: VIVT data cache, VIVT instruction cache Machine model: ak3919ev300_v601_f37 dev board Memory policy: Data cache writeback ANYKA CPU AK39XXEV330 (ID 0x20160101) Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttySAK0,115200n8 root=/dev/mtdblock5 rootfstype=squashfs init=/sbin/init M PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 33464K/65536K available (3154K kernel code, 117K rwdata, 988K rodata, 136K init, 188K bss, 320) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc4800000 - 0xff800000 ( 944 MB) lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc0413d44 (4144 kB) .init : 0xc0414000 - 0xc0436000 ( 136 kB) .data : 0xc0436000 - 0xc0453788 ( 118 kB) .bss : 0xc0453788 - 0xc0482878 ( 189 kB) SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 NR_IRQS:126 ak39ev330_clk: CPU(JCLK): 804(Mhz) ak39ev330_clk: MEMDDR2(DPHY): 402(Mhz) ak39ev330_clk: VCLK: 280(Mhz) ak-timer: ak_timer_init clocksource: ak_cs_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 159271703898 ns sched_clock: 32 bits at 12MHz, resolution 83ns, wraps every 178956970966ns Calibrating delay loop... 400.58 BogoMIPS (lpj=2002944) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok Setting up static identity map for 0x80008400 - 0x8000843c devtmpfs: initialized clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes) pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations On-chip L2 memory initialized ak-pinctrl 20170000.gpio: ak_pinctrl_probe 1962 ak_ev330_pinctrl: ak_pinctrl_probe irq: 15 media: Linux media interface: v0.10 Linux video capture interface: v2.00 clocksource: Switched to clocksource ak_cs_timer NET: Registered protocol family 2 TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 squashfs: version 4.0 (2009/01/31) Phillip Lougher jffs2: version 2.2. © 2001-2006 Red Hat, Inc. io scheduler noop registered (default) AKxx uart driver init, (c) 2013 ANYKA ttySAK0 at MMIO 0x20130000 (irq = 10, base_baud = 0) is a AK console [ttySAK0] enabled loop: module loaded Start to init Anyka SPI Flash... init Anyka SPI Nand Flash driver value:0 spi0 new hz is 35000000, div is 2(change). ak spiflash probe enter. akspi flash ID: 0x00c22017 ak-spiflash spi0.0: kh25l64 (8192 Kbytes) 8 cmdlinepart partitions found on MTD device spi0.0 Creating 8 MTD partitions on "spi0.0": 0x000000000000-0x00000002e000 : "UBOOT" 0x00000002e000-0x00000002f000 : "ENV" 0x00000002f000-0x000000030000 : "BKENV" 0x000000030000-0x000000040000 : "DTB" 0x000000040000-0x0000001f0000 : "KERNEL" 0x0000001f0000-0x0000002b0000 : "ROOTFS" 0x0000002b0000-0x000000780000 : "APP" 0x000000780000-0x000000800000 : "CONFIG" Init AK SPI Flash finish. akspi master SPI0 initialize success, use for PIO mode. i2c /dev entries driver ak_wdt_init: watchdog register... NET: Registered protocol family 17 sctp: Hash tables configured (established 512 bind 1024) VFS: Mounted root (squashfs filesystem) readonly on device 31:5. devtmpfs: mounted Freeing unused kernel memory: 136K ak_uio: register uio device successfully with irq: 2! enter gpio_uart_probe ak_mac Ethernet Driver Configed MAC RMII interface! insmod mac device ok Reset MAC controller! eth0 owns a shared interrupt on netdev->irq 16 setting up the cable unplug timer akisp_init, cb0:c30f9078, cb1: (null) jxfxx_probe Apr 26 2020 22:09:57 i2c i2c-0: jxfxx Probed success, subdev:c321de14

anyka login: TIMETICK->[APIS_Timer/src//Timetick.c]:212 task list is empty TIMETICK->[APIS_Timer/src//Timetick.c]:113 TIMETICK pid=453 tid=b6b354c0 begin

In both cases I cannot write anything. Ctrl+C is equally ineffective. Please help me get this started. With pleasure I add my firmware to your base.

nikitos1550 commented 3 years ago

Hello! Such question you can ask on openipc english telegram chat https://t.me/openipc