layerscape: add ls1012afrwy support and drop ls1012afrdm
[openwrt/openwrt.git] / target / linux / layerscape / image / armv8_64b.mk
1 #
2 # Copyright 2018 NXP
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 define Device/Default
9 PROFILES := Default
10 IMAGES := firmware.bin
11 FILESYSTEMS := ubifs
12 KERNEL := kernel-bin | gzip | uImage gzip
13 KERNEL_LOADADDR := 0x80080000
14 KERNEL_ENTRY_POINT := 0x80080000
15 endef
16
17 define Device/ls1012ardb
18 DEVICE_TITLE := LS1012ARDB
19 DEVICE_PACKAGES += \
20 layerscape-rcw-ls1012ardb \
21 layerscape-ppfe \
22 layerscape-ppa-ls1012ardb \
23 kmod-ppfe
24 DEVICE_DTS := freescale/fsl-ls1012a-rdb
25 UBIFS_OPTS := -m 1 -e 262016 -c 128
26 UBINIZE_OPTS := -E 5
27 BLOCKSIZE := 256KiB
28 PAGESIZE := 1
29 IMAGE/firmware.bin := \
30 ls-clean | \
31 ls-append $(1)-rcw.bin | pad-to 1M | \
32 ls-append $(1)-uboot.bin | pad-to 3M | \
33 ls-append $(1)-uboot-env.bin | pad-to 4M | \
34 ls-append $(1)-ppa.itb | pad-to 10M | \
35 ls-append pfe.itb | pad-to 15M | \
36 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
37 append-kernel | pad-to 32M | \
38 append-ubi | check-size 67108865
39 endef
40 TARGET_DEVICES += ls1012ardb
41
42 define Device/ls1012afrwy
43 DEVICE_TITLE := LS1012AFRWY
44 DEVICE_PACKAGES += \
45 layerscape-rcw-ls1012afrwy \
46 layerscape-ppfe \
47 layerscape-ppa-ls1012afrwy \
48 kmod-ppfe
49 DEVICE_DTS := freescale/fsl-ls1012a-frwy
50 FILESYSTEMS := ext4
51 IMAGES := firmware.bin sdcard.img
52 IMAGE/firmware.bin := \
53 ls-clean | \
54 ls-append $(1)-rcw.bin | pad-to 128K | \
55 ls-append pfe.itb | pad-to 384K | \
56 ls-append $(1)-ppa.itb | pad-to 1024K | \
57 ls-append $(1)-uboot.bin | pad-to 1856K | \
58 ls-append $(1)-uboot-env.bin | pad-to 2048K | \
59 check-size 2097153
60 IMAGE/sdcard.img := \
61 ls-clean | \
62 ls-append-sdhead $(1) | pad-to 15M | \
63 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
64 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
65 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
66 endef
67 TARGET_DEVICES += ls1012afrwy
68
69 define Device/ls1043ardb
70 DEVICE_TITLE := LS1043ARDB
71 DEVICE_PACKAGES += \
72 layerscape-rcw-ls1043ardb \
73 layerscape-fman-ls1043ardb \
74 layerscape-ppa-ls1043ardb
75 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
76 FILESYSTEMS := squashfs
77 IMAGE/firmware.bin := \
78 ls-clean | \
79 ls-append $(1)-rcw.bin | pad-to 1M | \
80 ls-append $(1)-uboot.bin | pad-to 3M | \
81 ls-append $(1)-uboot-env.bin | pad-to 4M | \
82 ls-append $(1)-ppa.itb | pad-to 9M | \
83 ls-append $(1)-fman.bin | pad-to 15M | \
84 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
85 append-kernel | pad-to 32M | \
86 append-rootfs | pad-rootfs | check-size 67108865
87 endef
88 TARGET_DEVICES += ls1043ardb
89
90 define Device/ls1043ardb-sdboot
91 DEVICE_TITLE := LS1043ARDB (SD Card Boot)
92 DEVICE_PACKAGES += \
93 layerscape-fman-ls1043ardb \
94 layerscape-ppa-ls1043ardb
95 DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
96 FILESYSTEMS := ext4
97 IMAGES := sdcard.img
98 IMAGE/sdcard.img := \
99 ls-clean | \
100 ls-append-sdhead $(1) | pad-to 4K | \
101 ls-append $(1)-uboot.bin | pad-to 3M | \
102 ls-append $(1)-uboot-env.bin | pad-to 4M | \
103 ls-append ls1043ardb-ppa.itb | pad-to 9M | \
104 ls-append ls1043ardb-fman.bin | pad-to 15M | \
105 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
106 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
107 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
108 endef
109 TARGET_DEVICES += ls1043ardb-sdboot
110
111 define Device/ls1046ardb
112 DEVICE_TITLE := LS1046ARDB
113 DEVICE_PACKAGES += \
114 layerscape-rcw-ls1046ardb \
115 layerscape-fman-ls1046ardb \
116 layerscape-ppa-ls1046ardb
117 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
118 UBIFS_OPTS := -m 1 -e 262016 -c 128
119 UBINIZE_OPTS := -E 5
120 BLOCKSIZE := 256KiB
121 PAGESIZE := 1
122 IMAGE/firmware.bin := \
123 ls-clean | \
124 ls-append $(1)-rcw.bin | pad-to 1M | \
125 ls-append $(1)-uboot.bin | pad-to 3M | \
126 ls-append $(1)-uboot-env.bin | pad-to 4M | \
127 ls-append $(1)-ppa.itb | pad-to 9M | \
128 ls-append $(1)-fman.bin | pad-to 15M | \
129 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
130 append-kernel | pad-to 32M | \
131 append-ubi | check-size 67108865
132 endef
133 TARGET_DEVICES += ls1046ardb
134
135 define Device/ls1046ardb-sdboot
136 DEVICE_TITLE := LS1046ARDB (SD Card Boot)
137 DEVICE_PACKAGES += \
138 layerscape-fman-ls1046ardb \
139 layerscape-ppa-ls1046ardb
140 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
141 FILESYSTEMS := ext4
142 IMAGES := sdcard.img
143 IMAGE/sdcard.img := \
144 ls-clean | \
145 ls-append-sdhead $(1) | pad-to 4K | \
146 ls-append $(1)-uboot.bin | pad-to 3M | \
147 ls-append $(1)-uboot-env.bin | pad-to 4M | \
148 ls-append ls1046ardb-ppa.itb | pad-to 9M | \
149 ls-append ls1046ardb-fman.bin | pad-to 15M | \
150 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
151 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
152 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
153 endef
154 TARGET_DEVICES += ls1046ardb-sdboot
155
156 define Device/ls1088ardb
157 DEVICE_TITLE := LS1088ARDB
158 DEVICE_PACKAGES += \
159 layerscape-rcw-ls1088ardb \
160 layerscape-mc-ls1088ardb \
161 layerscape-dpl-ls1088ardb \
162 layerscape-ppa-ls1088ardb \
163 restool
164 DEVICE_DTS := freescale/fsl-ls1088a-rdb
165 UBIFS_OPTS := -m 1 -e 262016 -c 128
166 UBINIZE_OPTS := -E 5
167 BLOCKSIZE := 256KiB
168 PAGESIZE := 1
169 IMAGE/firmware.bin := \
170 ls-clean | \
171 ls-append $(1)-rcw.bin | pad-to 1M | \
172 ls-append $(1)-uboot.bin | pad-to 3M | \
173 ls-append $(1)-uboot-env.bin | pad-to 4M | \
174 ls-append $(1)-ppa.itb | pad-to 10M | \
175 ls-append $(1)-mc.itb | pad-to 13M | \
176 ls-append $(1)-dpl.dtb | pad-to 14M | \
177 ls-append $(1)-dpc.dtb | pad-to 15M | \
178 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
179 append-kernel | pad-to 32M | \
180 append-ubi | check-size 67108865
181 endef
182 TARGET_DEVICES += ls1088ardb
183
184 define Device/ls1088ardb-sdboot
185 DEVICE_TITLE := LS1088ARDB (SD Card Boot)
186 DEVICE_PACKAGES += \
187 layerscape-rcw-ls1088ardb-sdboot \
188 layerscape-mc-ls1088ardb \
189 layerscape-dpl-ls1088ardb \
190 layerscape-ppa-ls1088ardb \
191 restool
192 DEVICE_DTS := freescale/fsl-ls1088a-rdb
193 FILESYSTEMS := ext4
194 IMAGES := sdcard.img
195 IMAGE/sdcard.img := \
196 ls-clean | \
197 ls-append-sdhead $(1) | pad-to 4K | \
198 ls-append $(1)-rcw.bin | pad-to 1M | \
199 ls-append $(1)-uboot.bin | pad-to 3M | \
200 ls-append $(1)-uboot-env.bin | pad-to 4M | \
201 ls-append ls1088ardb-ppa.itb | pad-to 10M | \
202 ls-append ls1088ardb-mc.itb | pad-to 13M | \
203 ls-append ls1088ardb-dpl.dtb | pad-to 14M | \
204 ls-append ls1088ardb-dpc.dtb | pad-to 15M | \
205 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
206 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
207 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
208 endef
209 TARGET_DEVICES += ls1088ardb-sdboot
210
211 define Device/ls2088ardb
212 DEVICE_TITLE := LS2088ARDB
213 DEVICE_PACKAGES += \
214 layerscape-rcw-ls2088ardb \
215 layerscape-mc-ls2088ardb \
216 layerscape-dpl-ls2088ardb \
217 layerscape-ppa-ls2088ardb \
218 restool
219 DEVICE_DTS := freescale/fsl-ls2088a-rdb
220 FILESYSTEMS := squashfs
221 IMAGE/firmware.bin := \
222 ls-clean | \
223 ls-append $(1)-rcw.bin | pad-to 1M | \
224 ls-append $(1)-uboot.bin | pad-to 3M | \
225 ls-append $(1)-uboot-env.bin | pad-to 4M | \
226 ls-append $(1)-ppa.itb | pad-to 10M | \
227 ls-append $(1)-mc.itb | pad-to 13M | \
228 ls-append $(1)-dpl.dtb | pad-to 14M | \
229 ls-append $(1)-dpc.dtb | pad-to 15M | \
230 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
231 append-kernel | pad-to 32M | \
232 append-rootfs | pad-rootfs | check-size 67108865
233 endef
234 TARGET_DEVICES += ls2088ardb
235
236 define Device/traverse-five64
237 KERNEL_NAME := Image
238 KERNEL_SUFFIX := -kernel.itb
239 KERNEL_INSTALL := 1
240 FDT_LOADADDR = 0x90000000
241 FILESYSTEMS := ubifs
242 DEVICE_TITLE := Traverse LS1043 Boards (Five64, LS1043S)
243 DEVICE_PACKAGES += \
244 layerscape-fman-ls1043ardb \
245 uboot-envtools uboot-traverse-ls1043v uboot-traverse-ls1043v-sdcard \
246 kmod-i2c-core kmod-i2c-mux-pca954x \
247 kmod-hwmon-core kmod-hwmon-ltc2990 kmod-hwmon-pac1934 kmod-hwmon-emc17xx\
248 kmod-gpio-pca953x kmod-input-gpio-keys-polled \
249 kmod-rtc-isl1208
250 DEVICE_DESCRIPTION = \
251 Build images for Traverse LS1043 boards. This generates a single image \
252 capable of booting on any of the boards in this family.
253 DEVICE_DTS = freescale/traverse-ls1043s
254 DEVICE_DTS_DIR = $(LINUX_DIR)/arch/arm64/boot/dts
255 DEVICE_DTS_CONFIG = ls1043s
256 KERNEL := kernel-bin | gzip | traverse-fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR)
257 KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR)
258 IMAGES = root sysupgrade.tar
259 IMAGE/root = append-rootfs
260 IMAGE/sysupgrade.tar = sysupgrade-tar
261 UBIFS_OPTS := -m 2048 -e 124KiB -c 4096
262 endef
263 TARGET_DEVICES += traverse-five64