A device-tree source parser, analyzer and language server.

Related tags

Command-line ginko
Overview

Ginko

A device-tree source parser, analyzer and language server. The main goal of this project is to make working with device-trees easy. For example, for the following device-tree:

/dts-v1/;

/ {
    pic@10000000 {
        phandle = <1>;
        interrupt-controller;
        reg = <0x10000000 0x100>;
    }
};

dtc produces the following output:

Error: test.dts:9.1-2 syntax error
FATAL ERROR: Unable to parse input tree

whereas ginko produces the following output:

 --> test.dts:8:6
  |
8 |     }
  |      ^ Expected ';'

At the moment, the command-line tool ginko only checks the device-tree source. It curently does not generate device-tree binary files nor can it output reformatted device-tree source files.

Projects

ginko

Installation and Usage

To install ginko with the rust toolchain, simply call

cargo install ginko

Additionally, pre-built binaries exist for x86 Linux and x86 Windows. Simply downloading them and adding the executables to a directory that is on the path should suffice to run the tool. Pre-built binaries also exist for macOS running on Apple Silicon, however these are not signed and notarized with apple so installation is more tedious. See this for more information.

Run

ginko <path/to/file.dts>

to run ginko on a device-tree source file and check the contents.

Goals:

  • A complete device-tree source parser.
  • Error tolerant parsing for device-tree usage
  • Providing readable and helpful feedback to the user

Shortcomings

This project is in its infancy. Therefore, a couple of features aren't supported yet:

  • C-style includes (i.e., #include "some_header.h")
  • Expressions (parenthesized expressions are ignored and do not throw an error)
  • Binary Device Tree format
  • Stable API

ginko_ls

ginko_ls is meant to be a feature-complete language server for device-trees. Language servers can be used in many editors, such as Visual Studio Code, Emacs or Vim

Features

  • Outline
  • Go to definition (nodes)
  • hover

Planned features

  • Incremental analysis
  • completion
  • formatting

All contributions, whether in the form of Pull Requests or Issues are highly appreciated and welcome.

You might also like...
Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.

usb-gadget This library allows implementation of USB peripherals, so called USB gadgets, on Linux devices that have a USB device controller (UDC). Bot

Log-structured, transactional virtual block device backed by S3

mvps Log-structured, transactional virtual block device compatible with the NBD protocol. mvps stands for "multi-versioned page store". MVPS can store

Definitions from the Virtual I/O Device (VIRTIO) specification.

virtio-spec-rs This crate contains the Rust equivalents of the definitions from the Virtual I/O Device (VIRTIO) Specification. This crate aims to be u

Over-simplified, featherweight, open-source and easy-to-use authentication and authorization server.

concess ⚠️ Early Development: This is not production ready, yet. Do not use it for anything important. Introduction concess is a over-simplified, feat

Horus is an open source tool for running forensic and administrative tasks at the kernel level using eBPF, a low-overhead in-kernel virtual machine, and the Rust programming language.
Horus is an open source tool for running forensic and administrative tasks at the kernel level using eBPF, a low-overhead in-kernel virtual machine, and the Rust programming language.

Horus Horus is an open-source tool for running forensic and administrative tasks at the kernel level using eBPF, a low-overhead in-kernel virtual mach

A localized open-source AI server that is better than ChatGPT.
A localized open-source AI server that is better than ChatGPT.

πŸ’―AI00 RWKV Server English | δΈ­ζ–‡ | ζ—₯本θͺž AI00 RWKV Server is an inference API server based on the RWKV model. It supports VULKAN inference acceleration a

Open-source compiler for the Papyrus scripting language of Bethesda games.

Open Papyrus Compiler This project is still WORK IN PROGRESS. If you have any feature requests, head over to the Issues tab and describe your needs. Y

A Source library for Ara Programming Language πŸ—ƒ

Ara Source A Source library for Ara Programming Language πŸ—ƒ Usage Add ara_source to your Cargo.toml, and you're good to go! [dependencies] ara_source

Open source programming language written in Rust.

No longer maintained! Tron Programming Language An open-source programming language written in Rust. Installation Before starting the installation, pl

Releases(v0.0.4)
Owner
Lukas Scheller
Lukas Scheller
Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. A tokei/scc/cloc alternative.

tcount (pronounced "tee-count") Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. Quick Start Simply run tcount

Adam P. Regasz-Rethy 48 Dec 7, 2022
Traversal of tree-sitter Trees and any arbitrary tree with a TreeCursor-like interface

tree-sitter-traversal Traversal of tree-sitter Trees and any arbitrary tree with a TreeCursor-like interface. Using cursors, iteration over the tree c

Sebastian Mendez 12 Jan 8, 2023
A language parser tool to build recursive descent top down parser.

lang-pt A language parser tool to generate recursive descent top down parser. Overview Parsers written for the languages like Javascript are often cus

Creative Forest 7 Jan 4, 2023
As-tree - Print a list of paths as a tree of paths 🌳

as-tree Print a list of paths as a tree of paths. For example, given: dir1/foo.txt dir1/bar.txt dir2/qux.txt it will print: . β”œβ”€β”€ dir1 β”‚ β”œβ”€β”€ foo.tx

Jake Zimmerman 396 Dec 10, 2022
lemmy-help is a emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs.

lemmy-help is a emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs.

Vikas Raj 117 Jan 3, 2023
Hashlink bytecode disassembler, analyzer, decompiler and assembler.

Hashlink bytecode This repository contains a collection of Rust crates and cli tools to load, disassemble, decompile and analyze Hashlink bytecode. Re

Guillaume Anthouard 24 Dec 21, 2022
A opinionated and fast static analyzer for PHP.

TLDR; A static analyzer for PHP. It helps you catch common mistakes in your PHP code. These are the current checks implemented. Extending undefined cl

Denzyl Dick 11 Mar 6, 2023
dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory

dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max

Sebastian Thiel 1.8k Jan 2, 2023
High-Speed Memory Scanner & Analyzer with REST API.

memory-server High-Speed Memory Scanner & Analyzer with REST API. Usage iOS Jailbreaking of iphone is required. Place your PC and iphone in the same n

Kenjiro Ichise 8 Jul 12, 2023
H2O Open Source Kubernetes operator and a command-line tool to ease deployment (and undeployment) of H2O open-source machine learning platform H2O-3 to Kubernetes.

H2O Kubernetes Repository with official tools to aid the deployment of H2O Machine Learning platform to Kubernetes. There are two essential tools to b

H2O.ai 16 Nov 12, 2022