[OpenWrt-Devel,2/9] package: kernel: dtc: Add device tree compiler package

Message ID 1508703687-25650-3-git-send-email-wigyori@uid0.hu
State New
Headers show
Series
  • merge: add missing devices / commits into LEDE
Related show

Commit Message

Zoltan HERPAI Oct. 22, 2017, 8:21 p.m.
From: Marek Vasut <marex@denx.de>

Add package with the DT compiler v1.4.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
---
 package/kernel/dtc/Makefile | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/kernel/dtc/Makefile

Comments

Hauke Mehrtens Oct. 22, 2017, 8:32 p.m. | #1
On 10/22/2017 10:21 PM, Zoltan HERPAI wrote:
> From: Marek Vasut <marex@denx.de>
> 
> Add package with the DT compiler v1.4.1 .
> 
> Signed-off-by: Marek Vasut <marex@denx.de>

This package is already in the package feed:
https://github.com/openwrt/packages/blob/master/libs/dtc/Makefile

Patch

diff --git a/package/kernel/dtc/Makefile b/package/kernel/dtc/Makefile
new file mode 100644
index 0000000..5155323
--- /dev/null
+++ b/package/kernel/dtc/Makefile
@@ -0,0 +1,36 @@ 
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# 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.1
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/utils/dtc/dtc.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_MAINTAINER:=Marek Vasut <marex@denx.de>
+PKG_LICENSE:=GPL-2.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dtc
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Device Tree Compiler
+endef
+
+define Package/dtc/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dtc $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,dtc))