Jump to content

Armbian on MiQi SBC hardware ?


Recommended Posts

Posted

Yes, if you can do the job of bringing the device into the build system. Since this is a new chip for us, it could not be plain simple. In general we don't have much / (me) any experiences with Rockchip and at least one of us would need to get this device, since porting and supporting without a hardware is no go ... except cloned boards. The chip is powerful / interesting but for the rest I would need to check closely. At least powering with micro USB is not a good idea and I hope there is an  alternative way.

Posted

At least powering with micro USB is not a good idea and I hope there is an  alternative way.

 

There is the fan header, Zador found that out by looking at schematic: http://forum.armbian.com/index.php/topic/1095-miqi-is-a-35-single-board-computer-with-rockchip-rk3288/?p=8338

 

I'm pretty impressed by the performance (and possible tweaks, see at the bottom of this page) but believe it would be necessary to come up with a fully blown desktop Armbian image since here the board seems to perform pretty well (GPU and video acceleration). For headless use cases the lack of IO bandwidth could be a problem. Anyway, I would appreciate if Peter starts with that and would assume Benn Huang could be asked to send out a few more developer samples.

Posted

There is already a complete build environment based on work done by Linaro(RFS) and Rockchip(kernel).

I am not sure if it makes sense to re-invent the wheel ?

http://www.bitkistl.com/2016/09/the-rockchip-toolbox.html

 

Last week we got some performance patches from Willy Tarreau (you know - the cluster guy, build farm)

With that It was possible to run Kodi, smplayer and some webGL demo at the same time, I just used some of the patches (e.g.set cpu throttling to 80+)

http://1wt.eu/miqi/
https://forum.mqmaker.com/t/miqi-based-build-farm-finally-up-and-running/605/1

Demo Video:

https://youtu.be/DnHJckoxGJU

 

VPU acceleration for Kodi 17 is still WIP, Jacob Chen and Marc aka Mac_l1 started on that.

Kernel 4.10+ is available from another guy.
https://forum.mqmaker.com/t/mainline-kernel-compilation/572
https://github.com/Miouyouyou/MyyQi

 

Anyway I will ask Benn about your proposal for some MiQis :-)

 

Thank You,

Peter

Posted

There is already a complete build environment based on work done by Linaro(RFS) and Rockchip(kernel).

I am not sure if it makes sense to re-invent the wheel ?

http://www.bitkistl.com/2016/09/the-rockchip-toolbox.html

Well, Armbian (as a build system) is not about reinventing the wheel, but is about supporting a large number of boards and platforms with as little board/platform specific tweaks as possible while compiling from sources as much as possible. If adding a new board/platform requires changes to the build script, there needs to be a good reason to do this.

And providing official images for the new platform requires enough hardware samples for the team - some polishing always requires access to the hardware if you don't want to spend weeks instead of hours if relying on somebody else to do the live testing.

Posted

I am not sure if it makes sense to re-invent the wheel ?

http://www.bitkistl....ip-toolbox.html

 

Main added value of our build system is bringing down the complexity. We could also say: what's written on that page and scattered around various external links (and which require advanced knowledge to understand) is with Armbian summed under one command.

Posted

Any chance to have Asus Tinker Board support as spin-off of MiQi armbian?

 

Once SoC is supported, adding new boards should be easy. But first, please wait until RK3288 is supported in Armbian.

Posted

Once SoC is supported, adding new boards should be easy. But first, please wait until RK3288 is supported in Armbian.

 

I wonder if the work is necessary because this Board is not  really available. The RK is well supported by Linux and SBCs with Rockchip are the more expansiv ones...

 

But in the End Armbian is a non Profit Thing, so supporting Boards is not depending on econnomic Reasons. :)

Posted

MiQi added to Armbian. What I did:

 

- added kernel 4.4.50 ... took from https://github.com/mqmaker/linux-rockchip(4.4.16) ... and patch all the way up to 4.4.50. 

- added stock MiQi uboot. I tried too merge it with mainline but figured out soon that it's not going to be easy and abandoned that

- added boot scripts with environment file

- packaged kernel, u-boot, ...

- updated kernel config to meet Docker requirements 

- added proper serial console

- tested CLI and desktop build. Both runs smoothly.

Known bugs: random MAC, eMMC install script and boot script need some adjustments

 

Unknown: mali, video accleration librarires, ... etc. most likely those should go: https://github.com/mqmaker/rk-rootfs-build

 

From tomorrow morning, betas will be available here: https://dl.armbian.com/miqi/nightly/

 

armbianmonitor -u
http://sprunge.us/TWMF

Console log:

 

 

-Boot SPL 2016.09-rc1-armbian (Feb 20 2017 - 18:42:37)
Trying to boot from MMC2


U-Boot 2016.09-rc1-armbian (Feb 20 2017 - 18:42:37 +0100)

Model: rk3288-miqi
DRAM:  2 GiB
MMC:   dwmmc@ff0c0000: 0dwmmc@ff0f0000: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
miqi init
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1205 bytes read in 19 ms (61.5 KiB/s)
## Executing script at 00000000
77 bytes read in 16 ms (3.9 KiB/s)
35462 bytes read in 38 ms (911.1 KiB/s)
4678228 bytes read in 370 ms (12.1 MiB/s)
7415848 bytes read in 571 ms (12.4 MiB/s)
## Loading init Ramdisk from Legacy Image at 21000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4678164 Bytes = 4.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Ramdisk to 1fb89000, end 1ffff214 ... OK
   Loading Device Tree to 1fb7d000, end 1fb88a85 ... OK

Starting kernel ...

Loading, please wait...
starting version 229
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Will now check root file system ... fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1 
/dev/mmcblk0p1: clean, 148716/1849536 files, 702155/7658608 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

Welcome to Ubuntu 16.04.2 LTS!

[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on Journal Socket.
         Starting Restore / save the current clock...
         Starting Create list of required st... nodes for the current kernel...
[  OK  ] Listening on udev Control Socket.
         Mounting POSIX Message Queue File System...
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Nameserver information manager...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Remote File Systems (Pre).
         Starting Load Kernel Modules...
         Starting Set console keymap...
[  OK  ] Reached target User and Group Name Lookups.
         Mounting Debug File System...
[  OK  ] Listening on Syslog Socket.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Reached target Remote File Systems.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Started Create list of required sta...ce nodes for the current kernel.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Set console keymap.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Nameserver information manager.
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
         Activating swap /var/swap...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Activated swap /var/swap.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started udev Coldplug all Devices.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
[  OK  ] Reached target Swap.
[  OK  ] Mounted /tmp.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting Journal Service...
[  OK  ] Reached target Local File Systems.
         Starting Armbian enhanced Log2Ram...
         Starting Set console font and keymap...
         Starting Raise network interfaces...
[  OK  ] Started Armbian enhanced Log2Ram.
[  OK  ] Started Journal Service.
[  OK  ] Found device /dev/ttyS2.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Started ifup for eth0.
[  OK  ] Reached target Sound Card.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Reached target System Time Synchronized.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Paths.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started Daily apt activities.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting LSB: No Display Manager...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting LSB: Starts LIRC daemon....
         Starting System Logging Service...
         Starting LSB: Armbian gathering hardware information...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Regular background program processing daemon.
         Starting Network Manager...
         Starting LSB: Start/stop sysstat's sadc...
         Starting Accounts Service...
         Starting Permit User Sessions...
         Starting Login Service...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Save/Restore Sound Card State...
[  OK  ] Started System Logging Service.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Save/Restore Sound Card State.
[  OK  ] Started LSB: No Display Manager.
[  OK  ] Started LSB: Armbian gathering hardware information.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Started LSB: Starts LIRC daemon..
[  OK  ] Started LSB: Start/stop sysstat's sadc.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started Network Manager.
[  OK  ] Started Login Service.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting Network Manager Wait Online...
         Starting Authenticate and Authorize Users to Run Privileged Tasks...
         Starting LSB: set CPUFreq kernel parameters...
         Starting Set console scheme...
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Set console scheme.
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started LSB: set CPUFreq kernel parameters.
[  OK  ] Started Authenticate and Authorize Users to Run Privileged Tasks.
[  OK  ] Started Accounts Service.
         Starting LSB: Set sysfs variables from /etc/sysfs.conf...
         Starting Hostname Service...
[  OK  ] Started Hostname Service.
[  OK  ] Started LSB: Set sysfs variables from /etc/sysfs.conf.
[  OK  ] Started Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
         Starting LSB: Advanced IEEE 802.11 management daemon...
         Starting LSB: disk temperature monitoring daemon...
         Starting /etc/rc.local Compatibility...
         Starting LSB: Start NTP daemon...
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Ubuntu 16.04.2 LTS miqi ttyS2

miqi login:  

 

 

Posted
- fixed eMMC install,
- added development kernel (4.10.x) with MALI driver (untested)
 

Onboard 16GB eMMC media performances - not the top performer but still very decent.

root@miqi: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2

        File stride size set to 17 * record size.
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     2403     2503    12483    12840    10950     2400
          102400      16     8277     8682    26678    26378    24787     8526
          102400     512    26729    27105    40906    40921    40702    27001
          102400    1024    27644    27575    41840    41808    41731    27562
          102400   16384    28077    28056    43618    43609    43589    28147
Posted

Onboard 16GB eMMC media performances - not the top performer but still very decent.

 

Great work, thanks! As a reference eMMC performance numbers done by Jean-Luc months ago:

                                                            random  random
              KB  reclen   write rewrite    read    reread    read   write
          102400       4    3836    3989    13389    13370   10816    3727
          102400      16   14491   14452    28656    27941   25246   13844
          102400     512   30696   30482    50109    50102   49613   30575
          102400    1024   30844   30666    51191    51202   50959   30466
          102400   16384   32673   33962    55222    55213   55158   33856

So maybe it's a different IC now or there's something 'wrong' with settings. Anyway: I hope Peter jumps in and throws some patches at us (those mentioned above from Willy Tarreau and maybe others to get VPU support and so on) 

Posted

Next test was done with mainline kernel 4.10.0 and performance CPU governor, while the one before was done on 4.4.50 with powersave.

                                                              random    random 
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     2527     2558    13977    14042    11684     2457
          102400      16     8800     8918    28143    28229    26319     8692
          102400     512    27341    27273    42205    42257    42042    27342
          102400    1024    27834    28148    42597    42648    42559    27925
          102400   16384    28056    28484    45067    45142    45128    28636

I guess those eMMC chips are simply different, yes.

Posted

Greetings everyone !

 

Concerning the eMMC, note that one of the patches applied to kernel 4.10.0 just mute the eMMC driver, in order to avoid it spamming the logs with

mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)

Discussion about the original patch (not the adaptation) can be found here : http://lists.infradead.org/pipermail/linux-rockchip/2017-January/013621.html

Still, if anyone with DTS knowledge could analyse the DTS files and see if the eMMC drivers are not misconfigured, that would be nice.

 

Also, you could see if trimming affect performances by running fstrim before.

Posted

@Myy

Welcome and thanks for update. At least we have something on the bug list now :)

 

@tkaiser

 

I had no luck ... I started with Ubuntu Xenial and ... lot's of dependencies did not met and at the end Kodi crashed :(

Posted

nice a "new" soc to play with.

 

could someone post the result of :

openssl speed -elapsed -evp bf-cbc aes-128-cbc

 

also i see on cnx rk3288 specs, the following :

 

  • Standalone crypto and decrypto, compatible with AES 128bits/DES/3DES/SHA-1/SHA-256/MD5/160bits PRNG

found some /lib/modules/../kernel/arch/arm/crypto/ modules on the git link posted above.

any trace of crypto engines in armbian's legacy kernel ?

 

maybe some more info in /proc/crypto

 

thx.

Posted

ARMBIAN 5.26 stable Ubuntu 16.04.2 LTS 4.4.51-rockchip  

openssl speed -elapsed -evp bf-cbc aes-128-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-128 cbc for 3s on 16 size blocks: 4194998 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 64 size blocks: 1163073 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 256 size blocks: 302774 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 1024 size blocks: 76480 aes-128 cbc's in 3.00s
Doing aes-128 cbc for 3s on 8192 size blocks: 9587 aes-128 cbc's in 3.00s
Doing bf-cbc for 3s on 16 size blocks: 3308303 bf-cbc's in 3.00s
Doing bf-cbc for 3s on 64 size blocks: 1000628 bf-cbc's in 3.00s
Doing bf-cbc for 3s on 256 size blocks: 263953 bf-cbc's in 3.00s
Doing bf-cbc for 3s on 1024 size blocks: 66903 bf-cbc's in 3.00s
Doing bf-cbc for 3s on 8192 size blocks: 8398 bf-cbc's in 3.00s
OpenSSL 1.0.1t  3 May 2016
built on: Fri Jan 27 00:26:25 2017
options:bn(64,32) rc4(ptr,char) des(idx,cisc,16,long) aes(partial) blowfish(ptr) 
compiler: gcc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128 cbc      22373.32k    24812.22k    25836.71k    26105.17k    26178.90k
bf-cbc           17644.28k    21346.73k    22523.99k    22836.22k    22932.14k
Posted

ARMBIAN 5.26 stable Ubuntu 16.04.2 LTS 4.4.51-rockchip  

openssl speed -elapsed -evp bf-cbc aes-128-cbc
...
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128 cbc      22373.32k    24812.22k    25836.71k    26105.17k    26178.90k
bf-cbc           17644.28k    21346.73k    22523.99k    22836.22k    22932.14k

 

This looks way too low. ODROID-XU4 with A15 @ 2GHz gets almost 4 times better AES scores: http://forum.odroid.com/viewtopic.php?f=93&t=17882&p=170395#p170373

 

Did you check cpufreq in parallel? I wonder whether it would help building OpenSSL from scratch and using 'mcpu=cortex-a17'?

Posted

Yes, you are correct. It was on powersave, those are now on proper speed:  :)

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128 cbc      79215.37k    86050.52k    89357.40k    90211.33k    90456.06k
bf-cbc           50721.71k    57495.64k    59830.53k    60454.91k    60631.72k
Posted

 

Yes, you are correct. It was on powersave, those are now on proper speed:  :)

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
aes-128 cbc      79215.37k    86050.52k    89357.40k    90211.33k    90456.06k
bf-cbc           50721.71k    57495.64k    59830.53k    60454.91k    60631.72k

 

Thank you for the update, so I would assume by manually compiling OpenSSL with CPU specific flags and adding some Willy Tarreau patches (2 GHz instead of 1.8 GHz) MiQi will outperform ODROID XU4 in this area easily :)

 

BTW: Though I know it's somewhat stupid since sysbench sucks. But can you please also post output from the call below:

sysbench --test=cpu --cpu-max-prime=20000 run --num-threads=$(grep -c '^processor' /proc/cpuinfo)

(while checking with 'armbianmonitor -m' whether throttling occured or not and at which clockspeed MiQi finishes).

Posted
sysbench --test=cpu --cpu-max-prime=20000 run --num-threads=$(grep -c '^processor' /proc/cpuinfo)
sysbench 0.4.12:  multi-threaded system evaluation benchmark


Running the test with following options:
Number of threads: 4


Doing CPU performance benchmark


Threads started!
Done.


Maximum prime number checked in CPU test: 20000




Test execution summary:
    total time:                          71.6801s
    total number of events:              10000
    total time taken by event execution: 286.6122
    per-request statistics:
         min:                                 25.38ms
         avg:                                 28.66ms
         max:                                 85.60ms
         approx.  95 percentile:              32.45ms


Threads fairness:
    events (avg/stddev):           2500.0000/6.56
    execution time (avg/stddev):   71.6530/0.02

Where / which 2Ghz patch? ... I can try it later.

 

Just received eMMC for XU4 to try to fix that problem.

Posted

@@Igor

thx for the benchmarks.

 

those figures are quite impressive for a 32bit soc, it's about 20% higher than my s905 for aes-128

 

Could you also post the output of /proc/crypto to see if it uses an accelerated engine ?

 

unfortunately i didn't realize that this rk3288 is not one of the cheap ones, so basically you're up for a 65$ board (+20$ shipping) or a 60e tv box.. the 60$+15$ xu4 looks like a better deal.

 

 

@@tkaiser

so igor's board was running at 1800MHz and watching the patch there's a claim it's stable at 1920MHz, but looking at the table i see that :

static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
+	RK3288_CPUCLK_RATE(2208000000, 1, 3, 1, 3, 3),

so i would also run at 2208MHz ??

 

are those patches specific to the MiQi board, or to the current kernel code published ? (meaning it would apply to any rk3288 board)

thx

Posted

@@tkaiser

so igor's board was running at 1800MHz and watching the patch there's a claim it's stable at 1920MHz, but looking at the table i see that :

static struct rockchip_cpuclk_rate_table rk3288_cpuclk_rates[] __initdata = {
+	RK3288_CPUCLK_RATE(2208000000, 1, 3, 1, 3, 3),

so i would also run at 2208MHz ??

I think commit messages for the patches answer your question: 

http://1wt.eu/miqi/patches-4.9/0007-ARM-dts-rockchip-miqi-add-turbo-mode-operating-point.patch

http://1wt.eu/miqi/patches-4.9/0006-clk-rockchip-add-all-known-operating-points-to-the-a.patch

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines