2 # Copyright (C) 2012-2016 OpenWrt.org
3 # Copyright (C) 2016 LEDE-project.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
11 include $(TOPDIR
)/rules.mk
12 include $(INCLUDE_DIR
)/image.mk
14 KERNEL_LOADADDR
:= 0x00008000
16 SIGNATURE
:=$(shell printf
"%.8s" $(SOURCE_DATE_EPOCH
))
19 $(call Image
/BuildDTB
,$(DTS_DIR
)/$(DEVICE_DTS
).dts
,$@.dtb
)
23 # these values are optimized for a 4GB labeled sdcard that actually holds 7744512 sectors of 512 byte
25 # Partition 1: 32768 sectors
26 # Partition 2: 98304 sectors (configurable)
30 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 -d
$(DEVICE_NAME
).bootscript
$@
-boot.scr
35 mkfs.fat
-C
$@.boot
16384
36 $(foreach dts
,$(DEVICE_DTS
), mcopy
-i
$@.boot
$(DTS_DIR
)/$(dts
).dtb
::$(dts
).dtb
;)
37 mcopy
-i
$@.boot
$(IMAGE_KERNEL
) ::zImage
38 -mcopy
-i
$@.boot
$@
-boot.scr
::boot.scr
41 define Build
/sdcard-img
42 if
[ -n
"$(UBOOT)" ]; then UBOOT
="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi
; \
43 ROOTFS_SIZE
=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE
) * 1024 * 2 )); \
44 SIGNATURE
="$(SIGNATURE)" \
45 .
/gen_mvebu_sdcard_img.sh
$@ \
48 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS
)
54 BOARD_NAME
= $$(DEVICE_DTS
)
56 KERNEL
:= kernel-bin | append-dtb | uImage none
57 SUPPORTED_DEVICES
= $$(DEVICE_DTS
)
61 IMAGES
:= sysupgrade.bin
62 IMAGE
/sysupgrade.bin
:= sysupgrade-tar | append-metadata
65 define Device
/UBI-factory
69 IMAGE
/factory.img
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi | pad-to
$$$$(PAGESIZE
)
72 define Device
/NAND-128K
77 VID_HDR_OFFSET
:= 2048
80 define Device
/NAND-256K
86 define Device
/NAND-512K
93 DEVICE_TITLE
:= Linksys
$(1)
94 DEVICE_PACKAGES
:= kmod-mwlwifi wpad-mini swconfig
97 define Device
/armada-385-linksys
103 define Device
/linksys-wrt1200ac
104 $(call Device
/linksys
,WRT1200AC
(Caiman
))
105 $(Device
/armada-385-linksys
)
106 DEVICE_DTS
:= armada-385-linksys-caiman
107 DEVICE_PACKAGES
+= mwlwifi-firmware-88w8864
109 TARGET_DEVICES
+= linksys-wrt1200ac
111 define Device
/linksys-wrt1900acv2
112 $(call Device
/linksys
,WRT1900ACv2
(Cobra
))
113 $(Device
/armada-385-linksys
)
114 DEVICE_DTS
:= armada-385-linksys-cobra
115 DEVICE_PACKAGES
+= mwlwifi-firmware-88w8864
117 TARGET_DEVICES
+= linksys-wrt1900acv2
119 define Device
/linksys-wrt3200acm
120 $(call Device
/linksys
,WRT3200ACM
(Rango
))
121 $(Device
/armada-385-linksys
)
122 DEVICE_DTS
:= armada-385-linksys-rango
123 DEVICE_PACKAGES
+= kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
125 TARGET_DEVICES
+= linksys-wrt3200acm
127 define Device
/linksys-wrt1900acs
128 $(call Device
/linksys
,WRT1900ACS
(Shelby
))
129 $(Device
/armada-385-linksys
)
130 DEVICE_DTS
:= armada-385-linksys-shelby
131 DEVICE_PACKAGES
+= mwlwifi-firmware-88w8864
133 TARGET_DEVICES
+= linksys-wrt1900acs
135 define Device
/linksys-wrt1900ac
136 $(call Device
/linksys
,WRT1900AC
(Mamba
))
137 DEVICE_DTS
:= armada-xp-linksys-mamba
138 DEVICE_PACKAGES
+= mwlwifi-firmware-88w8864
140 $(Device
/UBI-factory
)
143 TARGET_DEVICES
+= linksys-wrt1900ac
145 define Device
/openblocks-ax3-4
146 $(Device
/UBI-factory
)
147 DEVICE_DTS
:= armada-xp-openblocks-ax3-4
148 SUPPORTED_DEVICES
:= $(1)
151 IMAGE
/factory.img
:= append-kernel | pad-to
$$(BLOCKSIZE
) | append-ubi
152 DEVICE_TITLE
:= Plat
'Home OpenBlocks AX3
154 TARGET_DEVICES += openblocks-ax3-4
156 define Device/armada-385-db-ap
158 $(Device/UBI-factory)
160 DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP)
162 TARGET_DEVICES += armada-385-db-ap
164 define Device/marvell-nand
166 DEVICE_TITLE := Marvell Armada $(1)
169 define Device/armada-370-db
170 $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3))
172 TARGET_DEVICES += armada-370-db
174 define Device/armada-370-rd
175 $(call Device/marvell-nand,370 RD (RD-88F6710-A1))
177 TARGET_DEVICES += armada-370-rd
179 define Device/armada-xp-db
180 $(call Device/marvell-nand,XP DB (DB-78460-BP))
182 TARGET_DEVICES += armada-xp-db
184 define Device/armada-xp-gp
185 $(call Device/marvell-nand,XP GP (DB-MV784MP-GP))
187 TARGET_DEVICES += armada-xp-gp
189 define Device/armada-388-rd
190 DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP)
191 IMAGES := firmware.bin
192 IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs
194 TARGET_DEVICES += armada-388-rd
196 define Device/armada-388-clearfog-pro
199 DEVICE_TITLE := SolidRun ClearFog Pro
200 DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
201 IMAGES := sdcard.img.gz
202 IMAGE/sdcard.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
203 DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
204 SUPPORTED_DEVICES := armada-388-clearfog-pro armada-388-clearfog
205 UBOOT := clearfog-u-boot-spl.kwb
207 TARGET_DEVICES += armada-388-clearfog-pro
209 define Device/armada-388-clearfog-base
212 DEVICE_TITLE := SolidRun ClearFog Base
213 DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
214 IMAGES := sdcard.img.gz
215 IMAGE/sdcard.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
216 DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
217 UBOOT := clearfog-u-boot-spl.kwb
219 TARGET_DEVICES += armada-388-clearfog-base
221 define Device/globalscale-mirabox
223 DEVICE_DTS := armada-370-mirabox
224 SUPPORTED_DEVICES := mirabox
225 DEVICE_TITLE := Globalscale Mirabox
227 TARGET_DEVICES += globalscale-mirabox
229 $(eval $(call BuildImage))