2 # Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
14 PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc
15 PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0
17 PKG_LICENSE_FILES:=GPL
19 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
21 include $(INCLUDE_DIR)/package.mk
27 TITLE:=Device Tree Compiler
28 URL:=http://devicetree.org/Device_Tree_Compiler
31 define Package/dtc/description
32 Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
33 as input a device-tree in a given format and outputs a device-tree in another
34 format for booting kernels on embedded systems.
37 define Package/dtc/install
38 $(INSTALL_DIR) $(1)/usr/bin
39 $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin
46 TITLE:=a utility library for reading and manipulating dtb files
47 URL:=http://devicetree.org/Device_Tree_Compiler
50 define Package/libfdt/description
51 This is a library containing functions for manipulating Flat Device Trees.
54 define Package/libfdt/install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
64 CFLAGS="$(TARGET_CFLAGS)"
66 define Build/InstallDev
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(INSTALL_DIR) $(1)/usr/include
69 $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
70 $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
73 $(eval $(call BuildPackage,dtc))
74 $(eval $(call BuildPackage,libfdt))