{"id":1354,"date":"2015-03-03T17:55:20","date_gmt":"2015-03-03T17:55:20","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1354"},"modified":"2015-03-29T15:49:19","modified_gmt":"2015-03-29T14:49:19","slug":"arm-dreamplug-to-kernel-4-0-rc1","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1354","title":{"rendered":"ARM &#8211; DreamPlug to Kernel 4.0-rc1.."},"content":{"rendered":"<p>Now that the DreamPlug has a stable power supply (see previous post..) I decided to live dangerously and update the u-boot version and install a modern &#8216;device tree&#8217; plus kernel..<\/p>\n<p>It has been mentioned many times before that the u-boot update for a DreamPlug is fraught, and can result in a &#8216;brick&#8217;..\u00a0\u00a0 There should be a way of recovering from this by use of <strong>openocd<\/strong> and the <strong>JTAG<\/strong> connection, but I tested this many times, and it simply did not work&#8230;\u00a0\u00a0\u00a0 This failure has been documented by several others, and when I see the instruction to &#8216;keep trying until it works&#8217; I know that something is badly wrong &#8211; with the method, or hardware, or both&#8230;.<\/p>\n<p>There is documentation for DreamPlug u-boot updates, if you look for it..\u00a0\u00a0 Most of the info I found was rather &#8216;old&#8217;, and somewhat contradictory!\u00a0\u00a0\u00a0 Remember to take a copy of the old DreamPlug u-boot parameters, as these will get overwritten by the update, and you will need some of the info (including the ethernet <em>mac<\/em> addresses) to add back..<\/p>\n<p>It is worth mentioning here that you do <span style=\"text-decoration: underline;\">not<\/span> need to do this, if you don&#8217;t want to!\u00a0\u00a0\u00a0 The latest kernels can be compiled successfully to produce a <em>kernel-with-appended-device-tree <\/em>image, which will still work with the &#8216;older&#8217; version of u-boot on the DreamPlug..<\/p>\n<p>However, I finally plucked up the courage, and went from:<\/p>\n<pre><strong>U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06)<\/strong>\r\n<strong>Marvell-DreamPlug<\/strong><\/pre>\n<p>to<\/p>\n<pre><strong>U-Boot 2013.07 (Mar 03 2015 - 21:24:17)<\/strong>\r\n<strong>Marvell-DreamPlug<\/strong><\/pre>\n<p>There are more recent versions of u-boot, but this version was the only one I found documented for the DreamPlug update that worked, and it does provide support for device-tree (and ext2 boot..) as well..<\/p>\n<p>The kernel source was standard 4.0-rc1 from<em><strong> kernel.org<\/strong><\/em> and I cross-compiled the kernel from source in its own directory, including ~\/boot and ~\/lib sub-directories to receive the kernel image and modules, etc&#8230;.\u00a0\u00a0\u00a0 As usual, there are other ways of doing this, but this works, for me..<\/p>\n<p>My workflow was:<\/p>\n<pre><strong>export ARCH=arm<\/strong>\r\n<strong>export CROSS_COMPILE=armv7hl-mandriva-linux-gnueabi-\u00a0\u00a0 <\/strong>(insert your own cross-compiler reference here, and don't forget the dash at the end..)\r\n<strong>export INSTALL_PATH=..\/<\/strong>\r\n<strong>export INSTALL_MOD_PATH=..\/<\/strong><\/pre>\n<p>&#8211; then run<\/p>\n<pre><strong>make multi_v5_defconfig <\/strong>(if necessary..)\r\n<strong>make xconfig\u00a0 <\/strong>(make any necessary changes, for selinux support, etc...)\r\n<strong>make<\/strong>\r\n<strong>make LOADADDR=000008000 uImage   <\/strong>&lt;&lt; Changed March 29, 2015 - Now gives <span style=\"text-decoration: underline;\">correct<\/span> amount of total memory after boot &gt;&gt;   <strong>**<\/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\/kirkwood-dreamplug.dtb ..\/boot<\/strong>\r\n<strong>cp arch\/arm\/boot\/uImage ..\/boot<\/strong><\/pre>\n<p>Then copy the boot files and lib\/modules and lib\/firmware contents to the DreamPlug SDCard..<\/p>\n<p>For booting with device tree support, the changed u-boot parameters were:<\/p>\n<pre><strong>setenv x_bootcmd_fdt fatload usb 1:1 0xd000000 kirkwood-dreamplug.dtb<\/strong>\r\n<strong>setenv x_bootcmd_kernel fatload usb 1:1 0x6400000 uImage<\/strong>\r\n<strong>setenv bootcmd '${x_bootcmd_usb}; ${x_bootcmd_kernel}; ${x_bootcmd_fdt}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000 - 0xd000000;'<\/strong><\/pre>\n<p>I was still using fatload, but I may change to boot partition from fat to ext2 in the future and use ext2load..<\/p>\n<p>You may find that the SDCard usb device\/address is different &#8211; several examples I found showed it as <strong>usb 0:1<\/strong>&#8230;<\/p>\n<p>After all this, the DreamPlug booted with Kernel 4.0-rc1:<\/p>\n<pre><strong>Fedora release 18 (Spherical Cow)<\/strong>\r\n<strong>Kernel 4.0.0-rc1 on an armv5tel (ttyS0)<\/strong>\r\n<strong>........................<\/strong>\r\n<strong>[root@rgdreamplug ~]# uname -a<\/strong>\r\n<strong>Linux rgdreamplug 4.0.0-rc1 #1 PREEMPT Mon Mar 2 23:20:37 PST 2015 armv5tel armv5tel armv5tel GNU\/Linux<\/strong><\/pre>\n<p>In case you were wondering, the last Fedora version that supports armv5 was F18..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 March 3, 2015.<\/em><\/p>\n<p>** Thanks to <strong>Marcus Roeder<\/strong> for this information..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that the DreamPlug has a stable power supply (see previous post..) I decided to live dangerously and update the u-boot version and install a modern &#8216;device tree&#8217; plus kernel.. It has been mentioned many times before that the u-boot update for a DreamPlug is fraught, and can result in a &#8216;brick&#8217;..\u00a0\u00a0 There should be a way <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1354\"><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,7,10,11,14,16,19,20,937],"tags":[1174,628,136,1019,242,1175,372,379,448],"class_list":["post-1354","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-dreamplug","category-fedora","category-hacks","category-kernel","category-linux-arm","category-opinion","category-performance-2","category-u-boot-2","tag-arm","tag-device-tree","tag-dreamplug-2","tag-kernel-4-0-rc1","tag-linux","tag-success","tag-u-boot","tag-update","tag-warning"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1354","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=1354"}],"version-history":[{"count":4,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1354\/revisions"}],"predecessor-version":[{"id":1392,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1354\/revisions\/1392"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}