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
17 $(call Image
/BuildDTB
,$(DTS_DIR
)/$(DEVICE_DTS
).dts
,$@.dtb
)
21 # these values are optimized for a 4GB labeled sdcard that actually holds 7744512 sectors of 512 byte
23 # Partition 1: 32768 sectors
24 # Partition 2: 98304 sectors (configurable)
26 define Build
/boot-scr-cfpro
28 mkimage
-A arm
-O linux
-T script
-C none
-a
0 -e
0 -d cfpro-boot.script
$@.bootscript
33 mkfs.fat
-C
$@.boot
16384
34 $(foreach dts
,$(DEVICE_DTS
), mcopy
-i
$@.boot
$(DTS_DIR
)/$(dts
).dtb
::$(dts
).dtb
)
35 mcopy
-i
$@.boot
$(IMAGE_KERNEL
) ::zImage
36 mcopy
-i
$@.boot
$@.bootscript
::boot.scr
39 define Build
/sdcard-img
40 ROOTFS_SIZE
=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE
) * 1024 * 2 )); \
41 .
/gen_mvebu_sdcard_img.sh
$@ \
42 "$(STAGING_DIR_IMAGE)/clearfog-u-boot-spl.kwb" \
44 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS
)
50 BOARD_NAME
= $$(DEVICE_DTS
)
52 KERNEL
:= kernel-bin | append-dtb | uImage none
53 SUPPORTED_DEVICES
= $$(DEVICE_DTS
)
57 IMAGES
:= sysupgrade.bin
58 IMAGE
/sysupgrade.bin
:= sysupgrade-tar | append-metadata
61 define Device
/UBI-factory
65 IMAGE
/factory.img
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-ubi | pad-to
$$$$(PAGESIZE
)
68 define Device
/NAND-128K
73 VID_HDR_OFFSET
:= 2048
76 define Device
/NAND-256K
82 define Device
/NAND-512K
89 DEVICE_TITLE
:= Linksys
$(1)
90 DEVICE_PACKAGES
:= kmod-mwlwifi wpad-mini swconfig
93 define Device
/armada-385-linksys
99 define Device
/linksys-wrt1200ac
100 $(call Device
/linksys
,WRT1200AC
(Caiman
))
101 $(Device
/armada-385-linksys
)
102 DEVICE_DTS
:= armada-385-linksys-caiman
104 TARGET_DEVICES
+= linksys-wrt1200ac
106 define Device
/linksys-wrt1900acv2
107 $(call Device
/linksys
,WRT1900ACv2
(Cobra
))
108 $(Device
/armada-385-linksys
)
109 DEVICE_DTS
:= armada-385-linksys-cobra
111 TARGET_DEVICES
+= linksys-wrt1900acv2
113 define Device
/linksys-wrt3200acm
114 $(call Device
/linksys
,WRT3200ACM
(Rango
))
115 $(Device
/armada-385-linksys
)
116 DEVICE_DTS
:= armada-385-linksys-rango
117 DEVICE_PACKAGES
+= kmod-mwifiex-sdio
119 TARGET_DEVICES
+= linksys-wrt3200acm
121 define Device
/linksys-wrt1900acs
122 $(call Device
/linksys
,WRT1900ACS
(Shelby
))
123 $(Device
/armada-385-linksys
)
124 DEVICE_DTS
:= armada-385-linksys-shelby
126 TARGET_DEVICES
+= linksys-wrt1900acs
128 define Device
/linksys-wrt1900ac
129 $(call Device
/linksys
,WRT1900AC
(Mamba
))
130 DEVICE_DTS
:= armada-xp-linksys-mamba
132 $(Device
/UBI-factory
)
135 TARGET_DEVICES
+= linksys-wrt1900ac
137 define Device
/openblocks-ax3-4
138 $(Device
/UBI-factory
)
139 DEVICE_DTS
:= armada-xp-openblocks-ax3-4
140 SUPPORTED_DEVICES
:= $(1)
143 IMAGE
/factory.img
:= append-kernel | pad-to
$$(BLOCKSIZE
) | append-ubi
144 DEVICE_TITLE
:= Plat
'Home OpenBlocks AX3
146 TARGET_DEVICES += openblocks-ax3-4
148 define Device/armada-385-db-ap
150 $(Device/UBI-factory)
152 DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP)
154 TARGET_DEVICES += armada-385-db-ap
156 define Device/marvell-nand
158 DEVICE_TITLE := Marvell Armada $(1)
161 Device/armada-370-db = $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3))
162 Device/armada-370-rd = $(call Device/marvell-nand,370 RD (RD-88F6710-A1))
163 Device/armada-xp-db = $(call Device/marvell-nand,XP DB (DB-78460-BP))
164 Device/armada-xp-gp = $(call Device/marvell-nand,XP GP (DB-MV784MP-GP))
165 TARGET_DEVICES += armada-370-db armada-370-rd armada-xp-db armada-xp-gp
167 define Device/armada-388-rd
168 DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP)
169 IMAGES := firmware.bin
170 IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs
172 TARGET_DEVICES += armada-388-rd
174 define Device/armada-388-clearfog-pro
176 KERNEL := dtb | kernel-bin
177 DEVICE_TITLE := SolidRun ClearFog Pro
178 DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
179 IMAGES := sdcard.img.gz
180 IMAGE/sdcard.img.gz := boot-scr-cfpro | boot-img | sdcard-img | gzip | append-metadata
181 IMAGE_NAME = $$(IMAGE_PREFIX)-$$(2)
183 TARGET_DEVICES += armada-388-clearfog-pro
185 define Device/globalscale-mirabox
187 DEVICE_DTS := armada-370-mirabox
188 SUPPORTED_DEVICES := mirabox
189 DEVICE_TITLE := Globalscale Mirabox
191 TARGET_DEVICES += globalscale-mirabox
193 $(eval $(call BuildImage))