You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.8 KiB

  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:=1
  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. MAKE_FLAGS += \
  48. PREFIX= \
  49. CFLAGS="$(TARGET_CFLAGS)"
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(INSTALL_DIR) $(1)/usr/include
  53. $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
  54. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
  55. endef
  56. $(eval $(call BuildPackage,dtc))
  57. $(eval $(call BuildPackage,libfdt))