ramips: correct MTC WR1201 LAN ports names
[oweals/openwrt.git] / target / linux / at91 / image / sama5.mk
1
2 define Device/default-nand
3   BLOCKSIZE := 128k
4   PAGESIZE := 2048
5   SUBPAGESIZE := 2048
6   MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -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:at91-%=%)-fit.itb
17
18   $(if $(findstring at91-sama5d27_som1_ek,$@), \
19       mcopy -i $@.boot \
20           $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc1/u-boot.bin \
21           ::u-boot.bin
22       mcopy -i $@.boot \
23           $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd1_uboot/at91bootstrap.bin \
24           ::BOOT.bin,
25       mcopy -i $@.boot \
26           $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc/u-boot.bin \
27           ::u-boot.bin
28       $(if $(findstring sama5d4_xplained, $@), \
29           mcopy -i $@.boot \
30               $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
31               ::BOOT.bin,
32           mcopy -i $@.boot \
33               $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd_uboot/at91bootstrap.bin \
34               ::BOOT.bin))
35
36   $(CP) uboot-env.txt $@-uboot-env.txt
37   sed -i '2d;3d' $@-uboot-env.txt
38   sed -i '2i board='"$(DEVICE_NAME:at91-%=%)"'' $@-uboot-env.txt
39   sed -i '3i board_name='"$(DEVICE_NAME:at91-%=%)"'' $@-uboot-env.txt
40
41   mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
42
43   mcopy -i $@.boot $@-uboot.env ::uboot.env
44
45   ./gen_at91_sdcard_img.sh \
46       $@.img \
47       $@.boot \
48       $(KDIR)/root.ext4 \
49       $(AT91_SD_BOOT_PARTSIZE) \
50       $(CONFIG_TARGET_ROOTFS_PARTSIZE)
51
52   gzip -nc9 $@.img > $@
53
54   rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
55 endef
56
57 define Device/at91-sama5d2_xplained
58   $(Device/evaluation-dtb)
59   DEVICE_VENDOR := Microchip
60   DEVICE_MODEL := SAMA5D2 Xplained
61   KERNEL_SIZE := 6144k
62   $(Device/evaluation-sdimage)
63 endef
64 TARGET_DEVICES += at91-sama5d2_xplained
65
66 define Device/at91-sama5d27_som1_ek
67   $(Device/evaluation-dtb)
68   DEVICE_VENDOR := Microchip
69   DEVICE_MODEL := SAMA5D27 SOM1 Ek
70   KERNEL_SIZE := 6144k
71   $(Device/evaluation-sdimage)
72 endef
73 TARGET_DEVICES += at91-sama5d27_som1_ek
74
75 define Device/at91-sama5d2_ptc_ek
76   $(Device/evaluation-dtb)
77   DEVICE_VENDOR := Microchip
78   DEVICE_MODEL := SAMA5D2 PTC Ek
79   KERNEL_SIZE := 6144k
80   $(Device/evaluation-sdimage)
81 endef
82 TARGET_DEVICES += at91-sama5d2_ptc_ek
83
84
85 define Device/at91-sama5d3_xplained
86   $(Device/evaluation-dtb)
87   DEVICE_VENDOR := Microchip
88   DEVICE_MODEL := SAMA5D3 Xplained
89   KERNEL_SIZE := 6144k
90   $(Device/evaluation-sdimage)
91 endef
92 TARGET_DEVICES += at91-sama5d3_xplained
93
94 ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
95  ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
96   define Device/wb50n
97     $(Device/evaluation-fit)
98     DEVICE_VENDOR := Laird
99     DEVICE_MODEL := WB50N
100     DEVICE_PACKAGES := \
101           kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
102           kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
103           kmod-leds-gpio
104     BLOCKSIZE := 128k
105     PAGESIZE := 2048
106     SUBPAGESIZE := 2048
107     MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
108   endef
109   TARGET_DEVICES += wb50n
110  endif
111 endif
112
113
114 define Device/at91-sama5d4_xplained
115   $(Device/evaluation-dtb)
116   DEVICE_VENDOR := Microchip
117   DEVICE_MODEL := SAMA5D4 Xplained
118   KERNEL_SIZE := 6144k
119   BLOCKSIZE := 256k
120   PAGESIZE := 4096
121   SUBPAGESIZE := 2048
122   MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082
123   $(Device/evaluation-sdimage)
124 endef
125 TARGET_DEVICES += at91-sama5d4_xplained