FPU type should not interfere with the ABI selection.
[openwrt/svn-archive/archive.git] / package / boot / uboot-sunxi / Makefile
1 #
2 # Copyright (C) 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
10 PKG_NAME:=u-boot
11 PKG_VERSION:=2013.10-rc2-sunxi
12 PKG_RELEASE:=1
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL:=git://github.com/linux-sunxi/u-boot-sunxi
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_VERSION:=8a4621c488f33089d831168bfa5bae210a5684c8
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define uboot/Default
23 TITLE:=
24 CONFIG:=
25 IMAGE:=
26 endef
27
28 define uboot/A13-OLinuXino
29 TITLE:=U-Boot 2013.10-rc2 for the A13 Olinuxino
30 endef
31
32 define uboot/Hackberry
33 TITLE:=U-Boot 2013.10-rc2 for the Hackbeery
34 endef
35
36 define uboot/Cubieboard
37 TITLE:=U-Boot 2013.10-rc2 for Cubieboard
38 endef
39
40 define uboot/Cubieboard2
41 TITLE:=U-Boot 2013.10-rc2 for Cubieboard2
42 endef
43
44 define uboot/A20-OLinuXino_MICRO
45 TITLE:=U-Boot 2013.10-rc2 for A20 Olinuxino
46 endef
47
48 UBOOTS:=A13-OLinuXino Cubieboard Cubieboard2 A20-OLinuXino_MICRO Hackberry
49
50 define Package/uboot/template
51 define Package/uboot-sunxi-$(1)
52 SECTION:=boot
53 CATEGORY:=Boot Loaders
54 DEPENDS:=@TARGET_sunxi
55 TITLE:=$(2)
56 URL:=http://www.denx.de/wiki/U-Boot
57 VARIANT:=$(1)
58 MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
59 endef
60 endef
61
62 define BuildUBootPackage
63 $(eval $(uboot/Default))
64 $(eval $(uboot/$(1)))
65 $(call Package/uboot/template,$(1),$(TITLE))
66 endef
67
68 ifdef BUILD_VARIANT
69 $(eval $(call uboot/$(BUILD_VARIANT)))
70 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
71 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
72 endif
73
74 define Build/Configure
75 $(MAKE) -C $(PKG_BUILD_DIR) \
76 USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
77 endef
78
79 define Build/Compile
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 CROSS_COMPILE=$(TARGET_CROSS)
82 endef
83
84 define Package/uboot/install/default
85 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
86 $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
87 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
88 $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
89 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-sunxi-spl.bin
90 $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
91 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-sunxi-with-spl.bin
92 endef
93
94 define Package/uboot/install/template
95 define Package/uboot-sunxi-$(1)/install
96 $(call Package/uboot/install/default,$(2))
97 endef
98 endef
99
100 $(foreach u,$(UBOOTS), \
101 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
102 )
103
104 $(foreach u,$(UBOOTS), \
105 $(eval $(call BuildUBootPackage,$(u))) \
106 $(eval $(call BuildPackage,uboot-sunxi-$(u))) \
107 )