kirkwood: cleanup image build code
[openwrt/openwrt.git] / target / linux / kirkwood / image / Makefile
1 #
2 # Copyright (C) 2009-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/image.mk
10
11 KERNEL_LOADADDR:=0x8000
12
13 define Device/Default
14 PROFILES := Default
15 KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
16 KERNEL := kernel-bin | append-dtb | uImage none
17 KERNEL_NAME := zImage
18 KERNEL_SUFFIX := -uImage
19 KERNEL_IN_UBI := 1
20
21 PAGESIZE := 2048
22 SUBPAGESIZE := 512
23 BLOCKSIZE := 128k
24 IMAGES := sysupgrade.bin factory.bin
25 IMAGE/sysupgrade.bin := sysupgrade-tar
26 IMAGE/factory.bin := append-ubi
27 endef
28
29 define Device/dockstar
30 DEVICE_DTS := kirkwood-dockstar
31 DEVICE_TITLE := Seagate FreeAgent Dockstar
32 endef
33 TARGET_DEVICES += dockstar
34
35 define Device/goflexnet
36 DEVICE_TITLE := Seagate GoFlexNet
37 DEVICE_DTS := kirkwood-goflexnet
38 endef
39 TARGET_DEVICES += goflexnet
40
41 define Device/goflexhome
42 DEVICE_TITLE := Seagate GoFlexHome
43 DEVICE_DTS := kirkwood-goflexhome
44 endef
45 TARGET_DEVICES += goflexhome
46
47 define Device/linksys-audi
48 DEVICE_TITLE := Linksys EA3500 (Audi)
49 DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-mini
50 DEVICE_DTS := kirkwood-linksys-audi
51 KERNEL_SIZE := 2624k
52 KERNEL_IN_UBI := 0
53 UBINIZE_OPTS := -E 5
54 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
55 endef
56 TARGET_DEVICES += linksys-audi
57
58 define Device/linksys-viper
59 DEVICE_TITLE := Linksys E4200v2 / EA4500 (Viper)
60 DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-mini
61 DEVICE_DTS := kirkwood-linksys-viper
62 KERNEL_SIZE := 2688k
63 KERNEL_IN_UBI := 0
64 UBINIZE_OPTS := -E 5
65 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
66 endef
67 TARGET_DEVICES += linksys-viper
68
69 define Device/iconnect
70 DEVICE_TITLE := Iomega Iconnect
71 DEVICE_DTS := kirkwood-iconnect
72 endef
73 TARGET_DEVICES += iconnect
74
75 define Device/nsa310b
76 DEVICE_TITLE := ZyXEL NSA310b
77 DEVICE_DTS := kirkwood-nsa310b
78 DEVICE_PACKAGES := kmod-r8169 kmod-gpio-button-hotplug kmod-hwmon-lm85
79 endef
80 TARGET_DEVICES += nsa310b
81
82 define Device/nsa325
83 DEVICE_TITLE := ZyXEL NSA325 (v1 and v2)
84 DEVICE_DTS := kirkwood-nsa325
85 DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3
86 endef
87 TARGET_DEVICES += nsa325
88
89 define Device/on100
90 DEVICE_TITLE := Cisco Systems ON100
91 DEVICE_DTS := kirkwood-on100
92 DEVICE_PACKAGES := kmod-i2c-mv64xxx
93 KERNEL_SIZE := 5376k
94 KERNEL_IN_UBI := 0
95 UBINIZE_OPTS := -E 5
96 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
97 endef
98 TARGET_DEVICES += on100
99
100 define Device/pogo_e02
101 DEVICE_TITLE := Cloud Engines Pogoplug E02
102 DEVICE_DTS := kirkwood-pogo_e02
103 endef
104 TARGET_DEVICES += pogo_e02
105
106 define Device/ib62x0
107 DEVICE_TITLE := RaidSonic ICY BOX IB-NAS62x0
108 DEVICE_DTS := kirkwood-ib62x0
109 endef
110 TARGET_DEVICES += ib62x0
111
112 $(eval $(call BuildImage))