at91: add support for sam9x60-ek board
[openwrt/staging/wigyori.git] / target / linux / at91 / image / sam9x.mk
1
2 define Device/default-nand
3 BLOCKSIZE := 128k
4 PAGESIZE := 2048
5 SUBPAGESIZE := 512
6 MKUBIFS_OPTS := -m $$(PAGESIZE) -e 126KiB -c 2048
7 endef
8
9 define Build/at91-sdcard
10 $(if $(findstring ext4,$@), \
11 rm -f $@.boot
12 mkfs.fat -C $@.boot $(FAT32_BLOCKS)
13
14 mcopy -i $@.boot \
15 $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
16 ::$(DEVICE_NAME)-fit.itb
17
18 mcopy -i $@.boot \
19 $(BIN_DIR)/u-boot-$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
20 ::u-boot.bin
21
22 mcopy -i $@.boot \
23 $(BIN_DIR)/at91bootstrap-$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
24 ::BOOT.bin
25
26 $(CP) uboot-env.txt $@-uboot-env.txt
27 sed -i '2d;3d' $@-uboot-env.txt
28 sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
29 sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' $@-uboot-env.txt
30
31 mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
32
33 mcopy -i $@.boot $@-uboot.env ::uboot.env
34
35 ./gen_at91_sdcard_img.sh \
36 $@.img \
37 $@.boot \
38 $(KDIR)/root.ext4 \
39 $(AT91_SD_BOOT_PARTSIZE) \
40 $(CONFIG_TARGET_ROOTFS_PARTSIZE)
41
42 gzip -nc9 $@.img > $@
43
44 rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
45 endef
46
47 define Device/atmel_at91sam9263ek
48 $(Device/evaluation-dtb)
49 DEVICE_VENDOR := Atmel
50 DEVICE_MODEL := AT91SAM9263-EK
51 endef
52 TARGET_DEVICES += atmel_at91sam9263ek
53
54 define Device/atmel_at91sam9g15ek
55 $(Device/evaluation)
56 DEVICE_VENDOR := Atmel
57 DEVICE_MODEL := AT91SAM9G15-EK
58 endef
59 TARGET_DEVICES += atmel_at91sam9g15ek
60
61 define Device/atmel_at91sam9g20ek
62 $(Device/evaluation-dtb)
63 DEVICE_VENDOR := Atmel
64 DEVICE_MODEL := AT91SAM9G20-EK
65 endef
66 TARGET_DEVICES += atmel_at91sam9g20ek
67
68 define Device/atmel_at91sam9g20ek-2mmc
69 $(Device/evaluation-dtb)
70 DEVICE_VENDOR := Atmel
71 DEVICE_MODEL := AT91SAM9G20-EK
72 DEVICE_VARIANT := 2MMC
73 DEVICE_DTS := at91sam9g20ek_2mmc
74 SUPPORTED_DEVICES := atmel,at91sam9g20ek_2mmc
75 endef
76 TARGET_DEVICES += atmel_at91sam9g20ek-2mmc
77
78 define Device/atmel_at91sam9g25ek
79 $(Device/evaluation)
80 DEVICE_VENDOR := Atmel
81 DEVICE_MODEL := AT91SAM9G25-EK
82 endef
83 TARGET_DEVICES += atmel_at91sam9g25ek
84
85 define Device/atmel_at91sam9g35ek
86 $(Device/evaluation)
87 DEVICE_VENDOR := Atmel
88 DEVICE_MODEL := AT91SAM9G35-EK
89 endef
90 TARGET_DEVICES += atmel_at91sam9g35ek
91
92 define Device/atmel_at91sam9m10g45ek
93 $(Device/evaluation)
94 DEVICE_VENDOR := Atmel
95 DEVICE_MODEL := AT91SAM9M10G45-EK
96 endef
97 TARGET_DEVICES += atmel_at91sam9m10g45ek
98
99 define Device/atmel_at91sam9x25ek
100 $(Device/evaluation-dtb)
101 DEVICE_VENDOR := Atmel
102 DEVICE_MODEL := AT91SAM9X25-EK
103 $(Device/evaluation-sdimage)
104 endef
105 TARGET_DEVICES += atmel_at91sam9x25ek
106
107 define Device/atmel_at91sam9x35ek
108 $(Device/evaluation-dtb)
109 DEVICE_VENDOR := Atmel
110 DEVICE_MODEL := AT91SAM9X35-EK
111 $(Device/evaluation-sdimage)
112 endef
113 TARGET_DEVICES += atmel_at91sam9x35ek
114
115 define Device/microchip_sam9x60ek
116 $(Device/evaluation-dtb)
117 DEVICE_VENDOR := Microchip
118 DEVICE_MODEL := SAM9X60-EK
119 DEVICE_DTS := at91-sam9x60ek
120 $(Device/evaluation-sdimage)
121 endef
122 TARGET_DEVICES += microchip_sam9x60ek
123
124 define Device/calamp_lmu5000
125 $(Device/production)
126 DEVICE_VENDOR := CalAmp
127 DEVICE_MODEL := LMU5000
128 DEVICE_PACKAGES := kmod-rtc-pcf2123 kmod-usb-acm \
129 kmod-usb-serial-option kmod-usb-serial-sierrawireless kmod-gpio-mcp23s08
130 endef
131 TARGET_DEVICES += calamp_lmu5000
132
133 define Device/calao_tny-a9260
134 $(Device/production-dtb)
135 DEVICE_VENDOR := Calao
136 DEVICE_MODEL := TNY A9260
137 DEVICE_DTS := tny_a9260
138 endef
139 TARGET_DEVICES += calao_tny-a9260
140
141 define Device/calao_tny-a9263
142 $(Device/production-dtb)
143 DEVICE_VENDOR := Calao
144 DEVICE_MODEL := TNY A9263
145 DEVICE_DTS := tny_a9263
146 SUPPORTED_DEVICES := atmel,tny-a9263
147 endef
148 TARGET_DEVICES += calao_tny-a9263
149
150 define Device/calao_tny-a9g20
151 $(Device/production-dtb)
152 DEVICE_VENDOR := Calao
153 DEVICE_MODEL := TNY A9G20
154 DEVICE_DTS := tny_a9g20
155 endef
156 TARGET_DEVICES += calao_tny-a9g20
157
158 define Device/calao_usb-a9260
159 $(Device/production-dtb)
160 DEVICE_VENDOR := Calao
161 DEVICE_MODEL := USB A9260
162 DEVICE_DTS := usb_a9260
163 endef
164 TARGET_DEVICES += calao_usb-a9260
165
166 define Device/calao_usb-a9263
167 $(Device/production-dtb)
168 DEVICE_VENDOR := Calao
169 DEVICE_MODEL := USB A9263
170 DEVICE_DTS := usb_a9263
171 SUPPORTED_DEVICES := atmel,usb-a9263
172 endef
173 TARGET_DEVICES += calao_usb-a9263
174
175 define Device/calao_usb-a9g20
176 $(Device/production-dtb)
177 DEVICE_VENDOR := Calao
178 DEVICE_MODEL := USB A9G20
179 DEVICE_DTS := usb_a9g20
180 endef
181 TARGET_DEVICES += calao_usb-a9g20
182
183 define Device/egnite_ethernut5
184 $(Device/evaluation)
185 DEVICE_VENDOR := egnite
186 DEVICE_MODEL := Ethernut 5
187 UBINIZE_OPTS := -E 5
188 endef
189 TARGET_DEVICES += egnite_ethernut5
190
191 define Device/exegin_q5xr5
192 $(Device/production-dtb)
193 DEVICE_VENDOR := Exegin
194 DEVICE_MODEL := Q5x
195 DEVICE_VARIANT := rev5
196 DEVICE_DTS := at91-q5xr5
197 KERNEL_SIZE := 2048k
198 DEFAULT := n
199 endef
200 TARGET_DEVICES += exegin_q5xr5
201
202 define Device/laird_wb45n
203 $(Device/evaluation-fit)
204 DEVICE_VENDOR := Laird
205 DEVICE_MODEL := WB45N
206 DEVICE_DTS := at91-wb45n
207 DEVICE_PACKAGES := \
208 kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
209 kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
210 kmod-leds-gpio
211 BLOCKSIZE := 128k
212 PAGESIZE := 2048
213 SUBPAGESIZE := 2048
214 MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
215 endef
216 TARGET_DEVICES += laird_wb45n