-
Notifications
You must be signed in to change notification settings - Fork 1
/
.config
69 lines (65 loc) · 1.99 KB
/
.config
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
export ML_ARTIFACTS_DIR=$(realpath "${ML_ROOT}/artifacts")
export ML_ARTIFACTS_DIR_QEMU=$(realpath "${ML_ROOT}/artifacts_qemu")
export ML_CARD_MOUNT_DIR="/mnt/card"
export ML_CARD_DEVICE_CF="E:"
export ML_CARD_DEVICE_SD="I:"
export ML_CARD_FS="drvfs"
function guess_camera_from_path()
{
local model=$(pwd | sed -nr "s|.*/platform/(.*)\.[0-9]+.*|\1|p")
[[ -z "${model}" ]] && log error "Unable to guess model, you must provide it explicitly!"
log info "Model guessed: ${model}"
set_camera_env $model
}
function set_camera_env()
{
[ -z "${1}" ] && log error "No platform provided!"
case ${1} in
guess)
guess_camera_from_path
;;
R | r)
export ML_PLATFORM="R.180"
export ML_CARD_TYPE="sd"
;;
200D | 200d)
export ML_PLATFORM="200D.101"
export ML_CARD_TYPE="sd"
;;
2000D | 2000d)
export ML_PLATFORM="2000D.110"
export ML_CARD_TYPE="sd"
export ML_TYPE="minimal/hello-world"
export ML_QEMU_TYPE="-legacy"
;;
50D | 50d)
export ML_PLATFORM="50D.109"
export ML_CARD_TYPE="cf"
export ML_QEMU_TYPE="-legacy"
;;
M50 | m50)
export ML_PLATFORM="M50.110"
export ML_CARD_TYPE="sd"
export ML_QEMU_TYPE=""
;;
60D | 60d)
export ML_PLATFORM="60D.111"
export ML_CARD_TYPE="sd"
export ML_QEMU_TYPE="-legacy"
;;
5D4 | 5d4)
export ML_PLATFORM="5D4.133"
export ML_TYPE="minimal/hello-world"
export ML_CARD_TYPE="sd"
export ML_QEMU_TYPE="-legacy"
;;
750D | 750d)
export ML_PLATFORM="750D.110"
export ML_CARD_TYPE="sd"
export ML_QEMU_TYPE="-legacy"
;;
*)
log error "Unknown platform provided!"
esac
set_card_device ${ML_CARD_TYPE}
}