{"id":1265,"date":"2017-11-10T09:54:10","date_gmt":"2017-11-10T07:54:10","guid":{"rendered":"https:\/\/community.virtono.com\/?p=1265"},"modified":"2017-11-10T03:11:20","modified_gmt":"2017-11-10T01:11:20","slug":"kernel-hackers-want-to-use-yaml-for-hardware-description","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/internet-and-technology-news\/kernel-hackers-want-to-use-yaml-for-hardware-description\/","title":{"rendered":"Kernel hackers want to use Yaml for hardware description"},"content":{"rendered":"<header class=\"cluster-header\"><\/header>\n<div class=\"formatted\">\n<header class=\"cluster-header\">Device Tree Sources (DTS) are used in the\u00a0Linux kernel\u00a0for describing hardware and should in future be defined in the Yaml format.\u00a0That brings some benefits, say kernel developers.<\/p>\n<\/header>\n<div class=\"formatted\">\n<p id=\"gpar1\">The Device Trees concept is used in the Linux kernel to describe hardware that would otherwise not be discovered.\u00a0The information about this hardware then ends up in a tree structure.\u00a0This is important, for example, for ARM boards.\u00a0At the\u00a0Kernel Summit in Prague\u00a0, the American consulting group\u00a0Konsulko put forward their suggestion\u00a0to change the format for these device trees to Yaml.\u00a0That was a radical change, but it could well be worthwhile because of some advantages.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_73 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.virtono.com\/community\/internet-and-technology-news\/kernel-hackers-want-to-use-yaml-for-hardware-description\/#Status_quo_is_complicated\" title=\"Status quo is complicated\">Status quo is complicated<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.virtono.com\/community\/internet-and-technology-news\/kernel-hackers-want-to-use-yaml-for-hardware-description\/#Where_it_hooks\" title=\"Where it hooks\">Where it hooks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.virtono.com\/community\/internet-and-technology-news\/kernel-hackers-want-to-use-yaml-for-hardware-description\/#Yaml_should_help\" title=\"Yaml should help\">Yaml should help<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Status_quo_is_complicated\"><\/span>Status quo is complicated<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"gpar2\">The handling of device trees usually follows a fixed scheme on Linux systems.\u00a0From the so-called Device Tree Source Files, a compiler dynamically generates an in-memory tree.\u00a0This tree in memory is then serialized (\u00a0<em>flattened<\/em>\u00a0) to create a Device Tree Blob (DTB).\u00a0This file ends up on the corresponding device itself. At the same time, the bootloader learns where it finds it, for example on a file system or in non-volatile memory.<\/p>\n<p id=\"gpar3\">The boot loader fetches the DTB and either passes it on to the operating system unchanged or makes small changes to it.\u00a0He modifies about the boot command line.\u00a0The operating system re-deserializes the binary object using an interface created for this purpose.\u00a0It creates another in-memory tree, possibly with the boot loader changes.<\/p>\n<p id=\"gpar4\">The started kernel uses this tree structure, which is also called a\u00a0<em>&#8220;live tree&#8221;<\/em>\u00a0.\u00a0The operating system scans the structure, initializes, and configures the associated device.\u00a0To do this, it needs to know all the nodes and properties of the active node, because the access methods need that information.\u00a0But this is a point where potentially errors come into play, because about the Type information is lost.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Where_it_hooks\"><\/span>Where it hooks<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p id=\"gpar5\">The scenario just described applies mainly to individual machines.\u00a0If, for example, a single image is used for different but very similar platforms, then for each supported platform, separate Device Tree Blobs (DTBs) must be produced.\u00a0Even if the changes are minimal.\u00a0FPGAs or expansion boards need changes to the device tree at runtime, using device tree overlays.\u00a0They work subtly different than the in-memory trees.<\/p>\n<p id=\"gfpop1\">In order for Device Trees to work smoothly, several components (compiler, bootloader, operating system) must end up working together without errors.\u00a0That this does not always work, is partly due to the previously used format, which still carries some inconsistencies in itself.\u00a0For example, if properties are defined as individual values or a sequence of values, their type information is lost.\u00a0However, errors in dealing with device trees are not noticed until late, namely when the computer tries to boot the system.\u00a0Then it usually just hangs on, without giving an indication of the cause.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Yaml_should_help\"><\/span>Yaml should help<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>According to Konsulko, the Yaml format is intended to remedy this situation.\u00a0It not only covers all DTS features, but is easier to read by humans, easy to parse and subsequently to change.\u00a0Yaml is also widely used, mature and therefore has good support in various tools.\u00a0It supports references, anchors and types for properties and accompanies the complete compilation process with useful error messages.\u00a0Also Yaml can be used as Object Files as an intermediate format to postpone the final link to a later date.\u00a0Last but not least, Yaml is future-proof, because the data can easily be converted into future formats.<\/p>\n<p id=\"iq-gfpop\">The idea generator seems to be gradually replacing traditional DTS files with Yaml files.\u00a0Whether all kernel developers agree with the proposal must be proven.\u00a0In the workshop, however, there seemed to be no fundamental reservations.\u00a0Json and XML as formats rejected the developers in the workshop.\u00a0XML is too bulky.\u00a0Json does not support Yaml, while Yaml supports Json.\u00a0However, open questions also raise diffing and versioning.<\/p>\n<\/div>\n<hr class=\"implied\" \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Device Tree Sources (DTS) are used in the\u00a0Linux kernel\u00a0for describing hardware and should in future be defined in the Yaml format.\u00a0That brings some benefits, say kernel developers. The Device Trees concept is used in the Linux kernel to describe hardware that would otherwise not be discovered.\u00a0The information about this hardware<\/p>\n","protected":false},"author":3,"featured_media":1269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[25],"tags":[],"class_list":["post-1265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet-and-technology-news"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/69535.png?fit=200%2C200&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-kp","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2150,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/get-kernel-statistics-and-hardware-information\/","url_meta":{"origin":1265,"position":0},"title":"Get kernel statistics and hardware information","author":"Shreyash Sharma","date":"December 17, 2020","format":false,"excerpt":"When administering Linux systems, quick information about the installed kernel and the existing hardware is often helpful.\u00a0The \/ proc filesystem provides extensive information on the console. Solution:\u00a0Linux systems reveal a lot about themselves, you just have to know where to look.\u00a0The \/ proc file system, for example, allows\u00a0very detailed information\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/12\/Top-command1-1024x550-1.png?fit=1024%2C550&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/12\/Top-command1-1024x550-1.png?fit=1024%2C550&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/12\/Top-command1-1024x550-1.png?fit=1024%2C550&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2020\/12\/Top-command1-1024x550-1.png?fit=1024%2C550&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1341,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/compiling-linux-kernels-under-ubuntu-or-debian-2\/","url_meta":{"origin":1265,"position":1},"title":"Compiling Linux kernels under Ubuntu or Debian","author":"Shreyash Sharma","date":"February 21, 2018","format":false,"excerpt":"Compiling a Linux kernel is not an everyday occurrence for most administrators.\u00a0It is all the more important\u00a0to know\u00a0the right\u00a0tools\u00a0when the time comes.\u00a0The following article shows examples of how Mainline \/ Vanilla Kernel and the distribution-specific\u00a0kernel are compiled\u00a0. \u00a0 Install required software The following packages are needed to compile: $ sudo\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2018\/02\/kernel1.png?fit=400%2C225&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1243,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/compiling-linux-kernels-under-ubuntu-or-debian\/","url_meta":{"origin":1265,"position":2},"title":"Compiling Linux kernels under Ubuntu or Debian","author":"Daniel Draga","date":"November 6, 2017","format":false,"excerpt":"Compiling a Linux kernel is not an everyday occurrence for most administrators.\u00a0It is all the more important\u00a0to know\u00a0the right\u00a0tools\u00a0when the time comes.\u00a0The following article shows examples of how Mainline \/ Vanilla Kernel and the distribution-specific\u00a0kernel are compiled. Install required software The following packages are needed to compile: $ sudo apt-get\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/517444-636210253990788094_270x480_thumb.jpg?fit=480%2C270&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1195,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/remove-old-kernels-in-ubuntu\/","url_meta":{"origin":1265,"position":3},"title":"Remove Old Kernels in Ubuntu","author":"Shreyash Sharma","date":"October 27, 2017","format":false,"excerpt":"For\u00a0Ubuntu\u00a0installations (prior to Ubuntu version 15.10) with\u00a0separate \/ boot partition\u00a0, it may fill up\u00a0after installing several updates\u00a0.\u00a0The issue occurs because older kernel versions are not automatically removed.\u00a0In this article, we'll show you how to manually uninstall older kernel versions, freeing up space in the \/ boot partition. Problem Installing new\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/10\/Aug30-Kernel-Team-Summary.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1256,"url":"https:\/\/www.virtono.com\/community\/internet-and-technology-news\/google-disassembles-usb-stack-of-the-linux-kernel\/","url_meta":{"origin":1265,"position":4},"title":"Google disassembles USB stack of the Linux kernel","author":"Daniel Draga","date":"November 9, 2017","format":false,"excerpt":"With a special fuzzer for kernel system calls from\u00a0Google\u00a0, extremely many bugs have been found in the USB stack of the\u00a0Linux kernel\u00a0.\u00a0Many of them are classified as critical vulnerabilities, which is true for all kernel bugs. The Syzkaller tool, created and developed with Google support, is intended to fuzzy operating\u2026","rel":"","context":"In &quot;IT News&quot;","block_context":{"text":"IT News","link":"https:\/\/www.virtono.com\/community\/category\/internet-and-technology-news\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/google-linux.png?fit=1200%2C569&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/google-linux.png?fit=1200%2C569&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/google-linux.png?fit=1200%2C569&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/google-linux.png?fit=1200%2C569&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2017\/11\/google-linux.png?fit=1200%2C569&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":97,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/what-is-the-difference-between-kvm-and-openvz-virtualization\/","url_meta":{"origin":1265,"position":5},"title":"What is the difference between KVM and OpenVZ virtualization?","author":"Virtono","date":"July 18, 2016","format":false,"excerpt":"\u00a0 VS \u00a0What is the difference between KVM and OpenVZ? Usually this question arises when a person is looking for a Virtual Private Server, it\u2019s a dilemma, isn\u2019t it? Weighing the pros and cons but one thing that should be kept in mind is that out of these two, there\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/1-2.jpg?fit=1024%2C768&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/1-2.jpg?fit=1024%2C768&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/1-2.jpg?fit=1024%2C768&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/07\/1-2.jpg?fit=1024%2C768&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=1265"}],"version-history":[{"count":3,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1265\/revisions"}],"predecessor-version":[{"id":1270,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/1265\/revisions\/1270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/1269"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=1265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=1265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}