[PATCH v2] tools: add libyaml

Paul Spooren mail at aparcar.org
Wed Jul 29 19:49:20 EDT 2020


libyaml is used to process YAML files, a popular human readable
configuration format. If available during compilation, the
device-tree-compiler (dtc) will enable YAML as export format.

The exported YAML files can be validated using dt-schema[0].

Once available this can be used within a CI to reduce human resources
spent on reviewing DTS files.

[0]: https://github.com/robherring/dt-schema

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
v2:
* Use autotools as upstream doesn't fully support CMake
* Add MIT license

 tools/Makefile         |  2 +-
 tools/libyaml/Makefile | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 tools/libyaml/Makefile

diff --git a/tools/Makefile b/tools/Makefile
index 9bae09ece6..96de762772 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -26,7 +26,7 @@ tools-y += m4 libtool autoconf autoconf-archive automake flex bison pkgconf mkli
 tools-y += sstrip make-ext4fs e2fsprogs mtd-utils mkimage
 tools-y += firmware-utils patch-image quilt padjffs2
 tools-y += mm-macros missing-macros cmake bc findutils gengetopt patchelf
-tools-y += mtools dosfstools libressl
+tools-y += mtools dosfstools libressl libyaml
 tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
 tools-$(CONFIG_TARGET_x86) += qemu
 tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
diff --git a/tools/libyaml/Makefile b/tools/libyaml/Makefile
new file mode 100644
index 0000000000..9a7fc8a334
--- /dev/null
+++ b/tools/libyaml/Makefile
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2020 Paul Spooren <mail at aparcar.org>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libyaml
+PKG_VERSION:=0.2.5
+PKG_HASH:=fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/yaml/libyaml/tar.gz/$(PKG_VERSION)?
+
+HOST_BUILD_PARALLEL:=1
+HOST_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/host-build.mk
+
+$(eval $(call HostBuild))
-- 
2.25.1




More information about the openwrt-devel mailing list