如何下載Android kernel核心原始碼,編譯燒寫驗證

來源:互聯網
上載者:User

標籤:android 系統編譯   boot.img 編譯   核心   kernel   zimage   

1. Download Kernel source
   Study:       
   1. Please refer to the AOSP official kernel download address:
    http://source.android.com/source/building-kernels.html
   2. goto https://android.googlesource.com/kernel/msm.git check which branch your will get,
    for Secure Phone please checkout android-msm-hammerhead-3.4-kitkat-mr1 version
    
   commands:
    $ git clone https://android.googlesource.com/kernel/msm.git hammerhead-kernel
    $ cd hammerhead-kernel
    $ git checkout android-msm-hammerhead-3.4-kitkat-mr1
          
2. Build Kernel
    $ cd $(AOSP_PATH)
    $ . build/envsetup.sh
    $ lunch 12
       $ export ARCH=arm
    $ export SUBARCH=arm
    $ export CROSS_COMPILE=arm-eabi-
    $ cd hammerhead-kernel
    $ make hammerhead_defconfig
    $ make

3. Verify Kernel

   cp $(KERNEL)arch/arm/boot/zImag-dtb (ANDROID_ROOT)out/target/product/hammerhead/kernel

     out/host/linux-x86/bin/mkbootimg  --kernel out/target/product/hammerhead/kernel --ramdisk out/target/product/hammerhead/ramdisk.img --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1" --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02900000 --tags_offset 0x02700000 --output out/target/product/hammerhead/boot.img

adb shell su 0 reboot bootloader

fastboot flash boot out/target/product/hammerhead/boot.img

fastboot reboot

如何下載Android kernel核心原始碼,編譯燒寫驗證

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.