{"id":1328,"date":"2015-02-22T00:49:51","date_gmt":"2015-02-22T00:49:51","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1328"},"modified":"2015-02-22T00:49:51","modified_gmt":"2015-02-22T00:49:51","slug":"arm-raspberry-pi-classic-device-tree-kernel-compile","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1328","title":{"rendered":"ARM &#8211; Raspberry Pi &#8216;Classic&#8217; &#8211; Device Tree Kernel Compile.."},"content":{"rendered":"<p>After my tests compiling the new armv7 Pi 2 Kernel &#8211; with &#8216;device tree&#8217; &#8211; I decided to try the same with the &#8216;classic&#8217; armv6 Pi (B+)..<\/p>\n<p>You will need the latest version of the Pi \/boot files, including the latest <strong>config.txt<\/strong> with the necessary parameters for device tree boot, sound config, etc..<\/p>\n<p>For cross-compilation, I created a <em>pi<\/em> directory on my x66 system, and used git to download a Pi 3.19.0 kernel tree there:<\/p>\n<pre><strong>git clone -b rpi-3.19.y --single-branch https:\/\/github.com\/raspberrypi\/linux<\/strong><\/pre>\n<p>Then created a ~\/boot directory to contain the kernel, dtb and System.map files..<\/p>\n<p>Then, in the linux directory:<\/p>\n<pre><strong>export ARCH=arm<\/strong>\r\n<strong>export CROSS_COMPILE=armv7hl-mandriva-linux-gnueabi-\u00a0 <\/strong>(or whatever cross-compiler you use..\u00a0 don't forget the \"-\" at the end!)\r\n<strong>export INSTALL_PATH=..\/\u00a0\u00a0\u00a0 <\/strong>(install the files locally, within the <em>pi<\/em> directory)\r\n<strong>export INSTALL_MOD_PATH=..\/ <\/strong>(install the ~\/lib\/modules files locally, within the <em>pi<\/em> directory)<\/pre>\n<p>Then:<\/p>\n<pre><strong>make bcmrpi_defconfig<\/strong> (if necessary..)\r\n<strong>make xconfig <\/strong>\r\n<strong>make<\/strong>\r\n<strong>make modules_install<\/strong>\r\n<strong>make firmware_install<\/strong>\r\n<strong>cp System.map ..\/boot<\/strong>\r\n<strong>cp arch\/arm\/boot\/dts\/bcm2708-rpi-b-plus.dtb ..\/boot<\/strong>\r\n<strong>cp arch\/arm\/boot\/Image ..\/boot\/kernel.img   <\/strong>(Pi armv6 kernel is still called kernel.img)<\/pre>\n<p>This will create the kernel, modules, and boot\/dtb files all within the local directory created at the start..<\/p>\n<p>Then shut down the Pi, mount its SDcard, and copy files across to its \/boot and \/lib\/modules and \/lib\/firmware directories..<\/p>\n<p>Re-insert the SDcard, and connect power:<\/p>\n<pre><strong>Pidora release 2014 (Raspberry Pi Fedora Remix)<\/strong>\r\n<strong>Kernel 3.19.0 on an armv6l (ttyAMA0)<\/strong>\r\n<strong>.................<\/strong>\r\n<strong># uname -a<\/strong>\r\n<strong>Linux rgpi 3.19.0 #1 PREEMPT Sat Feb 21 15:24:00 PST 2015 armv6l armv6l armv6l GNU\/Linux<\/strong>\r\n\r\n<\/pre>\n<p><em>Robert Gadsdon.\u00a0\u00a0 February 21, 2014.<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After my tests compiling the new armv7 Pi 2 Kernel &#8211; with &#8216;device tree&#8217; &#8211; I decided to try the same with the &#8216;classic&#8217; armv6 Pi (B+).. You will need the latest version of the Pi \/boot files, including the latest config.txt with the necessary parameters for device tree boot, sound config, etc.. For cross-compilation, I created <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1328\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,11,14,16,21],"tags":[131,628,1005,1018,1175,898],"class_list":["post-1328","post","type-post","status-publish","format-standard","hentry","category-compilation","category-hacks","category-kernel","category-linux-arm","category-raspberry-pi","tag-cross-compile","tag-device-tree","tag-kernel-compile","tag-raspberry-pi-v6","tag-success","tag-workflow"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1328"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1328\/revisions"}],"predecessor-version":[{"id":1329,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1328\/revisions\/1329"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}