<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić's random unstructured stuff: CubieBoard</title>
  <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/</id>
  <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?cubieboard"/>
  <link xmlns="http://www.w3.org/2005/Atom" type="application/atom+xml" rel="self" href="https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443/feed/workspace/rot13?page=cubieboard;type=Atom"/>
  <updated xmlns="http://www.w3.org/2005/Atom">2019-06-05T15:47:05Z</updated>
  <entry xmlns="http://www.w3.org/2005/Atom">
    <title xmlns="http://www.w3.org/2005/Atom">CubieBoard</title>
    <link xmlns="http://www.w3.org/2005/Atom" type="text/html" rel="alternate" href="https://saturn.ffzg.hr/rot13/index.cgi?cubieboard"/>
    <content xmlns="http://www.w3.org/2005/Atom" type="html">&lt;div&gt;Creator: Dobrica Pavlinušić&lt;/div&gt;&lt;hr/&gt;&lt;div&gt;Tags: hardware&lt;/div&gt;&lt;hr/&gt;&lt;div class="wiki"&gt;
&lt;span class="nlw_phrase"&gt;&lt;img alt="cubieboard-ir-module.png" src="https://saturn.ffzg.hr/rot13/index.cgi/cubieboard-ir-module.png?action=attachments_download;page_name=cubieboard;id=20190605154705-0-23339" /&gt;&lt;!-- wiki: {image: cubieboard-=ir-=module.png} --&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="nlw_phrase"&gt;&lt;a href="https://saturn.ffzg.hr/rot13/index.cgi/cubieboard_schematic_2012-08-08.pdf?action=attachments_download;page_name=cubieboard;id=20180306111005-0-26284"&gt;cubieboard_schematic_2012-08-08.pdf&lt;/a&gt;&lt;!-- wiki: {file: cubieboard_schematic_2012-=08-=08.pdf} --&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="nlw_phrase"&gt;&lt;a href="https://saturn.ffzg.hr/rot13/index.cgi/BreadBoard%20V1.0%2003-25%20For%20CubieBoard.pdf?action=attachments_download;page_name=cubieboard;id=20140112210755-0-22383"&gt;BreadBoard V1.0 03-25 For CubieBoard.pdf&lt;/a&gt;&lt;!-- wiki: {file: BreadBoard V1.0 03-=25 For CubieBoard.pdf} --&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="nlw_phrase"&gt;&lt;table class="wafl_container"&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;div class="wafl_box"&gt;
        
          &lt;div class="wafl_titlebox"&gt;
            &lt;div class="wafl_title"&gt;
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="wafl_items"&gt;
            
              &lt;div class="wiki"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#a20"&gt;Dobrica Pavlinušić's random unstructured stuff (A20)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] A20} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#running_ubi_ubifs_on_mlc_nand"&gt;Dobrica Pavlinušić's random unstructured stuff (Running UBI/UBIFS on MLC NAND)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Running UBI/UBIFS on MLC NAND} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#nand_in_mainline_kernel"&gt;Dobrica Pavlinušić's random unstructured stuff (NAND in mainline kernel)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] NAND in mainline kernel} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#many_bad_blocks"&gt;Dobrica Pavlinušić's random unstructured stuff (many bad blocks)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] many bad blocks} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#cubieboard"&gt;Dobrica Pavlinušić's random unstructured stuff (cubieboard)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] cubieboard} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#cubieboard2"&gt;Dobrica Pavlinušić's random unstructured stuff (cubieboard2)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] cubieboard2} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#mount_ubifs_filesystem"&gt;Dobrica Pavlinušić's random unstructured stuff (mount ubifs filesystem)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] mount ubifs filesystem} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#u_boot"&gt;Dobrica Pavlinušić's random unstructured stuff (u-boot)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] u-=boot} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#compile_with_nand_support"&gt;Dobrica Pavlinušić's random unstructured stuff (compile with nand support)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] compile with nand support} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#pinout"&gt;Dobrica Pavlinušić's random unstructured stuff (pinout)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] pinout} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#u14_next_to_sata_connector"&gt;Dobrica Pavlinušić's random unstructured stuff (U14 (Next to SATA connector))&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] U14 (Next to SATA connector)} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#u15_between_ethernet_port_and_usb_ports"&gt;Dobrica Pavlinušić's random unstructured stuff (U15 (Between Ethernet port and USB ports))&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] U15 (Between Ethernet port and USB ports)} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#disk_speed"&gt;Dobrica Pavlinušić's random unstructured stuff (disk speed)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] disk speed} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#nand"&gt;Dobrica Pavlinušić's random unstructured stuff (NAND)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] NAND} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#sata"&gt;Dobrica Pavlinušić's random unstructured stuff (SATA)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] SATA} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#gpio"&gt;Dobrica Pavlinušić's random unstructured stuff (GPIO)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] GPIO} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#camera"&gt;Dobrica Pavlinušić's random unstructured stuff (Camera)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Camera} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#hardware"&gt;Dobrica Pavlinušić's random unstructured stuff (hardware)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] hardware} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#leds"&gt;Dobrica Pavlinušić's random unstructured stuff (LEDs)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] LEDs} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#forum"&gt;Dobrica Pavlinušić's random unstructured stuff (forum)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] forum} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#ina219"&gt;Dobrica Pavlinušić's random unstructured stuff (ina219)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] ina219} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#device_tree"&gt;Dobrica Pavlinušić's random unstructured stuff (device tree)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] device tree} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#user_land_c"&gt;Dobrica Pavlinušić's random unstructured stuff (user-land C)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] user-=land C} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#spi_flash"&gt;Dobrica Pavlinušić's random unstructured stuff (SPI flash)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] SPI flash} --&gt;&lt;/span&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#flashrom"&gt;Dobrica Pavlinušić's random unstructured stuff (flashrom)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] flashrom} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#build_u_boot_with_spi_support"&gt;Dobrica Pavlinušić's random unstructured stuff (build u-boot with SPI support)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] build u-=boot with SPI support} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#reset"&gt;Dobrica Pavlinušić's random unstructured stuff (reset)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] reset} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="nlw_phrase"&gt;&lt;a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#external_ir_receiver"&gt;Dobrica Pavlinušić's random unstructured stuff (external ir receiver)&lt;/a&gt;&lt;!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] external ir receiver} --&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

            
            
          &lt;/div&gt;
        
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- wiki: {toc: }
--&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 id="a20"&gt;A20&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Debian image sunxi_ss crypto &lt;a target="_blank" title="(external link)" href="http://www.cubieforums.com/index.php/topic,1275.0.html"&gt;http://www.cubieforums.com/index.php/topic,1275.0.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="http://www.armbian.com/cubieboard-2/"&gt;http://www.armbian.com/cubieboard-2/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="running_ubi_ubifs_on_mlc_nand"&gt;Running UBI/UBIFS on MLC NAND&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://events.static.linuxfound.org/sites/events/files/slides/ubi-mlc.pdf"&gt;https://events.static.linuxfound.org/sites/events/files/slides/ubi-mlc.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://youtu.be/9j2pOIiJqYw"&gt;https://youtu.be/9j2pOIiJqYw&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="nand_in_mainline_kernel"&gt;NAND in mainline kernel&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/Mainline_NAND_Howto"&gt;http://linux-sunxi.org/Mainline_NAND_Howto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/MTD_Driver"&gt;http://linux-sunxi.org/MTD_Driver&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Samsung K9GBG08U0A NAND&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://groups.google.com/forum/#!topic/linux-sunxi/PxMmiCe0Deg"&gt;https://groups.google.com/forum/#!topic/linux-sunxi/PxMmiCe0Deg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://www.netdevconf.org/2.1/papers/distributed-switch-architecture.pdf"&gt;https://www.netdevconf.org/2.1/papers/distributed-switch-architecture.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
dpavlin@cubieboard:~$ dmesg | grep -A 5 nand
[    4.395437] nand: Could not find valid JEDEC parameter page; aborting
[    4.401898] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xd7
[    4.408272] nand: Samsung NAND 4GiB 3,3V 8-bit
[    4.412719] nand: 4096 MiB, MLC, erase size: 1024 KiB, page size: 8192, OOB size: 640
[    4.421299] Bad block table found at page 524160, version 0x25
[    4.427987] Bad block table found at page 524032, version 0x25
[    4.434238] nand_read_bbt: bad block at 0x000001000000
[    4.439379] nand_read_bbt: bad block at 0x000001100000
[    4.445411] 6 ofpart partitions found on MTD device 1c03000.nand
[    4.451420] Creating 6 MTD partitions on &amp;quot;1c03000.nand&amp;quot;:
[    4.456769] 0x000000a00000-0x0001ffa00000 : &amp;quot;rootfs&amp;quot;
[    4.461737] mtd: partition &amp;quot;rootfs&amp;quot; extends beyond the end of device &amp;quot;1c03000.nand&amp;quot; -- size truncated to 0xff600000
[    4.472910] 0x000001000000-0x000001400000 : &amp;quot;env&amp;quot;
[    4.477926] 0x000000c00000-0x000001000000 : &amp;quot;U-Boot.backup&amp;quot;
[    4.483748] 0x000000800000-0x000000c00000 : &amp;quot;U-Boot&amp;quot;
[    4.488997] 0x000000400000-0x000000800000 : &amp;quot;SPL.backup&amp;quot;
[    4.494580] 0x000000000000-0x000000400000 : &amp;quot;SPL&amp;quot;



dpavlin@cubieboard2:~$ dmesg | grep -A 5 nand
[    4.709427] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xd7
[    4.715876] nand: Hynix H27UBG8T2BTR-BC 32G 3.3V 8-bit
[    4.721021] nand: 4096 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 640
[    4.728997] Scanning device for bad blocks
[    8.484659] 6 ofpart partitions found on MTD device 1c03000.nand
[    8.490678] Creating 6 MTD partitions on &amp;quot;1c03000.nand&amp;quot;:
[    8.496021] 0x000000a00000-0x0001ffa00000 : &amp;quot;rootfs&amp;quot;
[    8.500992] mtd: partition &amp;quot;rootfs&amp;quot; extends beyond the end of device &amp;quot;1c03000.nand&amp;quot; -- size truncated to 0xff600000
[    8.515527] 0x000001000000-0x000001400000 : &amp;quot;env&amp;quot;
[    8.520564] 0x000000c00000-0x000001000000 : &amp;quot;U-Boot.backup&amp;quot;
[    8.526504] 0x000000800000-0x000000c00000 : &amp;quot;U-Boot&amp;quot;
[    8.531755] 0x000000400000-0x000000800000 : &amp;quot;SPL.backup&amp;quot;
[    8.537395] 0x000000000000-0x000000400000 : &amp;quot;SPL&amp;quot;
&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="many_bad_blocks"&gt;many bad blocks&lt;/h2&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/Mainline_NAND_Howto#Many_bad_blocks"&gt;http://linux-sunxi.org/Mainline_NAND_Howto#Many_bad_blocks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
To fix many bad blocks issue you should:&lt;/p&gt;
&lt;p&gt;
1. Disable nand-on-flash-bbt in your dts&lt;br /&gt;
2. Remove this test: &lt;a target="_blank" title="(external link)" href="http://lxr.free-electrons.com/source/drivers/mtd/nand/nand_base.c?v=4.7#L2940"&gt;http://lxr.free-electrons.com/source/drivers/mtd/nand/nand_base.c?v=4.7#L2940&lt;/a&gt;&lt;br /&gt;
3. Boot your new kernel and erase chip with flash_erase /dev/mtd[0-X]&lt;br /&gt;
4. Re-introduce the bad block check removed in 2, re-enable nand-on-flash-bbt&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;and boot the new kernel&lt;/p&gt;
&lt;p&gt;
Let's try to do this with armbian.&lt;/p&gt;
&lt;h3 id="cubieboard"&gt;cubieboard&lt;/h3&gt;
&lt;p&gt;
First, enable nand overlay&lt;/p&gt;
&lt;pre&gt;
dpavlin@cubieboard:~$ cat /boot/armbianEnv.txt
overlays=nand
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Then remove nand-om-flash-btt:&lt;/p&gt;
&lt;pre&gt;
dpavlin@cubieboard:/$ cd /boot/dtb-`uname -r`/overlay
dpavlin@cubieboard:/boot/dtb-4.14.23-sunxi/overlay$ 

# backup original
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# cp sun4i-a10-nand.dtbo sun4i-a10-nand.dtbo.orig

# remote nand-on-flash-bbt
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# dtc -I dtb -O dts sun4i-a10-nand.dtbo | grep -v nand-on-flash-bbt &amp;gt; /tmp/nand.dts
root@cubieboard:/boot/dtb-4.14.23-sunxi/overlay# dtc -I dts -O dtb /tmp/nand.dts &amp;gt; sun4i-a10-nand.dtbo
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Compile armbian kernel with this patch applied&lt;/p&gt;
&lt;pre&gt;
dpavlin@armbian:~/build$ cp ./patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled \
    ./userpatches/kernel/sunxi-next/nand-disable-badblock-check-for-migration.patch
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Reboot and check that nand is available:&lt;/p&gt;
&lt;pre&gt;
dpavlin@cubieboard:~$ dmesg | grep -A 8 MTD
[   13.696198] 6 ofpart partitions found on MTD device 1c03000.nand
[   13.702205] Creating 6 MTD partitions on &amp;quot;1c03000.nand&amp;quot;:
[   13.707550] 0x000000a00000-0x0001ffa00000 : &amp;quot;rootfs&amp;quot;
[   13.712517] mtd: partition &amp;quot;rootfs&amp;quot; extends beyond the end of device &amp;quot;1c03000.nand&amp;quot; -- size truncated to 0xff600000
[   13.723693] 0x000001000000-0x000001400000 : &amp;quot;env&amp;quot;
[   13.728713] 0x000000c00000-0x000001000000 : &amp;quot;U-Boot.backup&amp;quot;
[   13.734568] 0x000000800000-0x000000c00000 : &amp;quot;U-Boot&amp;quot;
[   13.739778] 0x000000400000-0x000000800000 : &amp;quot;SPL.backup&amp;quot;
[   13.745368] 0x000000000000-0x000000400000 : &amp;quot;SPL&amp;quot;
[   13.751476] sun4i-mdio 1c0b080.mdio: 1c0b080.mdio supply phy not found, using dummy regulator
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Now init nand:&lt;/p&gt;
&lt;pre&gt;
root@cubieboard:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 1048576 (1M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0


root@cubieboard2:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0

root@cubieboard:/home/dpavlin# flash_erase /dev/mtd0 0 0
Erasing 1024 Kibyte @ 600000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 6 (mtd0)
        error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
             error 5 (Input/output error)
Erasing 1024 Kibyte @ 700000 --  0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 7 (mtd0)
        error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
             error 5 (Input/output error)
Erasing 1024 Kibyte @ ff500000 -- 100 % complete 


root@cubieboard:/home/dpavlin# ubiformat /dev/mtd0
ubiformat: mtd0 (mlc-nand), size 4284481536 bytes (4.0 GiB), 4086 eraseblocks of 1048576 bytes (1024.0 KiB), min. I/O size 8192 bytes
libscan: scanning eraseblock 4085 -- 100 % complete  
ubiformat: 4084 eraseblocks are supposedly empty
ubiformat: warning!: 2 of 4086 eraseblocks contain non-UBI data
ubiformat: continue? (y/N) y
ubiformat: warning!: only 0 of 4086 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: continue? (y/N) y
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 6 --  0 % complete  libmtd: error!: MEMERASE64 ioctl failed for eraseblock 6 (mtd0)
        error 5 (Input/output error)

ubiformat: error!: failed to erase eraseblock 6
           error 5 (Input/output error)
ubiformat: mark it as bad? (y/N) y
ubiformat: marking block 6 bad
ubiformat: formatting eraseblock 7 --  0 % complete  libmtd: error!: MEMERASE64 ioctl failed for eraseblock 7 (mtd0)
        error 5 (Input/output error)

ubiformat: error!: failed to erase eraseblock 7
           error 5 (Input/output error)
ubiformat: mark it as bad? (y/N) y
ubiformat: marking block 7 bad
ubiformat: formatting eraseblock 4085 -- 100 % complete  




ubiattach -p /dev/mtd0

ubimkvol /dev/ubi0 -s 2GiB -N root

mount /dev/ubi0_0 /mnt/ -t ubifs

root@cubieboard:~# mount /dev/ubi0_0 /mnt/ -t ubifs
[Wed Feb 28 17:49:38 2018] UBIFS error (pid: 4709): cannot open &amp;quot;/dev/ubi0:root&amp;quot;, error -22
[Wed Feb 28 17:49:43 2018] UBIFS (ubi0:0): background thread &amp;quot;ubifs_bgt0_0&amp;quot; started, PID 4722
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name &amp;quot;root&amp;quot;
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): LEB size: 1032192 bytes (1008 KiB), min./max. I/O unit sizes: 8192 bytes/8192 bytes
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): FS size: 2137669632 bytes (2038 MiB, 2071 LEBs), journal size 33030144 bytes (31 MiB, 32 LEBs)
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[Wed Feb 28 17:49:44 2018] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 8E9A30F0-241F-4013-916F-C0B995F22BB1, small LPT model

&lt;/pre&gt;
&lt;br /&gt;&lt;h3 id="cubieboard2"&gt;cubieboard2&lt;/h3&gt;
&lt;p&gt;
This is mostly redundant from cubieboard, but with attempt to define mtd partitions correctly&lt;/p&gt;
&lt;pre&gt;
root@cubieboard2:/home/dpavlin# ubiformat /dev/mtd0
ubiformat: mtd0 (mlc-nand), size 4273995776 bytes (4.0 GiB), 2038 eraseblocks of 2097152 bytes (2.0 MiB), min. I/O size 8192 bytes
libscan: scanning eraseblock 2037 -- 100 % complete  
ubiformat: 2038 eraseblocks have valid erase counter, mean value is 1
ubiformat: formatting eraseblock 2037 -- 100 % complete  


&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="mount_ubifs_filesystem"&gt;mount ubifs filesystem&lt;/h2&gt;
&lt;pre&gt;
dpavlin@cubieboard:~$ grep ubi /mnt/boot/armbianEnv.txt
rootdev=ubi0:root ubi.mtd=0
rootfstype=ubifs

dpavlin@cubieboard:~$ grep ubi /etc/fstab 
ubi0:root / ubifs defaults,noatime,nodiratime 0 1
&lt;/pre&gt;
&lt;br /&gt;&lt;h1 id="u_boot"&gt;u-boot&lt;/h1&gt;
&lt;p&gt;
Original u-boot output&lt;/p&gt;
&lt;pre&gt;
HELLO! BOOT0 is starting!
boot0 version : 1.5.1
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x0003c000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.133] boot1 version : 1.4.0
[       0.133] pmu type = 3
[       0.134] bat vol = 0
[       0.161] axi:ahb:apb=3:2:2
[       0.161] set dcdc2=1400, clock=1008 successed
[       0.163] key
[       0.175] no key found
[       0.175] flash init start
[       4.051] flash init finish
[       4.052] fs init ok
[       4.053] fattype FAT16
[       4.053] fs mount ok
[       4.060] script finish
[       4.061] power finish
[       4.069] BootMain start
[       4.069] 13
[       4.089] key value = 0
[       4.089] recovery key high 6, low 4
[       4.090] unable to find fastboot_key key_max value
[       4.098] test for multi os boot with display
[       4.100] show pic finish
[       4.103] load kernel start
[       4.127] load kernel successed
[       4.127] start address = 0x4a00000

U-Boot 2011.09-rc1 (Nov 26 2012 - 14:01:52) Allwinner Technology 

CPU:   SUNXI Family
Board: A10-EVB
DRAM:  512 MiB
NAND:  3776 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:11-
-name-        -start-       -size-      
bootloader  : 1000000       1000000     
env         : 2000000       1000000     
boot        : 3000000       2000000     
system      : 5000000       14000000    
data        : 19000000      20000000    
misc        : 39000000      1000000     
recovery    : 3a000000      2000000     
cache       : 3c000000      8000000     
private     : 44000000      1000000     
sysrecovery : 45000000      14000000    
UDISK       : 59000000      93000000    
-----------------------------------
Hit any key to stop autoboot:  0 
sunxi#
&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="compile_with_nand_support"&gt;compile with nand support&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://groups.google.com/forum/#!topic/linux-sunxi/PxMmiCe0Deg"&gt;https://groups.google.com/forum/#!topic/linux-sunxi/PxMmiCe0Deg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
On Cubieboard2 with those patches we get:&lt;/p&gt;
&lt;pre&gt;
=&amp;gt; nand info

Device 0: nand0, sector size 2048 KiB
  Page size       8192 b
  OOB size         640 b
  Erase size   2097152 b
  subpagesize     8192 b
  options     0x00001000
  bbt options 0x00070000

# which comparted to booted linux kernel with mtd support....

root@cubieboard2:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4284481536 (3G)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 640 
regions = 0

# it looks somewhat OK, but mtdparts doesn't (yet) return anything.
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Another day, another try to get mtdparts to display something...&lt;/p&gt;
&lt;pre&gt;
root@armbian:~/build/cache/sources/u-boot/v2017.11# grep -i mtd .config
CONFIG_SPL_MTD_SUPPORT=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT=&amp;quot;nand0=sunxi-nand&amp;quot;
CONFIG_MTDPARTS_DEFAULT=&amp;quot;mtdparts=sunxi-nand:4m(spl),4m(spl-backup),4m(uboot),4m(uboot-backup),4m(env),-(UBI)&amp;quot;
# CONFIG_CMD_MTDPARTS_SPREAD is not set
# MTD Support
CONFIG_MTD=y
# CONFIG_MTD_NOR_FLASH is not set
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set

=&amp;gt; mtdparts

device nand0 &amp;lt;sunxi-nand&amp;gt;, # parts = 6
 #: name                size            offset          mask_flags
 0: spl                 0x00400000      0x00000000      0
 1: spl-backup          0x00400000      0x00400000      0
 2: uboot               0x00400000      0x00800000      0
 3: uboot-backup        0x00400000      0x00c00000      0
 4: env                 0x00400000      0x01000000      0
 5: UBI                 0xfec00000      0x01400000      0

active partition: nand0,0 - (spl) 0x00400000 @ 0x00000000

defaults:
mtdids  : nand0=sunxi-nand
mtdparts: mtdparts=sunxi-nand:4m(spl),4m(spl-backup),4m(uboot),4m(uboot-backup),4m(env),-(UBI)






&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Instructions after this are hit-or-miss...&lt;/p&gt;
&lt;pre&gt;
dpavlin@klin:/klin/u-boot$ cp configs/Cubieboard_defconfig .config

# add NAND, MTD options, A10 for cubieboard1

# compile while defining flash:

dpavlin@klin:/klin/u-boot$ cat build-cubieboard.sh 
# parametars are probably wrong for your chip!
make V=1 CONFIG_NAND_SUNXI_SPL_ECC_STRENGTH=40 CONFIG_SYS_NAND_PAGE_SIZE=4036 CONFIG_SYS_NAND_OOBSIZE=640 CONFIG_SYS_NAND_BLOCK_SIZE=0x100000


dpavlin@cubieboard:~$ scp 10.60.0.92:/klin/u-boot/u-boot*spl* .

dpavlin@cubieboard:~$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8 
488+1 records in
488+1 records out
500154 bytes (500 kB) copied, 0.0423498 s, 11.8 MB/s

&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
It would be better to define params in u-boot config file like:&lt;/p&gt;
&lt;pre&gt;
CONFIG_SYS_EXTRA_OPTIONS=&amp;quot;SYS_NAND_BLOCK_SIZE=0x40000,SYS_NAND_PAGE_SIZE=4096,SYS_NAND_OOBSIZE=256&amp;quot;
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
(with correct values of course).&lt;/p&gt;
&lt;h1 id="pinout"&gt;pinout&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="http://docs.cubieboard.org/cubieboard1_and_cubieboard2_gpio_pin"&gt;http://docs.cubieboard.org/cubieboard1_and_cubieboard2_gpio_pin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="u14_next_to_sata_connector"&gt;U14 (Next to SATA connector)&lt;/h2&gt;
&lt;table style="border-collapse: collapse;" class="formatter_table"&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;span style="padding:.5em"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;strong&gt;SPI0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;48&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI13 (SPI0-MISO/UART6-RX/EINT25)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;47&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI11 (SPI0-CLK/UART5-RX/EINT23)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;46&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI12 (SPI0-MOSI/UART6-TX/EINT24)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;45&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI10 (SPI0-CS/UART5-TX/EINT22)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;span style="padding:.5em"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;strong&gt;LCD&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;44&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;3.3V (nc in 2012-08-08)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;43&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;VCC-5V&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;42&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;41&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;SPDIF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;40&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PB10 (LCD0-SCK/LCD-PIO1)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;39&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PB11 (LCD0-SDA/LCD-PIO2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;38&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;37&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PH7 (LCD0-BL-EN/LCD-PIO0/UART5-RX/EINT7)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;36&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;XN_TP (TP-X2)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;35&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;YN_TP (TP-Y2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;34&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;XP_TP (TP-X1)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;33&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;YP_TP (TP-Y1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;32&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD25 (LCDDE)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;31&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PB2 (PWM0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;30&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD26 (LCDHSYNC)-VGA-HSYNC&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;29&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD24 (LCDCLK)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;28&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD23 (LCDD23)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;27&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD27 (LCDVSYNC)-VGA-VSYNC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;26&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD21 (LCDD21)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;25&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD22 (LCDD22)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;24&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD19 (LCDD19/LVDS1N3)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;23&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD20 (LCDD20)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;22&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD17 (LCDD17/LVDS1NC)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;21&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD18 (LCDD18/LVDS1P3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;20&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;19&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD16 (LCDD16/LVDS1PC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;18&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD14 (LCDD14/LVDS1P2)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;17&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD15 (LCDD15/LVDS1N2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;16&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD12 (LCDD12/LVDS1P1)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;15&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD13 (LCDD13/LVDS1N1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;14&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD10 (LCDD10/LVDS1P0)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;13&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD11 (LCDD11/LVDS1N0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;12&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD8 (LCDD8/LVDS0P3)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;11&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD9 (LCDD9/LVDS0N3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;10&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD7 (LCDD7/LVDS0NC)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;9&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;8&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD5 (LCDD5/LVDS0N2)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;7&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD6 (LCDD6/LVDS0PC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;6&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD3 (LCDD3/LVDS0N1)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;5&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD4 (LCDD4/LNVS0P2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;4&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD1 (LCDD1/LVDS0N0)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;3&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD2 (LCDD2/LVDS0P1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;2&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;1&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PD0 (LCDD0/LVDSP0)&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;&lt;h2 id="u15_between_ethernet_port_and_usb_ports"&gt;U15 (Between Ethernet port and USB ports)&lt;/h2&gt;
&lt;table style="border-collapse: collapse;" class="formatter_table"&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;span style="padding:.5em"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;strong&gt;CSI1/TS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;1&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;VCC-5V&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;2&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PH15 (CSI1-PWR/EINT15)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;3&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;CSI1-IO-2V8&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;4&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PH14 (CSI1-RST#/EINT14)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;5&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG0 (CSI1-PCLK/SDC1-CMD)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;6&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PB18 (TWI1-SCK)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;7&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PB19 (TWI1-SDA)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;8&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG3 (CSI1-VSYNC/SDC1-D1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;9&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG2 (CSI1-HSYNC/SDC1-D0)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;10&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG1 (CSI1-MCLK/SDC1-CLK)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;11&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG4 (CSI1-D0/SDC1-D2)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;12&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG5 (CSI1-D1/SDC1-D3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;13&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG6 (CSI1-D2/UART3-TX)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;14&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG7 (CSI1-D3/UART3-RX&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;15&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG8 (CSI1-D4/UART3-RTS)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;16&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG9 (CSI1-D5/UART3-CTS)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;17&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG10 (CSI1-D6/UART4-TX)&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;18&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PG11 (CSI1-D7/UART4-RX)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;19&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;20&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;span style="padding:.5em"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;strong&gt;Analog&lt;/strong&gt; &lt;strong&gt;SDIO3&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;21&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;FMINL&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;22&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI4 (SDC3-CMD)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;23&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;FMINR&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;24&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI5 (SDC3-CLK)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;25&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;26&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI6 (SDC3-D0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;27&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;VGA-R&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;28&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI7 (SDC3-D1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;29&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;VGA-G&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;30&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI8 (SDC3-D2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;31&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;VGA-B&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;32&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PI9 (SDC3-D3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;span style="padding:.5em"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;&lt;strong&gt;CSI0/TS&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;33&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;LCD1-VSYNC&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;34&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE4 (CSI0-D0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;35&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;LCD1-HSYNC&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;36&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE5 (CSI0-D1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;37&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;Ground&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;38&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE6 (CSI0-D2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;39&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;AVCC&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;40&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE7 (CSI0-D3)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;41&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;LRADC0&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;42&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE8 (CSI0-D4)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;43&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;CVBS&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;44&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE9 (CSI0-D5)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;45&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;HPL&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;46&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE10 (CSI0-D6)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;47&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;HPR&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;48&lt;/td&gt;
&lt;td style="border: 1px solid black;padding: .2em;"&gt;PE11 (CSI0-D7)&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;&lt;hr /&gt;
&lt;p&gt;
everything below line is for legacy kernel and quite old&lt;/p&gt;
&lt;h1 id="disk_speed"&gt;disk speed&lt;/h1&gt;
&lt;h2 id="nand"&gt;NAND&lt;/h2&gt;
&lt;pre&gt;
root@cubieboard2:/home/dpavlin# uname -a
Linux cubieboard2 3.4.109-sun7i #4 SMP PREEMPT Sun Oct 11 14:32:15 CEST 2015 armv7l GNU/Linux
root@cubieboard2:/home/dpavlin# hdparm -t /dev/nand

/dev/nand:
 Timing buffered disk reads:  32 MB in  3.22 seconds =   9.94 MB/sec

# this is different, faster sdcard
root@cubieboard2:~# uname -a
Linux cubieboard2 4.3.3-sunxi #3 SMP Mon Dec 28 11:27:16 CET 2015 armv7l GNU/Linux
root@cubieboard2:~# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   770 MB in  2.00 seconds = 384.59 MB/sec
 Timing buffered disk reads:  60 MB in  3.05 seconds =  19.67 MB/sec


&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="sata"&gt;SATA&lt;/h2&gt;
&lt;p&gt;
Powered by 2A Nexus 7 power supply (for SATA)&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://groups.google.com/d/searchin/cubieboard/sata/cubieboard/hKJgJneGVmQ/xme3w4Y7XtsJ?fromplusone=1"&gt;https://groups.google.com/d/searchin/cubieboard/sata/cubieboard/hKJgJneGVmQ/xme3w4Y7XtsJ?fromplusone=1&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;
root@debian:~/sunxi-tools# ./bin2fex /boot/script.bin script.fex
fexc-bin: /boot/script.bin: version: 0.1.2
fexc-bin: /boot/script.bin: size: 42144 (76 sections)

root@debian:~/sunxi-tools# cp script.fex script+sata.fex

root@debian:~/sunxi-tools# diff -urw script.fex script+sata.fex 
--- script.fex  2013-05-30 10:41:13.979510762 +0000
+++ script+sata.fex     2013-05-30 10:42:36.380244101 +0000
@@ -595,7 +595,7 @@
 
 [sata_para]
 sata_used = 1
-sata_power_en =
+sata_power_en = port:PB08&amp;lt;1&amp;gt;&amp;lt;default&amp;gt;&amp;lt;default&amp;gt;&amp;lt;0&amp;gt;
 
 [mmc0_para]
 sdc_used = 1

root@debian:~/sunxi-tools# ./fex2bin script+sata.fex /boot/script.bin

root@debian:/etc# git diff
diff --git a/modules b/modules
index d8894c3..9e65a80 100644
--- a/modules
+++ b/modules
@@ -4,3 +4,4 @@
 # at boot time, one per line. Lines beginning with &amp;quot;#&amp;quot; are ignored.
 # Parameters can be specified after the module name.
 
+sw_ahci_platform
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
Reboot to activate changes and test speed (using 80G intel SSD to have sense of maximum performance)&lt;/p&gt;
&lt;pre&gt;
root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=INTEL SSDSA2M080G2GC, FwRev=2CV102HD, SerialNo=CVPO035101VN080JGN
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=1
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=156301488
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: ATA/ATAPI-7 T13 1532D revision 1:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   784 MB in  2.00 seconds = 392.08 MB/sec
 Timing buffered disk reads: 460 MB in  3.00 seconds = 153.32 MB/sec
&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
And test with disk:&lt;/p&gt;
&lt;pre&gt;
root@debian:~# hdparm -i /dev/sda

/dev/sda:

 Model=ST96812AS, FwRev=7.24, SerialNo=3PJ1GCKE
 Config={ HardSect NotMFM HdSw&amp;gt;15uSec Fixed DTR&amp;gt;10Mbs RotSpdTol&amp;gt;.5% }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
 BuffType=unknown, BuffSize=8192kB, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=117231408
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

root@debian:~# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   746 MB in  2.00 seconds = 372.90 MB/sec
 Timing buffered disk reads: 120 MB in  3.03 seconds =  39.56 MB/sec
&lt;/pre&gt;
&lt;br /&gt;&lt;h1 id="gpio"&gt;GPIO&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://github.com/gootoomoon/WiringCB-python"&gt;https://github.com/gootoomoon/WiringCB-python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="camera"&gt;Camera&lt;/h1&gt;
&lt;p&gt;
&lt;a href="https://saturn.ffzg.hr/rot13/index.cgi?ov7670" title="(135 months)  toc References http embeddedprogrammer.blogspot.com 2012 07 hacking-ov7670-camera-module-sccb-cheat..."&gt;OV7670&lt;/a&gt; is supported &lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/CSI"&gt;http://linux-sunxi.org/CSI&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://groups.google.com/forum/#!msg/linux-sunxi/DYWwfUFgVlw/_7A5APHyl7UJ"&gt;https://groups.google.com/forum/#!msg/linux-sunxi/DYWwfUFgVlw/_7A5APHyl7UJ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://groups.google.com/forum/#!msg/cubieboard/SWzC9qvpVL8/9cjQ_CPHQzUJ"&gt;https://groups.google.com/forum/#!msg/cubieboard/SWzC9qvpVL8/9cjQ_CPHQzUJ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="hardware"&gt;hardware&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/Cubieboard/ExpansionPorts"&gt;http://linux-sunxi.org/Cubieboard/ExpansionPorts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://linux-sunxi.org/A20/PIO"&gt;https://linux-sunxi.org/A20/PIO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
pinout: &lt;span class="nlw_phrase"&gt;&lt;img alt="gpio_defination_large.jpg" src="https://saturn.ffzg.hr/rot13/index.cgi/gpio_defination_large.jpg?action=attachments_download;page_name=cubieboard;id=20160103135534-0-14478" /&gt;&lt;!-- wiki: {image: gpio_defination_large.jpg} --&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://www.olimex.com/wiki/How_to_add_pwm"&gt;https://www.olimex.com/wiki/How_to_add_pwm&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;
cat /sys/class/pwm-sunxi/pwm0/pin 
PB2

echo 10khz &amp;gt; /sys/class/pwm-sunxi/pwm0/period

echo 25 &amp;gt; /sys/class/pwm-sunxi/pwm0/duty_percent

echo 1 &amp;gt; /sys/class/pwm-sunxi/pwm0/run
&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="leds"&gt;LEDs&lt;/h2&gt;
&lt;pre&gt;
dpavlin@cubieboard2:~$ grep . /sys/class/leds/*/trigger 
/sys/class/leds/blue:ph21:led2/trigger:none battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer [heartbeat] backlight cpu0 cpu1 default-on 
/sys/class/leds/green:ph20:led1/trigger:[none] battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid ac-online usb-online mmc0 timer heartbeat backlight cpu0 cpu1 default-on 
&lt;/pre&gt;
&lt;br /&gt;&lt;h1 id="forum"&gt;forum&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;ov7670 &lt;a target="_blank" title="(external link)" href="http://www.cubieforums.com/index.php/topic,3823.0.html"&gt;http://www.cubieforums.com/index.php/topic,3823.0.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;LVDS &lt;a target="_blank" title="(external link)" href="http://www.cubieforums.com/index.php/topic,3908.0.html"&gt;http://www.cubieforums.com/index.php/topic,3908.0.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="ina219"&gt;ina219&lt;/h1&gt;
&lt;h2 id="device_tree"&gt;device tree&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" title="(external link)" href="https://github.com/dpavlin/sunxi-DT-overlays/blob/cubieboard2/examples/i2c-ina219.dts"&gt;https://github.com/dpavlin/sunxi-DT-overlays/blob/cubieboard2/examples/i2c-ina219.dts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;
dpavlin@cubieboard2:~$ sensors
ina219-i2c-1-40
Adapter: mv64xxx_i2c adapter
in0:          +0.04 V  
in1:          +4.64 V  
power1:       66.88 W  
curr1:       +13.64 A  

iio_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +33.6�C  

root@cubieboard2:~# dmesg | grep ina | tail -1
[ 6597.685287] ina2xx 1-0040: power monitor ina219 (Rshunt = 100 uOhm)

# hum, it should be 10uA, so I changed that in device tree

dpavlin@cubieboard2:~$ dmesg | grep ina219
[   11.594536] ina2xx 1-0040: power monitor ina219 (Rshunt = 10 uOhm)
dpavlin@cubieboard2:~$ sensors
ina219-i2c-1-40
Adapter: mv64xxx_i2c adapter
in0:          +0.02 V  
in1:          +4.75 V  
power1:       85.00 W  
curr1:       +17.97 A  

iio_hwmon-isa-0000
Adapter: ISA adapter
temp1:        +32.5�C  

# still wrong current!

&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="user_land_c"&gt;user-land C&lt;/h2&gt;
&lt;p&gt;
User-land implementation which works: &lt;a target="_blank" title="(external link)" href="https://github.com/ZigFisher/Glutinium/blob/master/i2c-telemetry/src/ina219.c"&gt;https://github.com/ZigFisher/Glutinium/blob/master/i2c-telemetry/src/ina219.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
modified a little to provide full timestamp and fflush: &lt;span class="nlw_phrase"&gt;&lt;a href="https://saturn.ffzg.hr/rot13/index.cgi/ina219.c?action=attachments_download;page_name=cubieboard;id=20171023104353-0-23625"&gt;ina219.c&lt;/a&gt;&lt;!-- wiki: {file: ina219.c} --&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;
dpavlin@cubieboard2:~$ ./ina219 -b 1 -i 1
2017-10-23T12:40:24 4744mV  262.2mA
2017-10-23T12:40:26 4756mV  249.1mA
2017-10-23T12:40:27 4776mV  223.0mA
2017-10-23T12:40:28 4772mV  223.8mA
2017-10-23T12:40:29 4760mV  224.0mA
2017-10-23T12:40:30 4768mV  223.0mA
2017-10-23T12:40:31 4772mV  223.1mA
2017-10-23T12:40:32 4748mV  224.6mA
2017-10-23T12:40:33 4776mV  223.1mA
2017-10-23T12:40:34 4768mV  223.5mA
&lt;/pre&gt;
&lt;br /&gt;&lt;h1 id="spi_flash"&gt;SPI flash&lt;/h1&gt;
&lt;h2 id="flashrom"&gt;flashrom&lt;/h2&gt;
&lt;pre&gt;
dpavlin@cubieboard:~$ sudo grep spidev /boot/armbianEnv.txt
overlays=pwm nand uart3 uart4 spi-spidev
#overlays=spi-spidev
param_spidev_spi_bus=0


dpavlin@cubieboard:~$ sudo flashrom -p linux_spi:dev=/dev/spidev0.0
flashrom v0.9.9-2-g51e4303 on Linux 4.14.47-sunxi (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Found GigaDevice flash chip &amp;quot;GD25Q80(B)&amp;quot; (1024 kB, SPI) on linux_spi.
No operations were specified.

root@cubieboard:/home/dpavlin# time flashrom -p linux_spi:dev=/dev/spidev0.0 -r /dev/null
flashrom v0.9.9-2-g51e4303 on Linux 4.14.47-sunxi (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... OK.
Found GigaDevice flash chip &amp;quot;GD25Q80(B)&amp;quot; (1024 kB, SPI) on linux_spi.
Reading flash... done.

real    0m11.210s
user    0m0.796s
sys     0m0.381s

&lt;/pre&gt;
&lt;br /&gt;&lt;h2 id="build_u_boot_with_spi_support"&gt;build u-boot with SPI support&lt;/h2&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/Bootable_SPI_flash"&gt;http://linux-sunxi.org/Bootable_SPI_flash&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;
git clone -b sunxi-spi https://github.com/StephanvanSchaik/u-boot

dpavlin@armbian:~/u-boot$ git diff
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index 0389d4c..cbafac9 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -16,3 +16,13 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_SPI=y
+CONFIG_SUNXI_SPI=y
+
dpavlin@armbian:~/u-boot$ make Cubieboard_defconfig



&lt;/pre&gt;
&lt;br /&gt;&lt;p&gt;
This doesn't actually work for me (since it's missing device tree overlays), but rebasing to current u-boot master doesn't&lt;br /&gt;
produce code which compiles.&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="https://forum.armbian.com/topic/3252-opi-zero-boot-with-spi/"&gt;https://forum.armbian.com/topic/3252-opi-zero-boot-with-spi/&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="reset"&gt;reset&lt;/h1&gt;
&lt;p&gt;
&lt;a target="_blank" title="(external link)" href="http://linux-sunxi.org/Cubieboard/Reset"&gt;http://linux-sunxi.org/Cubieboard/Reset&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="external_ir_receiver"&gt;external ir receiver&lt;/h1&gt;
&lt;p&gt;
configuration described on &lt;a href="https://saturn.ffzg.hr/rot13/index.cgi?lirc" title="(82 months) Hints about using recent lirc toc ir-ctl install .pre apt install v4l-utils root@nuc2 ir-ctl feature..."&gt;lirc&lt;/a&gt; page&lt;/p&gt;
&lt;/div&gt;
&lt;hr/&gt;&lt;div&gt;Attachments: BreadBoard V1.0 03-25 For CubieBoard.pdf, cubieboard-ir-module.png, cubieboard_schematic_2012-08-08.pdf, gpio_defination_large.jpg, ina219.c&lt;/div&gt;</content>
    <id xmlns="http://www.w3.org/2005/Atom">https://saturn.ffzg.hr/rot13/index.cgi?cubieboard</id>
    <author xmlns="http://www.w3.org/2005/Atom">
      <name xmlns="http://www.w3.org/2005/Atom">Dobrica Pavlinušić</name>
    </author>
    <updated xmlns="http://www.w3.org/2005/Atom">2019-06-05T15:47:05Z</updated>
    <category xmlns="http://www.w3.org/2005/Atom" term="hardware" label="hardware"/>
  </entry>
</feed>
