Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=dtc
  6. PKG_VERSION:=1.7.0
  7. PKG_RELEASE:=1
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  9. PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4
  10. PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
  11. PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
  12. PKG_LICENSE:=GPL-2.0-only
  13. PKG_LICENSE_FILES:=GPL
  14. PKG_CPE_ID:=cpe:/a:dtc_project:dtc
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/meson.mk
  18. define Package/dtc
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=Device Tree Compiler
  22. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  23. endef
  24. define Package/dtc/description
  25. Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
  26. as input a device-tree in a given format and outputs a device-tree in another
  27. format for booting kernels on embedded systems.
  28. endef
  29. define Package/dtc/install
  30. $(INSTALL_DIR) $(1)/usr/bin
  31. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin
  32. endef
  33. # See Documentation/manual.txt for details about each utility
  34. define Package/fdt-utils
  35. SECTION:=utils
  36. CATEGORY:=Utilities
  37. TITLE:=Flat Device Tree Utilities
  38. URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
  39. DEPENDS:=+libfdt
  40. endef
  41. define Package/fdt-utils/install
  42. $(INSTALL_DIR) $(1)/usr/bin
  43. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin
  45. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/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)/usr/lib/libfdt*.so* $(1)/usr/lib
  61. endef
  62. MESON_ARGS += \
  63. -Dtools=true \
  64. -Dyaml=disabled \
  65. -Dvalgrind=disabled \
  66. -Dpython=disabled
  67. define Build/InstallDev
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(INSTALL_DIR) $(1)/usr/include
  70. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
  72. endef
  73. $(eval $(call BuildPackage,dtc))
  74. $(eval $(call BuildPackage,fdt-utils))
  75. $(eval $(call BuildPackage,libfdt))