2 # Copyright (C) 2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 http://mirror2.openwrt.org/sources \
19 ftp://ftp.denx.de/pub/u-boot
20 PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
22 PKG_LICENSE:=GPL-2.0 GPL-2.0+
23 PKG_LICENSE_FILES:=Licenses/README
27 include $(INCLUDE_DIR)/package.mk
34 TITLE:=U-Boot for SolidRun ClearFog A1
35 DEVICE:=armada-388-clearfog
41 define Package/uboot/template
42 define Package/uboot-mvebu-$(1)
44 CATEGORY:=Boot Loaders
45 DEPENDS:=@(TARGET_DEVICE_mvebu_DEVICE_$(3)||TARGET_mvebu_DEVICE_$(3))
49 URL:=http://www.denx.de/wiki/U-Boot
51 MAINTAINER:=Felix Fietkau <nbd@nbd.name>
55 define BuildUBootPackage
56 $(eval $(uboot/Default))
58 $(call Package/uboot/template,$(1),$(TITLE),$(DEVICE))
61 define Build/Configure
62 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
63 $(BUILD_VARIANT)_config
67 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
68 CROSS_COMPILE=$(TARGET_CROSS) \
69 DTC_DIR=$(LINUX_DIR)/scripts/dtc/
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/
84 define Package/uboot/install/template
85 define Package/uboot-mvebu-$(1)/install
86 $(call Package/uboot/install/default,$(2))
90 $(foreach u,$(UBOOTS), \
91 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
94 $(foreach u,$(UBOOTS), \
95 $(eval $(call BuildUBootPackage,$(u))) \
96 $(eval $(call BuildPackage,uboot-mvebu-$(u))) \