東川印記

一本東川,笑看爭龍斗虎;寰茫兦者,度橫佰昧人生。

android源码编译09之nexus7到手02烧录内核

2015年5月18日星期一



ROM搞完了,开搞内核。
看表

看表这意思是说,下的话下msm的,编的配置用 flo_defconfig, 编完以后放到 device/asus /flo-kernel/kernel下面。
上面只是我的猜测!
看了下面的解释,发现nexus7是tegra的代表。。。。



然后怎么办,查看一下系统信息
  1. shell@deb:/ $ getprop                                                         
  2. [af.resampler.quality]: [4]
  3. [bluetooth.hciattach]: [true]
  4. [bluetooth.status]: [on]
  5. [camera.disable_zsl_mode]: [1]
  6. [dalvik.vm.dexopt-flags]: [m=y]
  7. [dalvik.vm.heapgrowthlimit]: [192m]
  8. [dalvik.vm.heapmaxfree]: [8m]
  9. [dalvik.vm.heapminfree]: [512k]
  10. [dalvik.vm.heapsize]: [512m]
  11. [dalvik.vm.heapstartsize]: [16m]
  12. [dalvik.vm.heaptargetutilization]: [0.75]
  13. [dalvik.vm.lockprof.threshold]: [500]
  14. [dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
  15. [debug.egl.recordable.rgba8888]: [1]
  16. [debug.force_rtl]: [0]
  17. [dev.bootcomplete]: [1]
  18. [dhcp.wlan0.dns1]: [192.168.2.1]
  19. [dhcp.wlan0.dns2]: []
  20. [dhcp.wlan0.dns3]: []
  21. [dhcp.wlan0.dns4]: []
  22. [dhcp.wlan0.domain]: []
  23. [dhcp.wlan0.gateway]: [192.168.2.1]
  24. [dhcp.wlan0.ipaddress]: [192.168.2.73]
  25. [dhcp.wlan0.leasetime]: [85536]
  26. [dhcp.wlan0.mask]: [255.255.255.0]
  27. [dhcp.wlan0.mtu]: []
  28. [dhcp.wlan0.pid]: [6183]
  29. [dhcp.wlan0.reason]: [REBOOT]
  30. [dhcp.wlan0.result]: [ok]
  31. [dhcp.wlan0.server]: [192.168.2.1]
  32. [dhcp.wlan0.vendorInfo]: []
  33. [drm.service.enabled]: [true]
  34. [gsm.current.phone-type]: [1]
  35. [gsm.defaultpdpcontext.active]: [false]
  36. [gsm.network.type]: [UMTS]
  37. [gsm.operator.alpha]: [中国联通]
  38. [gsm.operator.iso-country]: [cn]
  39. [gsm.operator.isroaming]: [false]
  40. [gsm.operator.numeric]: [46001]
  41. [gsm.radio.kickstart]: [running]
  42. [gsm.sim.operator.alpha]: []
  43. [gsm.sim.operator.iso-country]: [cn]
  44. [gsm.sim.operator.numeric]: [46001]
  45. [gsm.sim.state]: [READY]
  46. [gsm.version.baseband]: [DEB-G00_2.37.0_1024]
  47. [gsm.version.ril-impl]: [Qualcomm RIL 1.0]
  48. [hw.cabl.level]: [Auto]
  49. [init.svc.adbd]: [running]
  50. [init.svc.bdAddrLoader]: [stopped]
  51. [init.svc.bootanim]: [stopped]
  52. [init.svc.bridgemgrd]: [running]
  53. [init.svc.console]: [running]
  54. [init.svc.debuggerd]: [running]
  55. [init.svc.dhcpcd_wlan0]: [running]
  56. [init.svc.drm]: [running]
  57. [init.svc.hciattach]: [stopped]
  58. [init.svc.healthd]: [running]
  59. [init.svc.installd]: [running]
  60. [init.svc.irsc_util]: [stopped]
  61. [init.svc.keystore]: [running]
  62. [init.svc.kickstart]: [running]
  63. [init.svc.ks_checker]: [stopped]
  64. [init.svc.media]: [running]
  65. [init.svc.mpdecision]: [running]
  66. [init.svc.netd]: [running]
  67. [init.svc.netmgrd]: [running]
  68. [init.svc.p2p_supplicant]: [running]
  69. [init.svc.qcamerasvr]: [running]
  70. [init.svc.qmuxd]: [running]
  71. [init.svc.qseecomd]: [running]
  72. [init.svc.ril-daemon]: [running]
  73. [init.svc.rmt_storage]: [running]
  74. [init.svc.sdcard]: [running]
  75. [init.svc.sensors]: [running]
  76. [init.svc.servicemanager]: [running]
  77. [init.svc.surfaceflinger]: [running]
  78. [init.svc.thermald]: [running]
  79. [init.svc.ueventd]: [running]
  80. [init.svc.vold]: [running]
  81. [init.svc.wcnss_init]: [stopped]
  82. [init.svc.zygote]: [running]
  83. [media.aac_51_output_enabled]: [true]
  84. [net.bt.name]: [Android]
  85. [net.change]: [net.rmnet_usb0.gw]
  86. [net.dns1]: [192.168.2.1]
  87. [net.dns2]: []
  88. [net.hostname]: [android-62fb79ad9a7634f7]
  89. [net.qtaguid_enabled]: [1]
  90. [net.rmnet_usb0.dns1]: []
  91. [net.rmnet_usb0.dns2]: []
  92. [net.rmnet_usb0.gw]: []
  93. [net.tcp.buffersize.default]: [4096,87380,110208,4096,16384,110208]
  94. [net.tcp.buffersize.edge]: [4093,26280,35040,4096,16384,35040]
  95. [net.tcp.buffersize.evdo]: [4094,87380,262144,4096,16384,262144]
  96. [net.tcp.buffersize.gprs]: [4092,8760,11680,4096,8760,11680]
  97. [net.tcp.buffersize.hsdpa]: [4094,87380,262144,4096,16384,262144]
  98. [net.tcp.buffersize.hspa]: [4094,87380,704512,4096,16384,262144]
  99. [net.tcp.buffersize.hspap]: [4094,87380,1220608,4096,16384,1220608]
  100. [net.tcp.buffersize.hsupa]: [4094,87380,262144,4096,16384,262144]
  101. [net.tcp.buffersize.lte]: [524288,1048576,2560000,262144,524288,1048576]
  102. [net.tcp.buffersize.umts]: [4094,87380,110208,4096,16384,110208]
  103. [net.tcp.buffersize.wifi]: [524288,1048576,2097152,262144,524288,1048576]
  104. [persist.audio.fluence.mode]: [endfire]
  105. [persist.audio.handset.mic]: [dmic]
  106. [persist.audio.lowlatency.rec]: [false]
  107. [persist.hwc.mdpcomp.enable]: [true]
  108. [persist.qcom.cabl.video_only]: [1]
  109. [persist.radio.adb_log_on]: [0]
  110. [persist.radio.apm_sim_not_pwdn]: [1]
  111. [persist.radio.use_cc_names]: [true]
  112. [persist.service.bdroid.bdaddr]: [AC:22:0B:A6:27:7C]
  113. [persist.sys.country]: [CN]
  114. [persist.sys.dalvik.vm.lib]: [libdvm.so]
  115. [persist.sys.language]: [zh]
  116. [persist.sys.localevar]: []
  117. [persist.sys.profiler_ms]: [0]
  118. [persist.sys.timezone]: [Asia/Shanghai]
  119. [persist.sys.usb.config]: [adb]
  120. [ril.ecclist]: [911,*911,#911,112]
  121. [rild.libpath]: [/system/lib/libril-qc-qmi-1.so]
  122. [ro.allow.mock.location]: [0]
  123. [ro.audio.monitorRotation]: [true]
  124. [ro.baseband]: [mdm]
  125. [ro.board.platform]: [msm8960]
  126. [ro.boot.baseband]: [mdm]
  127. [ro.boot.bootloader]: [FLO-04.02]
  128. [ro.boot.emmc]: [true]
  129. [ro.boot.hardware]: [flo]
  130. [ro.boot.serialno]: [09e16671]
  131. [ro.bootloader]: [FLO-04.02]
  132. [ro.bootmode]: [unknown]
  133. [ro.build.characteristics]: [tablet,nosdcard]
  134. [ro.build.date.utc]: [1430285332]
  135. [ro.build.date]: [2015年 04月 29日 星期三 13:28:52 CST]
  136. [ro.build.description]: [aosp_deb-userdebug 4.4.2 KVT49L eng.senrsl.20150429.132734 test-keys]
  137. [ro.build.display.id]: [aosp_deb-userdebug 4.4.2 KVT49L eng.senrsl.20150429.132734 test-keys]
  138. [ro.build.fingerprint]: [Android/aosp_deb/deb:4.4.2/KVT49L/eng.senrsl.20150429.132734:userdebug/test-keys]
  139. [ro.build.host]: [senrsl-ubuntu]
  140. [ro.build.id]: [KVT49L]
  141. [ro.build.product]: [deb]
  142. [ro.build.tags]: [test-keys]
  143. [ro.build.type]: [userdebug]
  144. [ro.build.user]: [senrsl]
  145. [ro.build.version.codename]: [REL]
  146. [ro.build.version.incremental]: [eng.senrsl.20150429.132734]
  147. [ro.build.version.release]: [4.4.2]
  148. [ro.build.version.sdk]: [19]
  149. [ro.carrier]: [unknown]
  150. [ro.com.android.dateformat]: [MM-dd-yyyy]
  151. [ro.config.alarm_alert]: [Alarm_Classic.ogg]
  152. [ro.config.notification_sound]: [pixiedust.ogg]
  153. [ro.config.ringtone]: [Ring_Synth_04.ogg]
  154. [ro.crypto.fuse_sdcard]: [true]
  155. [ro.crypto.state]: [unencrypted]
  156. [ro.debuggable]: [1]
  157. [ro.factorytest]: [0]
  158. [ro.hardware]: [flo]
  159. [ro.hwui.drop_shadow_cache_size]: [5]
  160. [ro.hwui.gradient_cache_size]: [1]
  161. [ro.hwui.layer_cache_size]: [32]
  162. [ro.hwui.path_cache_size]: [24]
  163. [ro.hwui.r_buffer_cache_size]: [4]
  164. [ro.hwui.text_large_cache_height]: [1024]
  165. [ro.hwui.text_large_cache_width]: [2048]
  166. [ro.hwui.text_small_cache_height]: [1024]
  167. [ro.hwui.text_small_cache_width]: [1024]
  168. [ro.hwui.texture_cache_flushrate]: [0.5]
  169. [ro.hwui.texture_cache_size]: [48]
  170. [ro.opengles.version]: [196608]
  171. [ro.product.board]: [deb]
  172. [ro.product.brand]: [Android]
  173. [ro.product.cpu.abi2]: [armeabi]
  174. [ro.product.cpu.abi]: [armeabi-v7a]
  175. [ro.product.device]: [deb]
  176. [ro.product.locale.language]: [en]
  177. [ro.product.locale.region]: [US]
  178. [ro.product.manufacturer]: [ASUS]
  179. [ro.product.model]: [AOSP on Deb]
  180. [ro.product.name]: [aosp_deb]
  181. [ro.qc.sensors.wl_dis]: [true]
  182. [ro.qualcomm.bt.hci_transport]: [smd]
  183. [ro.qualcomm.cabl]: [1]
  184. [ro.qualcomm.sensors.smd]: [true]
  185. [ro.revision]: [0]
  186. [ro.runtime.firstboot]: [1430296523883]
  187. [ro.secure]: [1]
  188. [ro.serialno]: [09e16671]
  189. [ro.sf.lcd_density]: [320]
  190. [ro.telephony.default_network]: [9]
  191. [ro.wifi.channels]: []
  192. [service.bootanim.exit]: [1]
  193. [sys.boot_completed]: [1]
  194. [sys.settings_global_version]: [8]
  195. [sys.settings_secure_version]: [13]
  196. [sys.settings_system_version]: [8]
  197. [sys.sysctl.extra_free_kbytes]: [27000]
  198. [sys.usb.config]: [adb]
  199. [sys.usb.state]: [adb]
  200. [vold.post_fs_data_done]: [1]
  201. [wifi.interface]: [wlan0]
  202. [wifi.supplicant_scan_interval]: [15]
  203. [wlan.driver.status]: [ok]
  204. shell@deb:/ $
这里 面只有qualcomm跟msm跟flo什么的,没有tegra跟nvidia字样。。。。
而flo跟deb跑的配置是一样的


然后又去看了下参数,
nexus1的CPU型号是Nvidia Tegra 3;
nexus2的CPU型号是高通 Snapdragon S4 Pro;
原来如此!


1,准备工作

下源码,这速度。。。。
  1. senrsl@senrsl-ubuntu:~/android/source/kernel$ git clone https://android.googlesource.com/kernel/msm.git
  2. 正克隆到 'msm'...
  3. remote: Sending approximately 965.38 MiB ...
  4. remote: Counting objects: 91883, done
  5. remote: Finding sources: 100% (8732/8732)
  6. 接收对象中:   4% (174136/3668330), 77.92 MiB | 5.00 KiB/s
2015年04月30日15:40:19五一放假

2015年05月18日19:52:40
想不到之前还留了这么一个
挂代理,呼呼的就下完了
  1. senrsl@senrsl-ubuntu:~/android/source/kernel$ git clone https://github.com/senRsl/kernel_msm.git
  2. 正克隆到 'kernel_msm'...
  3. remote: Counting objects: 3668349, done.
  4. remote: Compressing objects: 100% (49/49), done.
  5. remote: Total 3668349 (delta 2), reused 1 (delta 1), pack-reused 3668299
  6. 接收对象中: 100% (3668349/3668349), 946.58 MiB | 77.00 KiB/s, done.
  7. 处理 delta 中: 100% (3032026/3032026), done.
  8. 检查连接... 完成。
  9. senrsl@senrsl-ubuntu:~/android/source/kernel$
2,配置编译
这个跟之前的其他一样
  1. senrsl@senrsl-ubuntu:~/android/source/kernel$ cd kernel_msm/
  2. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ ll
  3. 总用量 12
  4. drwxrwxr-x 3 senrsl senrsl 4096  5月 15 13:44 ./
  5. drwxrwxr-x 6 senrsl senrsl 4096  5月 15 13:44 ../
  6. drwxrwxr-x 8 senrsl senrsl 4096  5月 15 16:22 .git/
  7. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ git branch -a
  8. * master
  9.   remotes/origin/HEAD -> origin/master
  10.   remotes/origin/android-msm-2.6.35
  11.   remotes/origin/android-msm-3.9-usb-and-mmc-hacks
  12.   remotes/origin/android-msm-anthias-3.10-lollipop-wear-release
  13.   remotes/origin/android-msm-dory-3.10-kitkat-wear
  14.   remotes/origin/android-msm-dory-3.10-lollipop-wear-release
  15.   remotes/origin/android-msm-flo-3.4-jb-mr2
  16.   remotes/origin/android-msm-flo-3.4-kitkat-mr0
  17.   remotes/origin/android-msm-flo-3.4-kitkat-mr1
  18.   remotes/origin/android-msm-flo-3.4-kitkat-mr2
  19.   remotes/origin/android-msm-flo-3.4-l-preview
  20.   remotes/origin/android-msm-flo-3.4-lollipop-mr1
  21.   remotes/origin/android-msm-flo-3.4-lollipop-mr1.1
  22.   remotes/origin/android-msm-flo-3.4-lollipop-release
  23.   remotes/origin/android-msm-hammerhead-3.4-kitkat-mr1
  24.   remotes/origin/android-msm-hammerhead-3.4-kitkat-mr2
  25.   remotes/origin/android-msm-hammerhead-3.4-kk-fr1
  26.   remotes/origin/android-msm-hammerhead-3.4-kk-fr2
  27.   remotes/origin/android-msm-hammerhead-3.4-kk-r1
  28.   remotes/origin/android-msm-hammerhead-3.4-l-preview
  29.   remotes/origin/android-msm-hammerhead-3.4-lollipop-mr1
  30.   remotes/origin/android-msm-hammerhead-3.4-lollipop-release
  31.   remotes/origin/android-msm-lenok-3.10-kitkat-wear
  32.   remotes/origin/android-msm-lenok-3.10-lollipop-wear-release
  33.   remotes/origin/android-msm-mako-3.4-jb-mr1
  34.   remotes/origin/android-msm-mako-3.4-jb-mr1-fr
  35.   remotes/origin/android-msm-mako-3.4-jb-mr1-kgsl
  36.   remotes/origin/android-msm-mako-3.4-jb-mr1.1
  37.   remotes/origin/android-msm-mako-3.4-jb-mr2
  38.   remotes/origin/android-msm-mako-3.4-kitkat-mr0
  39.   remotes/origin/android-msm-mako-3.4-kitkat-mr1
  40.   remotes/origin/android-msm-mako-3.4-kitkat-mr2
  41.   remotes/origin/android-msm-mako-3.4-lollipop-mr1
  42.   remotes/origin/android-msm-mako-3.4-lollipop-release
  43.   remotes/origin/android-msm-shamu-3.10-lollipop-mr1
  44.   remotes/origin/android-msm-shamu-3.10-lollipop-release
  45.   remotes/origin/android-msm-sony-cm-jb-3.0
  46.   remotes/origin/android-msm-sprat-3.10-kitkat-wear
  47.   remotes/origin/android-msm-sprat-3.10-lollipop-wear-release
  48.   remotes/origin/master
  49. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ git checkout -b android-msm-flo-3.4-kitkat-mr2 remotes/origin/android-msm-flo-3.4-kitkat-mr2
  50. Checking out files: 100% (41686/41686), done.
  51. 分支 android-msm-flo-3.4-kitkat-mr2 设置为跟踪来自 origin 的远程分支 android-msm-flo-3.4-kitkat-mr2。
  52. 切换到一个新分支 'android-msm-flo-3.4-kitkat-mr2'
  53. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ git map-branches
  54. origin/android-msm-flo-3.4-kitkat-mr2
  55.   android-msm-flo-3.4-kitkat-mr2 *
  56. origin/master
  57.   master
  58. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ export PATH=/home/senrsl/android/source/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:$PATH
  59. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ export ARCH=arm
  60. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ export SUBARCH=arm
  61. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ export CROSS_COMPILE=arm-eabi-
  62. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ make flo_defconfig
  63.   HOSTCC  scripts/basic/fixdep
  64.   HOSTCC  scripts/kconfig/conf.o
  65.   SHIPPED scripts/kconfig/zconf.tab.c
  66.   SHIPPED scripts/kconfig/zconf.lex.c
  67.   SHIPPED scripts/kconfig/zconf.hash.c
  68.   HOSTCC  scripts/kconfig/zconf.tab.o
  69.   HOSTLD  scripts/kconfig/conf
  70. warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
  71. warning: (ARCH_MSM_KRAITMP && ARCH_MSM_CORTEX_A5) selects HAVE_HW_BRKPT_RESERVED_RW_ACCESS which has unmet direct dependencies (HAVE_HW_BREAKPOINT)
  72. #
  73. # configuration written to .config
  74. #
  75. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$ make
  76. ...
  77.  OBJCOPY arch/arm/boot/zImage
  78.   Kernel: arch/arm/boot/zImage is ready
  79. senrsl@senrsl-ubuntu:~/android/source/kernel/kernel_msm$
3,烧入设备
本想zImage直接烧入设备,没找到方法,只好拷回源码,重新编译源码来烧
放到这个位置
  1. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY$ cd device/asus/flo-kernel/
  2. senrsl@senrsl-ubuntu:~/android/source/WORKING_DIRECTORY/device/asus/flo-kernel$ ll
  3. 总用量 13116
  4. drwxrwxr-x 3 senrsl senrsl    4096  5月 18 17:16 ./
  5. drwxrwxr-x 7 senrsl senrsl    4096  3月 20 13:35 ../
  6. drwxrwxr-x 2 senrsl senrsl    4096  3月 20 13:47 .git/
  7. -rwxrwxr-x 1 senrsl senrsl 6721952  5月 15 19:21 kernel*
  8. -rw-rw-r-- 1 senrsl senrsl 6689936  3月 20 13:35 old______kernel
  9. 然后执行编译
  10. 然后启动fastboot
  11. 然后烧入
  12. 自动重启
4,效果图


2015年05月18日20:04:56

--
senRsl
2015年04月29日16:54:58

没有评论 :

发表评论