|
3 | 3 | set -e |
4 | 4 |
|
5 | 5 | ACTION="apply" |
6 | | -if [[ "$1" == reset ]]; then |
7 | | - ACTION="reset" |
8 | | - shift |
9 | | -fi |
10 | | - |
11 | 6 | # Default to single camera DT for JetPack 5.0.2 |
12 | 7 | # single - jp5 [default] single cam GMSL board |
13 | 8 | # dual - dual cam GMSL board SC20220126 |
14 | 9 | JP5_D4XX_DTSI="tegra194-camera-d4xx-single.dtsi" |
15 | | -if [[ "$1" == "--one-cam" ]]; then |
16 | | - JP5_D4XX_DTSI="tegra194-camera-d4xx-single.dtsi" |
17 | | - shift |
18 | | -elif [[ "$1" == "--dual-cam" ]]; then |
19 | | - JP5_D4XX_DTSI="tegra194-camera-d4xx-dual.dtsi" |
20 | | - shift |
21 | | -elif [[ "$1" == "--max96712-EVB" ]]; then |
22 | | - JP5_D4XX_DTSI="tegra194-camera-d4xx-max96712-EVB.dtsi" |
23 | | - shift |
24 | | -elif [[ "$1" == "--fg12-16ch" ]]; then |
25 | | - JP5_D4XX_DTSI="tegra194-camera-d4xx-fg12-16ch.dtsi" |
26 | | - shift |
27 | | -elif [[ "$1" == "--fg12-16ch-dual" ]]; then |
28 | | - JP5_D4XX_DTSI="tegra194-camera-d4xx-fg12-16ch-dual.dtsi" |
| 10 | +while [[ $# -gt 0 ]]; do |
| 11 | + if [[ "$1" == "--one-cam" ]]; then |
| 12 | + JP5_D4XX_DTSI="tegra194-camera-d4xx-single.dtsi" |
| 13 | + elif [[ "$1" == "--dual-cam" ]]; then |
| 14 | + JP5_D4XX_DTSI="tegra194-camera-d4xx-dual.dtsi" |
| 15 | + elif [[ "$1" == "--max96712-EVB" ]]; then |
| 16 | + JP5_D4XX_DTSI="tegra194-camera-d4xx-max96712-EVB.dtsi" |
| 17 | + elif [[ "$1" == "--fg12-16ch" ]]; then |
| 18 | + JP5_D4XX_DTSI="tegra194-camera-d4xx-fg12-16ch.dtsi" |
| 19 | + elif [[ "$1" == "--fg12-16ch-dual" ]]; then |
| 20 | + JP5_D4XX_DTSI="tegra194-camera-d4xx-fg12-16ch-dual.dtsi" |
| 21 | + elif [[ "$1" == reset ]]; then |
| 22 | + ACTION="reset" |
| 23 | + elif [[ $1 == "-h" ]]; then |
| 24 | + echo Usage: |
| 25 | + echo "$0 [--one-cam | --dual-cam | --max96712-EVB | --fg12-16ch | --fg12-16ch-dual ] [reset] [-h]" |
| 26 | + echo -e 'reset\t: hard reset (git) to version from jetpack_version file' |
| 27 | + echo -e '-h\t: show this help' |
| 28 | + break |
| 29 | + fi |
29 | 30 | shift |
30 | | -fi |
31 | | - |
32 | | -if [[ "$1" == reset ]]; then |
33 | | - ACTION="reset" |
34 | | - shift |
35 | | -fi |
36 | | - |
37 | | -if [[ $1 == "-h" ]]; then |
38 | | - echo Usage: |
39 | | - echo "$0 [--one-cam | --dual-cam | --max96712-EVB | --fg12-16ch | --fg12-16ch-dual ] [reset] [-h]" |
40 | | - echo -e 'reset\t: hard reset (git) to version from jetpack_version file' |
41 | | - echo -e '-h\t: show this help' |
42 | | -fi |
| 31 | +done |
43 | 32 |
|
44 | | -[[ $# -gt 0 ]] && [[ $1 != "-h" ]] && echo -e too many arguments && exit 1 |
45 | 33 | . scripts/setup-common |
46 | 34 |
|
47 | 35 | # set JP4 devicetree |
|
0 commit comments