mac80211: small rate control fix
[openwrt/openwrt.git] / package / boot / uboot-mxs / 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
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:= \
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19 PKG_MD5SUM:=8445162690052e6afd4b8f87af2bb557
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define uboot/Default
24 TITLE:=
25 CONFIG:=
26 IMAGE:=
27 endef
28
29 define uboot/mx23_olinuxino
30 TITLE:=U-Boot 2013.07 for the Olinuxino i.MX233
31 endef
32
33 UBOOTS := \
34 mx23_olinuxino
35
36 define Package/uboot/template
37 define Package/uboot-mxs-$(1)
38 SECTION:=boot
39 CATEGORY:=Boot Loaders
40 DEPENDS:=@TARGET_mxs
41 TITLE:=$(2)
42 URL:=http://www.denx.de/wiki/U-Boot
43 VARIANT:=$(1)
44 MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
45 endef
46 endef
47
48 define BuildUBootPackage
49 $(eval $(uboot/Default))
50 $(eval $(uboot/$(1)))
51 $(call Package/uboot/template,$(1),$(TITLE))
52 endef
53
54 ifdef BUILD_VARIANT
55 $(eval $(call uboot/$(BUILD_VARIANT)))
56 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
57 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
58 endif
59
60 define Build/Configure
61 $(MAKE) -C $(PKG_BUILD_DIR) \
62 $(UBOOT_CONFIG)_config
63 endef
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 CROSS_COMPILE=$(TARGET_CROSS) u-boot.sb
68 endef
69
70
71 define Package/uboot/install/default
72 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
73 dd if=$(PKG_BUILD_DIR)/u-boot.sb of=$(BIN_DIR)/uboot-$(BOARD)-$(1).sb bs=512 seek=4
74 endef
75
76 define Package/uboot/install/template
77 define Package/uboot-mxs-$(1)/install
78 $(call Package/uboot/install/default,$(2))
79 endef
80 endef
81
82 $(foreach u,$(UBOOTS), \
83 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
84 )
85
86 $(foreach u,$(UBOOTS), \
87 $(eval $(call BuildUBootPackage,$(u))) \
88 $(eval $(call BuildPackage,uboot-mxs-$(u))) \
89 )