1
0

Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mkimage
  9. PKG_VERSION:=2018.03
  10. PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=\
  12. http://mirror2.openwrt.org/sources \
  13. ftp://ftp.denx.de/pub/u-boot
  14. PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
  15. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. define Host/Prepare
  18. $(Host/Prepare/Default)
  19. mkdir -p $(HOST_BUILD_DIR)/include/config
  20. touch $(HOST_BUILD_DIR)/include/config/auto.conf
  21. endef
  22. define Host/Compile
  23. $(MAKE) -C $(HOST_BUILD_DIR) \
  24. HOSTCFLAGS="$(HOST_CFLAGS)" \
  25. HOSTLDFLAGS="$(HOST_LDFLAGS)" \
  26. no-dot-config-targets=tools-only \
  27. CONFIG_MKIMAGE_DTC_PATH=dtc \
  28. CONFIG_FIT_SIGNATURE=y \
  29. tools-only
  30. endef
  31. define Host/Install
  32. $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
  33. $(CP) $(HOST_BUILD_DIR)/tools/mkenvimage $(STAGING_DIR_HOST)/bin/
  34. endef
  35. define Host/Clean
  36. rm -f $(STAGING_DIR_HOST)/bin/mkimage
  37. rm -f $(STAGING_DIR_HOST)/bin/mkenvimage
  38. endef
  39. $(eval $(call HostBuild))