2010-03-28 22:40:32 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
|
|
|
|
PKG_NAME:=u-boot
|
2010-04-09 10:44:47 +00:00
|
|
|
|
|
|
|
PKG_VERSION:=2010.03
|
|
|
|
PKG_MD5SUM:=2bf5ebf497dddc52440b1ea386cc1332
|
2010-03-28 22:40:32 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
|
|
|
|
PKG_TARGETS:=bin
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2010-03-31 09:45:09 +00:00
|
|
|
ifeq ($(DUMP),)
|
|
|
|
STAMP_CONFIGURED:=$(strip $(STAMP_CONFIGURED))_$(shell grep '^CONFIG_UBOOT_' $(TOPDIR)/.config | md5s)
|
|
|
|
endif
|
|
|
|
|
2010-03-28 22:40:32 +00:00
|
|
|
define Package/uboot-lantiq
|
|
|
|
SECTION:=boot
|
|
|
|
CATEGORY:=Boot Loaders
|
|
|
|
DEPENDS:=@TARGET_ifxmips
|
|
|
|
TITLE:=U-Boot for Lantiq reference boards
|
2010-03-28 23:33:10 +00:00
|
|
|
URL:=http://www.denx.de/wiki/U-Boot
|
2010-04-16 11:08:19 +00:00
|
|
|
MENU:=1
|
2010-03-28 22:40:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
$(PKG_UNPACK)
|
|
|
|
cp -r $(CP_OPTS) $(FILES_DIR)/* $(PKG_BUILD_DIR)/
|
|
|
|
$(Build/Patch)
|
|
|
|
find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
|
|
|
|
endef
|
|
|
|
|
2010-03-31 09:45:09 +00:00
|
|
|
UBOOT_TARGET:=$(call qstrip,$(CONFIG_UBOOT_TARGET))
|
|
|
|
UBOOT_RAMBOOT_DDR_CONFIG:=$(call qstrip,$(CONFIG_UBOOT_RAMBOOT_DDR_CONFIG))
|
2010-03-30 13:49:42 +00:00
|
|
|
|
2010-03-28 22:40:32 +00:00
|
|
|
UBOOT_MAKE_OPTS:= \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
ENDIANNESS= \
|
|
|
|
V=1
|
|
|
|
|
2010-03-30 13:49:42 +00:00
|
|
|
define Package/uboot-lantiq/config
|
2010-03-31 09:45:09 +00:00
|
|
|
source "$(SOURCE)/Config.in"
|
2010-03-30 13:49:42 +00:00
|
|
|
endef
|
|
|
|
|
2010-03-28 22:40:32 +00:00
|
|
|
define Build/Configure/Target
|
|
|
|
$(MAKE) -s -C $(PKG_BUILD_DIR) \
|
|
|
|
$(UBOOT_MAKE_OPTS) \
|
|
|
|
O=$(PKG_BUILD_DIR)/$(1) \
|
|
|
|
$(1)_config
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2010-03-31 09:45:09 +00:00
|
|
|
$(call Build/Configure/Target,$(UBOOT_TARGET))
|
2010-03-30 13:49:42 +00:00
|
|
|
ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
|
2010-03-31 09:45:09 +00:00
|
|
|
$(call Build/Configure/Target,$(UBOOT_TARGET)_ramboot)
|
2010-03-30 13:49:42 +00:00
|
|
|
endif
|
2010-03-28 22:40:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile/Target
|
|
|
|
$(MAKE) -s -C $(PKG_BUILD_DIR) \
|
|
|
|
$(UBOOT_MAKE_OPTS) \
|
|
|
|
O=$(PKG_BUILD_DIR)/$(1) \
|
|
|
|
all
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2010-03-31 09:45:09 +00:00
|
|
|
$(call Build/Compile/Target,$(UBOOT_TARGET))
|
2010-03-30 13:49:42 +00:00
|
|
|
ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
|
2010-03-31 09:45:09 +00:00
|
|
|
$(call Build/Compile/Target,$(UBOOT_TARGET)_ramboot)
|
2010-03-30 13:49:42 +00:00
|
|
|
endif
|
2010-03-28 22:40:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot-lantiq/install
|
2010-03-31 09:45:09 +00:00
|
|
|
mkdir -p $(1)/$(UBOOT_TARGET)
|
2010-03-28 22:40:32 +00:00
|
|
|
dd \
|
2010-03-31 09:45:09 +00:00
|
|
|
if=$(PKG_BUILD_DIR)/$(UBOOT_TARGET)/u-boot.bin \
|
|
|
|
of=$(1)/$(UBOOT_TARGET)/u-boot.bin \
|
2010-03-28 22:40:32 +00:00
|
|
|
bs=64k conv=sync
|
2010-03-30 13:49:42 +00:00
|
|
|
ifeq ($(CONFIG_UBOOT_RAMBOOT),y)
|
2010-03-31 09:45:09 +00:00
|
|
|
if [ -e $(UBOOT_RAMBOOT_DDR_CONFIG) ]; then \
|
2010-03-28 22:40:32 +00:00
|
|
|
perl ./gct \
|
2010-03-31 09:45:09 +00:00
|
|
|
$(UBOOT_RAMBOOT_DDR_CONFIG) \
|
|
|
|
$(PKG_BUILD_DIR)/$(UBOOT_TARGET)_ramboot/u-boot.srec \
|
|
|
|
$(1)/$(UBOOT_TARGET)/u-boot.asc; \
|
2010-03-28 22:40:32 +00:00
|
|
|
fi
|
2010-03-30 13:49:42 +00:00
|
|
|
endif
|
2010-03-28 22:40:32 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,uboot-lantiq))
|