2010-01-10 23:57:43 +08:00
|
|
|
#
|
2014-05-21 17:42:33 +08:00
|
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
2006-08-26 05:53:54 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2006-12-07 07:42:37 +08:00
|
|
|
PKG_NAME:=mkimage
|
2014-11-30 06:43:59 +08:00
|
|
|
PKG_VERSION:=2014.10
|
2010-01-10 23:57:43 +08:00
|
|
|
|
|
|
|
PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
|
2014-11-30 06:43:59 +08:00
|
|
|
PKG_SOURCE_URL:=\
|
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2016-12-17 00:32:10 +08:00
|
|
|
PKG_HASH:=d3b132a7a9b3f3182b7aad71c2dfbd4fc15bea83e12c76134eb3ffefc07d1c71
|
2010-01-10 23:57:43 +08:00
|
|
|
PKG_CAT:=bzcat
|
|
|
|
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
|
2006-08-26 05:53:54 +08:00
|
|
|
|
2007-05-10 15:02:04 +08:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
2012-09-23 16:49:34 +08:00
|
|
|
define Host/Prepare
|
|
|
|
$(Host/Prepare/Default)
|
|
|
|
rm -f \
|
|
|
|
$(HOST_BUILD_DIR)/include/errno.h \
|
2013-03-09 04:16:11 +08:00
|
|
|
$(HOST_BUILD_DIR)/include/malloc.h \
|
|
|
|
$(HOST_BUILD_DIR)/tools/.depend
|
2014-05-21 17:42:33 +08:00
|
|
|
touch $(HOST_BUILD_DIR)/include/config.mk
|
2013-03-09 04:16:11 +08:00
|
|
|
touch $(HOST_BUILD_DIR)/include/config.h
|
2012-09-23 16:49:34 +08:00
|
|
|
endef
|
|
|
|
|
2009-02-22 12:37:20 +08:00
|
|
|
define Host/Compile
|
2017-01-11 09:43:04 +08:00
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR) defconfig HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
|
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR) tools-only HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
|
2006-08-26 05:53:54 +08:00
|
|
|
endef
|
|
|
|
|
2009-02-22 12:37:20 +08:00
|
|
|
define Host/Install
|
2010-01-10 23:57:43 +08:00
|
|
|
$(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
|
2006-08-26 05:53:54 +08:00
|
|
|
endef
|
|
|
|
|
2009-02-22 12:37:20 +08:00
|
|
|
define Host/Clean
|
2007-08-07 08:04:25 +08:00
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/mkimage
|
2006-08-26 05:53:54 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|