{"id":1777,"date":"2016-07-15T06:13:41","date_gmt":"2016-07-15T05:13:41","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1777"},"modified":"2016-07-15T06:13:41","modified_gmt":"2016-07-15T05:13:41","slug":"arm-next-chip-waiting-for-hynix-nand-support","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1777","title":{"rendered":"ARM &#8211; Next CHIP &#8211; Waiting for Hynix NAND Support.."},"content":{"rendered":"<p>Tested some of the kernel versions possible (or not..) for the Next CHIP ARMv7, with mixed results..\u00a0\u00a0\u00a0\u00a0 I added an Ethernet\/USB device (ax88179-based) on the USB hub, and the network connection works fine..<\/p>\n<p>Linux-Next does not yet have the drivers for the Hynix NAND in the CHIP, although &#8211; with the rootfs separate on a USB stick &#8211; this was not an issue, except for updating the NAND-located kernel and dtb..<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">....<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Fedora 24 (Twenty Four)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Kernel 4.7.0-rc7-next-20160713 on an armv7l (ttyS0)<\/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 rgchip 4.7.0-rc7-next-20160713 #2 SMP Wed Jul 13 21:18:40 PDT 2016 armv7l armv7l armv7l GNU\/Linux<\/span><\/strong><\/pre>\n<p>There are a confusing multitude of patched kernel sources on the Next GitHub site <a href=\"https:\/\/github.com\/NextThingCo\/CHIP-linux\" target=\"_blank\">https:\/\/github.com\/NextThingCo\/CHIP-linux<\/a> , and those I tried did not compile cleanly, or the NAND\/UBIFS mount crashed..<\/p>\n<pre><strong><span style=\"font-family: courier new,courier;\">......................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">CC lib\/plist.o<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">drivers\/mtd\/ubi\/build.c:48:2: error: #error TODO<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> #error TODO<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> ^~~~~<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">scripts\/Makefile.build:258: recipe for target 'drivers\/mtd\/ubi\/build.o' failed<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">make[3]: *** [drivers\/mtd\/ubi\/build.o] Error 1<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">scripts\/Makefile.build:403: recipe for target 'drivers\/mtd\/ubi' failed<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">make[2]: *** [drivers\/mtd\/ubi] Error 2<\/span><\/strong><\/pre>\n<pre><strong><span style=\"font-family: courier new,courier;\">.................................<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started Permit User Sessions.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">ubi0: attaching mtd4<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">ubi0 warning: __ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started Notify NFS peers of a restart.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started Network Manager Script Dispatcher Service.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">ubi0 warning: __ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">ubi0 warning: __ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started Command Scheduler.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[ OK ] Started Job spooling tools.<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">ubi0 error: __ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">CPU: 0 PID: 255 Comm: ubiattach Not tainted 4.7.0-rc1++ #3<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Hardware name: Allwinner sun4i\/sun5i Families<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">Backtrace:<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[&lt;c010b228&gt;] (dump_backtrace) from [&lt;c010b424&gt;] (show_stack+0x18\/0x1c)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> r7:00000001 r6:00000000 r5:00000040 r4:ffffffb6<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[&lt;c010b40c&gt;] (show_stack) from [&lt;c02f1640&gt;] (dump_stack+0x24\/0x28)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[&lt;c02f161c&gt;] (dump_stack) from [&lt;c03c3af0&gt;] (__ubi_io_read+0x260\/0x500)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\">[&lt;c03c3890&gt;] (__ubi_io_read) from [&lt;c03c4550&gt;] (ubi_io_read_ec_hdr+0x50\/0x20c)<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> r10:00000000 r9:00000040 r8:00000000 r7:ded85000 r6:df7a5c00 r5:d93a4000<\/span><\/strong>\r\n<strong><span style=\"font-family: courier new,courier;\"> r4:00000000 ..... etc....<\/span><\/strong><\/pre>\n<p>I did manage to flash the NAND with a later kernel version &#8211; based on 4.4.11&#8230;\u00a0\u00a0 The process was relatively painless, as the re-flashing is controlled by an easy-to-use plugin\/app for Chromium\/Chrome browsers..\u00a0<a href=\"http:\/\/docs.getchip.com\/chip.html#flash-chip-with-an-os\" target=\"_blank\">http:\/\/docs.getchip.com\/chip.html#flash-chip-with-an-os<\/a>\u00a0 This erases and re-creates the NAND rootfs, which would be an issue normally, but as I have the rootfs on the USB stick, I just needed to re-edit the kernel command line parameter in U-boot to point to the rootfs on <strong>\/dev\/sda1<\/strong> again..<\/p>\n<p>I had hoped to be able to use the redundant space on the NAND for a swapfile, but the UBIFS filesystem does not support the <em><strong>fallocate<\/strong><\/em> command..<\/p>\n<p>After all this, I did find some &#8216;official&#8217; kernel patches being developed for Hynix NAND support, but these are still work-in-progress&#8230;\u00a0\u00a0\u00a0 <a href=\"https:\/\/patchwork.kernel.org\/patch\/9187023\/\" target=\"_blank\">https:\/\/patchwork.kernel.org\/patch\/9187023\/\u00a0<\/a> I will probably wait until these are available on Linux-Next, and update the device then..<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0\u00a0 July 14, 2016.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tested some of the kernel versions possible (or not..) for the Next CHIP ARMv7, with mixed results..\u00a0\u00a0\u00a0\u00a0 I added an Ethernet\/USB device (ax88179-based) on the USB hub, and the network connection works fine.. Linux-Next does not yet have the drivers for the Hynix NAND in the CHIP, although &#8211; with the rootfs separate on a USB stick <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1777\"><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,5,6,11,14,16,1395,19,20],"tags":[576,1400,1399,1402,1401,1396,1403],"class_list":["post-1777","post","type-post","status-publish","format-standard","hentry","category-armv7","category-compilation","category-crash-and-burn","category-hacks","category-kernel","category-linux-arm","category-next-chip","category-opinion","category-performance-2","tag-armv7","tag-code-problems","tag-github-confusion","tag-hynix","tag-nand","tag-next-chip","tag-support-in-progress"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1777","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=1777"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions"}],"predecessor-version":[{"id":1779,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1777\/revisions\/1779"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}