treewide: clean up download hashes
[openwrt/staging/chunkeey.git] / package / boot / uboot-omap / Makefile
1 #
2 # Copyright (C) 2012-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:=2015.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_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
20
21 PKG_LICENSE:=GPL-2.0 GPL-2.0+
22 PKG_LICENSE_FILES:=Licenses/README
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define uboot/Default
27 TITLE:=
28 CONFIG:=
29 IMAGE:=
30 endef
31
32 define uboot/omap4_panda
33 TITLE:=U-Boot for the Pandaboard
34 endef
35
36 define uboot/am335x_evm
37 TITLE:=U-Boot for the AM335x EVM
38 endef
39
40 define uboot/omap3_overo
41 TITLE:=U-Boot for the Gumstix Overo
42 endef
43
44 define uboot/omap3_beagle
45 TITLE:=U-Boot for the BeagleBoard
46 endef
47
48 UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle
49
50 define Package/uboot/template
51 define Package/uboot-omap-$(1)
52 SECTION:=boot
53 CATEGORY:=Boot Loaders
54 DEPENDS:=@TARGET_omap
55 TITLE:=$(2)
56 URL:=http://www.denx.de/wiki/U-Boot
57 VARIANT:=$(1)
58 HIDDEN:=1
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.img)
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.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img
87 $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO
88 endef
89
90 define Package/uboot/install/template
91 define Package/uboot-omap-$(1)/install
92 $(call Package/uboot/install/default,$(2))
93 endef
94 endef
95
96 $(foreach u,$(UBOOTS), \
97 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
98 )
99
100 $(foreach u,$(UBOOTS), \
101 $(eval $(call BuildUBootPackage,$(u))) \
102 $(eval $(call BuildPackage,uboot-omap-$(u))) \
103 )