forked from pwelyn/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 2
/
compile_unyaffs
executable file
·52 lines (44 loc) · 1.07 KB
/
compile_unyaffs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
############################################################################
#
# Copyright (c) 2011 - dsixda ([email protected])
# Copyright (c) 2014 - 越狱 (http://weibo.com/206021119)
#
# Android 厨房是100%免费。此脚本文件仅供个人或学习使用
# by hwh132 越狱 汉化
#
############################################################################
#
# 此脚本有两个可选参数:
#
# $1 = image 镜像文件所处的文件夹位置
# $2 = image 镜像文件的名称 (例如 data.img 或 system.img)
#
# 如果没有指定,脚本假定 system.img 位于工作文件夹
#
if [ `uname | grep CYGWIN` ]
then
unyaffs_file=unyaffs.exe
else
unyaffs_file=unyaffs
fi
if [ -e tools/unyaffs_files/$unyaffs_file ]
then
rm -f tools/unyaffs_files/$unyaffs_file
fi
scripts/check_yaffs_sizes $1 $2
if [ "$?" == "1" ]
then
exit 1
fi
echo "编译 unyaffs ..."
cd tools/unyaffs_files
gcc -o unyaffs unyaffs.c
cd ../..
if [ -e tools/unyaffs_files/$unyaffs_file ]
then
echo "unyaffs 编译成功"
else
echo "错误: unyaffs 编译失败!"
exit 1
fi
exit 0