5f3a511978a7413040d84b58d500d6ef22acffba
[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-rcw-ls1012ardb \
22 layerscape-ppfe \
23 layerscape-ppa-ls1012ardb \
24 kmod-ppfe
25 DEVICE_DTS := freescale/fsl-ls1012a-rdb
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 UBINIZE_OPTS := -E 5
119 BLOCKSIZE := 256KiB
120 PAGESIZE := 1
121 IMAGE/firmware.bin := \
122 ls-clean | \
123 ls-append $(1)-rcw.bin | pad-to 1M | \
124 ls-append $(1)-uboot.bin | pad-to 3M | \
125 ls-append $(1)-uboot-env.bin | pad-to 4M | \
126 ls-append $(1)-ppa.itb | pad-to 9M | \
127 ls-append $(1)-fman.bin | pad-to 15M | \
128 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
129 append-kernel | pad-to 32M | \
130 append-ubi | check-size 67108865
131 endef
132 TARGET_DEVICES += ls1046ardb
133
134 define Device/ls1046ardb-sdboot
135 DEVICE_TITLE := LS1046ARDB (SD Card Boot)
136 DEVICE_PACKAGES += \
137 layerscape-fman-ls1046ardb \
138 layerscape-ppa-ls1046ardb
139 DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
140 FILESYSTEMS := ext4
141 IMAGES := sdcard.img
142 IMAGE/sdcard.img := \
143 ls-clean | \
144 ls-append-sdhead $(1) | pad-to 4K | \
145 ls-append $(1)-uboot.bin | pad-to 3M | \
146 ls-append $(1)-uboot-env.bin | pad-to 4M | \
147 ls-append ls1046ardb-ppa.itb | pad-to 9M | \
148 ls-append ls1046ardb-fman.bin | pad-to 15M | \
149 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
150 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
151 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
152 endef
153 TARGET_DEVICES += ls1046ardb-sdboot
154
155 define Device/ls1088ardb
156 DEVICE_TITLE := LS1088ARDB
157 DEVICE_PACKAGES += \
158 layerscape-rcw-ls1088ardb \
159 layerscape-mc-ls1088ardb \
160 layerscape-dpl-ls1088ardb \
161 layerscape-ppa-ls1088ardb \
162 restool
163 DEVICE_DTS := freescale/fsl-ls1088a-rdb
164 UBINIZE_OPTS := -E 5
165 BLOCKSIZE := 256KiB
166 PAGESIZE := 1
167 IMAGE/firmware.bin := \
168 ls-clean | \
169 ls-append $(1)-rcw.bin | pad-to 1M | \
170 ls-append $(1)-uboot.bin | pad-to 3M | \
171 ls-append $(1)-uboot-env.bin | pad-to 4M | \
172 ls-append $(1)-ppa.itb | pad-to 10M | \
173 ls-append $(1)-mc.itb | pad-to 13M | \
174 ls-append $(1)-dpl.dtb | pad-to 14M | \
175 ls-append $(1)-dpc.dtb | pad-to 15M | \
176 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
177 append-kernel | pad-to 32M | \
178 append-ubi | check-size 67108865
179 endef
180 TARGET_DEVICES += ls1088ardb
181
182 define Device/ls1088ardb-sdboot
183 DEVICE_TITLE := LS1088ARDB (SD Card Boot)
184 DEVICE_PACKAGES += \
185 layerscape-rcw-ls1088ardb-sdboot \
186 layerscape-mc-ls1088ardb \
187 layerscape-dpl-ls1088ardb \
188 layerscape-ppa-ls1088ardb \
189 restool
190 DEVICE_DTS := freescale/fsl-ls1088a-rdb
191 FILESYSTEMS := ext4
192 IMAGES := sdcard.img
193 IMAGE/sdcard.img := \
194 ls-clean | \
195 ls-append-sdhead $(1) | pad-to 4K | \
196 ls-append $(1)-rcw.bin | pad-to 1M | \
197 ls-append $(1)-uboot.bin | pad-to 3M | \
198 ls-append $(1)-uboot-env.bin | pad-to 4M | \
199 ls-append ls1088ardb-ppa.itb | pad-to 10M | \
200 ls-append ls1088ardb-mc.itb | pad-to 13M | \
201 ls-append ls1088ardb-dpl.dtb | pad-to 14M | \
202 ls-append ls1088ardb-dpc.dtb | pad-to 15M | \
203 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
204 append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
205 append-rootfs | check-size $(LS_SD_IMAGE_SIZE)
206 endef
207 TARGET_DEVICES += ls1088ardb-sdboot
208
209 define Device/ls2088ardb
210 DEVICE_TITLE := LS2088ARDB
211 DEVICE_PACKAGES += \
212 layerscape-rcw-ls2088ardb \
213 layerscape-mc-ls2088ardb \
214 layerscape-dpl-ls2088ardb \
215 layerscape-ppa-ls2088ardb \
216 restool
217 DEVICE_DTS := freescale/fsl-ls2088a-rdb
218 FILESYSTEMS := squashfs
219 IMAGE/firmware.bin := \
220 ls-clean | \
221 ls-append $(1)-rcw.bin | pad-to 1M | \
222 ls-append $(1)-uboot.bin | pad-to 3M | \
223 ls-append $(1)-uboot-env.bin | pad-to 4M | \
224 ls-append $(1)-ppa.itb | pad-to 10M | \
225 ls-append $(1)-mc.itb | pad-to 13M | \
226 ls-append $(1)-dpl.dtb | pad-to 14M | \
227 ls-append $(1)-dpc.dtb | pad-to 15M | \
228 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
229 append-kernel | pad-to 32M | \
230 append-rootfs | pad-rootfs | check-size 67108865
231 endef
232 TARGET_DEVICES += ls2088ardb
233
234 define Device/traverse-ls1043
235 KERNEL_NAME := Image
236 KERNEL_SUFFIX := -kernel.itb
237 KERNEL_INSTALL := 1
238 FDT_LOADADDR = 0x90000000
239 FILESYSTEMS := ubifs
240 DEVICE_TITLE := Traverse LS1043 Boards
241 DEVICE_PACKAGES += \
242 layerscape-fman-ls1043ardb \
243 uboot-envtools \
244 kmod-i2c-core kmod-i2c-mux-pca954x \
245 kmod-hwmon-core \
246 kmod-gpio-pca953x kmod-input-gpio-keys-polled \
247 kmod-rtc-isl1208
248 DEVICE_DESCRIPTION = \
249 Build images for Traverse LS1043 boards. This generates a single image \
250 capable of booting on any of the boards in this family.
251 DEVICE_DTS = freescale/traverse-ls1043s
252 DEVICE_DTS_DIR = $(LINUX_DIR)/arch/arm64/boot/dts
253 DEVICE_DTS_CONFIG = ls1043s
254 KERNEL := kernel-bin | gzip | traverse-fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR)
255 KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR)
256 IMAGES = root sysupgrade.bin
257 IMAGE/root = append-rootfs
258 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
259 MKUBIFS_OPTS := -m 2048 -e 124KiB -c 4096
260 endef
261 TARGET_DEVICES += traverse-ls1043