-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpn_all
executable file
·130 lines (111 loc) · 4.17 KB
/
cpn_all
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/usr/bin/perl
use strict;
my $base_path = $ENV{'PWD'};
my $out = "$base_path/out";
my $outdump = "$base_path/outdump";
my $user_name = $ENV{'USER'};
my $user_home = $ENV{'HOME'};
if(-d $out)
{
system("rm -rf $out");
}
system("mkdir -p $out");
if(-d $outdump)
{
system("rm -rf $outdump");
}
system("mkdir -p $outdump");
chdir("$base_path/common/build");
system("python build.py --hlos");
chdir($base_path);
print("Split finished!!!\n");
#xbl.elf
system("cp $base_path/boot_images/QcomPkg/Sdm660Pkg/Bin/660/LA/RELEASE/xbl.elf $out");
#pmic.elf
system("cp $base_path/boot_images/QcomPkg/Sdm660Pkg/Bin/660/LA/RELEASE/pmic.elf $out");
#tz.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/tz.mbn $out");
#hyp.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/hyp.mbn $out");
#cmnlib.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/cmnlib.mbn $out");
#cmnlib64.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/cmnlib64.mbn $out");
#km4.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/km4.mbn $out");
#dspso.bin
system("cp $base_path/common/build/bin/asic/dspso.bin $out");
#rpm.mbn
system("cp $base_path/rpm_proc/build/ms/bin/AAAAANAZR/rpm.mbn $out");
#NON-HLOS.bin
system("cp $base_path/common/build/emmc/bin/asic/NON-HLOS.bin $out");
#sec.dat
system("cp $base_path/common/sectools/resources/build/fileversion2/sec.dat $out");
#BTFM.bin
system("cp $base_path/common/build/emmc/bin/BTFM.bin $out");
#devcfg.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/devcfg.mbn $out");
#storsec.mbn
system("cp $base_path/trustzone_images/build/ms/bin/KAJAANAA/storsec.mbn $out");
#gpt_main0.bin
system("cp $base_path/common/build/emmc/gpt_main0.bin $out");
#gpt_backup0.bin
system("cp $base_path/common/build/emmc/gpt_backup0.bin $out");
#patch0.xml
system("cp $base_path/common/build/emmc/patch0.xml $out");
#prog_firehose_ddr.elf
system("cp $base_path/boot_images/QcomPkg/Sdm660Pkg/Bin/660/LA/RELEASE/prog_emmc_ufs_firehose_Sdm660_ddr.elf $out");
#rawprogram_unsparse.xml
#system("cp $base_path/common/build/emmc/bin/asic/sparse_images/rawprogram_unsparse.xml $out");
#huangshaopeng@wind-mobi.com 20170911 begin
#adspso.bin
#system("cp $base_path/ADSP.8953.2.8.2/adsp_proc/build/dynamic_signed/8937/adspso.bin $out");
#cmnlib.mbn cmnlib64.mbn devcfg.mbn keymaster.mbn lksecapp.mbn
#my @tz_list = ("cmnlib.mbn", "cmnlib64.mbn", "devcfg.mbn", "keymaster.mbn");
#foreach (@tz_list)
#{
# system("cp $base_path/TZ.BF.4.0.5/trustzone_images/build/ms/bin/ZALAANAA/$_ $out");
#}
#huangshaopeng@wind-mobi.com 20170911 end
#gpt_backup0.bin gpt_both0.bin gpt_main0.bin patch0.xml
my @gpt_list = ("gpt_backup0.bin", "gpt_both0.bin", "gpt_main0.bin", "patch0.xml");
foreach (@gpt_list)
{
system("cp $base_path/common/build/emmc/$_ $out");
}
#emmc_appsboot.mbn boot.img recovery.img mdtp.img
# fs_image.tar.gz
my @ap_list = ("userdata.img", "boot.img", "recovery.img","dtbo.img", "vbmeta.img","vbmeta_system.img");
my $username = $ENV{'USER'};
foreach (@ap_list)
{
#system("cp $base_path/../out/target/product/sdm710/$_ $out");
system("cp $base_path/LINUX/android/out/target/product/sdm660_64/obj/PACKAGING/target_files_intermediates/sdm660_64-target_files-eng.${username}/IMAGES/$_ $out");
}
my @ap_list = ( "mdtp.img", "splash.img","persist.img","abl.elf", "metadata.img");
foreach (@ap_list)
{
#system("cp $base_path/../out/target/product/sdm710/$_ $out");
system("cp $base_path/LINUX/android/out/target/product/sdm660_64/$_ $out");
}
#split img
system("cp $base_path/common/build/emmc/bin/asic/sparse_images/* $out");
system("cp $base_path/common/build/emmc/rawprogram0.xml $out");
=pod
=cut
my ($sec, $min, $hour, $day, $month, $year, $a, $b, $c) = localtime(time);
my $zip_name = sprintf("FlashPackage_QFIL_%d%02d%02d_%02d%02d%02d.7z", $year+1900, $month+1, $day, $hour, $min, $sec);
print "$zip_name\n";
chdir("$base_path/out");
#system("cp rawprogram0.xml rawprogram_unsparse.xml");
if(-d "$user_home/660_image_Q")
{
print "$user_home/660_image_Q is exsist"
}
else
{
system("mkdir -p $user_home/660_image_Q");
}
chdir("$base_path/out");
system("7zr a -t7z $zip_name ./*");
system("cp $zip_name $user_home/660_image_Q/");