Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
  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:=dtc
  9. PKG_VERSION:=1.4.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc
  13. PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_LICENSE_FILES:=GPL
  16. PKG_INSTALL:=1
  17. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/dtc
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=Device Tree Compiler
  23. URL:=http://devicetree.org/Device_Tree_Compiler
  24. endef
  25. define Package/dtc/description
  26. Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
  27. as input a device-tree in a given format and outputs a device-tree in another
  28. format for booting kernels on embedded systems.
  29. endef
  30. define Package/dtc/install
  31. $(INSTALL_DIR) $(1)/usr/bin
  32. $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin
  33. endef
  34. define Package/libfdt
  35. SECTION:=libs
  36. CATEGORY:=Libraries
  37. TITLE:=a utility library for reading and manipulating dtb files
  38. URL:=http://devicetree.org/Device_Tree_Compiler
  39. endef
  40. define Package/libfdt/description
  41. This is a library containing functions for manipulating Flat Device Trees.
  42. endef
  43. define Package/libfdt/install
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
  46. endef
  47. TARGET_CFLAGS += \
  48. $(FPIC)
  49. MAKE_FLAGS += \
  50. PREFIX= \
  51. CFLAGS="$(TARGET_CFLAGS)"
  52. define Build/InstallDev
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(INSTALL_DIR) $(1)/usr/include
  55. $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
  56. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
  57. endef
  58. $(eval $(call BuildPackage,dtc))
  59. $(eval $(call BuildPackage,libfdt))