@@ -4,6 +4,7 @@ target_img=
4
4
parts=
5
5
wipe=
6
6
reset=
7
+ fastboot=
7
8
soc=
8
9
uboot_file=
9
10
efuse_file=
25
26
# ------
26
27
show_help ()
27
28
{
28
- echo " Usage : $0 --img=/path/to/aml_upgrade_package.img> --parts=<all|none|bootloader|dtb|logo|recovery|boot|system|..> [--wipe] [--reset=<y|n>] [--soc=<m8|axg|gxl|txlx|g12a>] [efuse-file=/path/to/file/location] [bootloader|dtb|logo|boot|...-file=/path/to/file/partition] [--password=/path/to/password.bin]"
29
+ echo " Usage : $0 --img=/path/to/aml_upgrade_package.img> --parts=<all|none|bootloader|dtb|logo|recovery|boot|system|..> [--wipe] [--reset=<y|n>] [--fastboot=<y|n>] [-- soc=<m8|axg|gxl|txlx|g12a>] [efuse-file=/path/to/file/location] [bootloader|dtb|logo|boot|...-file=/path/to/file/partition] [--password=/path/to/password.bin]"
29
30
echo " Version : 4.9"
30
31
echo " Parameters : --img => Specify location path to aml_upgrade_package.img"
31
32
echo " --parts => Specify which partition to burn"
@@ -36,6 +37,7 @@ show_help()
36
37
echo " --*-file => Force overload of partition files"
37
38
echo " --password => Unlock usb mode using password file provided"
38
39
echo " --destroy => Erase the bootloader and reset the board"
40
+ echo " --fastboot => Put the bootloader to fastboot mode, usable only without [--reset=..] argument"
39
41
}
40
42
41
43
# Check if a given file exists and exit if not
@@ -163,6 +165,9 @@ for opt do
163
165
--reset)
164
166
reset=" $optval "
165
167
;;
168
+ --fastboot)
169
+ fastboot=" $optval "
170
+ ;;
166
171
--efuse-file)
167
172
efuse_file=" $optval "
168
173
check_file $efuse_file
@@ -236,6 +241,11 @@ if [[ -z $destroy ]]; then
236
241
exit 1
237
242
fi
238
243
fi
244
+ if [[ ! -z " $reset " ]] && [[ ! -z " $fastboot " ]]; then
245
+ echo " --reset | --fastboot arguments, no simultaneous input allowed"
246
+ show_help
247
+ exit 1
248
+ fi
239
249
if [[ -z $soc ]]; then
240
250
soc=gxl
241
251
fi
@@ -543,7 +553,7 @@ print_debug "Partition list"
543
553
print_debug " --------------"
544
554
for i in $( seq 0 ` expr $nb_partitions - 1` )
545
555
do
546
- print_debug " $i ${partitions_file[$i]} ${partitions_name[$i]} ${partitions_type[$i]} "
556
+ print_debug " $i ${partitions_file[$i]} ${partitions_name[$i]} ${partitions_type[$i]} "
547
557
done
548
558
print_debug " "
549
559
899
909
# -------
900
910
[[ -d $tmp_dir ]] && rm -rf " $tmp_dir "
901
911
902
- # Resetting board ?
903
- # -----------------
904
- if [[ " $parts " != " none" ]]; then
912
+ # Resetting board ? | fastboot ?
913
+ # ------------------------------
914
+ if [[ " $parts " != " none" ]] && [[ -z " $fastboot " ]] ; then
905
915
if [[ -z " $reset " ]]; then
906
916
while true ; do
907
917
read -p " Do you want to reset the board? y/n [n]? " reset
@@ -915,6 +925,18 @@ if [[ "$parts" != "none" ]]; then
915
925
run_update bulkcmd " burn_complete 1"
916
926
echo -e $GREEN " [OK]" $RESET
917
927
fi
928
+ elif [[ " $parts " != " none" ]] && [[ -z " $reset " ]]; then
929
+ while true ; do
930
+ read -p " Do you want to put the board into fastboot mode? y/n [n]? " fastboot
931
+ if [[ $fastboot =~ [yYnN] ]]; then
932
+ break
933
+ fi
934
+ done
935
+ if [[ $fastboot =~ [yY] ]]; then
936
+ echo -n " Rebooting to fastboot "
937
+ run_update bulkcmd " fastboot"
938
+ echo -e $GREEN " [OK]" $RESET
939
+ fi
918
940
else
919
941
echo " Uboot is now loaded into your board !"
920
942
echo " You can use $TOOL_PATH /tools/update bulkcmd \" any uboot command\" to control uboot"
0 commit comments