2 # Copyright (C) 2015 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
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14 http://mirror2.openwrt.org/sources \
15 ftp://ftp.denx.de/pub/u-boot
17 PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_LICENSE:=GPL-2.0 GPL-2.0+
22 PKG_LICENSE_FILES:=Licenses/README
24 include $(INCLUDE_DIR)/package.mk
33 TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC702 Dev Board
37 TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC706 Dev Board
43 define Package/uboot/template
44 define Package/uboot-zynq-$(1)
46 CATEGORY:=Boot Loaders
49 URL:=http://www.denx.de/wiki/U-Boot
51 MAINTAINER:=Jason Wu <jason.wu.misc@gmail.com>
55 define BuildUBootPackage
56 $(eval $(uboot/Default))
58 $(call Package/uboot/template,$(1),$(TITLE))
62 $(eval $(call uboot/$(BUILD_VARIANT)))
63 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
64 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
67 define Build/Configure
68 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
69 $(BOARD)_$(UBOOT_CONFIG)_config
73 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
74 CROSS_COMPILE=$(TARGET_CROSS)
77 define Package/uboot/install/default
78 $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
80 $(CP) $(PKG_BUILD_DIR)/u-boot \
81 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.elf
83 $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.bin \
84 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.bin
86 $(CP) $(PKG_BUILD_DIR)/u-boot.dtb \
87 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.dtb
89 $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \
90 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.img
92 $(CP) $(PKG_BUILD_DIR)/spl/boot.bin \
93 $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.bin
95 $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl \
96 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl
98 $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl-dtb.bin \
99 $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl-dtb.bin
102 define Package/uboot/install/template
103 define Package/uboot-zynq-$(1)/install
104 $(call Package/uboot/install/default,$(2))
108 $(foreach u,$(UBOOTS), \
109 $(eval $(call Package/uboot/install/template,$(u),$(u))) \
112 $(foreach u,$(UBOOTS), \
113 $(eval $(call BuildUBootPackage,$(u))) \
114 $(eval $(call BuildPackage,uboot-zynq-$(u))) \