uboot-kirkwood: add Zyxel NSA325 uboot
[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:=2016.09.01
11 PKG_RELEASE:=1
12
13 PKG_HASH:=95728e89dd476d17428f94080752ab48884be477b6a678941582aeef618b70bb
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_DEVICES:=$(patsubst %_second_stage,%,$(1))
21 endef
22
23 define U-Boot/dockstar
24 NAME:=Seagate DockStar
25 endef
26
27 define U-Boot/dockstar_second_stage
28 NAME:=Seagate DockStar (second stage)
29 endef
30
31 define U-Boot/goflexhome
32 NAME:=the Seagate GoFlexHome/GoFlexNet
33 endef
34
35 define U-Boot/ib62x0
36 NAME:=RaidSonic ICY BOX NAS6210 and NAS6220
37 endef
38
39 define U-Boot/ib62x0_second_stage
40 NAME:=RaidSonic ICY BOX NAS6210 and NAS6220 (second stage)
41 endef
42
43 define U-Boot/iconnect
44 NAME:=Iomega iConnect Wireless
45 endef
46
47 define U-Boot/iconnect_second_stage
48 NAME:=Iomega iConnect Wireless (second stage)
49 endef
50
51 define U-Boot/nsa310
52 NAME:=Zyxel NSA310
53 endef
54
55 define U-Boot/nsa325
56 NAME:=Zyxel NSA325v1 and v2
57 endef
58
59 define U-Boot/pogo_e02
60 NAME:=Cloud Engines Pogoplug E02
61 endef
62
63 define U-Boot/pogo_e02_second_stage
64 NAME:=Cloud Engines Pogoplug E02 (second stage)
65 endef
66
67 define U-Boot/sheevaplug
68 NAME:=SheevaPlug
69 endef
70
71 UBOOT_TARGETS := \
72 dockstar dockstar_second_stage \
73 goflexhome \
74 ib62x0 ib62x0_second_stage \
75 iconnect iconnect_second_stage \
76 nsa310 \
77 nsa325 \
78 pogo_e02 pogo_e02_second_stage \
79 sheevaplug
80
81 define Build/Configure
82 $(if $(findstring _second_stage,$(BUILD_VARIANT)),
83 $(CP) \
84 $(PKG_BUILD_DIR)/configs/$(subst _second_stage,,$(BUILD_VARIANT))_defconfig \
85 $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
86 echo CONFIG_SECOND_STAGE=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
87 )
88 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
89 $(BUILD_VARIANT)_config V=1
90 endef
91
92 define Build/Compile
93 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
94 u-boot.kwb \
95 CROSS_COMPILE=$(TARGET_CROSS)
96 mkimage -A $(ARCH) -O linux -T kernel -C none \
97 -a 0x600000 -e 0x600000 \
98 -n 'U-Boot uImage' \
99 -d $(PKG_BUILD_DIR)/u-boot.bin $(PKG_BUILD_DIR)/u-boot.img
100 endef
101
102 define Package/u-boot/install
103 $(CP) \
104 $(PKG_BUILD_DIR)/u-boot.bin \
105 $(PKG_BUILD_DIR)/u-boot.kwb \
106 $(PKG_BUILD_DIR)/u-boot.img \
107 $(1)/
108 endef
109
110 define Build/InstallDev
111 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
112 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/kwboot $(STAGING_DIR_HOST)/bin/
113 endef
114
115 $(eval $(call BuildPackage/U-Boot))