{"id":1731,"date":"2016-05-16T07:02:17","date_gmt":"2016-05-16T06:02:17","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1731"},"modified":"2016-05-16T07:02:17","modified_gmt":"2016-05-16T06:02:17","slug":"arm64-odroid-c2-u-boot-mmc-support","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1731","title":{"rendered":"ARM64 &#8211; Odroid C2 &#8211; U-Boot MMC Support.."},"content":{"rendered":"<p>After the initial patches to provide basic U-Boot support for the C2, as mentioned in a previous article &#8211; there is now a further patch, to enable MMC support.\u00a0\u00a0\u00a0 Details at <a href=\"https:\/\/www.mail-archive.com\/u-boot@lists.denx.de\/msg212503.html\" target=\"_blank\">https:\/\/www.mail-archive.com\/u-boot@lists.denx.de\/msg212503.html<\/a><\/p>\n<p>I have applied this additional patch, and for SDcard-based systems, it works:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">U-Boot 2016.05-rc3 (May 14 2016 - 21:06:28 -0700) odroid-c2<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">aarch64-linux-gnu-gcc (GCC) 5.3.1 20160212 (Red Hat Cross 5.3.1-2)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">GNU ld version 2.26.20160125<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; mmc info<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Device: &lt;NULL&gt;<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Manufacturer ID: 3<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">OEM: 5054<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Name: SL64G<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Tran Speed: 25000000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Rd Block Len: 512<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">SD version 1.0<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">High Capacity: Yes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Capacity: 58.3 GiB<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Bus Width: 1-bit<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Erase Group Size: 512 Bytes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; mmc part<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Partition Map for MMC device 0 -- Partition Type: DOS<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Part Start Sector Num Sectors UUID        Type<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> 1   2048         122238976   e5ec0000-01 83<\/span><\/strong><\/pre>\n<p>But&#8230;\u00a0 If the system is on an Odroid eMMC module, then it fails:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">MMC: &lt;NULL&gt;: 0<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Card did not respond to voltage select!<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">*** Warning - MMC init failed, using default environment<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; mmc list<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">&lt;NULL&gt;: 0<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; mmc dev 0<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Card did not respond to voltage select!<\/span><\/strong><\/pre>\n<p>I was able to get a successful SDcard U-boot\/Kernel boot, as far as the rootfs load (as the Linux kernel does not <span style=\"text-decoration: underline;\">yet<\/span> have C2 mmc support):<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">...........................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; setenv loadaddr \"0x11000000\"<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; setenv dtb_loadaddr \"0x1000000\"<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; setenv bootargs \"root=\/dev\/mmcblk0p1 rootwait rw\"<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; setenv bootcmd \"ext4load mmc 0:1 ${loadaddr} \/boot\/uboot\/Image; ext4load mmc 0:1 ${dtb_loadaddr} \/boot\/uboot\/meson-gxbb-odroidc2.dtb; booti ${loadaddr} - ${dtb_loadaddr}\"<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">=&gt; boot<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">9298944 bytes read in 7277 ms (1.2 MiB\/s)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">2734 bytes read in 37 ms (71.3 KiB\/s)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">## Flattened Device Tree blob at 01000000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Booting using the fdt blob at 0x1000000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Loading Device Tree to 000000007df68000, end 000000007df6baad ... OK<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Starting kernel ...<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Booting Linux on physical CPU 0x0<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Linux version 4.6.0-rc7-next-20160510 (rgadsdon@rglinux-i7) (gcc version 5.3.1 20160212 (Red Hat Cross 5.3.1-2) (GCC) ) #1 SMP PREEMPT Sat May 14 21:36:55 PDT 2016<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">...........\u00a0 etc..................<\/span><\/strong><\/pre>\n<p>So &#8211; good progress, but not sure why the eMMC fails&#8230;\u00a0\u00a0\u00a0 I&#8217;ll probably wait for Linux Kernel MMC support, now..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 May 15, 2016<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the initial patches to provide basic U-Boot support for the C2, as mentioned in a previous article &#8211; there is now a further patch, to enable MMC support.\u00a0\u00a0\u00a0 Details at https:\/\/www.mail-archive.com\/u-boot@lists.denx.de\/msg212503.html I have applied this additional patch, and for SDcard-based systems, it works: U-Boot 2016.05-rc3 (May 14 2016 &#8211; 21:06:28 -0700) odroid-c2 aarch64-linux-gnu-gcc (GCC) 5.3.1 20160212 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1731\"><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":[1132,1131,1280,6,11,1298,14,16,1285,19,20,937],"tags":[1133,1357,1355,1286,1356,298,372],"class_list":["post-1731","post","type-post","status-publish","format-standard","hentry","category-aarch64","category-arm64","category-boot","category-crash-and-burn","category-hacks","category-hardware","category-kernel","category-linux-arm","category-odroid-c2","category-opinion","category-performance-2","category-u-boot-2","tag-arm64","tag-fails-on-emmc-modules","tag-mmc-support","tag-odroid-c2","tag-ok-on-sdcard","tag-patches","tag-u-boot"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1731","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=1731"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1731\/revisions"}],"predecessor-version":[{"id":1733,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1731\/revisions\/1733"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}