commit 3e4d616a74db777e25f6f9605d1bf203c07b220e
parent 52486075e6b97cfcb967c13b6246a93d787ff4f2
Author: Yousong Zhou <yszhou4tech@gmail.com>
Date: Thu, 1 Dec 2016 18:32:02 +0800
dtc: initial version 1.4.2
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat:
| A | libs/dtc/Makefile | | | 71 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 71 insertions(+), 0 deletions(-)
diff --git a/libs/dtc/Makefile b/libs/dtc/Makefile
@@ -0,0 +1,71 @@
+#
+# Copyright (C) 2016 Yousong Zhou <yszhou4tech@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dtc
+PKG_VERSION:=1.4.2
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.kernel.org/pub/software/utils/dtc
+PKG_SOURCE_MD5SUM:=3d5814e31b2046ef51fca8fece998db0
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=GPL
+PKG_INSTALL:=1
+PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+
+define Package/dtc
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Device Tree Compiler
+ URL:=http://devicetree.org/Device_Tree_Compiler
+endef
+
+define Package/dtc/description
+ Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
+ as input a device-tree in a given format and outputs a device-tree in another
+ format for booting kernels on embedded systems.
+endef
+
+define Package/dtc/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin
+endef
+
+
+define Package/libfdt
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=a utility library for reading and manipulating dtb files
+ URL:=http://devicetree.org/Device_Tree_Compiler
+endef
+
+define Package/libfdt/description
+ This is a library containing functions for manipulating Flat Device Trees.
+endef
+
+define Package/libfdt/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
+endef
+
+MAKE_FLAGS += \
+ PREFIX= \
+ CFLAGS="$(TARGET_CFLAGS)"
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,dtc))
+$(eval $(call BuildPackage,libfdt))