blob: 8a84cb4c0039cb5bc18e69246c02fbb1114f56c6 (
plain)
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
|
#!/bin/sh
set -e
flash_fastboot()
{
fastboot flash BOOT arch/arm/boot/boot.img
sleep 1
fastboot flash RECOVERY arch/arm/boot/boot.img
sleep 1
fastboot reboot
echo "OK"
}
flash_heimdall()
{
heimdall flash \
--BOOT arch/arm/boot/boot.img \
--RECOVERY arch/arm/boot/boot.img
echo "OK"
}
usage()
{
echo "Usage: $0 <fastboot|heimdall>"
exit 1
}
if [ $# -ne 1 ] ; then
usage
elif [ "$1" = "fastboot" ] ; then
flash_fastboot
elif [ "$1" = "heimdall" ] ; then
flash_heimdall
else
usage
fi
|