forked from dsixda/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_nand_boot
More file actions
executable file
·77 lines (60 loc) · 1.39 KB
/
build_nand_boot
File metadata and controls
executable file
·77 lines (60 loc) · 1.39 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
############################################################################
#
# 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.
#
############################################################################
echo
if [ -d BOOT-EXTRACTED ]
then
echo Found BOOT-EXTRACTED folder, checking contents ...
if [ -d BOOT-EXTRACTED/boot.img-ramdisk ]
then
echo Found boot.img-ramdisk
if [ -e BOOT-EXTRACTED/zImage ]
then
echo Found zImage
else
echo Did not find BOOT-EXTRACTED/zImage
exit 0
fi
else
echo Did not find BOOT-EXTRACTED/boot.img-ramdisk folder!
exit 0
fi
else
echo Did not find BOOT-EXTRACTED folder!
exit 0
fi
if [ -d WORKING_* ]
then
echo Working folder found
else
echo Working folder not found!
exit 0
fi
echo
echo "Building initrd.gz ..."
cd BOOT-EXTRACTED/boot.img-ramdisk
find . | cpio -o -H newc | gzip > ../initrd.gz
cd ..
rm -rf boot.img-ramdisk
cd ..
cd WORKING_*
if [ -e boot.img ]
then
echo
echo "Replacing boot.img in working folder with NAND boot folder ..."
rm -f boot.img
fi
if [ -d boot ]
then
echo
echo "Removing old NAND boot folder ..."
rm -rf boot
fi
mv ../BOOT-EXTRACTED boot
cd ..