{"id":1697,"date":"2013-06-14T08:28:26","date_gmt":"2013-06-14T12:28:26","guid":{"rendered":"http:\/\/protofusion.org\/wordpress\/?p=1697"},"modified":"2013-06-14T08:37:26","modified_gmt":"2013-06-14T12:37:26","slug":"beaglebone-black-and-dtc","status":"publish","type":"post","link":"http:\/\/protofusion.org\/wordpress\/2013\/06\/beaglebone-black-and-dtc\/","title":{"rendered":"BeagleBone Black and DTC"},"content":{"rendered":"<p><a href=\"http:\/\/protofusion.org\/wordpress\/wp-content\/uploads\/2013\/06\/bbblack-adafruit.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1705\" alt=\"BeagleBone Black (Adafruit)\" src=\"http:\/\/protofusion.org\/wordpress\/wp-content\/uploads\/2013\/06\/bbblack-adafruit-500x384.jpg\" width=\"500\" height=\"384\" srcset=\"http:\/\/protofusion.org\/wordpress\/wp-content\/uploads\/2013\/06\/bbblack-adafruit-500x384.jpg 500w, http:\/\/protofusion.org\/wordpress\/wp-content\/uploads\/2013\/06\/bbblack-adafruit-300x230.jpg 300w, http:\/\/protofusion.org\/wordpress\/wp-content\/uploads\/2013\/06\/bbblack-adafruit.jpg 1000w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Arch Linux ARM currently includes an unpatched version of <em>dtc<\/em> (device tree compiler) which lacks the &#8220;@&#8221; option. If you want to enable additional UARTs, SPI, I2C, or just use GPIO without recompiling the bootloader, you need a patched version of <em>dtc<\/em>. You can download the source code and manually patch\/compile, but to make this process easier I created a PKGBUILD which builds a patched version of <em>dtc<\/em> from git. Grab the raw PKGBUILD after the break, or just run packer to install from the <a href=\"https:\/\/aur.archlinux.org\/packages\/dtc-git-patched\/\" target=\"_blank\">AUR<\/a>:<\/p>\n<p style=\"padding-left: 30px;\"><em>packer -S dtc-git-patched<\/em><\/p>\n<p>Make sure you don&#8217;t have the vanilla version of <em>dtc<\/em> installed, pacman will throw &#8220;file exists on filesystem&#8221; errors if it&#8217;s already installed from the standard repository.<\/p>\n<p>After installing <em>dtc<\/em> you can easily mux pins with the flattened device tree. For more information on muxing pins and enabling UARTs, check out the <a href=\"http:\/\/hipstercircuits.com\/enable-serialuarttty-on-beaglebone-black\/-A&amp;bvm=bv.47883778,d.aWc\" target=\"_blank\">hipstercircuits guide<\/a>.<\/p>\n<p><!--more--><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# Maintainer: Ethan Zonca &lt;ethanzonca@ethanzonca.com&gt;\r\n\r\npkgname=dtc-git-patched\r\npkgver=20130410\r\npkgrel=1\r\npkgdesc=&quot;Device Tree Compiler with Dynamic Symbols and Fixup Support Patch&quot;\r\nurl=&quot;http:\/\/jdl.com\/software\/&quot;\r\narch=('i686' 'x86_64' 'armv7h')\r\nlicense=('GPL2')\r\nmakedepends=('git')\r\n\r\n_gitroot='http:\/\/jdl.com\/software\/dtc.git\/'\r\n_gitname='dtc.git'\r\n\r\nbuild() {\r\n    msg 'Downloading dynamic symbols fixup patch...'\r\n    wget https:\/\/patchwork.kernel.org\/patch\/1934471\/raw\/ -O dynamic-symbols.patch\r\n    msg 'Connecting to GIT server...'\r\n\r\n    if &#x5B;&#x5B; -d ${_gitname} ]]\r\n    then\r\n        cd ${_gitname}\r\n        git reset --hard HEAD\r\n        git pull -f\r\n        git clean -f\r\n    else\r\n        git clone ${_gitroot} ${_gitname}\r\n    fi\r\n\r\n    msg 'GIT checkout done or server timeout'\r\n}\r\n\r\npackage() {\r\n   cd ${_gitname}\r\n\r\n   # Revert to version that patch applies to\r\n   git reset --hard f8cb5dd94903a5cfa1609695328b8f1d5557367f\r\n\r\n   # Apply patch\r\n   git apply ..\/dynamic-symbols.patch\r\n   #    patch -Np1 -i ..\/dynamic-symbols.patch\r\n\r\n    make || return 1\r\n    make INSTALL=$(which install) DESTDIR=${pkgdir} PREFIX=\/usr install || return 1\r\n}\r\n<\/pre>\n<p><em><br \/>\nImage credit: <a href=\"http:\/\/www.adafruit.com\/products\/1278\">Adafruit<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Arch Linux ARM currently includes an unpatched version of dtc (device tree compiler) which lacks the &#8220;@&#8221; option. If you want to enable additional UARTs, SPI, I2C, or just use GPIO without recompiling the bootloader, you need a patched version<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"http:\/\/protofusion.org\/wordpress\/2013\/06\/beaglebone-black-and-dtc\/\">Read more &#8250;<\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"jetpack_post_was_ever_published":false,"_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}},"categories":[7],"tags":[189,190,260,250],"class_list":["post-1697","post","type-post","status-publish","format-standard","hentry","category-linux","tag-arch-linux-arm","tag-arm","tag-beaglebone-black","tag-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pNjAs-rn","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/posts\/1697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/comments?post=1697"}],"version-history":[{"count":12,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/posts\/1697\/revisions"}],"predecessor-version":[{"id":1709,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/posts\/1697\/revisions\/1709"}],"wp:attachment":[{"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/media?parent=1697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/categories?post=1697"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/protofusion.org\/wordpress\/wp-json\/wp\/v2\/tags?post=1697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}