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