2012-11-23 18:16:05 +00:00
|
|
|
#
|
2013-01-22 12:55:01 +00:00
|
|
|
# Copyright (C) 2012-2013 OpenWrt.org
|
2012-11-23 18:16:05 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=u-boot
|
2014-04-12 21:21:14 +00:00
|
|
|
PKG_VERSION:=2013.10
|
2012-11-23 18:16:05 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2013-01-22 12:55:01 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2013-10-28 15:15:05 +00:00
|
|
|
PKG_SOURCE_URL:= \
|
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2014-04-12 21:21:14 +00:00
|
|
|
PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
|
2012-11-23 18:16:05 +00:00
|
|
|
PKG_TARGETS:=bin
|
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define uboot/Default
|
|
|
|
TITLE:=
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=
|
|
|
|
DDR_SETTINGS:=
|
2012-11-23 18:16:05 +00:00
|
|
|
IMAGE:=
|
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/arv4519pw_ram
|
|
|
|
TITLE:=U-Boot for Arcadyan arv4519pw (RAM)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/arv4519pw_nor
|
|
|
|
TITLE:=U-Boot for Arcadyan arv4519pw (NOR)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/arv7518pw_ram
|
|
|
|
TITLE:=U-Boot for Arcadyan arv7518pw (RAM)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/arv7518pw_nor
|
|
|
|
TITLE:=U-Boot for Arcadyan arv7518pw (NOR)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/gigasx76x_ram
|
|
|
|
TITLE:=U-Boot for Siemens Gigaset sx76x (RAM)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h
|
|
|
|
endef
|
|
|
|
|
|
|
|
define uboot/gigasx76x_nor
|
|
|
|
TITLE:=U-Boot for Siemens Gigaset sx76x (NOR)
|
2013-01-22 12:55:01 +00:00
|
|
|
SOC:=danube
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
UBOOTS:= \
|
|
|
|
arv4519pw_ram arv4519pw_nor \
|
|
|
|
arv7518pw_ram arv7518pw_nor \
|
|
|
|
gigasx76x_ram gigasx76x_nor
|
|
|
|
|
|
|
|
define Package/uboot/template
|
|
|
|
define Package/uboot-lantiq-$(1)
|
|
|
|
SECTION:=boot
|
|
|
|
CATEGORY:=Boot Loaders
|
2012-12-15 01:59:35 +00:00
|
|
|
DEPENDS:=@TARGET_lantiq_xway
|
2012-11-23 18:16:05 +00:00
|
|
|
TITLE:=$(2)
|
|
|
|
URL:=http://www.denx.de/wiki/U-Boot
|
|
|
|
VARIANT:=$(1)
|
|
|
|
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
define BuildUBootPackage
|
|
|
|
$(eval $(uboot/Default))
|
|
|
|
$(eval $(uboot/$(1)))
|
|
|
|
$(call Package/uboot/template,$(1),$(TITLE))
|
|
|
|
endef
|
|
|
|
|
2013-01-22 12:55:01 +00:00
|
|
|
define Build/Configure
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) $(BUILD_VARIANT)_config
|
|
|
|
endef
|
2012-11-23 18:16:05 +00:00
|
|
|
|
|
|
|
define Build/Compile
|
2013-01-22 12:55:01 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS)
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot/install/default
|
2013-01-22 12:55:01 +00:00
|
|
|
$(CP) \
|
|
|
|
$(PKG_BUILD_DIR)/$(2) \
|
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.img
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
|
2013-01-22 12:55:01 +00:00
|
|
|
define Package/uboot/install/uart
|
|
|
|
awk -f $(PKG_BUILD_DIR)/tools/lantiq_ram_init_uart.awk \
|
|
|
|
-v soc=$(2) $(PKG_BUILD_DIR)/$(3) \
|
|
|
|
> $(PKG_BUILD_DIR)/ddr_settings
|
|
|
|
perl $(PKG_BUILD_DIR)/tools/gct.pl \
|
|
|
|
$(PKG_BUILD_DIR)/ddr_settings $(PKG_BUILD_DIR)/u-boot.srec \
|
|
|
|
$(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.asc
|
|
|
|
endef
|
|
|
|
|
2012-11-23 18:16:05 +00:00
|
|
|
define Package/uboot/install/template
|
|
|
|
define Package/uboot-lantiq-$(1)/install
|
2013-01-22 12:55:01 +00:00
|
|
|
$(call Package/uboot/install/default,$(1),$(if $(IMAGE),$(IMAGE),u-boot.bin))
|
|
|
|
$(if $(DDR_SETTINGS), \
|
|
|
|
$(call Package/uboot/install/uart,$(1),$(SOC),$(DDR_SETTINGS)) \
|
|
|
|
)
|
2012-11-23 18:16:05 +00:00
|
|
|
endef
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach u,$(UBOOTS), \
|
|
|
|
$(eval $(call BuildUBootPackage,$(u))) \
|
2013-01-22 12:55:01 +00:00
|
|
|
$(eval $(call Package/uboot/install/template,$(u))) \
|
2012-11-23 18:16:05 +00:00
|
|
|
$(eval $(call BuildPackage,uboot-lantiq-$(u))) \
|
|
|
|
)
|