2 # Copyright (C) 2010 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:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
21 include $(INCLUDE_DIR)/package.mk
30 TITLE:=U-boot for the qi_lb60 board
34 TITLE:=U-boot for the avt2 board
38 TITLE:=U-boot for the sakc board
42 TITLE:=U-boot for the N516 e-book reader
46 UBOOTS:=qi_lb60 n516 avt2 sakc
48 define Package/uboot/template
49 define Package/uboot-xburst-$(1)
51 CATEGORY:=Boot Loaders
52 DEPENDS:=@TARGET_xburst
54 URL:=http://www.denx.de/wiki/U-Boot
59 define BuildUbootPackage
60 $(eval $(uboot/Default))
62 $(call Package/uboot/template,$(1),$(TITLE))
67 $(eval $(call uboot/$(BUILD_VARIANT)))
68 UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
69 UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
73 $(call Build/Prepare/Default)
74 $(CP) ./files/* $(PKG_BUILD_DIR)
75 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
78 define Build/Configure
79 $(MAKE) -C $(PKG_BUILD_DIR) \
80 $(UBOOT_CONFIG)_config
84 $(MAKE) -C $(PKG_BUILD_DIR) \
85 CROSS_COMPILE=$(TARGET_CROSS)
88 define Package/uboot/install/template
89 define Package/uboot-xburst-$(1)/install
91 $(CP) $(PKG_BUILD_DIR)/u-boot-nand.bin $(BIN_DIR)/$(2)
95 $(foreach u,$(UBOOTS), \
96 $(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(u)-u-boot.bin)) \
99 $(foreach u,$(UBOOTS), \
100 $(eval $(call BuildUbootPackage,$(u))) \
101 $(eval $(call BuildPackage,uboot-xburst-$(u))) \