7f9ae4e1517ab7602d7332068560a73243fc2135
[openwrt/openwrt.git] / package / boot / uboot-kirkwood / Makefile
1 #
2 # Copyright (C) 2010-2014 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
10 PKG_VERSION:=2020.04
11 PKG_RELEASE:=9
12
13 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
14
15 include $(INCLUDE_DIR)/u-boot.mk
16 include $(INCLUDE_DIR)/package.mk
17
18 define U-Boot/Default
19 BUILD_TARGET:=kirkwood
20 BUILD_SUBTARGET:=generic
21 endef
22
23 define U-Boot/dockstar
24 NAME:=Seagate DockStar
25 BUILD_DEVICES:=seagate_dockstar
26 endef
27
28 define U-Boot/dockstar_second_stage
29 NAME:=Seagate DockStar (second stage)
30 BUILD_DEVICES:=seagate_dockstar
31 endef
32
33 define U-Boot/goflexhome
34 NAME:=the Seagate GoFlexHome/GoFlexNet
35 BUILD_DEVICES:=seagate_goflexhome seagate_goflexnet
36 endef
37
38 define U-Boot/ib62x0
39 NAME:=RaidSonic ICY BOX NAS6210 and NAS6220
40 BUILD_DEVICES:=raidsonic_ib-nas62x0
41 endef
42
43 define U-Boot/ib62x0_second_stage
44 NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 (second stage)
45 BUILD_DEVICES:=raidsonic_ib-nas62x0
46 endef
47
48 define U-Boot/iconnect
49 NAME:=Iomega iConnect Wireless
50 BUILD_DEVICES:=iom_iconnect-1.1
51 endef
52
53 define U-Boot/iconnect_second_stage
54 NAME:=Iomega iConnect Wireless (second stage)
55 BUILD_DEVICES:=iom_iconnect-1.1
56 endef
57
58 define U-Boot/l-50
59 NAME:=CheckPoint L-50
60 BUILD_DEVICES:=checkpoint_l-50
61 endef
62
63 define U-Boot/nas220
64 NAME:=Seagate Blackarmor NAS220
65 BUILD_DEVICES:=seagate_blackarmor-nas220
66 endef
67
68 define U-Boot/nsa310
69 NAME:=Zyxel NSA310
70 BUILD_DEVICES:=zyxel_nsa310b
71 endef
72
73 define U-Boot/nsa310s
74 NAME:=Zyxel NSA310S
75 BUILD_DEVICES:=zyxel_nsa310s
76 endef
77
78 define U-Boot/nsa325
79 NAME:=Zyxel NSA325v1 and v2
80 BUILD_DEVICES:=zyxel_nsa325
81 endef
82
83 define U-Boot/pogo_e02
84 NAME:=Cloud Engines Pogoplug E02
85 BUILD_DEVICES:=cloudengines_pogoe02
86 endef
87
88 define U-Boot/pogo_e02_second_stage
89 NAME:=Cloud Engines Pogoplug E02 (second stage)
90 BUILD_DEVICES:=cloudengines_pogoe02
91 endef
92
93 define U-Boot/pogoplugv4
94 NAME:=Cloud Engines Pogoplug V4
95 BUILD_DEVICES:=cloudengines_pogoplugv4
96 endef
97
98 define U-Boot/sheevaplug
99 NAME:=Globalscale SheevaPlug
100 BUILD_DEVICES:=globalscale_sheevaplug
101 endef
102
103 UBOOT_TARGETS := \
104 dockstar dockstar_second_stage \
105 goflexhome \
106 ib62x0 ib62x0_second_stage \
107 iconnect iconnect_second_stage \
108 l-50 \
109 nas220 \
110 nsa310 \
111 nsa310s \
112 nsa325 \
113 pogo_e02 pogo_e02_second_stage \
114 pogoplugv4 \
115 sheevaplug
116
117 define Build/Configure
118 $(if $(findstring _second_stage,$(BUILD_VARIANT)),
119 $(CP) \
120 $(PKG_BUILD_DIR)/configs/$(subst _second_stage,,$(BUILD_VARIANT))_defconfig \
121 $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
122 echo CONFIG_SECOND_STAGE=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
123 )
124 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
125 $(BUILD_VARIANT)_config V=1
126 endef
127
128 define Build/Compile
129 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
130 u-boot.kwb \
131 CROSS_COMPILE=$(TARGET_CROSS)
132 mkimage -A $(ARCH) -O linux -T kernel -C none \
133 -a 0x600000 -e 0x600000 \
134 -n 'U-Boot uImage' \
135 -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
136 endef
137
138 define Package/u-boot/install
139 $(CP) \
140 $(PKG_BUILD_DIR)/u-boot.bin \
141 $(PKG_BUILD_DIR)/u-boot.kwb \
142 $(PKG_BUILD_DIR)/u-boot.img \
143 $(1)/
144 endef
145
146 define Build/InstallDev
147 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
148 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/kwboot $(STAGING_DIR_HOST)/bin/
149 endef
150
151 $(eval $(call BuildPackage/U-Boot))