forked from dsixda/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile_unyaffs
More file actions
executable file
·52 lines (44 loc) · 1.12 KB
/
compile_unyaffs
File metadata and controls
executable file
·52 lines (44 loc) · 1.12 KB
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])
#
# Android Kitchen is 100% free. This script file is intended for personal
# and/or educational use only. It may not be duplicated for monetary
# benefit or any other purpose without the permission of the developer.
#
############################################################################
#
# This script has two optional parameters:
#
# $1 = folder where the image is located
# $2 = image name (e.g. data.img or system.img)
#
# If not specified, then script assumes system.img in working folder
#
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 "Compiling unyaffs ..."
cd tools/unyaffs_files
gcc -o unyaffs unyaffs.c
cd ../..
if [ -e tools/unyaffs_files/$unyaffs_file ]
then
echo unyaffs successfully compiled
else
echo "Error: unyaffs not successfully compiled!"
exit 1
fi
exit 0