iopsys-feed/uboot/Makefile
Kenneth Johansson d9bfa19cd7 Update feed [ feed_inteno_packages ] package [ u-boot ]
-------------------------------------------------------------------------------
* cfe658c Add support for ubi in userspace tools.
-------------------------------------------------------------------------------
commit cfe658c690831ad73a0038220ff402dd3d5a26e7
Author: Kenneth Johansson <kenneth@southpole.se>
Date: 2016-08-31 17:29:32 +0200

    Add support for ubi in userspace tools.

Base directory -> /
 tools/env/fw_env.c      | 249 +++++++++++++++++++++++++++++++++++++++++++++++-
 tools/env/fw_env.config |   8 ++
 2 files changed, 256 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2016-09-01 15:03:03 +02:00

96 lines
2.2 KiB
Makefile

#
# Copyright (C) 2013-2014 OpenWrt.org
#
# 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
PKG_VERSION:=2016.08
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@private.inteno.se:uboot
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cfe658c690831ad73a0038220ff402dd3d5a26e7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define uboot/Default
TITLE:=
CONFIG:=
IMAGE:=
endef
define uboot/ex300
TITLE:=U-Boot for the ex300
endef
UBOOTS := \
ex300
define Package/uboot/template
define Package/uboot-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
DEPENDS:=@TARGET_iopsys_ramips
TITLE:=$(2)
URL:=http://www.denx.de/wiki/U-Boot
VARIANT:=$(1)
endef
endef
define BuildUBootPackage
$(eval $(uboot/Default))
$(eval $(uboot/$(1)))
$(call Package/uboot/template,$(1),$(TITLE))
endef
ifdef BUILD_VARIANT
$(eval $(call uboot/$(BUILD_VARIANT)))
UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
endif
define Build/Configure
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
$(UBOOT_CONFIG)_config
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE=$(TARGET_CROSS)
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE=$(TARGET_CROSS) env
endef
define Package/uboot/install/default
$(INSTALL_DIR) $(BIN_DIR)/$(TARGET)
$(CP) \
$(PKG_BUILD_DIR)/uboot.img \
$(BIN_DIR)/$(TARGET)/
$(INSTALL_DIR) $$(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $$(1)/usr/sbin/
ln -s $$(1)/usr/sbin/fw_printenv $$(1)/usr/sbin/fw_setenv
endef
define Package/uboot/install/template
define Package/uboot-$(1)/install
$(call Package/uboot/install/default,$(2))
endef
endef
$(foreach u,$(UBOOTS), \
$(eval $(call Package/uboot/install/template,$(u),$(u))) \
)
$(foreach u,$(UBOOTS), \
$(eval $(call BuildUBootPackage,$(u))) \
$(eval $(call BuildPackage,uboot-$(u))) \
)