{"id":644,"date":"2013-02-22T17:07:43","date_gmt":"2013-02-22T17:07:43","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=644"},"modified":"2013-03-01T19:34:12","modified_gmt":"2013-03-01T19:34:12","slug":"pi-to-3-8-0-nasty-hacks","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=644","title":{"rendered":"Pi to 3.8.0 &#8211; Nasty hacks.."},"content":{"rendered":"<p>I have &#8211; after some messy hacking &#8211; managed to get the Raspberry Pi updated to kernel 3.8.0..<\/p>\n<div id=\"attachment_645\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-645\" class=\"size-large wp-image-645\" alt=\"Raspberry Pi VNC window, running kernel 3.8.0..\" src=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380-1024x766.png\" width=\"640\" height=\"478\" srcset=\"https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380-1024x766.png 1024w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380-300x224.png 300w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380-400x300.png 400w, https:\/\/rglinuxtech.com\/wp_rglinuxtech\/wp-content\/uploads\/2013\/02\/rgpi_vnc_380.png 1026w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-645\" class=\"wp-caption-text\">Raspberry Pi VNC window, running kernel 3.8.0..<\/p><\/div>\n<p>The starting point was the 3.7.1 Pi code, at <a title=\"https:\/\/github.com\/Olipro\/linux-RPi\" href=\"https:\/\/github.com\/Olipro\/linux-RPi\" target=\"_blank\">https:\/\/github.com\/Olipro\/linux-RPi<\/a>.\u00a0\u00a0\u00a0 The kernel.org patch for 3.8.0 assumes the code base is 3.7.0, so I had to &#8216;revert&#8217; the 3.7.1 patch.\u00a0\u00a0\u00a0 The &#8216;incremental&#8217; patches at kernel.org start with the 3.7.1 &#8211; to 3.7.2 patch, but the 3.7.0 to 3.7.1 patch can be found in the main kernel tree, at\u00a0<a title=\"http:\/\/www.kernel.org\/pub\/linux\/kernel\/v3.0\/patch-3.7.1.bz2\" href=\"http:\/\/www.kernel.org\/pub\/linux\/kernel\/v3.0\/patch-3.7.1.bz2\">http:\/\/www.kernel.org\/pub\/linux\/kernel\/v3.0\/patch-3.7.1.bz2<\/a> \u00a0\u00a0 Then &#8216;revert&#8217; the patch, by appending the -R parameter..<\/p>\n<p>That will give you a 3.7.0 version of the Pi kernel\/module\/drivers code, so then apply the standard 3.8 kernel.org patch from <a title=\"ftp:\/\/ftp.kernel.org\/pub\/linux\/kernel\/v3.0\/ \" href=\"ftp:\/\/ftp.kernel.org\/pub\/linux\/kernel\/v3.0\/ \" target=\"_blank\">ftp:\/\/ftp.kernel.org\/pub\/linux\/kernel\/v3.0\/\u00a0<\/a>\u00a0 to update it to 3.8.0..\u00a0\u00a0\u00a0\u00a0 This will not apply 100% cleanly, so more hacking needs to be done, to get it to compile without errors!<\/p>\n<p>In <em><strong>drivers\/mmc\/host<\/strong><\/em>,<br \/>\nRemove all references to __devinit and __devexit from <strong>sdhci-bcm2708.c<\/strong> (as they have gone, since 3.8..)<br \/>\nand change line 1365 from<br \/>\n<strong>.remove\u00a0\u00a0\u00a0\u00a0\u00a0 = __devexit_p (sdhci_bcm2708_remove),<\/strong><br \/>\nto<br \/>\n<strong>.remove\u00a0\u00a0\u00a0\u00a0\u00a0 = sdhci_bcm2708_remove,<\/strong><\/p>\n<p>Replace the 3.8 version of <strong>smsc95xx.c<\/strong> and <strong>smsc95xx.h<\/strong> with the 3.7 versions, in <em><strong>drivers\/net\/usb<\/strong><\/em><\/p>\n<p>Remove references to __devinit and __devexit and __devinitdata from all <strong>bcm2835&#8230;&#8230;c<\/strong> source files in <strong><em>sound\/arm.<\/em><\/strong><\/p>\n<p>This should result in a Pi kernel that will (cross) compile successfully, but not without several &#8216;warnings&#8217;..<\/p>\n<p>Result:<br \/>\n<strong>Fedora release 18 (Spherical Cow)<\/strong><br \/>\n<strong>Kernel 3.8.0-pi on an armv6l (ttyAMA0)<\/strong><br \/>\n<strong>&#8230;&#8230;&#8230;&#8230;.<br \/>\n# <em>uname -a<\/em><\/strong><br \/>\n<strong>Linux rgpi 3.8.0-pi #1 Fri Feb 22 16:13:35 GMT 2013 armv6l armv6l armv6l GNU\/Linux<\/strong><\/p>\n<p>Note:\u00a0 This should only be attempted if you have some idea what you are doing.\u00a0\u00a0 It is a <span style=\"text-decoration: underline;\"><strong>nasty<\/strong><\/span> hack, and may well produce unforeseen errors.\u00a0\u00a0\u00a0 <span style=\"text-decoration: underline;\">Not<\/span> recommended for production environments, and where data is valuable!<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 February 22nd, 2013.<br \/>\nUpdated February 27th, to provide correct link to the 3.7.0-1 patch, as pointed out by Joerg Neikes..<br \/>\n<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have &#8211; after some messy hacking &#8211; managed to get the Raspberry Pi updated to kernel 3.8.0.. The starting point was the 3.7.1 Pi code, at https:\/\/github.com\/Olipro\/linux-RPi.\u00a0\u00a0\u00a0 The kernel.org patch for 3.8.0 assumes the code base is 3.7.0, so I had to &#8216;revert&#8217; the 3.7.1 patch.\u00a0\u00a0\u00a0 The &#8216;incremental&#8217; patches at kernel.org start with the 3.7.1 &#8211; <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=644\"><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,6,10,11,14,16,21],"tags":[447,169,183,442,296,313,321,1175,379,448],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-fedora","category-hacks","category-kernel","category-linux-arm","category-raspberry-pi","tag-3-8-0","tag-from-3-7-1","tag-hacks-2","tag-kernel-3-8","tag-patch","tag-raspberry-pi-2","tag-revert","tag-success","tag-update","tag-warning"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/644","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=644"}],"version-history":[{"count":4,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/644\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/644\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}