[package] uboot-*: update license info in uboot packages
[openwrt.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:=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:=a076a044b64371edc52f7e562b13f6b2
20 PKG_TARGETS:=bin
21
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define uboot/Default
28   TITLE:=
29   CONFIG:=
30   IMAGE:=
31 endef
32
33 define uboot/omap4_panda
34   TITLE:=U-Boot for the Pandaboard
35 endef
36
37 define uboot/am335x_evm
38   TITLE:=U-Boot for the AM335x EVM
39 endef
40
41 define uboot/omap3_overo
42   TITLE:=U-Boot for the Gumstix Overo
43 endef
44
45 define uboot/omap3_beagle
46   TITLE:=U-Boot for the BeagleBoard
47 endef
48
49 UBOOTS:=omap4_panda am335x_evm omap3_overo omap3_beagle
50
51 define Package/uboot/template
52 define Package/uboot-omap-$(1)
53   SECTION:=boot
54   CATEGORY:=Boot Loaders
55   DEPENDS:=@TARGET_omap
56   TITLE:=$(2)
57   URL:=http://www.denx.de/wiki/U-Boot
58   VARIANT:=$(1)
59   HIDDEN:=1
60 endef
61 endef
62
63 define BuildUBootPackage
64         $(eval $(uboot/Default))
65         $(eval $(uboot/$(1)))
66         $(call Package/uboot/template,$(1),$(TITLE))
67 endef
68
69 ifdef BUILD_VARIANT
70 $(eval $(call uboot/$(BUILD_VARIANT)))
71 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
72 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.img)
73 endif
74
75 define Build/Configure
76         $(MAKE) -C $(PKG_BUILD_DIR) \
77                 USE_PRIVATE_LIBGCC=yes $(UBOOT_CONFIG)_config
78 endef
79
80 define Build/Compile
81         $(MAKE) -C $(PKG_BUILD_DIR) \
82                 CROSS_COMPILE=$(TARGET_CROSS)
83 endef
84
85 define Package/uboot/install/default
86         $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
87         $(CP) $(PKG_BUILD_DIR)/u-boot.img $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.img
88         $(CP) $(PKG_BUILD_DIR)/MLO $(BIN_DIR)/uboot-$(BOARD)-$(1)/MLO
89 endef
90
91 define Package/uboot/install/template
92 define Package/uboot-omap-$(1)/install
93         $(call Package/uboot/install/default,$(2))
94 endef
95 endef
96
97 $(foreach u,$(UBOOTS), \
98         $(eval $(call Package/uboot/install/template,$(u),$(u))) \
99 )
100
101 $(foreach u,$(UBOOTS), \
102         $(eval $(call BuildUBootPackage,$(u))) \
103         $(eval $(call BuildPackage,uboot-omap-$(u))) \
104 )