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
14 PKG_MD5SUM
:=2bf5ebf497dddc52440b1ea386cc1332
17 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
19 PKG_SOURCE_URL
:=ftp
://ftp.denx.de
/pub
/u-boot
22 include $(INCLUDE_DIR
)/package.mk
25 STAMP_CONFIGURED
:=$(strip $(STAMP_CONFIGURED
))_
$(shell $(SH_FUNC
) grep
'^CONFIG_UBOOT_' $(TOPDIR
)/.config | md5s
)
28 define Package
/uboot-lantiq
30 CATEGORY
:=Boot Loaders
31 DEPENDS
:=@TARGET_lantiq
32 TITLE
:=U-Boot for Lantiq reference boards
33 URL
:=http
://www.denx.de
/wiki
/U-Boot
38 cp
-r
$(CP_OPTS
) $(FILES_DIR
)/* $(PKG_BUILD_DIR
)/
40 find
$(PKG_BUILD_DIR
) -name .svn |
$(XARGS
) rm -rf
43 UBOOT_TARGET
:=$(call qstrip
,$(CONFIG_UBOOT_TARGET
))
44 UBOOT_RAMBOOT_DDR_CONFIG
:=$(call qstrip
,$(CONFIG_UBOOT_RAMBOOT_DDR_CONFIG
))
47 CROSS_COMPILE
=$(TARGET_CROSS
) \
51 define Package
/uboot-lantiq
/config
52 source
"$(SOURCE)/Config.in"
55 define Build
/Configure
/Target
56 $(MAKE
) -s
-C
$(PKG_BUILD_DIR
) \
58 O
=$(PKG_BUILD_DIR
)/$(1) \
62 define Build
/Configure
63 $(call Build
/Configure
/Target
,$(UBOOT_TARGET
))
64 ifeq ($(CONFIG_UBOOT_RAMBOOT
),y
)
65 $(call Build
/Configure
/Target
,$(UBOOT_TARGET
)_ramboot
)
69 define Build
/Compile
/Target
70 $(MAKE
) -s
-C
$(PKG_BUILD_DIR
) \
72 O
=$(PKG_BUILD_DIR
)/$(1) \
77 $(call Build
/Compile
/Target
,$(UBOOT_TARGET
))
78 ifeq ($(CONFIG_UBOOT_RAMBOOT
),y
)
79 $(call Build
/Compile
/Target
,$(UBOOT_TARGET
)_ramboot
)
83 define Package
/uboot-lantiq
/install
84 mkdir
-p
$(1)/$(UBOOT_TARGET
)
86 if
=$(PKG_BUILD_DIR
)/$(UBOOT_TARGET
)/u-boot.bin \
87 of
=$(1)/$(UBOOT_TARGET
)/u-boot.bin \
89 ifeq ($(CONFIG_UBOOT_RAMBOOT
),y
)
90 if
[ -e
$(UBOOT_RAMBOOT_DDR_CONFIG
) ]; then \
92 $(UBOOT_RAMBOOT_DDR_CONFIG
) \
93 $(PKG_BUILD_DIR
)/$(UBOOT_TARGET
)_ramboot
/u-boot.srec \
94 $(1)/$(UBOOT_TARGET
)/u-boot.asc
; \
99 $(eval
$(call BuildPackage
,uboot-lantiq
))