基于android5.1无显示触摸系统的系统镜像裁剪

本文详细介绍了Android系统裁剪的方法,包括编译过程中的配置调整、资源文件的精简及内核模块的选择性移除等内容。

http://blog.youkuaiyun.com/qwertyuiop159158/article/details/50053551 

思路:

         1:   编译后查看out\target\product\product\system文件夹的内容,从这个文件夹入手,裁剪不必要的服务,库文件,apk,等等.
         2:  了解真个编译系统,从编译过程入手,看隐含的可裁剪项,过程和思路很重要
 具体裁剪内容:
         1: build/target/product是编译产品关键的mk文件存放处,此处可以更加各个mk文件编译内容进行裁剪
        base.mk文件:去除不必要的lib库文件和bin文件
        core_minimal.mk:  dmtracedump, Shell, HTMLViewer, screencap等工具和apk等
        core.mk:   libnfc_ndef, mms-common  nfc功能库文件和mms短信功能等
        embedded.mk:    dumpstate, dumpsys
         emulator.mk:     camera.goldfish , camera.goldfish.jpeg , lights.goldfish , gps.goldfish等
        full_base.mk:   去除不需要的库和apk
         full_base_telephony.mk: 去除apk和电话功能
        generic_no_telephony.mk:去除apk和不必要的库
        languages_full.mk,locales_full.mk: 去除不需要的语言设置(可以去除res包的大小)
         2:
             external/icu4c/stubdata/icu-data-default.txt: 修改此文件,去除编译出的icu.dat文件大小,去除不需要的语言,重新用脚本生成想要的dat文件即可
            external/skia/Android.mk: 去除其中test的编译
        3:
             frameworks/base/data/etc/platform.xml: 去除不需要的属性
            frameworks/base/data/fonts/Android.mk: 去除不需要的字体
            frameworks/base/data/fonts/fallback_fonts.xml: 去除不需要的字体
            frameworks/base/data/fonts/fonts.mk: 去除不需要的字体
   裁剪字体的时候,有部分字体是不可删除的以Roboto开头的如 Roboto-Black
        4:
             frameworks/base/data/sounds/AllAudio.mk: 去除不需要的声音文件(除了ui的保留,其他都可以去除)
             frameworks/base/data/videos/VideoPackage1.mk: 去除不需要的视频文件
            frameworks/native/data/etc/handheld_core_hardware.xml: 去除不需要的属性
            frameworks/native/data/etc/tablet_core_hardware.xml:  去除不需要的属性
            frameworks/base/preloaded-classes: 裁剪不必要的资源加载
        5:
             init.rc: 裁剪不需要的本地服务
            system.prop: 裁剪不必要的属性内容


 6.在内核裁剪不必要的模块




 7.其他具体操作:
 7.1 裁剪资源
 PRODUCT_AAPT_CONFIG := mdpi large
PRODUCT_AAPT_PREF_CONFIG := mdpi
 7.2 降低像素密度
  ro.sf.lcd_density=160
 7.3 裁剪语言
 PRODUCT_LOCALES := en_US zh_TW zh_CN
 7.4 去掉gms包
 #$(call inherit-product-if-exists, vendor/google/products/gms_base.mk)
7.5 去掉无用的权限 在/tablet_core_hardware.xml 中
 <permissions>


+  <!--  <feature name="android.hardware.location" />
     <feature name="android.hardware.location.network" />
-<!--
+
     <feature name="android.hardware.sensor.compass" />
--->
+
     <feature name="android.hardware.sensor.accelerometer" />
-<!--
-    <feature name="android.hardware.bluetooth" />
 -->
-    <feature name="android.hardware.touchscreen" />
-    <feature name="android.hardware.touchscreen.multitouch" />
-    <feature name="android.hardware.touchscreen.multitouch.distinct" />




     <!-- basic system services -->
-    <feature name="android.software.app_widgets" />
     <feature name="android.software.connectionservice" />
     <feature name="android.software.voice_recognizers" />
-    <feature name="android.software.backup" />
     <feature name="android.software.home_screen" />
     <feature name="android.software.input_methods" />
-    <feature name="android.software.print" />




7.6 去掉开机动画 和开机logo


7.7 打包(package.sh)的时候删除其他文件 包括 apk, 内核模块, bin文件
rm $OUT/system/vendor/modules/81*.ko
rm $OUT/system/vendor/modules/8723bs.ko
rm $OUT/system/vendor/modules/ad5820_act.ko
rm $OUT/system/vendor/modules/afa750.ko
rm $OUT/system/vendor/modules/ar0330.ko
rm $OUT/system/vendor/modules/aw5306_ts.ko
rm $OUT/system/vendor/modules/esp8089.ko
rm $OUT/system/vendor/modules/dw9714_act.ko
rm $OUT/system/vendor/modules/ft5x_ts.ko
rm $OUT/system/vendor/modules/fxos8700.ko
rm $OUT/system/vendor/modules/gc*.ko
rm $OUT/system/vendor/modules/gsl*.ko
rm $OUT/system/vendor/modules/gt*.ko
rm $OUT/system/vendor/modules/hi253.ko
rm $OUT/system/vendor/modules/icn83xx_ts.ko
rm $OUT/system/vendor/modules/imx214.ko
rm $OUT/system/vendor/modules/icn83xx_ts.ko
rm $OUT/system/vendor/modules/mcs7830.ko
rm $OUT/system/vendor/modules/mma*.ko
rm $OUT/system/vendor/modules/ov*.ko
rm $OUT/system/vendor/modules/rtl8150.ko
rm $OUT/system/vendor/modules/sp*.ko
rm $OUT/system/vendor/modules/bma250.ko
rm $OUT/system/vendor/modules/t8et5.ko
rm $OUT/system/vendor/modules/siv121d.ko
rm $OUT/system/vendor/modules/s5k4*.ko
rm $OUT/system/vendor/modules/qf9700.ko
rm $OUT/system/vendor/modules/vfe_os.ko
rm $OUT/system/vendor/modules/vfe_subdev.ko
rm $OUT/system/vendor/modules/vfe_v4l2.ko
rm $OUT/system/vendor/modules/videobuf-core.ko
rm $OUT/system/vendor/modules/videobuf-dma-contig.ko


rm -rf $OUT/system/app/Calculator
rm -rf $OUT/system/app/HoloSpiralWallpaper
rm -rf $OUT/system/app/Browser
rm -rf $OUT/system/app/Calendar
rm -rf  $OUT/system/app/Camera2
rm -rf  $OUT/system/app/Exchange2
rm -rf  $OUT/system/app/Email
rm -rf $OUT/system/app/Galaxy4
rm -rf $OUT/system/app/Gallery2
rm -rf $OUT/system/app/LiveWallpapers
rm -rf $OUT/system/app/LiveWallpapersPicker
rm -rf $OUT/system/app/PrintSpooler
rm -rf $OUT/system/app/VideoPlayer
rm -rf $OUT/system/app/QuickSearchBox
rm -rf $OUT/system/app/DownloadProviderUi
rm -rf $OUT/system/app/DeskClock
rm -rf $OUT/system/app/PhotoTable
rm -rf $OUT/system/app/HTMLViewer
rm -rf $OUT/system/app/Development
rm -rf $OUT/system/app/PicoTts
rm -rf $OUT/system/app/UserDictionaryProvider
rm -rf $OUT/system/app/Music
rm -rf $OUT/system/app/NoiseField
rm -rf $OUT/system/app/PhaseBeam
rm -rf $OUT/system/app/OpenWnn
rm -rf $OUT/system/app/VisualizationWallpapers
rm -rf $OUT/system/app/DocumentsUI
rm -rf $OUT/system/precopy
rm -rf $OUT/system/priv-app/Contacts
rm -rf $OUT/system/priv-app/CalendarProvider
rm -rf $OUT/system/priv-app/WallpaperCropper
rm -rf $OUT/system/priv-app/MmsService
rm -rf $OUT/system/priv-app/DownloadProvider
rm -rf $OUT/system/priv-app/TelephonyProvider
rm -rf $OUT/system/priv-app/ContactsProvider
rm -rf $OUT/system/priv-app/MusicFX
rm -rf $OUT/system/media/audio/notifications/*
rm  $OUT/system/bin/ntfs-3g.probe
rm  $OUT/system/bin/ntfs-3g
rm  $OUT/system/bin/gdbserver
rm  $OUT/system/bin/usb_modeswitch


7.8 裁剪TTS ,注释如下makefile
   external/skia/Android.mk
  external/svox/pico/lang/all_pico_languages.mk
索智的SC5806开发板的BSP编译手册v1.2.txt 开始时间2016/8/12 18:46 结束时间2016/8/16 10:47 1、下载索智的SC5806的BSP。通过ftp下载。 地址:ftp://sochip.com.cn 账号:SC5806 密码:SC5806201601081633 Xftp 5使用自动传输BSP有点问题。ftp的传输模式有ASCII和 二进制模式。 BSP需要设置为 二进制模式。LeapFTP3.0.1.46_yfy 自动设置为二进制模式了。 估计 Xftp 5 因为设置为ASCII模式最后老是下载不完整。 2、BSP的android包的分块合并 及 解压缩: cat SC5806.android.aa SC5806.android.ab > r58_android_sc5806_20160811.tar.gz rootroot@rootroot-E400:~/wyb/r58_evb_sc5806$ tar zxvf r58_android_sc5806_20160811.tar.gz tar zxvf SC5806.lichee.tar.gz 3、编译lichee内核的时候出现modules中的软链接失效的问题的解决: cp sunxi_schw.ko /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/output/lib/modules/3.4.39/ make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/aw_schw” build gpu module for sun8iw6 android /bin/sh: 1: arm-linux-gnueabi-arm-linux-gnueabi-gcc: not found make:进入目录'/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android' CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/osfunc.o CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mutils.o 没有那个文件或目录 CC [M] /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mmap.o arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. 没有那个文件或目录 make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/osfunc.o] 错误 1 make[3]: *** 正在等待未完成的任务.... arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mutils.o] 错误 1 有那个文件或目录 arm-linux-gnueabi-gcc: fatal error: no input files compilation terminated. make[3]: *** [/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/mmap.o] 错误 1 make[2]: *** [_module_/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild] 错误 2 make[1]: *** [kbuild] 错误 2 make: *** [build] 错误 2 make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android” ERROR: build kernel Failed rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd .. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806$ 进入到文件osfunc.c所在的目录: rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4$ ll 总用量 16 drwxr-xr-x 4 rootroot rootroot 4096 7月 28 15:33 ./ drwxr-xr-x 4 rootroot rootroot 4096 7月 28 16:06 ../ drwxr-xr-x 6 rootroot rootroot 4096 7月 28 15:33 srvkm/ drwxr-xr-x 3 rootroot rootroot 4096 7月 28 15:33 system/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4$ cd srvkm/env/linux/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux$ ll 总用量 64 drwxr-xr-x 2 rootroot rootroot 4096 7月 28 16:06 ./ drwxr-xr-x 3 rootroot rootroot 4096 7月 28 15:33 ../ lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 event.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/event.c lrwxrwxrwx 1 rootroot rootroot 104 7月 28 15:33 ion.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/ion.c lrwxrwxrwx 1 rootroot rootroot 105 7月 28 15:33 mmap.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mmap.c lrwxrwxrwx 1 rootroot rootroot 103 7月 28 15:33 mm.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mm.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 module.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/module.c lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 mutex.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mutex.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 mutils.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/mutils.c lrwxrwxrwx 1 rootroot rootroot 107 7月 28 15:33 osfunc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/osfunc.c lrwxrwxrwx 1 rootroot rootroot 110 7月 28 15:33 osperproc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/osperproc.c lrwxrwxrwx 1 rootroot rootroot 106 7月 28 15:33 pdump.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pdump.c lrwxrwxrwx 1 rootroot rootroot 105 7月 28 15:33 proc.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/proc.c lrwxrwxrwx 1 rootroot rootroot 113 7月 28 15:33 pvr_bridge_k.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_bridge_k.c lrwxrwxrwx 1 rootroot rootroot 110 7月 28 15:33 pvr_debug.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_debug.c lrwxrwxrwx 1 rootroot rootroot 109 7月 28 15:33 pvr_sync.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/pvr_sync.c rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux$ 既可以发现这里文件都是红色标示的:软链接失败。 event.c -> /mnt/king_folder/studio/sdkbuild/R58/lichee/linux-3.4/modules/eurasia_km/services4/srvkm/env/linux/event.c 很显然,这是索智的一个叫king的工程师连接到了他自己的目录了。 我们自己在编译系统的时候,在本机不可能有他的目录,100%就出错了。 给出一种解决方法: rm ~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 -rf ln -s /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/services4 /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 设想1(扩展,经过验证出错!!!!):直接删除软连接的services4,然后拷贝过来链接源的services4,理论上应该也是可以的! 这样就不用每次都删除链接,然后再新建链接了!!!! rm ~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/services4 -rf rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ tar zcvf services4_bak.tar.gz services4/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ cp services4_bak.tar.gz /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km$ cd /home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/binary2_sunxi_android_release/target/kbuild$ tar zxvf services4_bak.tar.gz build gpu module for sun8iw6 android /bin/sh: 1: arm-linux-gnueabi-arm-linux-gnueabi-gcc: not found make:进入目录'/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android' eurasiacon/build/linux2/modules.mk:47: *** In makefile services4/srvkm/env/linux/Linux.mk: Duplicate module srvkm (first seen in eurasiacon/binary2_sunxi_android_release/target/kbuild/services4/srvkm/env/linux/Linux.mk) listed in $(modules)。 停止。 make: *** [build] 错误 2 make:离开目录“/home/rootroot/wyb/r58_evb_sc5806/lichee/linux-3.4/modules/eurasia_km/eurasiacon/build/linux2/sunxi_android” ERROR: build kernel Failed rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ 只能每次都软链接目录(使用绝对路径) 或者一次性解决问题(挨个文件使用相对路径链接好之后打包/有能力的同学可以使用脚本来完成) 设想2(未经验证):比对两个services4中的C文件,使用比对工具拷贝过来覆盖!!!! rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 1. sun8iw1p1 2. sun8iw3p1 3. sun8iw5p1 4. sun8iw6p1 5. sun8iw7p1 6. sun8iw8p1 7. sun8iw9p1 8. sun9iw1p1 Choice: 4 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. f1 1. fpga 2. n1 3. perf1_v1_0 4. perf2_v1_0 5. perf3_v1_0 6. qc 7. sc5806 Choice: 7 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd ../android/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ source build/envsetup.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ lunch 14. octopus_sc5806-eng Which would you like? [aosp_arm-eng] 14 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ extract-bsp rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ make -j8 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ pack 这样编译的系统LCD可以显示。TP不能用。 注意:加载TP的方法。 由于索智SC5806给过来的IMG是可以支持TP的,不过lsmod的时候并没有发现加载的触摸屏ko:gslX8600new.ko (r58_sochip_sc5806_1.4_1.0_v4.zip:r58_sochip_sc5806_1.4_1.0_v4.img) shell@octopus-sc5806:/ $ su shell@octopus-sc5806:/ # lsmod sunxi_schw 13015 0 - Live 0x00000000 (O) sunxi_gmac 21580 0 - Live 0x00000000 cdc_ether 3163 0 - Live 0x00000000 rtl8150 9023 0 - Live 0x00000000 mcs7830 5644 0 - Live 0x00000000 qf9700 5904 0 - Live 0x00000000 asix 13590 0 - Live 0x00000000 usbnet 14128 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000 sunxi_keyboard 3293 0 - Live 0x00000000 bma250 7848 0 - Live 0x00000000 vfe_v4l2 1197152 0 - Live 0x00000000 imx179 8639 0 - Live 0x00000000 ov8865_4lane 13556 0 - Live 0x00000000 ad5820_act 4578 0 - Live 0x00000000 dw9714_act 4077 0 - Live 0x00000000 vfe_subdev 4691 3 vfe_v4l2,imx179,ov8865_4lane, Live 0x00000000 vfe_os 4113 2 vfe_v4l2,vfe_subdev, Live 0x00000000 actuator 944 2 ad5820_act,dw9714_act, Live 0x00000000 cci 23760 5 vfe_v4l2,imx179,ov8865_4lane,ad5820_act,dw9714_act, Live 0x00000000 videobuf_dma_contig 4165 1 vfe_v4l2, Live 0x00000000 videobuf_core 16528 2 vfe_v4l2,videobuf_dma_contig, Live 0x00000000 pvrsrvkm 279395 33 - Live 0x00000000 (O) bcmdhd 630372 0 - Live 0x00000000 hdmi 38647 0 - Live 0x00000000 disp 1039537 6 hdmi, Live 0x00000000 sunxi_tr 9348 1 disp, Live 0x00000000 nand 299831 0 - Live 0x00000000 (O) shell@octopus-sc5806:/ # R:\wyb\r58_evb_sc5806\lichee\tools\pack\chips\sun8iw6p1\configs\sc5806\sys_config.fex ;---------------------------------------------------------------------------------- ;capacitor tp configuration ;external int function ;wakeup output function ;notice --- tp_int_port & tp_io_port use the same port ;---------------------------------------------------------------------------------- [ctp_para] ctp_used = 1 ctp_name = "gsl1688_r58h720" ctp_gesture_wakeup = 0 ctp_twi_id = 0 ctp_twi_addr = 0x40 ;ctp_name = "gsl1688_r58h720" ctp_screen_max_x = 720 ctp_screen_max_y = 1280 ctp_revert_x_flag = 0 ctp_revert_y_flag = 0 ctp_exchange_x_y_flag = 0 ctp_int_port = port:PL07<6><default><3><default> ctp_wakeup = port:PL06<1><default><3><1> ctp_power_ldo = "vcc-ctp" ctp_power_ldo_vol = 3000 ctp_power_io = shell@octopus-sc5806:/ # shell@octopus-sc5806:/ # cd /sys/class/i2c-adapter/i2 i2c-0/ i2c-1/ sys/class/i2c-adapter/i2c-0 < shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0 # ll drwxr-xr-x root root 1970-01-02 08:08 0-001a drwxr-xr-x root root 1970-01-02 08:08 0-0040 --w------- root root 4096 1970-01-02 08:08 delete_device lrwxrwxrwx root root 1970-01-02 08:08 device -> ../../twi.0 -r--r--r-- root root 4096 1970-01-02 08:08 name --w------- root root 4096 1970-01-02 08:08 new_device drwxr-xr-x root root 1970-01-02 08:08 power lrwxrwxrwx root root 1970-01-02 08:08 subsystem -> ../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:08 uevent shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0 # cd 0-0040 shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # ll lrwxrwxrwx root root 1970-01-02 08:08 driver -> ../../../../../bus/i2c/drivers/gslX680 drwxr-xr-x root root 1970-01-02 08:08 input -r--r--r-- root root 4096 1970-01-02 08:08 modalias -r--r--r-- root root 4096 1970-01-02 08:08 name drwxr-xr-x root root 1970-01-02 08:08 power lrwxrwxrwx root root 1970-01-02 08:08 subsystem -> ../../../../../bus/i2c -rw-r--r-- root root 4096 1970-01-02 08:08 uevent shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # cat name gslX680 shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # shell@octopus-sc5806:/sys/class/i2c-adapter/i2c-0/0-0040 # 判断触摸屏的驱动应该是硬件编译进去的。 思路1系统刷机之后,在串口在执行: shell@octopus-sc5806:/system/vendor/modules # su 255|shell@octopus-sc5806:/system/vendor/modules # insmod gslX680new.ko insmod: init_module 'gslX680new.ko' failed (Exec format error) 255|shell@octopus-sc5806:/system/vendor/modules # 出错了。 思路2: R:\wyb\r58_evb_sc5806\android\device\softwinner\octopus-sc5806\init.sun8i.rc # use automatic detecttion insmod ctp & gsensor driver #insmod /system/vendor/modules/sw-device.ko #insmod /system/vendor/modules/gslX680new.ko(打开这里还是有问题) insmod /system/vendor/modules/bma250.ko 在init.rc中直接挂载gslX8600new.ko不可行。 思路3: 直接在menuconfig中设置选中编译:gslX8600new.ko。 编译android的时候报错误。extract-bsp需要拷贝这个ko文件。也许可以通过修改配置文件来解决。 思路4: 正常编译后,在menuconfig中设置选中编译:gslX8600new.ko,然后编译内核,在android中make bootimage。还是有问题。 思路5: 正常编译后,在menuconfig中设置选中编译:gslX8600new.ko,然后重新编译内核(make clean),在android中make bootimage。 当然,只需要保存R:\wyb\r58_evb_sc5806\lichee\linux-3.4\.config,下次编译的时候直接把.config这个文件拷贝过去就可以了。 这样只需要编译一次内核就好!!!! rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ make clean rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ cd .. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun50iw1p1 1. sun8iw1p1 2. sun8iw3p1 3. sun8iw5p1 4. sun8iw6p1 5. sun8iw7p1 6. sun8iw8p1 7. sun8iw9p1 8. sun9iw1p1 Choice: 4 All available platforms: 0. android 1. dragonboard 2. linux 3. camdroid Choice: 0 All available kernel: 0. linux-3.4 Choice: 0 All available boards: 0. f1 1. fpga 2. n1 3. perf1_v1_0 4. perf2_v1_0 5. perf3_v1_0 6. qc 7. sc5806 Choice: 7 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd linux-3.4/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ make ARCH=arm menuconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf Kconfig drivers/net/wireless/bcmdhd/Kconfig:50:warning: defaults for choice values not supported # # configuration written to .config # *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee/linux-3.4$ 修改步骤: Device Drivers ---> Input device support ---> [*] Touchscreens ---> <M> gslX680NEW touchscreen driver 请将: <M> gslX680NEW touchscreen driver 修改为: <*> gslX680NEW touchscreen driver 即可。 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ ./build.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/lichee$ cd ../android/ rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ source build/envsetup.sh rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ lunch 14. octopus_sc5806-eng Which would you like? [aosp_arm-eng] 14 rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ extract-bsp rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ make bootimage rootroot@rootroot-E400:~/wyb/r58_evb_sc5806/android$ pack 重新刷机,这样就可以了。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值