1
0

Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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:=http://ftp.denx.de/pub/u-boot
  12. PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
  13. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
  14. include $(INCLUDE_DIR)/host-build.mk
  15. define Host/Prepare
  16. $(Host/Prepare/Default)
  17. mkdir -p $(HOST_BUILD_DIR)/include/config
  18. touch $(HOST_BUILD_DIR)/include/config/auto.conf
  19. endef
  20. define Host/Compile
  21. $(MAKE) -C $(HOST_BUILD_DIR) \
  22. HOSTCFLAGS="$(HOST_CFLAGS)" \
  23. HOSTLDFLAGS="$(HOST_LDFLAGS)" \
  24. no-dot-config-targets=tools-only \
  25. CONFIG_MKIMAGE_DTC_PATH=dtc \
  26. CONFIG_FIT_SIGNATURE=y \
  27. tools-only
  28. endef
  29. define Host/Install
  30. $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
  31. $(CP) $(HOST_BUILD_DIR)/tools/mkenvimage $(STAGING_DIR_HOST)/bin/
  32. endef
  33. define Host/Clean
  34. rm -f $(STAGING_DIR_HOST)/bin/mkimage
  35. rm -f $(STAGING_DIR_HOST)/bin/mkenvimage
  36. endef
  37. $(eval $(call HostBuild))