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.

95 lines
2.5 KiB

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