Makefile 2.5 KB

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