Open main menu

DAVE Developer's Wiki β

Changes

MISC-TN-008: Running Debian Buster (armbian) on Mito8M

9,419 bytes removed, 16:06, 9 November 2020
no edit summary
{{InfoBoxTop}}
{{AppliesToMito8M}}
{{AppliesToSBCX}}
{{AppliesToSBC Axel TN}}
{{InfoBoxBottom}}
{{WarningMessage|text=This technical note was validated against specific versions of hardware and software. What is described here may not work with other versions.}}
Specifically, it is built upon the [https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i.mx-applications-processors/i.mx-8-processors/i.mx-8m-family-armcortex-a53-cortex-m4-audio-voice-video:i.MX8M NXP i.MX8M] system-on-chip (SoC).
This Technical Note (TN) described describes how to run [https://www.armbian.com Armbian Buster ] distribution on this platform. For the sake of completeness, it is worth remembering that Armbian Buster is based on Debian 10.
==Testbed==To a good extent, '''Mito8M is electrically and mechanically compatible with [[:Category:AxelLite|Axel Lite]]'''. For this reason, the testbed used for this TN is pretty similar to the one described [[SBCX-TN-004:_Running_Armbian_Buster_(Debian_10)|here]]. Even though the SBCX carrier board is designed to host Axel Lite, in fact, '''it supports Mito8M as well'''.
TBD insert picture
[[File:SBCX-Mito8M.jpg|thumb|center|600px|Mito8M SoM on SBCX carrier board]]  Apart from the SoM, the most relevant difference with SBCX-TN_004 TN-004 is related to the root file system. In this case, it was built for the <code>aarch64</code> architecture. The root file system was stored on a partition of the microSD card inserted in the slot J26. This partition is associated with the <code>/dev/mmcblk1p2</code> device file:<pre class="board-terminal">armbian@Mito8M:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTmmcblk0 179:0 0 7.3G 0 disk `-mmcblk0p1 179:1 0 7.3G 0 part mmcblk0boot0 179:32 0 4M 1 disk mmcblk0boot1 179:64 0 4M 1 disk mmcblk0rpmb 179:96 0 4M 0 disk mmcblk1 179:128 0 14.6G 0 disk |-mmcblk1p1 179:129 0 42.9M 0 part `-mmcblk1p2 179:130 0 14.4G 0 part /</pre>
==Bootstrap process==
This section shows the complete bootstrap log retrieved from the serial console. To expand the box, please click on the ''Expand'' link on the top right corner.
<pre class="board-terminal mw-collapsible mw-collapsed">
U-Boot SPL 2018.03-08018-g59e59e6f85-dirty (Nov 29 2019 - 12:42:16 +0100)
Load address: 0x40480000
Loading: #################################################################
################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# #################################################################...
#################################################
1.7 MiB/s
Using ethernet@30be0000 device
TFTP from server 192.168.0.23; our IP address is 192.168.0.81
Filename 'mito/imx8mq-mito.dtb.gc'.
Load address: 0x43000000
Loading: #######
Password:
Last login: Tue Jan 14 16:57:06 CET 2020 on ttymxc0
____ __ __ _ _ ___ __ _ ___ | _ \/ (_)|_ __ ___ / / ( _ )| \/ || |\/| |_) | | '__/ _ \ / _ \ '_ \| |\/| |_| | __/| | | | | __/ (_) |__ (_) | | | ||_| |_|_| |_|\__\___|/ \___/ |_| |_|
Welcome to Armbian buster with Linux 4.14.98-g4c94e1dbaec2
root@Mito8M:~#lscpu</pre>Architecture: aarch64Byte Order: Little Endian==Testbed general configuration==CPU(s): 4This section illustrates the configuration settings common to all the tests performed. ====SoC and SDRAM bank organization===={| class="wikitable"|+!!!Mito8M!|On-| rowspan="2" |SoC|SoC|NXP i.MX8M Quad||line CPU(s) list: 0-3|ARM frequencyThread(s) per core: 1[MHz]|800||-| rowspan="5" |SDRAM|Type|LPDDR4||-|Frequency[MHz]|1600||-|Bus witdth[bit]|32||-|Theoretical bandiwidth[Gb/Core(s]|102.) per socket: 4|Socket(s): 1|-NUMA node(s): 1|Size[MB]|3072|Vendor ID: ARM|} ====Software configuration==== * Linux kernelModel: 4.14.98* ArchitectureModel name: aarch64* Governor: userspace @ 800 MHz<pre class="board Cortex-terminal">A53root@Mito8MStepping:~# echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor r0p4root@Mito8MCPU max MHz:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 1300.0000userspaceroot@Mito8MCPU min MHz:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq800000</pre> GCC 800.0000<pre class="board-terminal">armbian@Mito8MBogoMIPS:~/devel/lmbench$ gcc -vUsing built-in specs 16.66COLLECT_GCC=gccCOLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/8/lto-wrapperTargetL1d cache: aarch64-linux-gnu unknown sizeConfigured withL1i cache: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu unknown sizeThread modelL2 cache: posix unknown sizegcc version 8.3.0 NUMA node0 CPU(Debian 8.3.s): 0-6)</pre>  ==Results==This section details the results that were achieved by the different benchmarks ===General configuration=== ===Testbed #1===3 {| class="wikitable"|+!!!Mito8M!|-||ARM frequency[MHz]|792||-||Frequency[MHz]|1600||-||Bus witdth[bit]|32||} ==Detailed testing procedures==This sections details how the benchmarks were configured and run on the testbed.===STREAM=== ====Building====<pre class="board-terminal">git clone httpsFlags://github.com/jeffhammond/STREAM.gitmake fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
</pre>
 
<syntaxhighlight lang="makefile" line="line">
armbian@Mito8M:~/devel/STREAM$ cat Makefile
CC = gcc
CFLAGS = -O2 -fopenmp
 
FC = gfortran-4.9
FFLAGS = -O2 -fopenmp
 
all: stream_c.exe
 
stream_f.exe: stream.f mysecond.o
$(CC) $(CFLAGS) -c mysecond.c
$(FC) $(FFLAGS) -c stream.f
$(FC) $(FFLAGS) stream.o mysecond.o -o stream_f.exe
 
stream_c.exe: stream.c
$(CC) $(CFLAGS) stream.c -o stream_c.exe
 
clean:
rm -f stream_f.exe stream_c.exe *.o
 
# an example of a more complex build line for the Intel icc compiler
stream.icc: stream.c
icc -O3 -xCORE-AVX2 -ffreestanding -qopenmp -DSTREAM_ARRAY_SIZE=80000000 -DNTIMES=20 stream.c -o stream.omp.AVX2.80M.20x.icc
</syntaxhighlight>
 
====Running====
<pre class="board-terminal">
armbian@Mito8M:~/devel/STREAM$ ./stream_c.exe
-------------------------------------------------------------
STREAM version $Revision: 5.10 $
-------------------------------------------------------------
This system uses 8 bytes per array element.
-------------------------------------------------------------
Array size = 10000000 (elements), Offset = 0 (elements)
Memory per array = 76.3 MiB (= 0.1 GiB).
Total memory required = 228.9 MiB (= 0.2 GiB).
Each kernel will be executed 10 times.
The *best* time for each kernel (excluding the first iteration)
will be used to compute the reported bandwidth.
-------------------------------------------------------------
Number of Threads requested = 4
Number of Threads counted = 4
-------------------------------------------------------------
Your clock granularity/precision appears to be 1 microseconds.
Each test below will take on the order of 46427 microseconds.
(= 46427 clock ticks)
Increase the size of the arrays if this shows that
you are not getting at least 20 clock ticks per test.
-------------------------------------------------------------
WARNING -- The above is only a rough guideline.
For best results, please be sure you know the
precision of your system timer.
-------------------------------------------------------------
Function Best Rate MB/s Avg time Min time Max time
Copy: 6770.5 0.024010 0.023632 0.025117
Scale: 6093.2 0.027474 0.026259 0.029142
Add: 5263.5 0.046008 0.045597 0.046230
Triad: 4820.0 0.050297 0.049793 0.050723
-------------------------------------------------------------
Solution Validates: avg error less than 1.000000e-13 on all three arrays
-------------------------------------------------------------
</pre>
 
==Useful links==
*[https://www.cs.virginia.edu/stream/ STREAM benchmark]
*[http://lmbench.sourceforge.net/ LM Bench benchmark]
*[https://panthema.net/2013/pmbw/ pmbw benchmark ]
*Joshua Wyatt Smith and Andrew Hamilton, [http://inspirehep.net/record/1424637/files/1719033_626-630.pdf Parallel benchmarks for ARM processors in the highenergy context]
*T Wrigley, G Harmsen and B Mellado, [http://inspirehep.net/record/1424631/files/1719033_275-280.pdf Memory performance of ARM processors and itsrelevance to High Energy Physics]
*G. T. Wrigley, R. G. Reed, B. Mellado, [http://inspirehep.net/record/1424637/files/1719033_626-630.pdf Memory benchmarking characterisation of ARM-based SoCs]
8,186
edits