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.

96 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.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473
  13. PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
  14. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  15. PKG_LICENSE:=GPL-2.0-only
  16. PKG_LICENSE_FILES:=GPL
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/meson.mk
  20. define Package/dtc
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Device Tree Compiler
  24. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  25. endef
  26. define Package/dtc/description
  27. Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
  28. as input a device-tree in a given format and outputs a device-tree in another
  29. format for booting kernels on embedded systems.
  30. endef
  31. define Package/dtc/install
  32. $(INSTALL_DIR) $(1)/usr/bin
  33. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin
  34. endef
  35. # See Documentation/manual.txt for details about each utility
  36. define Package/fdt-utils
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. TITLE:=Flat Device Tree Utilities
  40. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  41. DEPENDS:=+libfdt
  42. endef
  43. define Package/fdt-utils/install
  44. $(INSTALL_DIR) $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin
  49. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin
  50. endef
  51. define Package/libfdt
  52. SECTION:=libs
  53. CATEGORY:=Libraries
  54. TITLE:=a utility library for reading and manipulating dtb files
  55. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  56. endef
  57. define Package/libfdt/description
  58. This is a library containing functions for manipulating Flat Device Trees.
  59. endef
  60. define Package/libfdt/install
  61. $(INSTALL_DIR) $(1)/usr/lib
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib
  63. endef
  64. MESON_ARGS += \
  65. -Dtools=true \
  66. -Dyaml=disabled \
  67. -Dvalgrind=disabled \
  68. -Dpython=disabled
  69. define Build/InstallDev
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(INSTALL_DIR) $(1)/usr/include
  72. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
  74. endef
  75. $(eval $(call BuildPackage,dtc))
  76. $(eval $(call BuildPackage,fdt-utils))
  77. $(eval $(call BuildPackage,libfdt))