標籤:x86_64 核心版本 pop href nload 刷機 height letter disk
一、Android核心源碼的下載:
1.Google GIT地址:
$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/exynos.git
$ git clone https://android.googlesource.com/kernel/goldfish.git
$ git clone https://android.googlesource.com/kernel/msm.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git
$ git clone https://android.googlesource.com/kernel/tegra.git
2.清華伺服器位址:
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/common.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/exynos.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/hikey-linaro.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/lk.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/msm.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/omap.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/samsung.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/tegra.git
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/x86_64.git
goldfish這個project包含了適合於模擬器平台的源碼;
msm這個project包含了適合於ADP1、ADP2、Nexus One、Nexus 4的源碼,並且可以作為高通MSM晶片集開發定製核心工作的起始點;
omap這個project包含了適合於PandaBoard、Galaxy Nexus的源碼,並且可以作為德州儀器OMAP晶片集核心開發定製工作的起始點;
samsung這個project包含了適合於Nexus S的源碼,並且可以作為三星蜂鳥晶片集核心開發定製工作的起始點;
tegra這個project包含了適合於Xoom和Nexus 7的源碼,並且可以作為英偉達圖睿晶片集核心開發定製工作的起始點;
exynos這個project包含了適合與Nexus 10的源碼,並且可以作為三星獵戶座晶片集核心開發定製工作的起始點。
二、編譯:
1.程式碼程式庫download之後會在對應的目錄下可以通過 ls -al 查看到 .git , git branch -a 查看所有分支,我手上nexus平板刷的Android5.0的系統,所有選擇以下核心版本:
git checkout remotes/origin/android-tegra-flounder-3.10-lollipop-release
2.分支代碼下載好之後:
(1)修改Makefile:
#ARCH ?= $(SUBARCH)
#CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
修改為:
ARCH ?= arm
CROSS_COMPILE ?= arm-eabi-
(2)配置:
kernel/xxx/arch/arm/configs/ ,目錄下有很多設定檔
make tegra_defconfig ,選擇預設配置,之後會產生 .config
make menuconfig ,可以通過此命令進一步配置核心更新 .config
(3)編譯:
配置好核心後就可以輸入 : make ,等待zImage的產生。
三、打包zImage 到 boot.img,並刷機:
# 下載解打包工具 https://github.com/derekhe/u8825d-bootimg-scripts# 解壓到任意地方後,從手機上擷取得你現在正使用的boot.img放到解壓出來的目錄# 1. 解壓現有的boot.img./unpack-bootimg.pl boot.img
# 2. 拷貝編譯的zImage檔案到此目錄,路徑自己確定cp ../arch/arm/boot/zImage ./
# 3. 打包zImage和ramdisk目錄mv boot.img boot.img.bak./repack-bootimg.pl zImage boot.img-ramdisk boot.img
# 4. 刷入boot.img,手機重啟的瞬間要記得按音量減鍵./adb reboot./fastboot devices./fastboot erase boot./fastboot flash boot boot.img
./fastboot reboot
如果能正常開機,就congratulation!!!^v^
Android : 下載核心源碼 and 編譯、打包