最近编译rk3288源码遇到一个奇怪的问题,正常编译使用的Android源码。如果做一些改动之后。再烧录启动失败很是苦恼,主要报下面错误
kernel 失败日志
[ 4.088148] EXT4-fs (mmcblk0p12): recovery complete
[ 4.088569] EXT4-fs (mmcblk0p12): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
[ 4.088640] fs_mgr: check_fs(): mount(/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata,/data,ext4)=0
[ 4.089558] fs_mgr: Running /sbin/e2fsck on /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata
[ 4.094685] e2fsck: e2fsck 1.42.9 (28-Dec-2013)
[ 4.094716] e2fsck: /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata: clean, 87/65536 files, 8892/262144 blocks
[ 4.099557] EXT4-fs (mmcblk0p12): mounted filesystem with ordered data mode. Opts: noauto_da_alloc,discard,errors=panic
[ 4.099610] fs_mgr: __mount(source=/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata,target=/data,type=ext4)=0
[ 4.099624] fs_mgr: mount_with_alternatives(): Mounted /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata on /data with fs_type=ext4 instead of f2fs
[ 4.114656] mali_kbase: version magic '3.10.0 SMP preempt mod_unload ARMv7 p2v8 ' should be '3.10.0+ SMP preempt mod_unload ARMv7 p2v8 '
[ 4.115626] rk29_ipp: version magic '3.0.8+ SMP preempt mod_unload ARMv7 ' should be '3.10.0+ SMP preempt mod_unload ARMv7 p2v8 '
[ 4.116342] rk29_ipp: version magic '3.0.36+ SMP preempt mod_unload ARMv7 ' should be '3.10.0+ SMP preempt mod_unload ARMv7 p2v8 '
[ 4.117034] rk29_ipp: version magic '3.0.101+ SMP preempt mod_unload ARMv7 ' should be '3.10.0+ SMP preempt mod_unload ARMv7 p2v8 '
[ 4.117938] zram0: detected capacity change from 0 to 533413888
[ 4.179195] Adding 520908k swap on /dev/block/zram0. Priority:-1 extents:1 across:520908k SS
[ 4.212235] EXT4-fs (mmcblk0p12): Unrecognized mount option "background_gc=on" or missing value
[ 4.218352] bat_cap: oldcap path is /sys/devices/ff100000.adc
[ 4.218391] bat_cap: oldcap_path no exist
[ 4.218517] binder: 147:147 transaction failed 29189, size 0-0
[ 4.218892] init: Warning! Service displayd needs a SELinux domain defined; please fix!
正常开机kernel日志
[ 4.053321] EXT4-fs (mmcblk0p12): recovery complete
[ 4.053741] EXT4-fs (mmcblk0p12): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=remount-ro
[ 4.053809] fs_mgr: check_fs(): mount(/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata,/data,ext4)=0
[ 4.054772] fs_mgr: Running /sbin/e2fsck on /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata
[ 4.059909] e2fsck: e2fsck 1.42.9 (28-Dec-2013)
[ 4.059940] e2fsck: /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata: clean, 512/65536 files, 24112/262144 blocks
[ 4.064803] EXT4-fs (mmcblk0p12): mounted filesystem with ordered data mode. Opts: noauto_da_alloc,discard,errors=panic
[ 4.064859] fs_mgr: __mount(source=/dev/block/platform/ff0f0000.rksdmmc/by-name/userdata,target=/data,type=ext4)=0
[ 4.064873] fs_mgr: mount_with_alternatives(): Mounted /dev/block/platform/ff0f0000.rksdmmc/by-name/userdata on /data with fs_type=ext4 instead of f2fs
[ 4.081348] arm_release_ver of this mali_ko is 'r6p0-02rel0', rk_ko_ver is '13', built at '09:15:10', on 'Oct 22 2015'.
[ 4.081418] mali ffa30000.gpu: Continuing without Mali clock control
[ 4.081451] mali pd enabled
[ 4.081458] clk enabled
[ 4.082773] MALI_DVFS_STEP = 5, div_dvfs = 7
[ 4.082782] mali_dvfs_infotbl[0].clock=99000,min_threshold=0,max_threshold=70
[ 4.082789] mali_dvfs_infotbl[1].clock=198000,min_threshold=65,max_threshold=77
[ 4.082795] mali_dvfs_infotbl[2].clock=297000,min_threshold=75,max_threshold=84
[ 4.082802] mali_dvfs_infotbl[3].clock=417000,min_threshold=82,max_threshold=91
[ 4.082808] mali_dvfs_infotbl[4].clock=480000,min_threshold=94,max_threshold=100
[ 4.082893] gpufreq_input_connect
[ 4.082903] turn on mali power
[ 4.082910] kbase_platform_rk_init,register_reboot_notifier
[ 4.082949] hrtimer: interrupt took 10791 ns
[ 4.083031] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1
[ 4.085077] mali ffa30000.gpu: Probed as mali0
[ 4.086733] rk29_ipp: version magic '3.0.8+ SMP preempt mod_unload ARMv7 ' should be '3.10.0 SMP preempt mod_unload ARMv7 p2v8 '
[ 4.087457] rk29_ipp: version magic '3.0.36+ SMP preempt mod_unload ARMv7 ' should be '3.10.0 SMP preempt mod_unload ARMv7 p2v8 '
[ 4.088164] rk29_ipp: version magic '3.0.101+ SMP preempt mod_unload ARMv7 ' should be '3.10.0 SMP preempt mod_unload ARMv7 p2v8 '
[ 4.089051] zram0: detected capacity change from 0 to 533413888
[ 4.150924] Adding 520908k swap on /dev/block/zram0. Priority:-1 extents:1 across:520908k SS
[ 4.181575] EXT4-fs (mmcblk0p12): Unrecognized mount option "background_gc=on" or missing value
[ 4.188992] bat_cap: oldcap path is /sys/devices/ff100000.adc
[ 4.189032] bat_cap: oldcap_path no exist
[ 4.189161] binder: 152:152 transaction failed 29189, size 0-0
Android logcat 日志
I/AudioFlinger( 157): Using default 3000 mSec as standby time.
I/ServiceManager( 157): Waiting for service batterystats...
D/MDnsDS ( 153): MDnsSdListener::Hander starting up
D/MDnsDS ( 153): MDnsSdListener starting to monitor
D/MDnsDS ( 153): Going to poll with pollCount 1
D/libEGL ( 151): loaded /vendor/lib/egl/libGLES_mali.so
I/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 151): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 151): Function call returned error : err = 3.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 151): Function call returned error : err = 3.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 151): fail to deal with version affairs of rk_ext. err : 3.
E/mali ( 151): ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
E/mali ( 151): The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched:
I/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 151): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 151): Function call returned error : err = 3.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 151): Function call returned error : err = 3.
E/mali_so ( 151): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 151): fail to deal with version affairs of rk_ext. err : 3.
W/libEGL ( 151): eglInitialize(0xb76c7bd8) failed (EGL_NOT_INITIALIZED)
I/gralloc ( 151): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 151): to open device 'fb0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 151): gralloc_device_open new neiw fd=11
D/gralloc ( 151): g_MMU_stat=0
I/gralloc ( 151): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 151): to open device 'gpu0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 151): gralloc_device_open new neiw fd=11
D/gralloc ( 151): g_MMU_stat=0
I/[Gralloc]( 151): using (fd=12)
I/[Gralloc]( 151): id = fb0
I/[Gralloc]( 151): xres = 1024 px
I/[Gralloc]( 151): yres = 600 px
I/[Gralloc]( 151): xres_virtual = 1024 px
I/[Gralloc]( 151): yres_virtual = 1800 px
I/[Gralloc]( 151): bpp = 32
I/[Gralloc]( 151): r = 16:8
I/[Gralloc]( 151): g = 8:8
I/[Gralloc]( 151): b = 0:8
I/[Gralloc]( 151): format = 2
I/[Gralloc]( 151): width = 163 mm (159.568100 dpi)
I/[Gralloc]( 151): height = 95 mm (160.421051 dpi)
I/[Gralloc]( 151): refresh rate = 54.51 Hz
D/hwcomposer( 151): hwc_device_open(8694):Open hwc device in thread=151
D/hwcomposer( 151): context->ddrFd ok
I/gralloc ( 151): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 151): to open device 'gpu0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 151): gralloc_device_open new neiw fd=17
D/gralloc ( 151): g_MMU_stat=0
D/hwcomposer( 151): Dim buffer alloc fd [1024x600,f=4],fd=18
D/hwcomposer( 151): Frame buffer alloc fd [32x32,f=4],fd=19
D/hwcomposer( 151): RGA HWComposer verison1.0.0
D/hwcomposer( 151): Device: 0xb76c8048
D/hwcomposer( 151): fb_fps=54.506001
D/hwcomposer( 151): RK_GRAPHICS_VER=commit-id:
D/hwcomposer( 151): rga version =2.000
I/SurfaceFlinger( 151): Using composer version 1.3
W/SurfaceFlinger( 151): no suitable EGLConfig found, trying a simpler query
F/SurfaceFlinger( 151): no suitable EGLConfig found, giving up
F/libc ( 151): Fatal signal 6 (SIGABRT), code -6 in tid 151 (surfaceflinger)
D/hwcomposer( 151): hwc_control_3dmode_thread creat
I/DEBUG ( 154): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 154): Build fingerprint: 'Android/rk3288/rk3288:5.1.1/LMY49F/stonecom06121244:eng/release-keys'
I/DEBUG ( 154): Revision: '0'
I/DEBUG ( 154): ABI: 'arm'
I/DEBUG ( 154): pid: 151, tid: 151, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
I/DEBUG ( 154): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG ( 154): Abort message: 'no suitable EGLConfig found, giving up'
I/DEBUG ( 154): r0 00000000 r1 00000097 r2 00000006 r3 00000000
I/DEBUG ( 154): r4 b6f3ae38 r5 00000006 r6 00000000 r7 0000010c
I/DEBUG ( 154): r8 b76be550 r9 00000000 sl 00000000 fp 00000001
I/DEBUG ( 154): ip 00000097 sp bef51280 lr b6ea6db1 pc b6ecced8 cpsr 600e0010
I/DEBUG ( 154):
I/DEBUG ( 154): backtrace:
I/DEBUG ( 154): #00 pc 0003ced8 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 154): #01 pc 00016dad /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 154): #02 pc 000179bf /system/lib/libc.so (raise+10)
I/DEBUG ( 154): #03 pc 00014165 /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG ( 154): #04 pc 000124ec /system/lib/libc.so (abort+4)
I/DEBUG ( 154): #05 pc 00007bb9 /system/lib/libcutils.so (__android_log_assert+88)
I/DEBUG ( 154): #06 pc 000284f9 /system/lib/libsurfaceflinger.so
I/DEBUG ( 154): #07 pc 000280f5 /system/lib/libsurfaceflinger.so
I/DEBUG ( 154): #08 pc 0001849b /system/lib/libsurfaceflinger.so (android::SurfaceFlinger::init()+158)
I/DEBUG ( 154): #09 pc 00000b55 /system/bin/surfaceflinger
I/DEBUG ( 154): #10 pc 0001239d /system/lib/libc.so (__libc_init+44)
I/DEBUG ( 154): #11 pc 00000c74 /system/bin/surfaceflinger
I/DEBUG ( 154):
I/DEBUG ( 154): Tombstone written to: /data/tombstones/tombstone_07
I/ServiceManager( 148): service 'media.audio_flinger' died
I/Netd ( 423): Netd 1.0 starting
I/SurfaceFlinger( 424): SurfaceFlinger is starting
I/SurfaceFlinger( 424): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL ( 424): loaded /vendor/lib/egl/libGLES_mali.so
I/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 424): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 424): Function call returned error : err = 3.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 424): Function call returned error : err = 3.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 424): fail to deal with version affairs of rk_ext. err : 3.
E/mali ( 424): ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
E/mali ( 424): The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched:
I/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 424): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 424): Function call returned error : err = 3.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 424): Function call returned error : err = 3.
E/mali_so ( 424): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 424): fail to deal with version affairs of rk_ext. err : 3.
W/libEGL ( 424): eglInitialize(0xb7623c20) failed (EGL_NOT_INITIALIZED)
I/gralloc ( 424): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 424): to open device 'fb0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 424): gralloc_device_open new neiw fd=11
D/gralloc ( 424): g_MMU_stat=0
I/gralloc ( 424): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 424): to open device 'gpu0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 424): gralloc_device_open new neiw fd=11
D/gralloc ( 424): g_MMU_stat=0
I/[Gralloc]( 424): using (fd=12)
I/[Gralloc]( 424): id = fb0
I/[Gralloc]( 424): xres = 1024 px
I/[Gralloc]( 424): yres = 600 px
I/[Gralloc]( 424): xres_virtual = 1024 px
I/[Gralloc]( 424): yres_virtual = 1800 px
I/[Gralloc]( 424): bpp = 32
I/[Gralloc]( 424): r = 16:8
I/[Gralloc]( 424): g = 8:8
I/[Gralloc]( 424): b = 0:8
I/[Gralloc]( 424): format = 2
I/[Gralloc]( 424): width = 163 mm (159.568100 dpi)
I/[Gralloc]( 424): height = 95 mm (160.421051 dpi)
I/[Gralloc]( 424): refresh rate = 54.51 Hz
D/hwcomposer( 424): hwc_device_open(8694):Open hwc device in thread=424
D/hwcomposer( 424): context->ddrFd ok
I/gralloc ( 424): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 424): to open device 'gpu0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 424): gralloc_device_open new neiw fd=17
D/gralloc ( 424): g_MMU_stat=0
W/linker ( 425): libffmpeg.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
I/mediaserver( 425): ServiceManager: 0xb88c57f8
I/AudioFlinger( 425): Using default 3000 mSec as standby time.
I/ServiceManager( 425): Waiting for service batterystats...
D/hwcomposer( 424): Dim buffer alloc fd [1024x600,f=4],fd=18
D/hwcomposer( 424): Frame buffer alloc fd [32x32,f=4],fd=19
D/hwcomposer( 424): RGA HWComposer verison1.0.0
D/hwcomposer( 424): Device: 0xb7624040
D/hwcomposer( 424): fb_fps=54.506001
D/hwcomposer( 424): RK_GRAPHICS_VER=commit-id:
D/hwcomposer( 424): rga version =2.000
I/SurfaceFlinger( 424): Using composer version 1.3
W/SurfaceFlinger( 424): no suitable EGLConfig found, trying a simpler query
F/SurfaceFlinger( 424): no suitable EGLConfig found, giving up
F/libc ( 424): Fatal signal 6 (SIGABRT), code -6 in tid 424 (surfaceflinger)
D/hwcomposer( 424): hwc_control_3dmode_thread creat
D/AndroidRuntime( 426): >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
I/DEBUG ( 154): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 154): Build fingerprint: 'Android/rk3288/rk3288:5.1.1/LMY49F/stonecom06121244:eng/release-keys'
I/DEBUG ( 154): Revision: '0'
I/DEBUG ( 154): ABI: 'arm'
I/DEBUG ( 154): pid: 424, tid: 424, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
I/DEBUG ( 154): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
D/AndroidRuntime( 426): CheckJNI is OFF
I/AndroidRuntime( 426): JNI options: '-Xjniopts:warnonly'
I/art ( 426): option[0]=-Xzygote
I/art ( 426): option[1]=-Xstacktracefile:/data/anr/traces.txt
I/art ( 426): option[2]=-Xjniopts:warnonly
I/art ( 426): option[3]=exit
I/art ( 426): option[4]=vfprintf
I/art ( 426): option[5]=sensitiveThread
I/art ( 426): option[6]=-verbose:gc
I/art ( 426): option[7]=-Xms16m
I/art ( 426): option[8]=-Xmx512m
I/art ( 426): option[9]=-XX:mainThreadStackSize=24K
I/art ( 426): option[10]=-XX:HeapGrowthLimit=192m
I/art ( 426): option[11]=-XX:HeapMinFree=512k
I/art ( 426): option[12]=-XX:HeapMaxFree=8m
I/art ( 426): option[13]=-XX:HeapTargetUtilization=0.75
I/art ( 426): option[14]=-Xgenregmap
I/art ( 426): option[15]=-Xgc:precise
I/art ( 426): option[16]=-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y
I/art ( 426): option[17]=-Ximage-compiler-option
I/art ( 426): option[18]=--runtime-arg
I/art ( 426): option[19]=-Ximage-compiler-option
I/art ( 426): option[20]=-Xms64m
I/art ( 426): option[21]=-Ximage-compiler-option
I/art ( 426): option[22]=--runtime-arg
I/art ( 426): option[23]=-Ximage-compiler-option
I/art ( 426): option[24]=-Xmx64m
I/art ( 426): option[25]=-Ximage-compiler-option
I/art ( 426): option[26]=--compiler-filter=verify-none
I/art ( 426): option[27]=-Ximage-compiler-option
I/art ( 426): option[28]=--image-classes=/system/etc/preloaded-classes
I/art ( 426): option[29]=-Xcompiler-option
I/art ( 426): option[30]=--runtime-arg
I/art ( 426): option[31]=-Xcompiler-option
I/art ( 426): option[32]=-Xms64m
I/art ( 426): option[33]=-Xcompiler-option
I/art ( 426): option[34]=--runtime-arg
I/art ( 426): option[35]=-Xcompiler-option
I/art ( 426): option[36]=-Xmx512m
I/art ( 426): option[37]=-Xcompiler-option
I/art ( 426): option[38]=--compiler-filter=interpret-only
I/art ( 426): option[39]=-Duser.language=en
I/art ( 426): option[40]=-Duser.region=US
W/art ( 426): Incomplete boot detected. Pruning dalvik cache
I/DEBUG ( 154): Abort message: 'no suitable EGLConfig found, giving up'
I/DEBUG ( 154): r0 00000000 r1 000001a8 r2 00000006 r3 00000000
I/DEBUG ( 154): r4 b6f45e38 r5 00000006 r6 00000000 r7 0000010c
I/DEBUG ( 154): r8 b761a550 r9 00000000 sl 00000000 fp 00000001
I/DEBUG ( 154): ip 000001a8 sp bef97280 lr b6eb1db1 pc b6ed7ed8 cpsr 600e0010
I/DEBUG ( 154):
I/DEBUG ( 154): backtrace:
I/DEBUG ( 154): #00 pc 0003ced8 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 154): #01 pc 00016dad /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 154): #02 pc 000179bf /system/lib/libc.so (raise+10)
I/DEBUG ( 154): #03 pc 00014165 /system/lib/libc.so (__libc_android_abort+36)
I/DEBUG ( 154): #04 pc 000124ec /system/lib/libc.so (abort+4)
I/DEBUG ( 154): #05 pc 00007bb9 /system/lib/libcutils.so (__android_log_assert+88)
I/DEBUG ( 154): #06 pc 000284f9 /system/lib/libsurfaceflinger.so
I/DEBUG ( 154): #07 pc 000280f5 /system/lib/libsurfaceflinger.so
I/DEBUG ( 154): #08 pc 0001849b /system/lib/libsurfaceflinger.so (android::SurfaceFlinger::init()+158)
I/DEBUG ( 154): #09 pc 00000b55 /system/bin/surfaceflinger
I/DEBUG ( 154): #10 pc 0001239d /system/lib/libc.so (__libc_init+44)
I/DEBUG ( 154): #11 pc 00000c74 /system/bin/surfaceflinger
W/art ( 426): Invalid image header in '/data/dalvik-cache/arm/system@framework@boot.art'
I/art ( 426): Pruning dalvik-cache since we are generating an image and will need to recompile
I/art ( 426): Using an offset of 0x3cf000 from default art base address of 0x70000000
I/art ( 426): GenerateImage: /system/bin/dex2oat --image=/data/dalvik-cache/arm/system@framework@boot.art --dex-file=/system/framework/core-libart.jar --dex-file=/system/framework/conscrypt.jar --dex-file=/system/framework/okhttp.jar --dex-file=/system/framework/core-junit.jar --dex-file=/system/framework/bouncycastle.jar --dex-file=/system/framework/ext.jar --dex-file=/system/framework/framework.jar --dex-file=/system/framework/telephony-common.jar --dex-file=/system/framework/voip-common.jar --dex-file=/system/framework/ims-common.jar --dex-file=/system/framework/mms-common.jar --dex-file=/system/framework/android.policy.jar --dex-file=/system/framework/apache-xml.jar --oat-file=/data/dalvik-cache/arm/system@framework@boot.oat --instruction-set=arm --instruction-set-features=div --base=0x703cf000 --runtime-arg -Xms64m --runtime-arg -Xmx64m --compiler-filter=verify-none --image-classes=/system/etc/preloaded-classes
I/dex2oat ( 506): /system/bin/dex2oat --image=/data/dalvik-cache/arm/system@framework@boot.art --dex-file=/system/framework/core-libart.jar --dex-file=/system/framework/conscrypt.jar --dex-file=/system/framework/okhttp.jar --dex-file=/system/framework/core-junit.jar --dex-file=/system/framework/bouncycastle.jar --dex-file=/system/framework/ext.jar --dex-file=/system/framework/framework.jar --dex-file=/system/framework/telephony-common.jar --dex-file=/system/framework/voip-common.jar --dex-file=/system/framework/ims-common.jar --dex-file=/system/framework/mms-common.jar --dex-file=/system/framework/android.policy.jar --dex-file=/system/framework/apache-xml.jar --oat-file=/data/dalvik-cache/arm/system@framework@boot.oat --instruction-set=arm --instruction-set-features=div --base=0x703cf000 --runtime-arg -Xms64m --runtime-arg -Xmx64m --compiler-filter=verify-none --image-classes=/system/etc/preloaded-classes
I/DEBUG ( 154):
....
I/SurfaceFlinger( 705): SurfaceFlinger is starting
I/SurfaceFlinger( 705): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL ( 705): loaded /vendor/lib/egl/libGLES_mali.so
I/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 705): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 705): Function call returned error : err = 3.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 705): Function call returned error : err = 3.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 705): fail to deal with version affairs of rk_ext. err : 3.
E/mali ( 705): ERROR: The DDK is not compatible with any of the Mali GPUs on the system.
E/mali ( 705): The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched:
I/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 780; [Func] : base_context_deal_with_version_affairs_rk_ext;
I/mali_so ( 705): arm_release_ver of this mali_so is 'r6p0-02rel0', rk_so_ver is '11@0', built at '17:59:04', on 'Aug 12 2015'.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 834; [Func] : get_ver_info_from_mali_ko_rk_ext;
E/mali_so ( 705): Function call returned error : err = 3.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_kbase.c; [Line] : 782; [Func] : base_context_deal_with_version_affairs_rk_ext;
E/mali_so ( 705): Function call returned error : err = 3.
E/mali_so ( 705): [File] : hardware/arm/maliT760/driver/product/base/src/mali_base_context.c; [Line] : 236; [Func] : basep_context_init;
E/mali_so ( 705): fail to deal with version affairs of rk_ext. err : 3.
W/libEGL ( 705): eglInitialize(0xb881bbe0) failed (EGL_NOT_INITIALIZED)
I/gralloc ( 705): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 705): to open device 'fb0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 705): gralloc_device_open new neiw fd=11
D/gralloc ( 705): g_MMU_stat=0
I/gralloc ( 705): [File] : hardware/rockchip/libgralloc/gralloc_module.cpp; [Line] : 66; [Func] : gralloc_device_open;
I/gralloc ( 705): to open device 'gpu0' in gralloc_module with ver '1.0.2' on arm_release_ver 'r6p0-02rel0', built at '12:51:53', on 'Jun 12 2018'.
D/gralloc ( 705): gralloc_device_open new neiw fd=11
D/gralloc ( 705): g_MMU_stat=0
I/[Gralloc]( 705): using (fd=12)
I/[Gralloc]( 705): id = fb0
I/[Gralloc]( 705): xres = 1024 px
从logcat 日志可以看出surfaceflinger 已经崩溃了。
我们知道 surfaceflinger是Android的标准框架之一,不会有大的bug,而且我没有修改任何surfaceflinger 的内容,所以考虑之后只能是kernel初始化加载相关模块出现错误导致surfaceflinger 获取资源失败,
所以自己对比 正常开机和错误的 kernel 相关日志,
其中这段文字很重要
mali_kbase: version magic ‘3.10.0 SMP preempt mod_unload ARMv7 p2v8 ’ should be ‘3.10.0+ SMP preempt mod_unload ARMv7 p2v8 ‘
正常开机不会存在这个日志的。而且正常开机会打印很多 GPU驱动初始化相关信息。
[ 4.081418] mali ffa30000.gpu: Continuing without Mali clock control
[ 4.081451] mali pd enabled
[ 4.081458] clk enabled
[ 4.082773] MALI_DVFS_STEP = 5, div_dvfs = 7
[ 4.082782] mali_dvfs_infotbl[0].clock=99000,min_threshold=0,max_threshold=70
[ 4.082789] mali_dvfs_infotbl[1].clock=198000,min_threshold=65,max_threshold=77
[ 4.082795] mali_dvfs_infotbl[2].clock=297000,min_threshold=75,max_threshold=84
[ 4.082802] mali_dvfs_infotbl[3].clock=417000,min_threshold=82,max_threshold=91
[ 4.082808] mali_dvfs_infotbl[4].clock=480000,min_threshold=94,max_threshold=100
[ 4.082893] gpufreq_input_connect
[ 4.082903] turn on mali power
[ 4.082910] kbase_platform_rk_init,register_reboot_notifier
[ 4.082949] hrtimer: interrupt took 10791 ns
[ 4.083031] mali ffa30000.gpu: GPU identified as 0x0750 r0p0 status 1
[ 4.085077] mali ffa30000.gpu: Probed as mali0
这些都不在开机失败的kernel日志中,所以初步判断是mali(GPU)初始化 失败,查找失败打印的日志在源码中的位置
kernel/kernel/module.c
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
const char *modmagic = get_modinfo(info, "vermagic");
int err;
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
/* This is allowed: modprobe --force will invalidate it. */
if (!modmagic) {
err = try_to_force_load(mod, "bad vermagic");
if (err)
return err;
} else if (!same_magic(modmagic, vermagic, info->index.vers)) {
printk(KERN_ERR "%s: version magic '%s' should be '%s'\n",
mod->name, modmagic, vermagic);
return -ENOEXEC;
}
if (!get_modinfo(info, "intree"))
add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
if (get_modinfo(info, "staging")) {
add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK);
printk(KERN_WARNING "%s: module is from the staging directory,"
" the quality is unknown, you have been warned.\n",
mod->name);
}
/* Set up license info based on the info section */
set_license(mod, get_modinfo(info, "license"));
return 0;
}
这个函数被layout_and_allocate(初始化模块分配内存)函数引用,layout_and_allocate被load_module(主要加载驱动模块)
mali_kbase: version magic ‘3.10.0 SMP preempt mod_unload ARMv7 p2v8 ’ should be ‘3.10.0+ SMP preempt mod_unload ARMv7 p2v8 ’
就是check_modinfo 函数中
printk(KERN_ERR "%s: version magic '%s' should be '%s'\n",
mod->name, modmagic, vermagic);
static inline int same_magic(const char *amagic, const char *bmagic,
bool has_crcs)
{
if (has_crcs) {
amagic += strcspn(amagic, " ");
bmagic += strcspn(bmagic, " ");
}
return strcmp(amagic, bmagic) == 0;
}
对比vermagic信息是否相等
modmagic = 3.10.0 SMP preempt mod_unload ARMv7 p2v8
vermagic = 3.10.0+ SMP preempt mod_unload ARMv7 p2v8
两者明显不相等。
我自己根本没有改动过相关kernel 源码,怎么会多出来一个 + 号,
vermagic 的内核源码定义为
static const char vermagic[] = VERMAGIC_STRING;
#define VERMAGIC_STRING \
UTS_RELEASE " " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
MODULE_ARCH_VERMAGIC
其中 #define UTS_RELEASE “3.10.0+” 文件位置是include/generated/utsrelease.h
utsrelease.h 是一个编译生成的文件,直接修改这个文件不起作用,
只有找到在哪生成修改才行,在Make file 有
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
看来UTS_RELEASE 是由include/config/kernel.release生成的,
cat include/config/kernel.release
3.10.0+
而kernel.release这个文件也不是系统自己就有的,也是编译时候生成的,在搜索Makefile得到
# Store (new) KERNELRELASE string in include/config/kernel.release
include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctre
e))" > $@
看来是由setlocalversion这个脚本生成的,
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
fi
如果定义了CONFIG_LOCALVERSION_AUTO(CONFIG_LOCALVERSION_AUTO=y)
此时会执行第一个if下的脚本。执行res=”
res
r
e
s
(scm_version)”
如果代码属于git管理:
打了tag,则会添加tag相关字符;
没有打tag,则会添加log相加字符,例如最新的commit是
commit cdebe039ded3e7fcd00c6e5603a878b14d7e564e
则编译之后文件include/config/kernel.release的内容为2.6.35.7-gcdeb
2.2. 如果没有定义了CONFIG_LOCALVERSION_AUTO。
此时会执行else下的脚本。
A. 如果没有定义LOCALVERSION,版本号后面会添加“+”号:执行else里的if下的脚本scm=$(scm_version –short),在函数scm_version –short里,如果传入参数short会添加“+”号,
if $short; then
echo "+"
return
fi
B. 定义了LOCALVERSION则不会执行else里if所在的脚本,从而不会在后面添加“+”号。
C. LOCALVERSION变量可在命令行定义:
make LOCALVERSION=.88 include/config/kernel.release
或者添加为环境变量。
如果既不想添加字符,又不想有“+”号:不定义CONFIG_LOCALVERSION_AUTO,将LOCALVERSION变量定义为空:LOCALVERSION=
另外一中简单方法修改直接
#define VERMAGIC_STRING \
"3.10.0" " " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
MODULE_ARCH_VERMAGIC
重新编译Android 源码, 解决问题!!!!!!!!!