{"id":1669,"date":"2016-03-13T20:54:19","date_gmt":"2016-03-13T20:54:19","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1669"},"modified":"2016-03-13T20:54:19","modified_gmt":"2016-03-13T20:54:19","slug":"arm-rock2-kernel-4-5-rc7-boot-success","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1669","title":{"rendered":"ARM &#8211; Rock2 &#8211; Kernel 4.5-rc7 Boot Success"},"content":{"rendered":"<p>After a lot of testing, and some more confusion, I have managed to get the Rock2 to boot using the latest (<strong>2016.03-rc3<\/strong>) version of U-Boot, and the latest kernel (<strong>4.5-rc7<\/strong>)<\/p>\n<p>As previously, there was a lot of conflicting information&#8230;&#8230;.<\/p>\n<p>I started by booting into the semi-proprietary 3.10-based kernel on the SDcard, and then erasing the eMMC (<span style=\"font-family: courier new,courier;\"><strong>dd if=\/dev\/zero<\/strong><\/span>&#8230; etc..).<\/p>\n<p>I managed to get U-Boot to load and run, but the kernel stubbornly refused to load.. I did find some &#8216;successful&#8217; boot examples using the 4.5-rc kernel, but these all booted onto a ramdisk image (\/dev\/ram0). (See <a href=\"https:\/\/kernelci.org\/boot\/rk3288-rock2-square\/\" target=\"_blank\">https:\/\/kernelci.org\/boot\/rk3288-rock2-square\/<\/a> )<\/p>\n<p>I modified the kernel config and commandline parameters from these examples, and the combination booted into the SDcard successfully:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">U-Boot SPL 2016.03-rc3 (Mar 05 2016 - 17:11:08)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Trying to boot from MMC<\/span><\/strong>\r\n\r\n<strong><span style=\"font-family: courier new,courier;\">U-Boot 2016.03-rc3 (Mar 05 2016 - 17:11:08 -0800)<\/span><\/strong>\r\n\r\n<strong><span style=\"font-family: courier new,courier;\">Model: Radxa Rock 2 Square<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">DRAM: 2 GiB<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">MMC: dwmmc@ff0f0000: 0, dwmmc@ff0c0000: 1<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">stdio_add_devices: Video device failed (ret=-1)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">In: serial<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Out: serial<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Err: serial<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Net: Net Initialization Skipped<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">No ethernet found.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Hit any key to stop autoboot: 0<\/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;\">6721600 bytes read in 594 ms (10.8 MiB\/s)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">31421 bytes read in 36 ms (851.6 KiB\/s)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Kernel image @ 0x2000000 [ 0x000000 - 0x669040 ]<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">## Flattened Device Tree blob at 01f00000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Booting using the fdt blob at 0x1f00000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Loading Device Tree to 1fff5000, end 1ffffabc ... OK<\/span><\/strong>\r\n\r\n<strong><span style=\"font-family: courier new,courier;\">Starting kernel ...<\/span><\/strong>\r\n\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Booting Linux on physical CPU 0x500<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Linux version 4.5.0-rc7 (root@rgrock2) (gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC) ) #1 SMP Sun Mar 13 13:32:42 EDT 2016<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] CPU: div instructions available: patching division code<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] CPU: PIPT \/ VIPT nonaliasing data cache, VIPT aliasing instruction cache<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Machine model: Radxa Rock 2 Square<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] debug: ignoring loglevel setting.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] cma: Reserved 64 MiB at 0x7c000000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Memory policy: Data cache writealloc<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] On node 0 totalpages: 524288<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] free_area_init_node: node 0, pgdat c108d640, node_mem_map eeff9000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] DMA zone: 1536 pages used for memmap<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] DMA zone: 0 pages reserved<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] DMA zone: 196608 pages, LIFO batch:31<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] HighMem zone: 327680 pages, LIFO batch:31<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] PERCPU: Embedded 12 pages\/cpu @eefa5000 s18880 r8192 d22080 u49152<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] pcpu-alloc: s18880 r8192 d22080 u49152 alloc=12*4096<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 522752<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Kernel command line: console=ttyS2,115200n8 root=\/dev\/mmcblk1p1 earlyprintk ignore_loglevel<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 0.000000] Memory: 1998816K\/2097152K available (8591K kernel code, 1053K rwdata, 4124K rodata, 1104K init, 343K bss, 32800K reserved, 65536K cma-reserved, 1245184K highmem) ..................................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">........................................................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">................................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">16.210447] rk_gmac-dwmac ff290000.ethernet eth0: Link is Up - 1Gbps\/Full - flow control rx\/tx<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ 16.219077] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started LSB: Bring up\/down networking.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started \/etc\/rc.d\/rc.local Compatibility.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Starting Wait for Plymouth Boot Screen to Quit...<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> Starting Terminate Plymouth Boot Screen...<\/span><\/strong>\r\n\r\n<strong><span style=\"font-family: courier new,courier;\">Fedora 23 (Twenty Three)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Kernel 4.5.0-rc7 on an armv7l (ttyS2)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">.............<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"># uname -a<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Linux rgrock2 4.5.0-rc7 #1 SMP Sun Mar 13 13:32:42 EDT 2016 armv7l armv7l armv7l GNU\/Linux<\/span><\/strong><\/pre>\n<p>If you do not have an hdmi monitor attached, the u-boot sequence will wait for several seconds, before continuing&#8230;<\/p>\n<p>The U-Boot parameters I used were as follows:<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">setenv autoload no<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">setenv bootdelay 10<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">setenv fdt_high 0x1fffffff<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">setenv bootargs \"console=ttyS2,115200n8 root=\/dev\/mmcblk1p1 earlyprintk ignore_loglevel\"<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">setenv bootcmd \"ext4load mmc 1:1 ${kernel_addr_r} boot\/uboot\/zImage; ext4load mmc 1:1 ${fdt_addr_r} boot\/uboot\/rk3288-rock2-square.dtb; bootz ${kernel_addr_r} - ${fdt_addr_r}\"<\/span><\/strong><\/pre>\n<p>One further important thing to mention&#8230; The cpu\/soc runs _hot_ when under load, so you will need a heatsink! When I first attempted to compile the kernel on the rock2, using the usual multi-cpu make command (<strong><span style=\"font-family: courier new,courier;\">make -j5 zImage.<\/span><\/strong>..) the system shut down and rebooted, and the chipset was _very_ hot.. Until I can make up a suitable heatsink &#8211; and maybe even a fan? &#8211; I compile in single-processor mode (leave out the <span style=\"font-family: courier new,courier;\"><strong>-j5<\/strong><\/span>..), and this is OK..<\/p>\n<p><em>Robert Gadsdon. March 13, 2016.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a lot of testing, and some more confusion, I have managed to get the Rock2 to boot using the latest (2016.03-rc3) version of U-Boot, and the latest kernel (4.5-rc7) As previously, there was a lot of conflicting information&#8230;&#8230;. I started by booting into the semi-proprietary 3.10-based kernel on the SDcard, and then erasing the eMMC (dd <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1669\"><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":[1275,1280,5,10,11,14,16,1274,1277,937],"tags":[576,1216,1289,1281,1282,1175,1290],"class_list":["post-1669","post","type-post","status-publish","format-standard","hentry","category-armv7","category-boot","category-compilation","category-fedora","category-hacks","category-kernel","category-linux-arm","category-rock2","category-rx3288","category-u-boot-2","tag-armv7","tag-fedora-23","tag-kernel-4-5-rc7","tag-radxa","tag-rock2","tag-success","tag-uboot-2016-03-rc3"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1669","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=1669"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1669\/revisions"}],"predecessor-version":[{"id":1670,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1669\/revisions\/1670"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}