ipq40xx: OpenMesh A42 overhaul
[openwrt/openwrt.git] / target / linux / ipq40xx / image / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/image.mk
3
4 define Device/Default
5 PROFILES := Default
6 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
7 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
8 KERNEL_PREFIX := $$(IMAGE_PREFIX)
9 KERNEL_LOADADDR := 0x80208000
10 SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
11 IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
12 IMAGE/sysupgrade.bin/squashfs :=
13 endef
14
15 define Device/FitImage
16 KERNEL_SUFFIX := -fit-uImage.itb
17 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
18 KERNEL_NAME := Image
19 endef
20
21 define Device/FitImageLzma
22 KERNEL_SUFFIX := -fit-uImage.itb
23 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
24 KERNEL_NAME := Image
25 endef
26
27 define Device/UbiFit
28 KERNEL_IN_UBI := 1
29 IMAGES := nand-factory.ubi nand-sysupgrade.bin
30 IMAGE/nand-factory.ubi := append-ubi
31 IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
32 endef
33
34 define Device/avm_fritzbox-4040
35 $(call Device/FitImageLzma)
36 DEVICE_DTS := qcom-ipq4019-fritz4040
37 BLOCKSIZE := 4k
38 PAGESIZE := 256
39 BOARD_NAME := fritz4040
40 DEVICE_TITLE := AVM Fritz!Box 4040
41 IMAGE_SIZE := 29753344
42 IMAGES = sysupgrade.bin
43 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
44 DEVICE_PACKAGES := ipq-wifi-avm_fritzbox-4040 fritz-tffs fritz-caldata u-boot-fritz4040
45 endef
46 TARGET_DEVICES += avm_fritzbox-4040
47
48 define Device/glinet_gl-b1300
49 DEVICE_TITLE := GL.iNet GL-B1300
50 BOARD_NAME := gl-b1300
51 DEVICE_DTS := qcom-ipq4019-gl-b1300
52 KERNEL_INSTALL := 1
53 KERNEL_SIZE := 4096k
54 IMAGE_SIZE := 26624k
55 $(call Device/FitImage)
56 IMAGES := sysupgrade.bin
57 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
58 DEVICE_PACKAGES := ipq-wifi-glinet_gl-b1300
59 endef
60 TARGET_DEVICES += glinet_gl-b1300
61
62 define Device/openmesh_a42
63 $(call Device/FitImageLzma)
64 DEVICE_DTS := qcom-ipq4018-a42
65 BLOCKSIZE := 64k
66 SUPPORTED_DEVICES := openmesh,a42
67 DEVICE_TITLE := OpenMesh A42
68 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
69 IMAGE_SIZE := 15616k
70 IMAGES = factory.bin sysupgrade.bin
71 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
72 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
73 DEVICE_PACKAGES := ath10k-firmware-qca4019 uboot-envtools
74 endef
75 TARGET_DEVICES += openmesh_a42
76
77 define Device/qcom_ap-dk01.1-c1
78 DEVICE_TITLE := QCA AP-DK01.1-C1
79 BOARD_NAME := ap-dk01.1-c1
80 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
81 KERNEL_INSTALL := 1
82 KERNEL_SIZE := 4096k
83 IMAGE_SIZE := 26624k
84 $(call Device/FitImage)
85 IMAGES := sysupgrade.bin
86 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
87 DEVICE_PACKAGES := ath10k-firmware-qca4019
88 endef
89 TARGET_DEVICES += qcom_ap-dk01.1-c1
90
91 define Device/qcom_ap-dk04.1-c1
92 $(call Device/FitImage)
93 $(call Device/UbiFit)
94 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
95 KERNEL_INSTALL := 1
96 KERNEL_SIZE := 4048k
97 BLOCKSIZE := 128k
98 PAGESIZE := 2048
99 BOARD_NAME := ap-dk04.1-c1
100 DEVICE_TITLE := QCA AP-DK04.1-C1
101 endef
102 TARGET_DEVICES += qcom_ap-dk04.1-c1
103
104 $(eval $(call BuildImage))