スマモッチャーの解析(kernelコンパイル)

スマモッチャーのLinux kernelのソースコードは株式会社アール・ダブリュー・シーより公開されています。そこでこのkernelを自前でコンパイルしてみる事にしました。

linux-kernel-3.4.43.tgz を解凍すればkernelのソースコード類が展開されます。バージョンはファイル名の通り3.4.43でそこへオリジナルコードが反映されています。このkernelをコンパイルする時にはだかる壁がarmへのクロスコンパイルという事と、GCCのバージョンです。

スマモッチャーが使用しているコアはGK7102でARM1176jzfなんですね。なのでintelなPC-Linux(正確にはWin10上のVMware上に構築したLinux環境)でコンパイルするにはarm用のgccが必要となってきます。この問題は、既にRaspberry Pi(初代)で経験済みなので、crosstool-NGを使ってサクっと……とは行きませんでしたが作成しました(uClibc版です)。

壁の2つ目のGCCのバージョンですが、crosstool-NGの現時点の最新版が1.24.0で生成されるGCCのバージョンは4.8.5~6.3.0です…。今更気が付きましたが、このバージョンでもkernelをコンパイルできましたね。Linux kernelをコンパイルする時、通常気にするのはGCCの最低バージョンですが、スマモッチャーのkernelは3.4.43とかなり古い物を使用しているので、GCCの上限バージョンも確認する必要があります。大まかな調べ方はソースコードにどのGCCバージョン用のヘッダーファイルが入っているかで分かります。


$ ls ./include/linux/compiler-*
./include/linux/compiler-gcc3.h ./include/linux/compiler-gcc.h
./include/linux/compiler-gcc4.h ./include/linux/compiler-intel.h



GCC 3.x.x, 4.x.x に対応している様です。私はcrosstool-NGのバージョンを下げて1.20版を使用してクロスコンパイル用のGCCをコンパイルしました。この辺りの時代の注意点はhard-floatに対応しているかどうかです。kernelだけではなく、いわゆるrootfs側も同じにしないとダメでスマモッチャーの場合はGK7102はhard-floatに対応しているが、rootfsがsoft-floatでコンパイルされている様なので、ひとまずsoft-floatに合わせました。

ここからが本番、いよいよkernelをコンパイルするのですが…そのままコンパイルすると起動しないkernelが出来上がります。この解析には頭を悩まされました。GCCが要因なのか、kernelなのか、はたまた別の要因なのか。

結論を書くと、「公開されていソースコードはスマモッチャーのkernelをコンパイルしたときの物では無い」という事です。

SDKで展開していてかなり広まっているのでそのどれかをコンパイルした時の環境なのでしょう。気が付いた切っ掛けは開発用に複数用意されていたconfigファイルです。

wifi_cammera_donki_06.png

.config の他に .config.old, config.bak.○○ というのが有ります。特に目を引いたのはGK7102とGK7102Sという名称があるという事。これは .config の中身にも別物として定義してありました。


# CONFIG_ARCH_GK710X is not set
# CONFIG_ARCH_GK710X_FPGA is not set
CONFIG_ARCH_GK710XS=y
# CONFIG_ARCH_GK710XS_FPGA is not set
# CONFIG_ARCH_GK720X is not set
# CONFIG_ARCH_GK720X_FPGA is not set




スマモッチャーに使用されているMPUは"S無し"です。なのに .config では"S有り"の方が選択されています。そこで、.config と config.bak_GK7102_170522, .config と config.bak_GK7102S_170520 をそれぞれ比較すると .config は明らかに"S有り"の設定です。なので、この点を先ずはマージしました。

次に気になったファイルが、自動コンパイル用のシェルスクリプトです。forcemake_GK7102_mt7601.sh と forcemake_GK7102S_8188ftv.sh があり、ファイル名からあからさまに組み合わせが間違っています。mt7601, 8188ftvというのはWiFiモジュールのチップ名でスマモッチャーに使われているのは蟹さんのRTL8188FTVです。


$ diff -urN ./forcemake_GK7102_mt7601.sh ./forcemake_GK7102S_8188ftv.sh
--- ./forcemake_GK7102_mt7601.sh 2017-12-11 05:43:45.000000000 +0000
+++ ./forcemake_GK7102S_8188ftv.sh 2017-12-28 10:36:34.000000000 +0000
@@ -1,4 +1,4 @@
-cp -f drivers/usb/core/hub.c_7601 drivers/usb/core/hub.c
+cp -f drivers/usb/core/hub.c_8188ftv drivers/usb/core/hub.c
touch drivers/usb/core/hub.c
make ARCH=arm CROSS_COMPILE=arm-goke-linux-uclibcgnueabi- uImage
#cp -f arch/arm/boot/zImage ./uImage



内容を比較するとhub.cファイルをそれぞれのチップに合わせた物に置き換えているだけだったので、まだ簡単な部類の差分でした。このスクリプトはU-Bootのtftp機能を使用してネット環境でカーネルイメージを転送する用に作成されているのでしょう。config.bak_GK7102_170522 の中身にもそれっぽい記述がありました。


CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="/home/endy/rootfs/rootfs_goke"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
CONFIG_RD_LZMA=y
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set



これらをマージしてスモマッチャー用のconfigファイルを作成しました。コンパイルしてできたzImageファイルをuSDカードに入れて、U-Bootだけ起動してからuSDに入っているzImageをメモリ上に展開して実行しました。


GK7102 # sf probe
[PROCESS_SEPARATORS] sf probe
SF: 8 MiB [page:256 Bytes] [sector:64 KiB] [count:128] (GD25Q64C)
GK7102 # fatinfo mmc 0
[PROCESS_SEPARATORS] fatinfo mmc 0
Interface: MMC
Device 0: Vendor: Man 744a45 Snr e5201dfe Rev: 0.2 Prod: USD
Type: Removable Hard Disk
Capacity: 15079.0 MB = 14.7 GB (30881792 x 512)
Partition 1: Filesystem: FAT32 "NO NAME "
GK7102 # fatload mmc 0:1 0xc1000000 zImage
[PROCESS_SEPARATORS] fatload mmc 0:1 0xc1000000 zImage
reading zImage
1686120 bytes read
GK7102 # bootm 0xc1000000
[PROCESS_SEPARATORS] bootm 0xc1000000
put param to memory
mem size (36)
total mem size (64)
bsb size (1)
usr size (0)

the kernel image is zImage or Image
entry = 0xc1000000
## Transferring control to Linux (at address c1000000)...

Starting kernel ...

machid = 3988 r2 = 0xc0000100
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.4.43-gk (jujurou@ubuntu_buildroot) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG 1.20.0) ) #90 PREEMPT Tue Jun 25 12:34:47 UTC 2019
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Goke IPC Board
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AHB: 0x90000000 0xf2000000 -- 0x1000000
[ 0.000000] APB: 0xa0000000 0xf3000000 -- 0x1000000
[ 0.000000] PPM: 0xc0000000 0xc0000000 -- 0x200000
[ 0.000000] BSB: 0xc2600000 0xf5000000 -- 0x100000
[ 0.000000] DSP: 0xc2700000 0xf6000000 -- 0x18f0000
[ 0.000000] USR: 0xc3ff0000 0xfe000000 -- 0x10000
[ 0.000000] hal version = 20160913
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 9144
[ 0.000000] Kernel command line: console=ttySGK0,115200 mem=36M rootfstype=squashfs root=/dev/mtdblock2 init=linuxrc mtdparts=gk_flash:320K(U),1664K(K),1152K(R),2560K(A),-(H)
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 36MB = 36MB total
[ 0.000000] Memory: 31792k/31792k available, 5072k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xff600000 - 0xffe00000 ( 8 MB)
[ 0.000000] vmalloc : 0x82800000 - 0xff000000 (1992 MB)
[ 0.000000] lowmem : 0x80000000 - 0x82400000 ( 36 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x80410000 (4128 kB)
[ 0.000000] .init : 0x80410000 - 0x8042f000 ( 124 kB)
[ 0.000000] .data : 0x80430000 - 0x80457ce0 ( 160 kB)
[ 0.000000] .bss : 0x80457d04 - 0x8048a278 ( 202 kB)
[ 0.000000] NR_IRQS:128
[ 0.000000] >> gk init irq vic1...
[ 0.000000] >> gk init irq vic2...
[ 0.000000] gk init vic...
[ 0.000000] mach gk init timer...
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttySGK0] enabled
[ 0.010000] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 512
[ 0.080000] CPU: Testing write buffer coherency: ok
[ 0.090000] Setting up static identity map for 0xc0542098 - 0xc05420d0
[ 0.100000] NET: Registered protocol family 16
[ 0.110000] init timer...
[ 0.110000] Init HW timer for DSP communication
[ 0.110000] init gpio...
[ 0.120000] ###################################
[ 0.120000] [BOOT VERSION] GK7102 rb-sc1045-v2.0 v2.0
[ 0.130000] [NET INT_CLK] Internal PHY clock
[ 0.130000] [GPIO]#############################
[ 0.140000] [GPIO] gpio map get from uboot
[ 0.140000] [GPIO CFG] gpio count = 53
[ 0.150000] [GPIO CFG] intphy count = 3
[ 0.150000] [GPIO CFG] extphy count = 3
[ 0.160000] [GPIO CFG] IR LED CTL (12)
[ 0.160000] [GPIO CFG] IR CUT1 (44)
[ 0.160000] [GPIO CFG] IR CUT2 (39)
[ 0.170000] [GPIO CFG] SENSOR Reset (27)
[ 0.170000] [GPIO CFG] PHY Reset (53)
[ 0.180000] [GPIO CFG] PHY Speed Led (54)
[ 0.180000] [GPIO CFG] SPI0 EN (53)
[ 0.190000] [GPIO CFG] SPI1 EN (53)
[ 0.190000] [GPIO CFG] USB HOST (53)
[ 0.190000] [GPIO CFG] SD Detect (55)
[ 0.200000] [GPIO CFG] SD Power (55)
[ 0.200000] [GPIO]#############################
[ 0.210000] gpiochip_add: registered GPIOs 0 to 63 on device: gk-gpio0
[ 0.220000] create proc dir
[ 0.220000] gk register devices 10
[ 0.220000] gk register I2C
[ 0.240000] bio: create slab at 0
[ 0.250000] spi spi.0: gk SPI Controller 0 created
[ 0.250000] spi spi.0: master is unqueued, this is deprecated
[ 0.260000] spi spi.1: gk SPI Controller 1 created
[ 0.260000] spi spi.1: master is unqueued, this is deprecated
[ 0.270000] usbcore: registered new interface driver usbfs
[ 0.280000] usbcore: registered new interface driver hub
[ 0.280000] usbcore: registered new device driver usb
[ 0.290000] i2c regbase: 0xf3003000
[ 0.290000] i2c i2c.0: i2c irq:registers 9
[ 0.300000] i2c i2c.0: GK I2C[0] adapter[i2c-0] probed!
[ 0.300000] i2c regbase: 0xf3004000
[ 0.310000] i2c i2c.1: i2c irq:registers 58
[ 0.310000] i2c i2c.1: GK I2C[1] adapter[i2c-1] probed!
[ 0.320000] FS-Cache: Loaded
[ 0.330000] cfg80211: Calling CRDA to update world regulatory domain
[ 0.340000] CacheFiles: Loaded
[ 0.350000] gk-sd gk-sd.0: Slot0 req_size=0x00010000, segs=16, seg_size=0x00010000
[ 0.380000] gk-sd gk-sd.0: GK SD/MMC[0] has 1 slots @ 50181818Hz, [0x09e130b0:0x00000000]
[ 0.390000] NET: Registered protocol family 2
[ 0.390000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.400000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.410000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.420000] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.420000] TCP: reno registered
[ 0.430000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.430000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.440000] NET: Registered protocol family 1
[ 0.450000] RPC: Registered named UNIX socket transport module.
[ 0.460000] RPC: Registered udp transport module.
[ 0.460000] RPC: Registered tcp transport module.
[ 0.470000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.480000] mdma init...
[ 0.480000] mdma request irq: 54
[ 0.490000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.500000] NFS: Registering the id_resolver key type
[ 0.510000] jffs2: version 2.2. (NAND) 2001-2006 Red Hat, Inc.
[ 0.510000] msgmni has been set to 62
[ 0.530000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 0.540000] io scheduler noop registered
[ 0.540000] io scheduler deadline registered
[ 0.550000] io scheduler cfq registered (default)
[ 0.550000] uart.0: ttySGK0 at MMIO 0xa0005000 (irq = 31) is a gkuart
[ 0.560000] uart.1: ttySGK1 at MMIO 0xa001f000 (irq = 15) is a gkuart
[ 0.570000] uart.2: ttySGK2 at MMIO 0xa001e000 (irq = 27) is a gkuart
[ 0.590000] mmc0: new high speed SDHC card at address 59b4
[ 0.600000] brd: module loaded
[ 0.610000] loop: module loaded
[ 0.610000] adc initialized (10:11)
[ 0.620000] speed_mod is 0
[ 0.620000] USE 1X mode read and 1X mode write
[ 0.620000] gk_flash gk_flash.0: GD25Q64C (8192 Kbytes)
[ 0.630000] 5 cmdlinepart partitions found on MTD device gk_flash
[ 0.640000] Creating 5 MTD partitions on "gk_flash":
[ 0.640000] 0x000000000000-0x000000050000 : "U"
[ 0.650000] 0x000000050000-0x0000001f0000 : "K"
[ 0.650000] 0x0000001f0000-0x000000310000 : "R"
[ 0.660000] 0x000000310000-0x000000590000 : "A"
[ 0.670000] 0x000000590000-0x000000800000 : "H"
[ 0.680000] slram: not enough parameters.
[ 0.680000] GKETH_init
[ 0.680000] [GKETH_drv_probe] eth_base = 0xf200e000
[ 0.690000] mii id = 0
[ 0.690000] ###### PHY Reset.1.0.2
[ 0.810000] mdiobus_register: PHY[0] whose id 0x00000000
[ 0.820000] goke MII Bus: probed
[ 0.820000] gk-eth gk-eth.0: MAC Address[02:11:22:a3:a0:00].
[ 0.830000] usbcore: registered new interface driver cdc_wdm
[ 0.830000] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.840000] musb phy Begin initial sequence ...
[ 1.150000] gk musb init end...
[ 1.150000] dma_controller_create_non_init ok
[ 1.160000] musb-hdrc musb-hdrc: MUSB HDRC host driver
[ 1.160000] musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1
[ 1.170000] hub 1-0:1.0: USB hub found
[ 1.180000] hub 1-0:1.0: 1 port detected
[ 1.180000] musb-hdrc musb-hdrc: USB Host mode controller at f0006000 using DMA, IRQ 26
[ 1.190000] platform add gk musb...
[ 1.200000] mousedev: PS/2 mouse device common for all mice
[ 1.200000] input: GKInput as /devices/virtual/input/input0
[ 1.210000] Protocol NEC[0]
[ 1.210000] ir request irq: 62
[ 1.220000] IR Host Controller probed!
[ 1.220000] gk rtc init...
[ 1.220000] rtc base: 0xf2080000
[ 1.230000] os read tm: t=0
[ 1.230000] gk-rtc gk-rtc: rtc core: registered gk-rtc as rtc0
[ 1.240000] i2c /dev entries driver
[ 1.240000] gk_wdt_v1_00: GK Watchdog Timer, (c) 2014 Goke Microelectronics
[ 1.250000] [gk_wdt_init]: init
[ 1.250000] [gk_wdt_probe]: probe
[ 1.260000] [gk_wdt_probe]: probe mapped wdt_base=f3006000
[ 1.260000] watchdog inactive, reset disabled, irq disabled
[ 1.270000] mmcblk0: mmc0:59b4 USD 14.7 GiB
[ 1.280000] mmcblk0: p1
[ 1.280000] IPv4 over IPv4 tunneling driver
[ 1.290000] gre: GRE over IPv4 demultiplexor driver
[ 1.290000] ip_gre: GRE over IPv4 tunneling driver
[ 1.300000] TCP: cubic registered
[ 1.300000] Initializing XFRM netlink socket
[ 1.310000] NET: Registered protocol family 10
[ 1.320000] IPv6 over IPv4 tunneling driver
[ 1.320000] NET: Registered protocol family 17
[ 1.330000] NET: Registered protocol family 15
[ 1.330000] Registering the dns_resolver key type
[ 1.340000] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[ 1.350000] os read tm: t=0
[ 1.350000] gk-rtc gk-rtc: setting system clock to 1970-01-01 00:00:00 UTC (0)
[ 1.370000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 1.380000] Freeing init memory: 124K
[ 1.640000] usb 1-1: new high-speed USB device number 2 using musb-hdrc

can't run '/bin/hostname': No such file or directory
Starting logging: /etc/init.d/S01logging: line 24: start-stop-daemon: not found
/etc/init.d/S01logging: line 24: start-stop-daemon: not found
OK
Starting mdev...
Initializing random number generator... read-only file system detected...done
Starting network...
/etc/init.d/S40network: line 22: /sbin/ifup: not found
GOKE 7102S BOARD 20170515 START:
Press 'q' in 1 seconds to exit: ro_rootfs
[ 5.190000] gpio_dev init suc
insmod: can't open '/home/drv/exfat.ko': No such file or directory
[ 5.310000] exFAT: Version 1.2.9
[ 6.040000] hal: module license 'Proprietary' taints kernel.
[ 6.040000] Disabling lock debugging due to kernel taint
[ 6.080000] crypto initialized (10:11)
[ 6.290000]
Media driver version (gcc version 4.6.1 (crosstool-NG 1.18.0) (uClibc)) v2.0.0 #svn r11887 Thu Apr 27 14:04:15 CST 2017
[ 6.390000] request_irq...24 ok-- video_sync
[ 6.390000] request_irq...59 ok-- video_frame_last_pixel
[ 6.400000] request_irq...61 ok-- video_frame
GOKE ADI: R(10836) LIBC(uClibc) (gcc version 4.6.1 (crosstool-NG[ 6.650000] sensor board reset...
1.18.0) ) 2016-10-27 15:58:20
[ 6.910000] detect:gc2033 at 0x6e
[ 6.920000] gc2033 i2c read 0x000000f0 is 0x00000020
[ 6.920000] gc2033 i2c read 0x000000f1 is 0x00000033
[ 6.930000] ===================================================
[ 6.930000] ================find:gc2033 at 0x6e================
[ 6.940000] ===================================================
find:gc2033 at 0x6e
rm: can't remove '/tmp/sensor_hw.bin': No such file or directory
rm: can't remove '/tmp/sensor_ex.ko.lzma': No such file or directory
mount: mounting /dev/mmcblk0p1 on /mnt failed: Device or resource busy
exec factory_tool.sh .......
ls: /mnt/*-hwcfg.ini: No such file or directory
ls: /mnt/*-VOICE.tgz: No such file or directory
ls: /mnt/*-ptz.cfg: No such file or directory
ls: /mnt/*-hardinfo.bin: No such file or directory
ls: /mnt/*-custom_init.sh: No such file or directory
[ 8.560000] usbcore: registered new interface driver rtl8188fu
[ 10.290000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
ifconfig: SIOCGIFFLAGS: No such device
[ 10.330000] net eth0: ###### GKETH_start_hw
[ 10.340000] net eth0: ###### GKETH_phy_start_aneg...
[ 10.350000] ADDRCONF(NETDEV_UP): eth0: link is not ready
/home/start.sh: line 158: [-f: not found
listen on port 3201.
[ 10.950000] initlializing ptz...
[ 10.950000]
[ 10.950000] Parameters of PTZ driver:
[ 10.960000] test_max_pos = 0
[ 10.960000] max_pps = 1000
[ 10.960000] pulse interval: 100/1000 = 0
[ 10.970000] xchg_dir = 2
[ 10.970000] hspd_slfck = 50
[ 10.970000] vspd_slfck = 30
[ 10.980000] hspd_normal = 50
[ 10.980000] vspd_normal = 30
[ 10.980000] hspd_reloc = 30
[ 10.990000] vspd_reloc = 10
[ 10.990000] spd_zoom = 3
[ 10.990000] hmotor_upbound = 510
[ 11.000000] vmotor_upbound = 180
[ 11.000000] zmotor_upbound = 130
[ 11.000000] no_selfck = 0
[ 11.010000] other_flags = 544
[ 11.010000] hmotor_center = 0
[ 11.010000] vmotor_center = 0
[ 11.020000] other_flags:
[ 11.020000] 0x0001 --- Return to center when power on
[ 11.020000] 0x0002 --- Z-Motor only
[ 11.020000] 0x0004 --- No self-check
[ 11.020000] 0x0008 --- Ignore position
[ 11.020000] 0x0010 --- Respect spd_slfck
[ 11.020000] 0x0020 --- No posotion-switch detection
[ 11.030000] motor pins: 46,47,42,43,40,41,37,38
[ 11.030000] orig position: <185, 45, 0>
[ 11.040000] GK710X gpio ptz(goke timer) device driver[2018.12.14] initialized.
rsyscall_suc
/home/start.sh: line 218: can't create /sys/class/net/ra0/mtu: nonexistent directory
【APP START】:
========v2 pthread statck size 131072===
eye+ wait. av[0] id[0] testMode[0]



===============================
ver: 3.4.1.0114
===============================



========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
0: Watchdog started... feed interval 15 seconds.
Watchdog wd_setTimeOut [15] complete.
gk ic type 1[0- 7102S; 1-7102]
gpio15, 4 parts, pinmux reg[0x0]:[0x0], effectValue[1]
gpio53, 4 parts, pinmux reg[0x0]:[0x0], effectValue[0]
gpio33, 4 parts, pinmux reg[0x0]:[0x0], effectValue[0]
gpio12, 4 parts, pinmux reg[0x0]:[0x0], effectValue[1]
gpio44, 4 parts, pinmux reg[0x0]:[0x0], effectValue[1]
gpio39, 4 parts, pinmux reg[0x0]:[0x0], effectValue[1]
ptz/tty, protocol:0, port:0, bps:2400
ptz/tty, protocol:1, port:0, bps:2400
[HW] max_pps : -1
[HW] max_pps : 1000
[HW] xchg_dir : -1
[HW] xchg_dir : 2
[HW] other_flags : -1
[HW] other_flags : 544
[HW] hmotor_upbound : -1
[HW] hmotor_upbound : 510
[HW] vmotor_upbound : -1
[HW] vmotor_upbound : 180
[HW] hspd_normal : -1
[HW] hspd_normal : 50
[HW] vspd_normal : -1
[HW] vspd_normal : 30
[HW] hspd_slfck : -1
[HW] hspd_slfck : 50
[HW] vspd_slfck : -1
[HW] vspd_slfck : 30
[HW] hspd_reloc : -1
[HW] hspd_reloc : -1
[HW] vspd_reloc : -1
[HW] vspd_reloc : -1
---------open /tmp/sc2135 failed
---------open /tmp/sc2235 failed
---------open /tmp/sc1235 failed
---------open /tmp/ar0130 failed
---------open /tmp/sc1145 failed
---------open /tmp/jxh42 failed
---------open /tmp/sc1135 failed
---------open /tmp/jxh62 failed
---------open /tmp/f22 failed
---------open /tmp/f23 failed
---------open /tmp/gc1034 failed
---------open /tmp/gc2033 ok
######Get Hardware Info: model:CloudCam, firmware-ident:eyeplus_ipc_gk_005
GPIO: RedLed[-1], BlueLed[15], BoardReset[53] ptzSupport[1], LocalImageAuto[2400] promptVoice[1]...
GPIO open success. GIO fd = 8
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
ERROR: gpio = -1 return !
reset sensor ######
silent_reboot_time = 4871
---------open /home/reboot.time failed
sys init finished.
Can't open parameter file /home/devParam.dat on flash, errno=0x2.



-----------------1080p encode param init fps = 12---------------


---------open /home/cls.conf failed
检测到为海外版本
support all id, langauge check from platform, not from VOICE file.
open /etc/passwd file errno=30---------open /mnt/mmc01/cls.conf failed
GET EYE SER: AJWL190415101TD9CS9TRWCUQF006829
l[ 14.380000] net eth0: ###### GKETH_phy_stop
inktest(eth0) = 0
init eth0...
[ 14.390000] net eth0: ###### GKETH_start_hw
[ 14.400000] net eth0: ###### GKETH_phy_start_aneg...
[ 14.400000] device eth0 entered promiscuous mode
[ 14.410000] ADDRCONF(NETDEV_UP): eth0: link is not ready
init wlan0...
NET INTERFACE is wlan0
avEncInit start, sensorMode = 21
GOKE ADI: R(12529) LIBC(uClibc) (gcc version 4.6.1 (crosstool-NG 1.18.0) ) 2017-08-09 16:00:24
[PRI] firmware version:6080.

Image library version (gcc version 4.6.1 (crosstool-NG 1.18.0) (uClibc)) v2.0.0 #svn r11883 Thu Apr 27 10:01:52 CST 2017
[ 15.120000] ===================================================
[ 15.120000] =====gc2033 drv create at 20161117 ver:20170210====
[ 15.130000] ===================================================
[ 15.140000] [sensor_get_dev_id 276]find sensor id: 00002033
[ 15.150000] sensor board reset...
===========================gadi_venc_map_dsp call======================
got sensor size: 1920x1080
viParams:
resoluMode=0x991e021c, frameRate=25, mirrorMode={0,0}

stream_formats:
streamId encodeType channelId flipRotate width height xOffset yOffset fps keepAspRat
0 1 0 0 1920 1080 0 0 12 0
1 1 1 0 640 360 0 0 12 0
2 0 2 0 320 180 0 0 12 0
3 2 1 0 640 360 0 0 3 0

h264Conf:
streamId brcMode cbrAvgBps gopM gopModel gopN idrInterval profile reEncMode vbrMaxbps vbrMinbps
0 1 400000 1 0 80 1 0 1 384000 80000
1 1 130000 1 0 80 1 0 1 200000 60000
2 1 200000 1 0 50 1 0 1 400000 100000
3 1 200000 1 0 50 1 0 1 400000 100000

chanParams:
chan1Type=1, chan1Width=1920, chan1Height=1080
chan2Type=1, chan2Width=640, chan2Height=360
chan3Type=0, chan3Width=320, chan3Height=180
chan4Type=0, chan4Width=0, chan4Height=0
eye+ wait. av[0] id[1] testMode[0]
got sensor size: 1920x1080
[ 16.450000] sensor board reset...
[ 16.720000] hhl add: gain_index=0
[ 16.720000] hhl add: gain: 0x0 0x1 0x0
[ 16.730000] hhl add: gain_index=53
[ 16.730000] hhl add: gain: 0x2 0x1 0x0
[ 16.740000] win_height:0 win_width:0
[ 16.740000] win_height:0 win_width:0
total used free shared buffers
Mem: 31916 16556 15360 0 244
-/+ buffers: 16312 15604
Swap: 0 0 0
/bin/sh: -l: not found
Auto login as root ...
GK710XS login: ############################## venc_isp_start##########################
start stream[0]
=======================================
[GK]DE-MBLK 4x4 basing on 1/16 orig pic version: v2.1.0
=======================================
[ 18.100000] hhl add: gain_index=0
[ 18.110000] hhl add: gain: 0x0 0x1 0x0
start stream[1]
start stream[3]
eye+ wait. av[0] id[1] testMode[0]
VENC INIT OK!
/etc/sensors/gc2033.bin/etc/sensors/gc2033.binbin file name :gc2033
size is 168348
[Loading] sensor bin:gc2033.bin

Handle next connect...
gk_md_start
audio frame size: 160
_audio_ao_start 333792
gadi_audio_ao_set_volume 0xb9
----------------soundDetectInit: sensitivity[98]
========v2 pthread statck size 65536===
[FUN]pda_thread [LINE]1771 face detection init ok
rd storage = /mnt/mmc01/0
local_create_root, root_path = /mnt/mmc01
MountLocalPartitions......
try mount t=vfat dev=/dev/mmcblk0p1 mp=/mnt/mmc01/0......ok
local_create_root, root_path = /mnt/mmc01/0
---------open /opt/upgrading failed
num of local partions: 1
check /mnt/mmc01/0/DUMPLOG
-------------->init sd record, buffer is 1024KB
Wrong date/time of system
========v2 pthread statck size 65536===
IsStorageReady() = 1, p_devcfg_param->recordMode=0
sd record init ok.
eye+ wait. av[1] id[1] testMode[0]
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
#####GOKE_change_bpsfps bpsType = 0 bps = 768 fps = 12 keyFrmae = 60(not use now), quant = 2
sensorType2Name, type=21
------------------venc_video_set_qp--------------
qpMaxOnI[35], qpMaxOnP[42], qpMinOnI[29], qpMinOnP[33]
#####GOKE_change_bpsfps bpsType = 0 bps = 256 fps = 12 keyFrmae = 60(not use now), quant = 2
sensorType2Name, type=21
------------------venc_video_set_qp--------------
qpMaxOnI[35], qpMaxOnP[42], qpMinOnI[29], qpMinOnP[33]
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
--------------SONG TOOL INIT------------
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
========v2 pthread statck size 65536===
---------open /home/reboot.time failed
stat check system time!!!!!!
CTP Server Started at 8001
setsockopt IP_ADD_MEMBERSHIP: No such device
no hswl board, exit hswl_task!
get_ipaddr ioctl error and errno=99 interface_name = wlan0
---------ip got, start onvif-----------
------------uuid is 1df2e14e-1dd2-11b2-8323-304a2681908e and mac = 304a2681908e
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
ctp_proc_live_video, mt=1
Thu Jan 1 08:00:20 CST 1970
-------------------eye+ init---------------
vendor.moduleid: eyeplus_ipc_gk_005
=============CreateDevicePtz OK =============
CreateDevicePlayback
eye+ sdk version: 10823
----------->GetDeviceId buf AJWL190415101TD9CS9TRWCUQF006829
--------------DevSystem_GetMacAddr MAC: 304a2681908e
[p2pwrapper] [08:00:22] [1996362528] LogOn SVN Info[@000]
[ 23.390000] net eth0: ###### GKETH_phy_stop
stat GatherWifiSetting++++++++++++++++++++++++++++


GatherWifiSetting.........
========v2 pthread statck size 131072===
========v2 pthread statck size 65536===
start get vi frame
GetDefaultConfig, get DeviceType: {"gateway":"Off"}
APModePlay = Yes
gk_isp_daynight sensorModel 32774 isday = 1
getVideoStandard : 0
[gk_isp_daynight]gadi_venc_set_framerate:streamid:0,fps:12
[gk_isp_daynight]gadi_venc_set_framerate:streamid:1,fps:12
gk_isp_daynight: set day mode
----------------->sensorModel == GADI_ISP_SENSOR_GC2033, turn to day!
sensorType2Name, type=21
try section isp_gc2033_day...
try section isp_day.[ 23.920000] hhl add: gain_index=0
..
#####IR CUT [ 23.920000] hhl add: gain: 0x0 0x1 0x0
in Day Mode.
TransmitStatistics = No
LiveCtrl = Yes
APModePlay = Yes
APModePlay = Yes
AudioEncode = G711A
inlanPlay = Yes
gk_isp_daynight sensorModel 32774 isday = 0
getVideoStandard : 0
[gk_isp_daynight]gadi_venc_set_framerate:streamid:0,fps:8
[gk_isp_daynight]gadi_venc_set_framerate:streamid:1,fps:8
gk_isp_daynight: set night mode
----------------->sensorModel == GADI_ISP_SENSOR_GC2033, turn to night!
sensorType2Name, type=21
try section isp_gc2033_night...
try section isp_night...
[ 24.960000] hhl add: gain_index=0
[ 24.960000] hhl add: gain: 0x0 0x1 0x0
[OnStatus]--------status: 0x101
[OnStatus]--------device have no account!
random: Trying to read entropy from /dev/random
Configuration file: /tmp/hostapd.conf
drv->ifindex=6
l2_sock_recv==l2_sock_xmit=0x0x19fa570
#####IR CUT in Night Mode.
get_ipaddr ioctl error and errno=99 interface_name = wlan0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 cha[ 27.030000] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
n=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=14 freq=2484 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=52 freq=5260 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=56 freq=5280 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=60 freq=5300 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=64 freq=5320 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=100 freq=5500 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=104 freq=5520 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=108 freq=5540 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=112 freq=5560 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=116 freq=5580 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=120 freq=5600 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=124 freq=5620 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=128 freq=5640 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=132 freq=5660 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=136 freq=5680 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=140 freq=5700 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g Channel: 4 Frequency: 2427 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr 30:4a:26:81:90:8e and ssid 'CLOUDCAM_304a2681908e'
Using existing control interface directory.
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, CLOUDCAM_304a2681908e,21
rtl871x_set_acl
wlan0: Setup of interface done.
wifi ap CLOUDCAM_304a2681908e started ...
killall: dhcpd: no process killed
/home/ap/start-ap.sh: line 12: dhcpd: not found
SoftAPThread terminated.
=============>DevVideo_GetSize called
getMainStreamVideoSize: w 1920 h 1080 [res = 0xa]
audio coding is PCM!
------playSound /tmp/VOICE/Please_configure_camera_by_AP_hotspot_or_scanning_code.wav
playHiAudioFile start /tmp/VOICE/Please_configure_camera_by_AP_hotspot_or_scanning_code.wav..

localhost login: ------playSound /tmp/VOICE/Please_configure_camera_by_AP_hotspot_or_scanning_code.wav over

localhost login: root
Password: EVENT: SOUND detect.


Login timed out Auto login as root ...
localhost login: nux
Password:
Login incorrect
localhost login: root
Password:
Jan 1 08:01:31 login[291]: root login on 'ttySGK0'

-sh: /bin/hostname: not found
#
# uname -a
EVENT: SOUND detect.
Linux localhost 3.4.43-gk #90 PREEMPT Tue Jun 25 12:34:47 UTC 2019 armv6l GNU/Linux
# ===============>watchdog counter 2(n:48,to:45) timeouted!
EVENT: SOUND detect.

# cat /procEVENT: SOUND detect.
/cpuinfo
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 597.60
Features : swp half fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : Goke IPC Board
Revision : 0000
Serial : 0000000000000000
#


kernelが起動してその後もコマンドを実行でき、スマホ上からRTSPで接続してカメラ画像を表示できることを確認しました。ただ、オリジナルと少し異なるログが出ていたりするので、何かしらマージ漏れ or 反映しすぎなところがあると思われます。
スポンサーサイト



tag : Linux

黒ねこ時計 くろック D02
プロフィール

jujurou

Author:jujurou
運営HP:チャコの部屋
Twitter:jujurou

カレンダー
05 | 2019/06 | 07
- - - - - - 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 - - - - - -
最新記事
最新コメント
カテゴリ
ユーザタグ

ぺるけ Linux RaspberryPi 三段化 6P43P-E 全段差動プッシュプル トランジスタ式ミニワッター 6P43P TRminiWatterPart4 MPD DAC OpenOCD FON2405E buildroot イーサネットコンバータ FM3ペリフェラル Bluetooth BeagleBoneBlack ODROID-U2 library FM3評価ボード mingw OpenGL 6N6P bitbake KiCad 計測 プリアンプ Edison VMware FM4 ミニワッター シングル TL-WR700N 

月別アーカイブ
ランキング

FC2 Blog Ranking

カウンター
検索フォーム
リンク
RSSリンクの表示
QRコード
QRコード
ライセンス
クリエイティブ・コモンズ・ライセンス
Twitter