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
12 PKG_VERSION:=2009.11.1
13 PKG_MD5SUM:=6086421c9e2f3a0d0dbc5f706b551dbc
16 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
21 include $(INCLUDE_DIR)/package.mk
23 define Package/uboot-lantiq
25 CATEGORY:=Boot Loaders
26 DEPENDS:=@TARGET_ifxmips
27 TITLE:=U-Boot for Lantiq reference boards
28 URL:=http://www.denx.de/wiki/U-Boot
33 cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
35 find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
38 UBOOT_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_CONFIG))
39 UBOOT_DDR_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_DDR_CONFIG))
42 CROSS_COMPILE=$(TARGET_CROSS) \
46 define Package/uboot-lantiq/config
48 source "$(SOURCE)/Config.in"
52 define Build/Configure/Target
53 $(MAKE) -s -C $(PKG_BUILD_DIR) \
55 O=$(PKG_BUILD_DIR)/$(1) \
59 define Build/Configure
60 $(call Build/Configure/Target,$(UBOOT_CONFIG))
61 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
62 $(call Build/Configure/Target,$(UBOOT_CONFIG)_ramboot)
66 define Build/Compile/Target
67 $(MAKE) -s -C $(PKG_BUILD_DIR) \
69 O=$(PKG_BUILD_DIR)/$(1) \
74 $(call Build/Compile/Target,$(UBOOT_CONFIG))
75 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
76 $(call Build/Compile/Target,$(UBOOT_CONFIG)_ramboot)
80 define Package/uboot-lantiq/install
81 mkdir -p $(1)/$(UBOOT_CONFIG)
83 if=$(PKG_BUILD_DIR)/$(UBOOT_CONFIG)/u-boot.bin \
84 of=$(1)/$(UBOOT_CONFIG)/u-boot.bin \
86 ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
87 if [ -e $(UBOOT_DDR_CONFIG) ]; then \
90 $(PKG_BUILD_DIR)/$(UBOOT_CONFIG)_ramboot/u-boot.srec \
91 $(1)/$(UBOOT_CONFIG)/u-boot.asc; \
96 $(eval $(call BuildPackage,uboot-lantiq))