41f396b83976651d99f528554eb37090ec4f0081
[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 BOARD_NAME := fritz4040
38 DEVICE_TITLE := AVM Fritz!Box 4040
39 IMAGE_SIZE := 29753344
40 IMAGES = sysupgrade.bin
41 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
42 DEVICE_PACKAGES := ipq-wifi-avm_fritzbox-4040 fritz-tffs fritz-caldata u-boot-fritz4040
43 endef
44 TARGET_DEVICES += avm_fritzbox-4040
45
46 define Device/glinet_gl-b1300
47 DEVICE_TITLE := GL.iNet GL-B1300
48 BOARD_NAME := gl-b1300
49 DEVICE_DTS := qcom-ipq4019-gl-b1300
50 KERNEL_INSTALL := 1
51 KERNEL_SIZE := 4096k
52 IMAGE_SIZE := 26624k
53 $(call Device/FitImage)
54 IMAGES := sysupgrade.bin
55 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
56 DEVICE_PACKAGES := ipq-wifi-glinet_gl-b1300
57 endef
58 TARGET_DEVICES += glinet_gl-b1300
59
60 define Device/openmesh_a42
61 $(call Device/FitImageLzma)
62 DEVICE_DTS := qcom-ipq4018-a42
63 BLOCKSIZE := 64k
64 SUPPORTED_DEVICES := openmesh,a42
65 DEVICE_TITLE := OpenMesh A42
66 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
67 IMAGE_SIZE := 15616k
68 IMAGES = factory.bin sysupgrade.bin
69 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
70 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
71 DEVICE_PACKAGES := ath10k-firmware-qca4019 uboot-envtools
72 endef
73 TARGET_DEVICES += openmesh_a42
74
75 define Device/qcom_ap-dk01.1-c1
76 DEVICE_TITLE := QCA AP-DK01.1-C1
77 BOARD_NAME := ap-dk01.1-c1
78 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
79 KERNEL_INSTALL := 1
80 KERNEL_SIZE := 4096k
81 IMAGE_SIZE := 26624k
82 $(call Device/FitImage)
83 IMAGES := sysupgrade.bin
84 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
85 DEVICE_PACKAGES := ath10k-firmware-qca4019
86 endef
87 TARGET_DEVICES += qcom_ap-dk01.1-c1
88
89 define Device/qcom_ap-dk04.1-c1
90 $(call Device/FitImage)
91 $(call Device/UbiFit)
92 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
93 KERNEL_INSTALL := 1
94 KERNEL_SIZE := 4048k
95 BLOCKSIZE := 128k
96 PAGESIZE := 2048
97 BOARD_NAME := ap-dk04.1-c1
98 DEVICE_TITLE := QCA AP-DK04.1-C1
99 endef
100 TARGET_DEVICES += qcom_ap-dk04.1-c1
101
102 $(eval $(call BuildImage))