uboot-mvebu: make hidden and be m for clearfog to fix IB failing to add it
[openwrt/openwrt.git] / package / boot / uboot-mvebu / Makefile
1 #
2 # Copyright (C) 2016 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=u-boot
12 PKG_VERSION:=2016.03
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=\
18 http://mirror2.openwrt.org/sources \
19 ftp://ftp.denx.de/pub/u-boot
20 PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
21
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
24
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define uboot/Default
30 TITLE:=
31 endef
32
33 define uboot/clearfog
34 TITLE:=U-Boot for SolidRun ClearFog A1
35 DEVICE:=armada-388-clearfog
36 endef
37
38 UBOOTS:= \
39 clearfog
40
41 define Package/uboot/template
42 define Package/uboot-mvebu-$(1)
43 SECTION:=boot
44 CATEGORY:=Boot Loaders
45 DEPENDS:=@(TARGET_DEVICE_mvebu_DEVICE_$(3)||TARGET_mvebu_DEVICE_$(3))
46 DEFAULT:=m
47 HIDDEN:=1
48 TITLE:=$(2)
49 URL:=http://www.denx.de/wiki/U-Boot
50 VARIANT:=$(1)
51 MAINTAINER:=Felix Fietkau <nbd@nbd.name>
52 endef
53 endef
54
55 define BuildUBootPackage
56 $(eval $(uboot/Default))
57 $(eval $(uboot/$(1)))
58 $(call Package/uboot/template,$(1),$(TITLE),$(DEVICE))
59 endef
60
61 define Build/Configure
62 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
63 $(BUILD_VARIANT)_config
64 endef
65
66 define Build/Compile
67 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
68 CROSS_COMPILE=$(TARGET_CROSS) \
69 DTC_DIR=$(LINUX_DIR)/scripts/dtc/
70 endef
71
72 define Package/uboot/install/default
73 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
74 $(CP) $(PKG_BUILD_DIR)/u-boot-spl.kwb \
75 $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-spl.kwb
76 $(INSTALL_DIR) $(KERNEL_BUILD_DIR)/
77 $(CP) $(PKG_BUILD_DIR)/u-boot-spl.kwb \
78 $(KERNEL_BUILD_DIR)/openwrt-$(BOARD)-$(1)-u-boot-spl.kwb
79 $(INSTALL_DIR) $(BIN_DIR)/u-boot-kwboot/
80 $(CP) $(PKG_BUILD_DIR)/tools/kwboot \
81 $(BIN_DIR)/u-boot-kwboot/
82 endef
83
84 define Package/uboot/install/template
85 define Package/uboot-mvebu-$(1)/install
86 $(call Package/uboot/install/default,$(2))
87 endef
88 endef
89
90 $(foreach u,$(UBOOTS), \
91 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
92 )
93
94 $(foreach u,$(UBOOTS), \
95 $(eval $(call BuildUBootPackage,$(u))) \
96 $(eval $(call BuildPackage,uboot-mvebu-$(u))) \
97 )