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.

93 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2016-2018 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.5.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_HASH:=c672e443c9f7e39f5a7c8e602da6777f9ad55ad70de87de300a43828c8050172
  13. PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
  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:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  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. # See Documentation/manual.txt for details about each utility
  35. define Package/fdt-utils
  36. SECTION:=utils
  37. CATEGORY:=Utilities
  38. TITLE:=Flat Device Tree Utilities
  39. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  40. endef
  41. define Package/fdt-utils/install
  42. $(INSTALL_DIR) $(1)/usr/bin
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/convert-dtsv0 $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtdump $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtget $(1)/usr/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtput $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtoverlay $(1)/usr/bin
  48. endef
  49. define Package/libfdt
  50. SECTION:=libs
  51. CATEGORY:=Libraries
  52. TITLE:=a utility library for reading and manipulating dtb files
  53. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  54. endef
  55. define Package/libfdt/description
  56. This is a library containing functions for manipulating Flat Device Trees.
  57. endef
  58. define Package/libfdt/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
  61. endef
  62. # NO_PYTHON is for disabling pylibfdt
  63. MAKE_FLAGS += \
  64. PREFIX= \
  65. NO_PYTHON=1 \
  66. NO_VALGRIND=1 \
  67. NO_YAML=1 \
  68. define Build/InstallDev
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(INSTALL_DIR) $(1)/usr/include
  71. $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
  72. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
  73. endef
  74. $(eval $(call BuildPackage,dtc))
  75. $(eval $(call BuildPackage,fdt-utils))
  76. $(eval $(call BuildPackage,libfdt))