python-xlsxwriter: bump to version 0.9.6
[buildroot-gz.git] / board / atmel / flasher.sh
blobbbdb199b970af08d1c5a05defa3e5f592c8b5d2f
1 #!/usr/bin/env bash
3 BUILDIR=$1
4 TTY=$2
5 BOARD=$3
7 family_at91sam9g45m10ek="at91sam9m10g45ek"
8 mach_at91sam9g45m10ek="at91sam9m10-g45-ek"
9 dtb_at91sam9g45m10ek="at91sam9m10g45ek.dtb"
11 family_at91sam9rlek="at91sam9rlek"
12 mach_at91sam9rlek="at91sam9rl64-ek"
13 dtb_at91sam9rlek="at91sam9rlek.dtb"
15 family_at91sam9g15ek="at91sam9x5ek"
16 mach_at91sam9g15ek="at91sam9g15-ek"
17 dtb_at91sam9g15ek="at91sam9g15ek.dtb"
19 family_at91sam9g25ek="at91sam9x5ek"
20 mach_at91sam9g25ek="at91sam9g25-ek"
21 dtb_at91sam9g25ek="at91sam9g25ek.dtb"
23 family_at91sam9g35ek="at91sam9x5ek"
24 mach_at91sam9g35ek="at91sam9g35-ek"
25 dtb_at91sam9g35ek="at91sam9g35ek.dtb"
27 family_at91sam9x25ek="at91sam9x5ek"
28 mach_at91sam9x25ek="at91sam9x25-ek"
29 dtb_at91sam9x25ek="at91sam9x25ek.dtb"
31 family_at91sam9x35ek="at91sam9x5ek"
32 mach_at91sam9x35ek="at91sam9x35-ek"
33 dtb_at91sam9x35ek="at91sam9x35ek.dtb"
35 family_sama5d31ek="sama5d3xek"
36 mach_sama5d31ek="at91sama5d3x-ek"
37 dtb_sama5d31ek="sama5d31ek.dtb"
39 family_sama5d31ek_revc="sama5d3xek"
40 mach_sama5d31ek_revc="at91sama5d3x-ek"
41 dtb_sama5d31ek_revc="sama5d31ek_revc.dtb"
43 family_sama5d33ek="sama5d3xek"
44 mach_sama5d33ek="at91sama5d3x-ek"
45 dtb_sama5d33ek="sama5d33ek.dtb"
47 family_sama5d33ek_revc="sama5d3xek"
48 mach_sama5d33ek_revc="at91sama5d3x-ek"
49 dtb_sama5d33ek_revc="sama5d33ek_revc.dtb"
51 family_sama5d34ek="sama5d3xek"
52 mach_sama5d34ek="at91sama5d3x-ek"
53 dtb_sama5d34ek="sama5d34ek.dtb"
55 family_sama5d34ek_revc="sama5d3xek"
56 mach_sama5d34ek_revc="at91sama5d3x-ek"
57 dtb_sama5d34ek_revc="sama5d34ek_revc.dtb"
59 family_sama5d35ek="sama5d3xek"
60 mach_sama5d35ek="at91sama5d3x-ek"
61 dtb_sama5d35ek="sama5d35ek.dtb"
63 family_sama5d35ek_revc="sama5d3xek"
64 mach_sama5d35ek_revc="at91sama5d3x-ek"
65 dtb_sama5d35ek_revc="sama5d35ek_revc.dtb"
67 family_sama5d36ek="sama5d3xek"
68 mach_sama5d36ek="at91sama5d3x-ek"
69 dtb_sama5d36ek="sama5d36ek.dtb"
71 family_sama5d36ek_revc="sama5d3xek"
72 mach_sama5d36ek_revc="at91sama5d3x-ek"
73 dtb_sama5d36ek_revc="sama5d36ek_revc.dtb"
75 family_sama5d3_xplained="sama5d3_xplained"
76 mach_sama5d3_xplained="at91sama5d3x-xplained"
77 dtb_sama5d3_xplained="at91-sama5d3_xplained.dtb"
79 family_sama5d4ek="sama5d4ek"
80 mach_sama5d4ek="at91sama5d4x-ek"
81 dtb_sama5d4ek="at91-sama5d4ek.dtb"
83 family_sama5d4_xplained="sama5d4_xplained"
84 mach_sama5d4_xplained="at91sama5d4x-ek"
85 dtb_sama5d4_xplained="at91-sama5d4_xplained.dtb"
87 usage() {
88 cat << EOF
89 Usage:
90 $0 <builddir_path> <interface> <board>
92 Available boards:
93 at91sam9g45m10ek
94 at91sam9rlek
95 at91sam9g15ek
96 at91sam9g25ek
97 at91sam9x25ek
98 at91sam9g35ek
99 at91sam9x35ek
100 sama5d31ek
101 sama5d33ek
102 sama5d34ek
103 sama5d35ek
104 sama5d36ek
105 sama5d31ek_revc (Until rev. C)
106 sama5d33ek_revc (Until rev. C)
107 sama5d34ek_revc (Until rev. C)
108 sama5d35ek_revc (Until rev. C)
109 sama5d36ek_revc (Until rev. C)
110 sama5d3_xplained
111 sama5d4ek
112 sama5d4_xplained
114 Example:
115 $0 ./output /dev/ttyACM0 at91sam9g45m10ek
119 F="family_$BOARD"
120 M="mach_$BOARD"
121 D="dtb_$BOARD"
123 if [[ $# != 3 || -z ${!F} ]]; then
124 usage
125 exit 1
128 video_mode="video=LVDS-1:800x480-16"
129 if [[ $BOARD == "*pda4" ]]; then
130 video_mode="video=LVDS-1:480x272-16"
133 echo "Executing: ${!F} O=$1/images $1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode"
134 export O=$1/images
135 $1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode