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-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.4.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_HASH:=6643e8f00ff86350f465bb54b2185058b5b1b7bac01a0842c81a52b86589cde7
  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. TARGET_CFLAGS += \
  63. $(FPIC)
  64. # NO_PYTHON is for disabling pylibfdt
  65. MAKE_FLAGS += \
  66. PREFIX= \
  67. NO_PYTHON=1 \
  68. CFLAGS="$(TARGET_CFLAGS)"
  69. define Build/InstallDev
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(INSTALL_DIR) $(1)/usr/include
  72. $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
  73. $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
  74. endef
  75. $(eval $(call BuildPackage,dtc))
  76. $(eval $(call BuildPackage,fdt-utils))
  77. $(eval $(call BuildPackage,libfdt))