分类: LINUX
2010-08-09 21:12:37
#*********************************** |
02 |
# build android rom script |
03 |
# edit by xiaoliang |
04 |
# |
05 |
#*********************************** |
06 |
|
07 |
SRC_HOME=/home/liangwei/android_src |
08 |
|
09 |
update.zip : boot.img $(shell find system data META-INF) |
10 |
rm -rf update_unsign.zip |
11 |
zip -qr update_unsign.zip system data META-INF boot.img |
12 |
$(JAVA_HOME)/bin/java -jar auto-sign/signapk.jar auto-sign/testkey.x509.pem auto-sign/testkey.pk8 update_unsign.zip update.zip |
13 |
rm -f update_unsign.zip |
14 |
|
15 |
boot.img:ramdisk.img kernel.img |
16 |
$(SRC_HOME)/out/host/linux-x86/bin/mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel kernel.img --ramdisk ramdisk.img -o boot.img |
17 |
|
18 |
kernel.img:$(SRC_HOME)/kernel/msm/arch/arm/boot/zImage |
19 |
cp -f $(SRC_HOME)/kernel/msm/arch/arm/boot/zImage ./kernel.img |
20 |
|
21 |
kernel-qemu:$(SRC_HOME)/kernel/common/arch/arm/boot/zImage |
22 |
cp -f $(SRC_HOME)/kernel/common/arch/arm/boot/zImage ./kernel-qemu |
23 |
|
24 |
ramdisk.img:$(shell find root) |
25 |
$(SRC_HOME)/out/host/linux-x86/bin/mkbootfs ./root | gzip & gt ; ramdisk.img |
26 |
|
27 |
system.img : $(shell find system) |
28 |
$(SRC_HOME)/out/host/linux-x86/bin/mkyaffs2image ./system system.img |
29 |
|
30 |
userdata.img:$(shell find data) |
31 |
$(SRC_HOME)/out/host/linux-x86/bin/mkyaffs2image ./data userdata.img |
32 |
|
33 |
userdata-qemu.img:userdata.img |
34 |
rm -rf userdata-qemu.img |
35 |
cp userdata.img userdata-qemu.img |
36 |
|
37 |
initlogo.rle:logo.png |
38 |
convert -depth 8 logo.png rgb:logo.raw |
39 |
$(SRC_HOME)/out/host/linux-x86/bin/rgb2565 -rle & lt ;logo.raw & gt ;initlogo.rle |
40 |
cp -rf initlogo.rle data/data/com.android.mysplash/ |
41 |
rm -rf logo.raw |
42 |
|
43 |
.PHONY:run |
44 |
run:system.img ramdisk.img kernel-qemu userdata-qemu.img |
45 |
/server/android-sdk-linux_86/tools/emulator -show-kernel -sysdir ./ |