Michael发表于:2010/04/30 16:47 | | |
DISCLAIMER:
I'm not responsible for any damages done to your phone. Please read carefully, and also please, please do a nandroid backup.
If any of the following fails, don't continue. And post your errors on this thread.

提示:

我无需承担由此发生的任何责任,但还是希望在任何操作之前先备份好整个系统.如果按照下面的操作失败,请留言

Prepare your system
在电脑上需要准备一下几点(ubuntu 8.04,其他版本似乎都有各种奇怪的问题):

$ sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

Get the Kernel sources for your device from https://opensource.motorola.com/sf/go/projects.cliqdext/frs
在这个官方网站上下内核的源码
https://opensource.motorola.com/sf/go/projects.cliqdext/frs

Be sure to download the one for your CLIQ/DEXT, if you compile other than the one intended for your device you will be left in 1969!! (DISCO!).
一定要下载DEXT或者CLIQ的,其他机型的编译后会导致手机上显示时间为1969

Note: The latest for TMO, is split in 3 files, download all of them.
Note: TMOBILE最新的内核有三个,全部都要下载

Once you have downloaded all your files
下载完成后按照如下操作

$ mkdir ~/motorola-source
$ gunzip morrison-customer-tmo-1_4-release-1_4_8-framework.tar.gz
$ tar xvf morrison-customer-tmo-1_4-release-1_4_8-framework.tar -C ~/motorola-source
$ gunzip morrison-customer-tmo-1_4-release-1_4_8-external.tar.gz
$ tar xvf morrison-customer-tmo-1_4-release-1_4_8-external.tar -C ~/motorola-source
$ gunzip morrison-customer-tmo-1_4-release-1_4_8-kernel.tar.gz
$ tar xvf morrison-customer-tmo-1_4-release-1_4_8-kernel.tar -C ~/motorola-source


This should leave a directory structure like this under ~/motorola-source
这样应该会生成一个~/motorola-source的文件夹

$ ls ~/motorola-source
base  bionic  bootable  build  dalvik  external  frameworks  kernel  libhardware  libhardware_legacy  Makefile  msm7k  out  prebuilt  README.txt  system  unpack.pl  vendor

Now lets get the prerequisites stated at ~/motorola-source/README.txt
下面来看README.TXT中的说明

Once you have downloaded all of previous requirements you will need to download several things from android to do this:
所有的准备工作完后,你要开始下载一些android的东西了,代码如下

$ mkdir ~/moto-prerquisites
$ cd ~/moto-prerquisites
$ git clone git://android.git.kernel.org/platform/frameworks/base.git
$ git clone git://android.git.kernel.org/platform/hardware/libhardware.git
$ git clone git://android.git.kernel.org/platform/hardware/libhardware_legacy.git
$ git clone git://android.git.kernel.org/platform/hardware/msm7k.git
$ git clone git://android.git.kernel.org/platform/prebuilt.git

Get ready to wait a while because de prebuilt repository is quite big
等啊等,那个prebuilt有600M,很大的.慢慢下

Once all of the above have finished lets set the prerequisites to the TAGS specified in the README.txt
以上的信息都包括在readme.txt中

下面继续下载

$ cd ~/moto-prerquisites/base
$ git checkout android-1.5r3

$ cd ~/moto-prerquisites/libhardware
$ git checkout android-1.5r3

$ cd ~/moto-prerquisites/libhardware_legacy
$ git checkout android-1.5r3

$ cd ~/moto-prerquisites/msm7k
$ git checkout android-1.6_r1

$ cd ~/moto-prerquisites/prebuilt
$ git checkout android-1.5r3Once you've done this copy all the directories to ~/motorola-source

$ cp -r base libhardware libhardware_legacy msm7k prebuilt ~/motorola-source

Now we have to unpack what comes in the sources from motorola
下面我们要对源码进行解包

$ cd ~/motorola-source
$ chmod +x unpack.pl
$ ./unpack.pl

Now you have everything that's needed to compile your kernel.You have to set some variables first
解包完成后,需要交叉编译的内核的东西就下载完了,下面要开始设置环境变量

$ export PLATFORM_DIR=~/motorola/source
$ export ARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin:Now lets build

代码
cd /kernel
$ make msm_mot_defconfigThis line will build the kernel and output a zImage

代码
$ make ANDROID_BUILD_TOP=This will build the wireless driver module dhd.ko

代码
$ make -C /system/wlan/bcm/osrc/open-src/src/dhd/linux ANDROID_BUILD_TOP=Now you have build your kernel results should be

代码
~/motorola-source/kernel/arch/arm/boot/zImage
~/motorola-source/system/wlan/bcm/osrc/open-src/src/dhd/linux/dhd.ko

In order to flash this to your system you will need a nandroid backup and unpack-bootimg.pl and repack-bootimg.pl get them from here http://android-dls.com/wiki/index.ph...ck_Boot_Images

为了刷这个系统,你还必须要做一个系统备份和unpack-bootimg.pl ,repack-bootimg.pl,从这里下载

Code:
$ mkdir ~/bin
$ unzip unpack-bootimg.zip -d ~/bin
$ unzip repack-bootimg.zip -d ~/bin
$ export PATH=:~/bin

With your nandroid backup search for your boot.img and copy it somewhere easy to find
放在一个容易找的地方


Code:
$ mkdir ~/mymoto
$ cd ~/mymoto
$ cp /path/to/my/nandroid/boot.img .

Extract the boot image
解压这个boot.img

Code:
$ unpack-bootimg.pl boot.img

this will leave you with

Code:
$ ls ~/mymoto
boot.img  boot.img-kernel.gz  boot.img-ramdisk  boot.img-ramdisk.cpio.gz

Now lets repack that boot image with our new kernel
现在我们用新内核的boot.img来替换


以下为刷机步骤,无需翻译
Code:
$ cd ~/mymoto
$ repack-bootimg.pl ~/motorola-source/kernel/arch/arm/boot/zImage boot.img-ramdisk my-boot.img

//You'll need android-sdk installed to use adb search the forums on how to install android-sdk
Now push your image and wireless driver to your phone

Code:
$ adb push my-boot.img /sdcard/
$ adb push ~/motorola-source/system/wlan/bcm/osrc/open-src/src/dhd/linux/dhd.ko /system/lib/
$ adb shell
Now let's see where we should flash our image

Code:
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00300000 00020000 "boot"
mtd1: 08ac0000 00020000 "system"
mtd2: 0df80000 00020000 "userdata"
mtd3: 00040000 00020000 "misc"
mtd4: 00500000 00020000 "recovery"
mtd5: 06000000 00020000 "cache"
mtd6: 00080000 00020000 "splash"As we can see mtd0 is where our boot image is stored, be sure to checkout wich one corresponds to your phone but it should be the same for all

now erase /dev/mtd/mtd0

Code:
# cat /dev/zero > /dev/mtd/mtd0
write: No space left on device [this is ok, you can ignore]
# flash_image boot /sdcard/my-boot.img
# reboot
评论(5) | 引用(0) | 阅读(332)

评论:

dsafds Email Homepage
2010/07/22 13:00
I link wow gold  or
DejesusAshley29 Email Homepage
2010/06/22 04:46
That article just about this good topic is superior! Thence people not should write the <a href="http://www.topthesis.com">thesis writing</a> and history dissertation by their efforts, they will use your assistance.
MCGOWAN22Susanna Email Homepage
2010/06/21 19:05
You can order already written essays and <a href="http://www.supremeessays.com">buy essay</a> about this good post, using the paper writing service.
kay_chou Email
2010/05/15 17:53
哇哈哈~~女流氓勋章拥有者~
我看不懂啊~
fay Email Homepage
2010/05/04 09:30
搞了半天原来是ANDROID的,我说咋和我知道的完全不一样
admin 回复于 2010/05/11 17:39
-.-你以为这是MAGX么....
分页: 1/1 第一页 1 最后页
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]