Jump to content

BananaPi R2 (.csc mt7623 as new boardfamily)


Recommended Posts

Posted
On 7/27/2018 at 9:18 AM, frank-w said:

@chwe if you make changes which fixing problems in mainline please send me the patches si can include them in my repo

 

Sure, I stepped down a littlebit with my BPi-R2 testings at the moment. There was/is a patchseries which should make it possible to define multiple CPU ports (https://lore.kernel.org/patchwork/patch/793311/). Unfortunately it never reached Linus tree and the patch doesn't apply at the moment. Maybe I'll have a look into it and see if this enhances the performance. 

Posted

Hello,

 

Add latest U-boot support for MT7623 SoC

 

Status:

I’ve already sent the first round patches for MT7623n,  and the most of the drivers are based on mainline Linux, like clock, timer, mmc, pinctrl, watchdog, power domain and DTS.

 

The following are the major differences between Linux and U-boot:

-modify the driver interface to adapt the U-boot DM framework.

-remove unneeded DT nodes as they don’t have proper drivers in U-boot yet.

-just add the basic functions (step-by-step) so that we can monitor the size.

-reuse ns16550.c but add a highspeed register for MediaTek UARTs.

 

The current progress:

-Boot from eMMC or SD card.

-ROM -> MediaTek preloder -> U-boot -> Linux

 

TODO:

-Ethernet

 

The patch sets:

-https://patchwork.ozlabs.org/project/uboot/list/?series=68601

 

How to build:

-make mt7623n_bpir2_defconfig; make

 

Ryder

Posted

Great work! So we finally will end with upstream u-boot & mainline kernel. :) 

 

Applied patches on top of v2018.11rc1 without any failure. But got some errors during build

scripts/kconfig/conf  --syncconfig Kconfig
.config:1066:warning: override: reassigning to symbol ENV_IS_NOWHERE
.config:1070:warning: override: reassigning to symbol BOOTDELAY
.config:1070:warning: symbol value '' invalid for BOOTDELAY

WARNING: unmet direct dependencies detected for EXT4_WRITE
  Depends on [n]: FS_EXT4 [=n]
  Selected by [y]:
  - ENV_IS_IN_EXT4 [=y] && !CHAIN_OF_TRUST [=n]
#
# configuration written to .config
#

WARNING: unmet direct dependencies detected for EXT4_WRITE
  Depends on [n]: FS_EXT4 [=n]
  Selected by [y]:
  - ENV_IS_IN_EXT4 [=y] && !CHAIN_OF_TRUST [=n]

 

'fixed' by:

diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index a896d6a..642dc9f 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -49,5 +49,7 @@ CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_TIMER=y
 CONFIG_MTK_TIMER=y
 CONFIG_WDT_MTK=y
+CONFIG_FS_EXT4=y
+CONFIG_EXT4_WRITE=y
 CONFIG_LZMA=y
 # CONFIG_EFI_LOADER is not set

so I assume somewhere there's a 'selects' missing somewhere.  :) 

 

gave it a shot:

U-Boot 2018.11-rc1-armbian (Oct 02 2018 - 21:11:30 +0200)

CPU: MediaTek MT7623 E3
DRAM:  2 GiB
MMC:   mmc@11230000: 0, mmc@11240000: 1
Loading Environment from EXT4... 
** Unable to use mmc 0:auto for loading the env **
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.

it will for sure need some adjustments (still the old bootscript from u-boot 2014 etc). I'll keep you updated. @frank-w might be interested as well here. 

Posted

I've seen also post from ryder.lee in bananapi.org-forum for uboot-patches and forked uboot-repo on github for testing it.

 

Have you got it booting a kernel from sd/emmc?

Posted (edited)
15 hours ago, frank-w said:

Have you got it booting a kernel from sd/emmc?

u-boot had to learn bootz and ext commands first. :P 

diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index 642dc9f..ce30e40 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_BOOTMENU=y
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_XIMG is not set
@@ -25,6 +26,8 @@ CONFIG_CMD_READ=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_PING=y
+CONFIG_CMD_EXT4=y		
+CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_EMBED=y

but that's because armbian doesn't use fat for kernel and zImages instead of uImages.. 

Far away from 'automated' but yes boot up isn't much an issue:

Spoiler

 


U-Boot> ext4load mmc 1:1 0x84000000 /boot/zImage
5571072 bytes read in 279 ms (19 MiB/s)
U-Boot> ext4load mmc 1:1 0x86000000 /boot/dtb/mt7623n-bananapi-bpi-r2.dtb
26401 bytes read in 6 ms (4.2 MiB/s)
U-Boot> setenv bootargs earlyprintk root="/dev/mmcblk1p1" rw rootfstype=ext4 rootwait
U-Boot> printenv
baudrate=115200
bootargs=earlyprintk root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait
bootdelay=3
fdt_high=0xac000000
fdtcontroladdr=fffd0fe0
fileaddr=86000000
filesize=6721
loadaddr=0x84000000

Environment size: 193/4092 bytes
U-Boot> bootz 0x84000000 - 0x86000000
Kernel image @ 0x84000000 [ 0x000000 - 0x550200 ]
## Flattened Device Tree blob at 86000000
   Booting using the fdt blob at 0x86000000
   Loading Device Tree to abff6000, end abfff720 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc6-mt7623 (root@Buildmachine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #3 SMP Tue Oct 2 22:20:26 CEST 2018
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bananapi BPI-R2
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0xfb800000
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x468 with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40140 r8192 d21300 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 522751
[    0.000000] Kernel command line: earlyprintk root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2000724K/2097148K available (8192K kernel code, 732K rwdata, 2116K rodata, 1024K init, 289K bss, 30888K reserved, 65536K cma-reserved, 1245180K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 733 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 290 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.007957] Switching to timer-based delay loop, resolution 76ns
[    0.014145] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[    0.023310] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[    0.031772] Console: colour dummy device 80x30
[    0.036189] console [tty0] enabled
[    0.039568] bootconsole [earlycon0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0-rc6-mt7623 (root@Buildmachine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #3 SMP Tue Oct 2 22:20:26 CEST 2018
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bananapi BPI-R2
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0xfb800000
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x468 with crng_init=0
[    0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40140 r8192 d21300 u69632
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 522751
[    0.000000] Kernel command line: earlyprintk root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2000724K/2097148K available (8192K kernel code, 732K rwdata, 2116K rodata, 1024K init, 289K bss, 30888K reserved, 65536K cma-reserved, 1245180K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 733 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 290 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000005] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.007957] Switching to timer-based delay loop, resolution 76ns
[    0.014145] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 147020034397 ns
[    0.023310] sched_clock: 32 bits at 13MHz, resolution 76ns, wraps every 165191050201ns
[    0.031772] Console: colour dummy device 80x30
[    0.036189] console [tty0] enabled
[    0.039568] bootconsole [earlycon0] disabled
[    0.043850] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.043873] pid_max: default: 32768 minimum: 301
[    0.044008] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.044030] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.044524] CPU: Testing write buffer coherency: ok
[    0.044849] CPU0: update cpu_capacity 1024
[    0.044867] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.045388] Setting up static identity map for 0x80100000 - 0x80100060
[    0.045648] rcu: Hierarchical SRCU implementation.
[    0.046613] EFI services will not be available.
[    0.046841] smp: Bringing up secondary CPUs ...
[    0.047304] CPU1: update cpu_capacity 1024
[    0.047311] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.047858] CPU2: update cpu_capacity 1024
[    0.047865] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.048351] CPU3: update cpu_capacity 1024
[    0.048357] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.048447] smp: Brought up 1 node, 4 CPUs
[    0.048507] SMP: Total of 4 processors activated (104.00 BogoMIPS).
[    0.048518] CPU: All CPU(s) started in SVC mode.
[    0.049455] devtmpfs: initialized
[    0.054373] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 3
[    0.054608] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.054641] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.056701] pinctrl core: initialized pinctrl subsystem
[    0.057450] DMI not present or invalid.
[    0.057875] NET: Registered protocol family 16
[    0.059489] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.060604] cpuidle: using governor ladder
[    0.060652] cpuidle: using governor menu
[    0.060857] No ATAGs?
[    0.060976] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.061007] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.061672] Serial: AMBA PL011 UART driver
[    0.131271] vgaarb: loaded
[    0.131544] SCSI subsystem initialized
[    0.131980] usbcore: registered new interface driver usbfs
[    0.132040] usbcore: registered new interface driver hub
[    0.132107] usbcore: registered new device driver usb
[    0.132327] pps_core: LinuxPPS API ver. 1 registered
[    0.132343] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.132375] PTP clock support registered
[    0.132516] EDAC MC: Ver: 3.0.0
[    0.133972] clocksource: Switched to clocksource arch_sys_counter
[    0.178501] NET: Registered protocol family 2
[    0.179108] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.179156] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.179253] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.179371] TCP: Hash tables configured (established 8192 bind 8192)
[    0.179485] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.179544] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.179733] NET: Registered protocol family 1
[    0.180239] RPC: Registered named UNIX socket transport module.
[    0.180266] RPC: Registered udp transport module.
[    0.180279] RPC: Registered tcp transport module.
[    0.180290] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.181807] Initialise system trusted keyrings
[    0.182069] workingset: timestamp_bits=30 max_order=19 bucket_order=0
[    0.187299] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.187968] NFS: Registering the id_resolver key type
[    0.188011] Key type id_resolver registered
[    0.188024] Key type id_legacy registered
[    0.188071] ntfs: driver 2.1.32 [Flags: R/O].
[    0.188513] pstore: using deflate compression
[    0.192003] Key type asymmetric registered
[    0.192032] Asymmetric key parser 'x509' registered
[    0.192094] bounce: pool size: 64 pages
[    0.192151] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.192174] io scheduler noop registered
[    0.192187] io scheduler deadline registered
[    0.192342] io scheduler cfq registered (default)
[    0.192359] io scheduler mq-deadline registered
[    0.192372] io scheduler kyber registered
[    0.247764] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.269790] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 194, base_baud = 1625000) is a ST16650V2
[    0.290826] 11003000.serial: ttyS1 at MMIO 0x11003000 (irq = 195, base_baud = 1625000) is a ST16650V2
[    0.311784] 11004000.serial: ttyS2 at MMIO 0x11004000 (irq = 196, base_baud = 1625000) is a ST16650V2
[    0.991434] console [ttyS2] enabled
[    0.996093] 1100c000.serial: ttyS3 at MMIO 0x1100c000 (irq = 201, base_baud = 17062500) is a MediaTek BTIF
[    1.006270] STMicroelectronics ASC driver initialized
[    1.012216] mtk_rng 1020f000.rng: registered RNG driver
[    1.012372] random: fast init done
[    1.021033] random: crng init done
[    1.027396] brd: module loaded
[    1.037373] loop: module loaded
[    1.041647] mt6323-regulator mt6323-regulator: Chip ID = 0x2023
[    1.057569] libphy: Fixed MDIO Bus: probed
[    1.061757] CAN device driver interface
[    1.088514] libphy: mdio: probed
[    1.091842] mtk_soc_eth 1b100000.ethernet: generated random MAC address 3e:0b:5b:bd:af:15
[    1.100550] mtk_soc_eth 1b100000.ethernet: connected mac 0 to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.111283] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xf0920000, irq 207
[    1.119732] mtk_soc_eth 1b100000.ethernet: generated random MAC address e2:01:0c:a4:c7:e4
[    1.128314] mtk_soc_eth 1b100000.ethernet: connected mac 1 to PHY at fixed-0:01 [uid=00000000, driver=Generic PHY]
[    1.139042] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xf0920000, irq 207
[    1.147970] xhci-mtk 1a1c0000.usb: Linked as a consumer to regulator.3
[    1.154549] xhci-mtk 1a1c0000.usb: Linked as a consumer to regulator.2
[    1.161326] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.166572] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1
[    1.177118] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.186184] xhci-mtk 1a1c0000.usb: irq 204, io mem 0x1a1c0000
[    1.192806] hub 1-0:1.0: USB hub found
[    1.196603] hub 1-0:1.0: 1 port detected
[    1.200842] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    1.206073] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2
[    1.213432] xhci-mtk 1a1c0000.usb: Host supports USB 3.0  SuperSpeed
[    1.219827] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.228462] hub 2-0:1.0: USB hub found
[    1.232226] hub 2-0:1.0: 1 port detected
[    1.236656] xhci-mtk 1a240000.usb: Linked as a consumer to regulator.3
[    1.243216] xhci-mtk 1a240000.usb: Linked as a consumer to regulator.2
[    1.249951] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.255189] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3
[    1.265646] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    1.274721] xhci-mtk 1a240000.usb: irq 205, io mem 0x1a240000
[    1.281256] hub 3-0:1.0: USB hub found
[    1.285061] hub 3-0:1.0: 1 port detected
[    1.289298] xhci-mtk 1a240000.usb: xHCI Host Controller
[    1.294529] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4
[    1.301893] xhci-mtk 1a240000.usb: Host supports USB 3.0  SuperSpeed
[    1.308379] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.317037] hub 4-0:1.0: USB hub found
[    1.320802] hub 4-0:1.0: 1 port detected
[    1.325268] usbcore: registered new interface driver usb-storage
[    1.331436] i2c /dev entries driver
[    1.336536] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    1.344828] cpu cpu0: Linked as a consumer to regulator.4
[    1.350240] cpu cpu0: dummy supplies not allowed for exclusive requests
[    1.358693] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.2
[    1.365272] mtk-msdc 11230000.mmc: Linked as a consumer to regulator.1
[    1.398480] mtk-msdc 11240000.mmc: Got CD GPIO
[    1.403109] mtk-msdc 11240000.mmc: Linked as a consumer to regulator.2
[    1.449534] ledtrig-cpu: registered to indicate activity on CPUs
[    1.460762] usbcore: registered new interface driver usbhid
[    1.466337] usbhid: USB HID core driver
[    1.472945] NET: Registered protocol family 10
[    1.478366] Segment Routing with IPv6
[    1.482066] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.488467] NET: Registered protocol family 17
[    1.492893] can: controller area network core (rev 20170425 abi 9)
[    1.499109] NET: Registered protocol family 29
[    1.503522] can: raw protocol (rev 20170425)
[    1.507774] can: broadcast manager protocol (rev 20170425 t)
[    1.513395] can: netlink gateway (rev 20170425) max_hops=1
[    1.519130] Key type dns_resolver registered
[    1.523465] ThumbEE CPU extension supported.
[    1.527728] Registering SWP/SWPB emulation handler
[    1.532994] Loading compiled-in X.509 certificates
[    1.534415] mmc0: new high speed MMC card at address 0001
[    1.545015] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB 
[    1.551130] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[    1.558611] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
[    1.564716] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB, chardev (242:0)
[    1.598318] mmc1: host does not support reading read-only switch, assuming write-enable
[    1.611422] mmc1: new high speed SDHC card at address aaaa
[    1.618968] mmcblk1: mmc1:aaaa SC16G 14.8 GiB 
[    1.627456]  mmcblk1: p1
[    1.654077] mtk-pcie 1a140000.pcie: Port0 link down
[    1.689518] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00
[    1.695735] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])
[    1.705203] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    1.712046] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.721091] PCI: bus0: Fast back to back transfers disabled
[    1.726711] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.734964] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    1.742004] pci 0000:01:00.0: reg 0x14: initial BAR value 0x00000000 invalid
[    1.749070] pci 0000:01:00.0: reg 0x18: initial BAR value 0x00000000 invalid
[    1.756126] pci 0000:01:00.0: reg 0x1c: initial BAR value 0x00000000 invalid
[    1.763157] pci 0000:01:00.0: reg 0x20: initial BAR value 0x00000000 invalid
[    1.770365] pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5 GT/s x1 link at 0000:00:01.0 (capable of 7.876 Gb/s with 8 GT/s x1 link)
[    1.815393] PCI: bus1: Fast back to back transfers disabled
[    1.820979] pci 0000:00:01.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    1.827747] pci 0000:00:01.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    1.834936] pci 0000:00:01.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    1.841677] pci 0000:00:01.0: BAR 7: assigned [io  0x1000-0x1fff]
[    1.847742] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    1.854923] pci 0000:01:00.0: BAR 5: assigned [mem 0x60000000-0x600001ff]
[    1.861664] pci 0000:01:00.0: BAR 4: assigned [io  0x1000-0x100f]
[    1.867724] pci 0000:01:00.0: BAR 0: assigned [io  0x1010-0x1017]
[    1.873774] pci 0000:01:00.0: BAR 2: assigned [io  0x1018-0x101f]
[    1.879834] pci 0000:01:00.0: BAR 1: assigned [io  0x1020-0x1023]
[    1.885896] pci 0000:01:00.0: BAR 3: assigned [io  0x1024-0x1027]
[    1.891947] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.896885] pci 0000:00:01.0:   bridge window [io  0x1000-0x1fff]
[    1.902934] pci 0000:00:01.0:   bridge window [mem 0x60000000-0x600fffff]
[    1.909681] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    1.917050] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    1.923305] ahci 0000:01:00.0: enabling device (0140 -> 0143)
[    1.929154] ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled
[    1.935789] ahci 0000:01:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl IDE mode
[    1.943741] ahci 0000:01:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs 
[    1.953691] scsi host0: ahci
[    1.957049] scsi host1: ahci
[    1.960067] ata1: SATA max UDMA/133 abar m512@0x60000000 port 0x60000100 irq 219
[    1.967452] ata2: SATA max UDMA/133 abar m512@0x60000000 port 0x60000180 irq 219
[    1.975109] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    1.983319] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    1.991903] hctosys: unable to open rtc device (rtc0)
[    1.997522] vpa: disabling
[    2.000242] vusb: disabling
[    2.003019] vmc: disabling
[    2.005748] vmch: disabling
[    2.008525] vemc3v3: disabling
[    2.011559] vgp1: disabling
[    2.014370] vcamaf: disabling
[    2.304222] ata1: SATA link down (SStatus 0 SControl 300)
[    2.634432] ata2: SATA link down (SStatus 0 SControl 300)
[    2.660811] EXT4-fs (mmcblk1p1): mounted filesystem with writeback data mode. Opts: (null)
[    2.669188] VFS: Mounted root (ext4 filesystem) on device 179:49.
[    2.684793] devtmpfs: mounted
[    2.689240] Freeing unused kernel memory: 1024K
[    2.704491] Run /sbin/init as init process
[    3.145859] systemd[1]: System time before build time, advancing clock.
[    3.185696] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    3.204499] systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 9 (stretch)!

[    3.249162] systemd[1]: Set hostname to <bananapir2>.
[    3.622256] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    3.655962] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    3.694397] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[    3.735642] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    3.775685] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    3.814357] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    3.856282] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on udev Control Socket.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Created slice System Slice.
         Starting Create list of required st…ce nodes for the current kernel...
         Mounting Debug File System...
[  OK  ] Reached target Slices.
         Starting Restore / save the current clock...
         Starting Nameserver information manager...
         Starting Set the console keyboard layout...
         Starting Load Kernel Modules...
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Remount Root and Kernel File Systems...
         Starting Journal Service...
[  OK  ] Mounted Debug File System.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Started Load Kernel Modules.
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Journal Service.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
         Starting udev Coldplug all Devices...
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Mounted /tmp.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
         Starting Armbian ZRAM config...
         Starting Raise network interfaces...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[FAILED] Failed to start Armbian ZRAM config.
See 'systemctl status armbian-zram-config.service' for details.
         Starting Armbian memory supported logging...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/ttyS2.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Armbian memory supported logging.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Reached target System Initialization.
         Starting Armbian hardware optimization...
         Starting Armbian filesystem resize...
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Started Daily apt download activities.
         Starting Armbian hardware monitoring...
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started Armbian hardware optimization.
[  OK  ] Started Armbian hardware monitoring.
[  OK  ] Started Armbian filesystem resize.
[  OK  ] Reached target Basic System.
[  OK  ] Started Regular background program processing daemon.
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting Login Service...
[  OK  ] Started D-Bus System Message Bus.
         Starting Network Manager...
         Starting System Logging Service...
         Starting LSB: Start/stop sysstat's sadc...
[  OK  ] Started Armbian first run tasks.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started System Logging Service.
[  OK  ] Started LSB: Start/stop sysstat's sadc.
[  OK  ] Started Login Service.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started LSB: set CPUFreq kernel parameters.
         Starting LSB: Set sysfs variables from /etc/sysfs.conf...
[  OK  ] Started LSB: Set sysfs variables from /etc/sysfs.conf.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
[  OK  ] Started Unattended Upgrades Shutdown.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
         Starting Network Manager Wait Online...
[  OK  ] Started Permit User Sessions.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
         Starting Hostname Service...
[  OK  ] Started OpenBSD Secure Shell server.
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
         Stopping OpenBSD Secure Shell server...
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Stopping OpenBSD Secure Shell server...
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Starting Network Service...
[  OK  ] Started Network Service.
         Starting Network Name Resolution...
[  OK  ] Started Network Name Resolution.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[  OK  ] Started Network Service.
[FAILED] Failed to start Network Manager Wait Online.
See 'systemctl status NetworkManager-wait-online.service' for details.
[  OK  ] Reached target Network is Online.
         Starting /etc/rc.local Compatibility...
         Starting LSB: Advanced IEEE 802.11 management daemon...
         Starting LSB: Start NTP daemon...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Reached target Login Prompts.
         Starting Authorization Manager...
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started Authorization Manager.
[  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.

Debian GNU/Linux 9 bananapir2 ttyS2

bananapir2 login: root
Password: 
You are required to change your password immediately (root enforced)
Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
 ____                                  ____  _   ____  ____  
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_) |  _ \|___ \ 
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |_) | __) |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| | |  _ < / __/ 
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_| |_| \_\_____|
                                                             

Welcome to ARMBIAN 5.59 user-built Debian GNU/Linux 9 (stretch) 4.19.0-rc6-mt7623   
System load:   0.50 0.21 0.08  	Up time:       1 min		
Memory usage:  3 % of 2018MB 	IP:            
CPU temp:      37°C           	
Usage of /:    6% of 15G    	

[ General system configuration (beta): armbian-config ]

New to Armbian? Check the documentation first: https://docs.armbian.com


Thank you for choosing Armbian! Support: www.armbian.com

Creating a new user account. Press <Ctrl-C> to abort

Please provide a username (eg. your forename): 

was just a quick and dirty test.. :P 

 

you can test it on https://github.com/chwe17/build/tree/mt7623 only dev kernel currently tested (btw. the gmac2 patch should be removed it never worked as expected), next is probably broken at the moment.. 

Edited by Tido
added spoiler, terrible long
Posted
14 hours ago, chwe said:

Great work! So we finally will end with upstream u-boot & mainline kernel. :) 

 

Applied patches on top of v2018.11rc1 without any failure. But got some errors during build


scripts/kconfig/conf  --syncconfig Kconfig
.config:1066:warning: override: reassigning to symbol ENV_IS_NOWHERE
.config:1070:warning: override: reassigning to symbol BOOTDELAY
.config:1070:warning: symbol value '' invalid for BOOTDELAY

WARNING: unmet direct dependencies detected for EXT4_WRITE
  Depends on [n]: FS_EXT4 [=n]
  Selected by [y]:
  - ENV_IS_IN_EXT4 [=y] && !CHAIN_OF_TRUST [=n]
#
# configuration written to .config
#

WARNING: unmet direct dependencies detected for EXT4_WRITE
  Depends on [n]: FS_EXT4 [=n]
  Selected by [y]:
  - ENV_IS_IN_EXT4 [=y] && !CHAIN_OF_TRUST [=n]

 

'fixed' by:


diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index a896d6a..642dc9f 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -49,5 +49,7 @@ CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_TIMER=y
 CONFIG_MTK_TIMER=y
 CONFIG_WDT_MTK=y
+CONFIG_FS_EXT4=y
+CONFIG_EXT4_WRITE=y
 CONFIG_LZMA=y
 # CONFIG_EFI_LOADER is not set

so I assume somewhere there's a 'selects' missing somewhere.  :) 

 

I’ve taken a look at this but couldn't find any build warning on v2018.11 rc1 .

 

Posted

just to clarify from: http://forum.banana-pi.org/t/add-latest-u-boot-support-for-bpi-r2-bpi-r64-not-yet/6938/2 since I'm not registered there and likely I'll not do it in the future. 

Patch one:

13 hours ago, chwe said:

fixed' by:


diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index a896d6a..642dc9f 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -49,5 +49,7 @@ CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_TIMER=y
 CONFIG_MTK_TIMER=y
 CONFIG_WDT_MTK=y
+CONFIG_FS_EXT4=y
+CONFIG_EXT4_WRITE=y
 CONFIG_LZMA=y
 # CONFIG_EFI_LOADER is not set

 

was mandatory otherwise u-boot built with mt7623n_bpir2_defconfig crashed. 

 

12 hours ago, chwe said:

 


diff --git a/configs/mt7623n_bpir2_defconfig b/configs/mt7623n_bpir2_defconfig
index 642dc9f..ce30e40 100644
--- a/configs/mt7623n_bpir2_defconfig
+++ b/configs/mt7623n_bpir2_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_BOOTMENU=y
 # CONFIG_CMD_ELF is not set
 # CONFIG_CMD_XIMG is not set
@@ -25,6 +26,8 @@ CONFIG_CMD_READ=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_PING=y
+CONFIG_CMD_EXT4=y		
+CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_EMBED=y

 

isn't mandatory for u-boot to build, but mandatory for armbian to boot since we don't use FAT partition for Kernels respective we don't use uImages for armhf. To my knowledge, it isn't needed for the 'BPi way' of image creation. 

 

Actually I don't know why CONFIG_FS_EXT4 and CONFIG_EXT4_WRITE are needed for a proper build, but since we need ext4 anyway here.. I don't care much. 

It might be related to https://github.com/armbian/build/blob/4a5325353675de7a7660f7846bb176e1dec6796c/lib/compilation.sh#L149-L158 :) 

Posted
On 10/14/2018 at 7:24 AM, chwe said:

did you ever tried cryptodev for the R2. I think you had to compile openssl as well (as far as I now, there're some issues with openssls cryptodev implementation, but honestly never cared). Just out of curiosity.. :P I only gave it one shot back then cause the board had bigger issues than crypto in those days.

 

Yes, this was my first attempt a lot of time ago.  However, as you describe, things in R2 were very unstable those days.  Also, cryptodev it is not an official part of the Kernel, so I prefer to use AF_ALG. (the only problem with these things is that the documentation it is horrible, inaccurate and incomplete ... you need to catch details from everywhere to understand what to do).  And you are right, it is necessary to recompile openssl for cryptodev ... but also to obtain the AF_ALG openssl driver (in openssl) and the module (for the kernel).  In general, openssl it is not prepared from factory to work with this type of extensions that are very important for some types of hardware as the R2.

 

In fact, AF_ALG works well, just that the corresponding modules are not included by default (I really don't know why).

 

My current efforts are related with why crytposetup can't use AF_ALG without the BPI kernel (there is something with the drivers).  But, although not so fast, LUKS works well on the R2 even without the hardware support.

Posted

I'll split it.. cause IMO we go a way of topic here...  (last post from)

40 minutes ago, malvcr said:

My current efforts are related with why crytposetup can't use AF_ALG without the BPI kernel

 

 

which 'bpi kernel'? the 4.9 bsp, @frank-ws 4.14? If 4.9, well my interest is minor if nobody has a proper patchset for mainline.. I decided shortly after starting that I won't deal with the 4.9 kernel, the whole network part differs from their mainline implementation I had a lot of build errors and a kernel with no git history.. The only thing which looks sane to me is 4.19 (since LTS and support of MT7623 matured a lot.. there were changes in the network related stuff between 4.14 and 4.15 if I've it right in mind and I never want to deal with backports there.. Frank did or tried it and spend a lot of time to provide a kernel based on 4.14 - appreciated but to much efforts needed IMO, honestly the interest here was too low to put much efforts in it. Upstream U-boot needs some adjustments, basically it works/can work (it boots up, but I would need to write a proper bootscript and configure it properly :P), a default network config is there (all RJ45 bridged) MTKs crypto kernelmodules are there. As long as this is a 'one man show' development is slow cause I don't use the R2 productive and I don't have projects which rely on it. It would be nice to separate IoT nodes from the rest of my network (e.g. keep insecure thingies separated).  As long as nobody wants to contribute and test this will be AS IS. I may fix u-boot so that it properly boots into Linux and stick everything to 4.19. Hardware drivers for USB, SATA and network are there.. Wifi won't be there until its manilined (which likely never happens - and my interest in wifi is minor to port it). mPCI 'should' work (e.g. nothing suspicious in dmesg) HDMI is untested. 

Spoiler

 ____                                  ____  _   ____  ____  
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_) |  _ \|___ \ 
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |_) | __) |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| | |  _ < / __/ 
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_| |_| \_\_____|
                                                             

Welcome to ARMBIAN 5.59 user-built Debian GNU/Linux 9 (stretch) 4.19.0-rc6-mt7623   
System load:   0.50 0.21 0.08  	Up time:       1 min		
Memory usage:  3 % of 2018MB 	IP:            
CPU temp:      37°C           	
Usage of /:    6% of 15

 

 

Posted

I am using frank-w 4.14.71 kernel (I had issues with even 4.14.69).  Located in the internal eMMc.

 

Why the R2 and no other machine?  I have several Orange, Raspberry, Banana, Parallella ... Arduino ...

 

The R2 it is not a perfect machine for many cases, but it works well in some applications.  I am trying to work it focused on some basic elements:

 

1) Two SATA ports from factory.

2) 2 GB RAM

3) 5 addressable (more than 100 Mbps) networking ports

4) ARMv7

5) .. maybe, the WIFI part ..

6) Crypto enhancements

7) Local eMMc storage

 

It has other "features", but that is my focus.

 

  • My SATA requirements must be "fast enough".  I could complement the shared SATA channel with a USB3 disk.  I am not really moving huge quantities of data constantly, mainly some data time to time.
  • Memory is important.  SinoVOIP made an R64 machine with only 1GB and I think it was a mistake.
  • You can do many things with those ethernet ports.  If I need a router or a switch I can buy a cheap one ... but when having the type of power this machine has behind, these ports acquire new life and they are not mere data access points.
  • ARM it is powerful, power friendly, complete.  I have been working with Intel and other platforms for decades, but when having ARM I don't need those monsters.  I prefer small well crafted diamonds.
  • WIFI ... it depends if you have the R2 exposed or not.  My environments are usually multi-computer ones and not always you need wireless there.
  • The Crypto part it is VITAL when dealing with secure scenarios.
  • The internal storage is a must.  I can't depend on SD cards; they are very fragile.  Of course, I can't burn the eMMc with swap and other similar things.

 

So ... now the 5 ports can have independent addresses.  Great!!!   But the crypto, sometimes work, sometimes not.  It is slow or fast, it is supported or not.  That part continues being very unstable for me.  In the while, I am working with AF_ALG and whatever the Kernel can bring me, but I think that this would improve in the future.  Can I help with that part?  .... let me know what can I do.  I have several R2 1.1 and 1.2 machines and one of them into production state with a customer.

Posted
17 hours ago, malvcr said:

3) 5 addressable (more than 100 Mbps) networking ports

Do you really achieve it in productive? The few iperf tests I did in the past were rather annoying and sometimes confusing..  See results in this thread..  I would be interested in some 'real' numbers here.

 

17 hours ago, malvcr said:

That part continues being very unstable for me.  In the while, I am working with AF_ALG and whatever the Kernel can bring me, but I think that this would improve in the future.

Crypto 'should' be there with 4.14 but at least with 4.19 there should be an LTS which doesn't need any many backports (except wifi, which I'm not willing to patch in, there's a mPCI slot for those who want wifi on this board and I've a 3T3R wifi card which should run with the brcmsmac driver --> not tested yet!). That's why I decided to drop 4.14 fully. It simply didn't make much sense for me to stick to 4.14 as long as nobody uses it productive (I can fix my mistakes on my own board, so as long as I'm the only user, I don't need an LTS Kernel). I planed to stick stick next to 4.19 and Dev to mainline (cause the kernel isn't patched heavily this is possible, it's unlikely that patches will break that often) in the future.  

 

18 hours ago, malvcr said:

The internal storage is a must.  I can't depend on SD cards; they are very fragile.  Of course, I can't burn the eMMc with swap and other similar things.

never had problems with SD-Cards.. I normally go for the qualitative ones and my SBCs don't get that much hammered (Armbians defaults help here as well). But yeah, It's simply not done yet. Need to be done but it wasn't of high priority yet. 

18 hours ago, malvcr said:

Can I help with that part?  .... let me know what can I do. 

depends on your skills.. (e.g. bash, kernel, u-boot) :P Let me know in which topics you want to dive in and we will find some nice topics to solve. :) Currently 'under construction':

  • upstream u-boot (boots, but not yet automatically fires up the kernel - some parts of armbians buildscript are here in conflict), a recent bootscript is missing after the change to upstream - it worked back then with the 2014 u-boot but it was just a quick and dirty hack - upstream u-boot should be a good point to solve this properly. 
  • 'nand-sata-install' (not touched yet, I assume it will need some tweaking with the boot binaries)
  • thermals & opp (they look rather conservative and go down to 98MHz, first trip starts at 47°C). some testing would be needed if this can be enhanced.
  • testing, testing & testing. I simply have not the time (and spare equipment) to do it on my own (e.g. USB3 is only tested to the point it works, performance is untested, SATA worked back then but the SSD for those tests in now used productive and I don't have them spare just for testing). And I only own a 1.2 board, no idea how they differ. 
  • kernelconfig is 'it works' probably a bunch of stuff is missing yet (crypto stuff 'should' be there)

You've to build images on your own. Armbian doesn't offer Images nor do we offer kernel-updates over the repository (e.g. apt upgrade will only update ubuntu/debian related stuff, no u-boot, no kernel). This won't change in the near future until the bigger issues are solved. I don't prepare a PR of my fork into armbians Repo until I'm confident that the board isn't a 'troublemaker' (e.g. the support efforts for H6 are a nightmare cause it's IMO simply 'not ready yet' - this won't happen with mt7623 :)).  Even when everything is solved I don't guarantee official armbian-support, it's not only my decision and the fact that this is the only board with this SoC makes it a bit 'problematic' as well (support vs. effort to maintain it). But even when not, maintaining it 'out of tree' shouldn't be that hard (e.g. armbians buildscript allows to pack debs for kernel packages - fire up your own aptly or install them with dpkg -i works fine).  My mt7623 branch exists since June and it looks like the first time I've a merge-conflict, quite sure it's a trivial one and it will be fixed over the weekend (without even looking at it, there are only ~2 files where it can be.. :P). For sure it will be more fun if it's not longer a 'one man show'.. :) 

 

 

Posted

OK ... let me check the nand-sata-install first.  I was able to install in the emmc, so I have something to compare with.  Then the kernelconfig, in particular the crypto stuff ( I need to check Armbian style for not to break what can't be broken ).

I don't have experience with the uboot, but let me read a little.  This is an important think to learn :-)

 

 

Posted

I was reading the nand-sata-install script ... it seems very monolithic for me.  I will do something: 

1) Mininum quantity of changes for it to work on the R2 following Armbian standards.

2) A more modular approach to reduce the quantity of changes, make the process more clear and avoid side effects.

 

The second one will be just a "proposal" ... :-)

 

Posted

nice. :)

 

so basically you'll need:

https://github.com/chwe17/build/tree/mt7623

that's the current 'armbian-alike' branch for the BPi-R2. Uboot, I assume you're not familiar enough to boot it manually? Those commands should help:

On 10/2/2018 at 11:18 PM, chwe said:

U-Boot> ext4load mmc 1:1 0x84000000 /boot/zImage 
5571072 bytes read in 279 ms (19 MiB/s) 
U-Boot> ext4load mmc 1:1 0x86000000 /boot/dtb/mt7623n-bananapi-bpi-r2.dtb 
26401 bytes read in 6 ms (4.2 MiB/s) 
U-Boot> setenv bootargs earlyprintk root="/dev/mmcblk1p1" rw rootfstype=ext4 rootwait 
U-Boot> printenv baudrate=115200 bootargs=earlyprintk root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait bootdelay=3 fdt_high=0xac000000 fdtcontroladdr=fffd0fe0 fileaddr=86000000 filesize=6721 loadaddr=0x84000000 Environment size: 193/4092 bytes 
U-Boot> bootz 0x84000000 - 0x86000000
Kernel image @ 0x84000000 [ 0x000000 - 0x550200 ]

 

 

see comment ~10 comments ago (you could also load uInitrd was well, this would give you some freedom during boot - see in the old u-boot where it was hacky but actually working.. ;)https://github.com/chwe17/u-boot-mt/blob/f5916a4c6d0ad8acf0e9b8fe3f649425272f5e6a/include/configs/mt7623-bpi-r2.h#L361-L377).. This can be automated with not much efforts I guess.. but until weekend I won't have time for it.

 

On 10/22/2018 at 3:28 PM, malvcr said:

2) A more modular approach to reduce the quantity of changes, make the process more clear and avoid side effects.

 

 

If you plan to clean-up nand-sata-install, I assume you'll have some friends here, but before you start to do it, you might open a thread in the developers sub-forum or an github issue where you present your work. To make sure the right people read it. They might give you some hints ('clean up' nand-sata was discused quite often, but until now nobody had an idea or enough for a script which works good for all boards - which should be a goal for such a script, you may have a look into this one: https://github.com/armbian/build/pull/1129 it's also slightly touched there...

 

Just let me know when you struggle somewhere. :)  btw. UART access is a must during this stage.

Posted

Thanks for the references ... I am cloning the armbian-alike branch now.

 

Before starting on the developers area I will read a little and to order my mind to define what could be the best approach on this.

 

 

Posted

A question ... after installing and running thee script for compilation, I must choose a machine ... but the R2 it is not there.

 

Did I make a mistake or do I need to follow something special here? ( I suppose I forgot some parameter somewhere ).

 

-- by the way, I have a beautiful Parallella 16 that I wanted to use for neural network processing.  After the R2 I could try it to see how far it is from a normal Armbian distribution.

 

(p.s. I know the P16 was discarded early by somebody in Armbian, although it is a very interesting device)

 

Posted

you've to checkout the mt7623 branch, cause I keep my masters branch similar to armbian, so that I can fetch whenever needed for other features branches. As soon as you build the first time there's file called 'config-default.conf' open it and edit LIB_TAG="mt7623". Then you'll build from this branch. keep in mind, if you create patches or edit stuff in the buildscript, checkout mt7623 as well.. otherwise your changes will be in master..

 

The reason is quite simple.. I also test stuff on other boards, and update my master is a branch as soon as it's not based on armbians master.

Posted

Ready, R2 image built ... this night I will check the image to see how it works.

 

By now, I will check the discussion about the writing to internal storage.

 

Also, before providing any changes, I will triple check.  I know your work it is very important :-)

 

Posted
20 hours ago, malvcr said:

Also, before providing any changes, I will triple check.  I know your work it is very important :-)

mistakes will happen. ;) And it's fine. We both will learn from those mistakes. Cause we work on an features branch more or less independent from Armbians repo, this can not affect the project. We don't crash anything in case something goes wrong. :) I won't yell to you in case a PR breaks things. :P If it happens, let's figure out what's wrong, revert that part and start again. 

Posted

I have been reading the script to write on the disk ... 

 

It really looks as a mixture of attempts.  For example, you have references to A10, A13, A20 and particular directories for them with some data, but the rk3328 it is wired in the script.

 

Also, why the openmediavault it is there?  I know some people at Armbian are very involved on that nice product, but openmediavault it is not Armbian and not always Armbian will be used to install an openmediavault product.

 

The script it is also difficult to follow because of all the wizardry on obtaining bits of information to define what to do and how to do it (in this moment not, but in my future proposal I will deal with this).

 

From my point of view, the right method is to let different parameter files (as was done with A10, A13 or A20), but depending on /etc/armbian-release LINUXFAMILY varible and, without any particular reference to any type of card or SOC inside the script.  Then, the script only would have the generic stuff and every address or particular direction would be in these parameter files.

 

Then there is the openmediavault.  That thing must be out of the script ... maybe within "optional" things that could or not be executed depending if they exist or not.  If you have openmediavault, then you add your sub-scripts, but if you don't have it, why to deal with that?

 

The last thing is about the static list for running services.  In my particular case, my first R2 it is not running these but other services, so that script it is useless.  The running services must be requested to the operating system, they can't be statically specified.  Maybe using lsof or something similar, let me check it ( if this becomes very complicated in the script, I can write some C or C++ tool for that).

 

--

Before making this to run with the R2, let me order it a little.  I don't like to work in a mine-field ;-) ...

 

Posted
20 minutes ago, malvcr said:

Also, why the openmediavault it is there?  I know some people at Armbian are very involved on that nice product, but openmediavault it is not Armbian and not always Armbian will be used to install an openmediavault product.

you mean in customize-image.sh? OMV is there partly as an example how users can write their own customization scripts for Armbian. All official ARM based OMV images (except RPi) are based on Armbian (for RPi it's just a Armbian rootfs). Since all those Images are provided by @tkaiser who's also an Armbian maintainer it's somehow part of Armbian. Keep in mind, customize-image must be called during build, otherwise this stuff doesn't affect the build.

36 minutes ago, malvcr said:

Before making this to run with the R2, let me order it a little.  I don't like to work in a mine-field ;-) ...

if you plan to make major changes to the buildscript, I suggest you try to make them somehow independent from the adjustments for the R2, cause buildscript changes will affect all Armbian builds and we shouldn't mix up board bring up and major buildscript changes too much. Makes it harder to merge in case maintainers have concerns towards the changes you did in the buildscirpt. For sure, there are parts of the buildscirpt which would need some cleaning but those should be besides a board bring up. :)

 

Maybe you open an github issue with the suggested changes on Armbians repo for cleaning the script so that all maintainers can catch those changes.

 

46 minutes ago, malvcr said:

The script it is also difficult to follow because of all the wizardry on obtaining bits of information to define what to do and how to do it (in this moment not, but in my future proposal I will deal with this).

it needs some time, and to be honest I don't understand every part of it in detail. It's also grown over time. The script catches more than 50 boards and sometimes there are for sure better ways to solve it. Just keep in mind it must be working for all boards, not only the R2. :) I don't plan to fork the project. In case something isn't clear from script side, just let me know, I'll try to explain it as best as I can.

Posted
2 hours ago, chwe said:

you mean in customize-image.sh?

Nop ... check /usr/sbin/nand-sata-install.sh

 

Line 19:

[ -f /etc/default/openmediavault ] && echo '/srv/*' >>"${EX_LIST}"

Line 290

Quote

    290         if [ $? -eq 0 -a -f /etc/default/openmediavault ]; then

    291                 echo -e '# >>> [openmediavault]' >> ${TempDir}/rootfs/etc/fstab

    292                 grep ' /srv/' /etc/fstab | while read ; do

    293                         echo "${REPLY}" >> ${TempDir}/rootfs/etc/fstab

    294                         mkdir -p -m700 "${TempDir}/rootfs$(awk -F" " '{print $2}' <<<"${REPLY}")"

    295                 done

    296                 echo -e '# <<< [openmediavault]' >> ${TempDir}/rootfs/etc/fstab

    297         fi

 

That's the main nand-sata-install file without any OMV there.

 

I don't think this is an example as it is an integral part of the script.

 

I agree 100% with you in that major changes on these scripts can't be part of a bring up a particular machine.

 

2 hours ago, chwe said:

I don't plan to fork the project. In case something isn't clear from script side, just let me know, I'll try to explain it as best as I can.

 

Yes, it has no sense to increase complexity on an already complex work.

 

Let me see ... my original plan was minimal changes.  I will work that way for R2, but I will also include the suggestions as a github issue.

There is an extra option.  After these two steps, I can develop a different nand-sata-install system "around" the Armbian base (without changing the already existing one).  If the community thinks it could be useful, it will be there.  In general the worst thing I could do is to promote another "systemd" psychosis .

 

Posted
42 minutes ago, malvcr said:

Nop ... check /usr/sbin/nand-sata-install.sh

okay, but this part of the script gets only called when Armbian is 'converted' to a OMV (which can be done by armbian-config), we had such tweaks in the past also for DietPi (before they dropped images based on Armbian). OMVs storage mounting isn't default of armbian, and if they would call NAND-SATA install it would probably mess with their settings. Bringing up a generic NAND-SATA install would be nice, was discussed quite often but nobody had enough spare time and willingness to write it. ;) likely cause there are so many possibilities depending on the board you have (e.g. most boards can't directly boot from USB, so the bootloader has to stay on SD-Card, some have SPI, some have eMMC) all kind of funny configuration you've to catch. And it needs also to be up-gradable with apt-upgrade cause we deliver u-boot updates via apt...

 

59 minutes ago, malvcr said:

There is an extra option.  After these two steps, I can develop a different nand-sata-install system "around" the Armbian base (without changing the already existing one).  If the community thinks it could be useful, it will be there.  In general the worst thing I could do is to promote another "systemd" psychosis .

if you come up with an idea, and you can show somehow a basic 'concept' which is flexible enough for all kind of boards, I'm quite sure it's getting attention. Nand-sata has one job... so no chance to be a systemD... :lol:

 

Posted

currently applied a ugly hack to my u-boot (https://github.com/chwe17/build/commit/1b60a94e8c625c50da369162344052753ed2e64a). It's nasty, it's not properly solved and I don't like it.. :D But for those don't want to deal with u-boot but get a clue what's working.. The board will boot without manual u-boot hacking.. (e.g. mostly the stuff from my u-boot plumbing work done in the bsp u-boot, it should try to boot from sd card first, and in case there's no SD-Card it should switch to eMMC - untested!)

Spoiler

 


[PLFM] Keep stay in USB Mode
Platform initialization is ok
wait for frequency meter finish, CLK26CALI = 0x81
mt_pll_post_init: mt_get_cpu_freq = 1040000Khz
wait for frequency meter finish, CLK26CALI = 0x90
mt_pll_post_init: mt_get_bus_freq = 273000Khz
wait for frequency meter finish, CLK26CALI = 0x81
mt_pll_post_init: mt_get_mem_freq = 133250Khz
[PWRAP] pwrap_init_preloader
[PWRAP] pwrap_init
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=0,rdata=2D52
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=1,rdata=2D52
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=2,rdata=2D52
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=3,rdata=2D52
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=4 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=5 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=6 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=7 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=8 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=9 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=10 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] pass,index=11 rdata=5AA5
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=12,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=13,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=14,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=15,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=16,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=17,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=18,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=19,rdata=B54B
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=20,rdata=6A97
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=21,rdata=6A97
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=22,rdata=6A97
[PWRAP] _pwrap_init_sistrobe [Read Test] fail,index=23,rdata=6A97
[PWRAP] _pwrap_init_reg_clock
[PMIC_WRAP]wrap_init pass,the return value=0.
[pmic6323_init] Preloader Start..................
[pmic6323_init] PMIC CHIP Code = 0x2023
INT_MISC_CON: 0  TOP_RST_MISC: 0
pl pmic powerkey Press
[pmic6323_init] powerKey = 1
[pmic6323_init] is USB in = 0xB004
[pmic6323_init] Reg[0x11A]=0x1B
pmic setup LED
[pmic6323_init] Done...................
mt7623 disable long press reset ->>>>>
mt7623 disable long press reset <<<<<-
mt7623 VPA supplied by 1.0V to MT7530 ->
mt7623 VPA supplied by 1.0V to MT7530 <-
mt7623 enables RG_VGP1_EN for LCM ->
mt7623 enables RG_VGP1_EN for LCM <-
MT7623 E2 setting =>
MT7623 E2 setting <=
[PLFM] Init I2C: OK(0)
[PLFM] Init PWRAP: OK(0)
[PLFM] Init PMIC: OK(0)
[PLFM] chip[CA00]

[BLDR] [Support SD/eMMC] Build Time: 20170114-170026
==== Dump RGU Reg ========
RGU MODE:     4D
RGU LENGTH:   FFE0
RGU STA:      0
RGU INTERVAL: FFF
RGU SWSYSRST: 0
==== Dump RGU Reg End ====
RGU: g_rgu_satus:0
 mtk_wdt_mode_config  mode value=10, tmp:22000010
PL P ON
WDT does not trigger reboot
RGU mtk_wdt_init:MTK_WDT_DEBUG_CTL(590200F3)
kpd read addr: 0x0040: data:0x4001
Enter mtk_kpd_gpio_set! 
kpd debug column : 0, 0, 0, 0, 0, 0, 0, 0
kpd debug row : 0, 0, 0, 0, 0, 0, 0, 0
after set KP enable: KP_SEL = 0x0 !
MTK_PMIC_RST_KEY is used for this project!
[RTC] get_frequency_meter: input=0x0, ouput=5
[RTC] get_frequency_meter: input=0x0, ouput=3968
[RTC] get_frequency_meter: input=0x0, ouput=5
[RTC] get_frequency_meter: input=0x0, ouput=0
[RTC] get_frequency_meter: input=0x0, ouput=0
[RTC] bbpu = 0x4, con = 0xBFFE
rtc_first_boot_init
[RTC] get_frequency_meter: input=0x0, ouput=5
[RTC] get_frequency_meter: input=0x0, ouput=3967
[RTC] get_frequency_meter: input=0x0, ouput=5
[RTC] get_frequency_meter: input=0x0, ouput=0
[RTC] get_frequency_meter: input=0x0, ouput=0
rtc_2sec_stat_clear
rtc_2sec_reboot_check cali=1536
[RTC] irqsta = 0x0, pdn1 = 0x0, pdn2 = 0x201, spar0 = 0xC0, spar1 = 0x800
[RTC] new_spare0 = 0x0, new_spare1 = 0x1, new_spare2 = 0x1, new_spare3 = 0x1
[RTC] bbpu = 0x4, con = 0x426, cali = 0x600
pl pmic powerkey Press
power key is pressed
[PLFM] Power key boot!
[RTC] rtc_bbpu_power_on done
[EMI] mcp_dram_num:0,discrete_dram_num:1,enable_combo_dis:0
[EMI] PCDDR3
[Check]mt_get_mdl_number 0x0
[EMI] eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[EMI] MDL number = 0
[EMI] emi_set eMMC/NAND ID = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[EMI][Vcore]0x21E=0x48,0x220=0x48
[EMI][Vmem]0x554=0x0
wait for frequency meter finish, CLK26CALI = 0x81
[EMI] PCDDR3 DRAM Clock = 1600012 KHz, MEMPLL MODE = 2 
[EMI] PCDDR3 RXTDN Calibration:
Start REXTDN SW calibration...
drvp=0xC,drvn=0x9
[EMI] pinmux = 4
===============================================================================

        dramc_write_leveling_swcal
===============================================================================
delay  byte0  byte1  byte2  byte3
-----------------------------
0    0    1    1    1    
1    0    1    1    1    
2    0    1    1    1    
3    1    1    1    1    
4    1    1    1    1    
5    1    1    1    1    
6    1    1    1    1    
7    1    1    1    1    
8    1    1    1    1    
9    1    1    1    1    
10    1    1    1    1    
11    1    1    1    1    
12    1    1    1    1    
13    1    1    1    1    
14    1    1    1    1    
15    1    1    1    1    
pass bytecount = 4
byte_i    status    best delay
0    2    3
1    2    0
2    2    0
3    2    0
========================================
[write leveling]DQS: 0x3, DQM: 0x3
[write leveling after remap]DQ byte0 reg: 0x200 val: 0x33330000
[write leveling after remap]DQ byte1 reg: 0x204 val: 0x3333
[write leveling after remap]DQ byte2 reg: 0x208 val: 0x0
[write leveling after remap]DQ byte3 reg: 0x20C val: 0x0
=============================================
X-axis: DQS Gating Window Delay (Fine Scale)
Y-axis: DQS Gating Window Delay (Coarse Scale)
=============================================
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0010:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1
0011:|    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1    1
0012:|    0    0    0    1    1    1    1    1    1    1    1    1    0    0    0    0
0013:|    1    1    1    1    1    1    1    0    0    0    0    0    0    0    0    0
0014:|    1    1    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
Rank 0 coarse tune value selection : 18, 18
18
56
rank 0 coarse = 18
rank 0 fine = 56
00:|    0    0    0    0    0    0    0    0    1    1    1    0
opt_dle value:13
==================================================================
		RX	DQS perbit delay software calibration 
==================================================================
1.0-31 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    0 0 0 0 0 0 0 0 0 0 
10 |    0 0 0 0 0 0 0 0 0 0 
20 |    0 0 0 0 0 0 0 0 0 0 
30 |    0 0 
--------------------------------------
==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =50 DQS1 = 40 DQS2 =50 DQS3 = 44
==================================================================
bit	DQS0	 bit      DQS1     bit     DQS2     bit     DQS3
0  (19~70)44  8  (7~58)32  16  (22~66)44  24  (17~63)40
1  (19~68)43  9  (7~57)32  17  (24~67)45  25  (17~60)38
2  (21~71)46  10  (11~61)36  18  (23~69)46  26  (19~64)41
3  (19~69)44  11  (13~63)38  19  (21~66)43  27  (20~66)43
4  (23~75)49  12  (17~63)40  20  (23~71)47  28  (23~66)44
5  (23~71)47  13  (13~62)37  21  (23~74)48  29  (19~65)42
6  (24~69)46  14  (11~58)34  22  (25~72)48  30  (14~62)38
7  (27~74)50  15  (16~61)38  23  (29~71)50  31  (19~64)41
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    6 7 4 6 1 3 4 0 8 8 
10 |    4 2 0 3 6 2 6 5 4 7 
20 |    3 2 2 0 4 6 3 1 0 2 
30 |    6 3 
==================================================================
*DQIDLY1 = 0x6040706
*DQIDLY2 = 0x40301
*DQIDLY3 = 0x2040808
*DQIDLY4 = 0x2060300
*DQIDLY5 = 0x7040506
*DQIDLY6 = 0x20203
*DQIDLY7 = 0x1030604
*DQIDLY8 = 0x3060200
*DRAMC_R0DELDLY = 0x2C322832

[MEM]CONA:F3A2,conf1:F07486A3
DM4BitMux = 1 
DQSO 0 in TX per-bit = 2 <= DQSO 0 in WL = 3  
DQSO 1 in TX per-bit = 0 <= DQSO 1 in WL = 0  
[Warning] DQSO 2 in TX per-bit = 8 > DQSO 2 in WL = 0  
[Warning] DQSO 3 in TX per-bit = 6 > DQSO 3 in WL = 0  
Tx DQM dly  = 0x122
Tx DQM dly bit4 = 0x0
DRAMC_DQODLY1=12532334h
DRAMC_DQODLY2=25223243h
DRAMC_DQODLY3=100110h
DRAMC_DQODLY4=11003123h
Tx DQ dly bit4 = 0x0
Tx DQS dly = 0x6803
Tx DQS dly bit4 = 0x0
TX Byte0: DQ - 14, DQS - 14. win_sum= 27
TX Byte1: DQ - 19, DQS - 12. win_sum= 30
TX Byte2: DQ - 8, DQS - 22. win_sum= 29
TX Byte3: DQ - 10, DQS - 22. win_sum= 31
DRAMC calibration takes 649781996 CPU cycles

[EMI] DRAMC calibration passed

[MEM] complex R/W mem test pass
0:dram_rank_size:80000000
[Dram_Buffer] dram size:-2147483648 
[Dram_Buffer] structure size: 1725560 
[Dram_Buffer] MAX_TEE_DRAM_SIZE: 0 
Boot from SD Card!!
[PLFM] Init Boot Device: OK(0)

[PART] blksz: 512B
[PART] [0x0000000000000000-0x000000000003FFFF] "PRELOADER" (512 blocks) 
[PART] [0x0000000000000000-0x000000000003FFFF] "MBR" (512 blocks) 
[PART] [0x0000000000040000-0x00000000000BFFFF] "UBOOT" (1024 blocks) 
[PART] [0x00000000000C0000-0x00000000000FFFFF] "CONFIG" (512 blocks) 
[PART] [0x0000000000100000-0x000000000013FFFF] "FACTORY" (512 blocks) 
[PART] [0x0000000000140000-0x000000000213FFFF] "BOOTIMG" (65536 blocks) 
[PART] [0x0000000002140000-0x000000000413FFFF] "RECOVERY" (65536 blocks) 
[PART] [0x0000000004140000-0x000000004413FFFF] "ROOTFS" (2097152 blocks) 
[PART] [0x0000000044140000-0x000001FFC413FFFF] "USER" (-4194304 blocks) 
[platform_vusb_on] PASS
[TOOL] PMIC not dectect usb cable!
[TOOL] <UART> listen  ended, receive size:0!
[TOOL] <UART> wait sync time 150ms->5ms
[TOOL] <UART> receieved data: ()

Device APC domain init setup:

 bootloader load uboot ,the address of uboot is 81E00000 
[PART]partition name UBOOT 
[PART]partition start block 0x200 
[PART]partition size 0x80000 
[PART]partition blks 0x400 
[PART]partition flags 0x0 
[PART]partition name 0x8 
[bean] part->startblk(0x200) bdev->blksz(0x200) part->part_id(8) hdr(0xFFB50000)
[BlkDev.c 101 ]partition block size 0x200 ,blks:0x1DACC00
[BlkDev.c 101 ]partition block erase size 0x200 

[PART] load "UBOOT" from 0x0000000000050000 (dev) to 0x81E00000 (mem) [SUCCESS]
[PART] load speed: 5744KB/s, 300000 bytes, 51ms
[BT_SD_PG] device info 0x8590 0x8A00 0xCB01 0x102
0:dram_rank_size:80000000
[PLFM] md_type[0] = 255 
[PLFM] md_type[1] = 255 

[PLFM] boot reason: 0
[PLFM] boot mode: 0
[PLFM] META COM0: 0
[PLFM] <0xFFB7CC10>: 0x0
[PLFM] boot time: 2932ms
[PLFM] DDR reserve mode: enable = 0, success = 0

[BLDR] jump to 0x81E00000
[BLDR] <0x81E00000>=0xEA0000B8
[BLDR] <0x81E00004>=0xE59FF014


U-Boot 2018.11-rc1-armbian (Nov 04 2018 - 15:46:13 +0100)

CPU: MediaTek MT7623 E3
DRAM:  2 GiB
MMC:   mmc@11230000: 0, mmc@11240000: 1
Loading Environment from EXT4... 
** Unable to use mmc 0:auto for loading the env **
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc1 is current device
801 bytes read in 2 ms (390.6 KiB/s)
Running boot/boot.scr from: mmc 1:1 using boot/boot.scr
## Executing script at 85f80000
25993 bytes read in 6 ms (4.1 MiB/s)
3679647 bytes read in 185 ms (19 MiB/s)
5571072 bytes read in 279 ms (19 MiB/s)
Booting boot/zImage  boot/uInitrd boot/dtb/mt7623n-bananapi-bpi-r2.dtb from: mmc 1:1 using bootargs=initcall_debug console=ttyS2,115200n1 root=/dev/mmcblk1p1 rw rootfstype=ext4 rootwait audit=0 loglevel=1
Kernel image @ 0x82000000 [ 0x000000 - 0x550200 ]
## Loading init Ramdisk from Legacy Image at 86080000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3679583 Bytes = 3.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 86000000
   Booting using the fdt blob at 0x86000000
   Loading Ramdisk to 8fc7d000, end 8ffff55f ... OK
   Loading Device Tree to 8fc73000, end 8fc7c588 ... OK

Starting kernel ...

Loading, please wait...
starting version 232
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 ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/mmcblk1p1] fsck.ext4 -a -C0 /dev/mmcblk1p1 
/dev/mmcblk1p1: clean, 35874/61184 files, 214241/244736 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.

Welcome to Debian GNU/Linux 9 (stretch)!

[  OK  ] Created slice System Slice.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Reached target Swap.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Listening on Journal Socket (/dev/log).
         Mounting Debug File System...
[  OK  ] Listening on Syslog Socket.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Journal Socket.
         Starting Restore / save the current clock...
         Starting Set the console keyboard layout...
         Starting Nameserver information manager...
[  OK  ] Listening on fsck to fsckd communication Socket.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Reached target Remote File Systems.
         Starting Create list of required st…ce nodes for the current kernel...
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Load Kernel Modules...
         Starting Journal Service...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Paths.
[  OK  ] Mounted Debug File System.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started Journal Service.
         Mounting Configuration File System...
         Starting Apply Kernel Variables...
         Starting Create Static Device Nodes in /dev...
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
         Starting udev Coldplug all Devices...
[  OK  ] Mounted Configuration File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Starting udev Kernel Device Manager...
[  OK  ] Mounted /tmp.
[  OK  ] Reached target Local File Systems.
         Starting Armbian ZRAM config...
         Starting Raise network interfaces...
         Starting Set console font and keymap...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/ttyS2.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Armbian ZRAM config.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Starting Armbian memory supported logging...
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Armbian memory supported logging.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
         Starting Armbian hardware optimization...
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
         Starting Armbian hardware monitoring...
         Starting Armbian filesystem resize...
[  OK  ] Started Armbian hardware optimization.
[  OK  ] Started Armbian hardware monitoring.
[  OK  ] Started Armbian filesystem resize.
[  OK  ] Reached target Basic System.
         Starting Login Service...
[  OK  ] Started Armbian first run tasks.
[  OK  ] Created slice system-getty.slice.
         Starting System Logging Service...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
[  OK  ] Started D-Bus System Message Bus.
         Starting Network Manager...
[  OK  ] Started Regular background program processing daemon.
         Starting LSB: Start/stop sysstat's sadc...
[  OK  ] Started System Logging Service.
[  OK  ] Started LSB: Start/stop sysstat's sadc.
[  OK  ] Started Login Service.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
         Starting LSB: set CPUFreq kernel parameters...
[  OK  ] Started LSB: set CPUFreq kernel parameters.
         Starting LSB: Set sysfs variables from /etc/sysfs.conf...
[  OK  ] Started LSB: Set sysfs variables from /etc/sysfs.conf.
[  OK  ] Started Network Manager.
         Starting Network Manager Wait Online...
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started Unattended Upgrades Shutdown.
[  OK  ] Started Permit User Sessions.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
         Starting Hostname Service...
[FAILED] Failed to start Hostname Service.
See 'systemctl status systemd-hostnamed.service' for details.
[  OK  ] Started OpenBSD Secure Shell server.
         Stopping OpenBSD Secure Shell server...
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Stopping OpenBSD Secure Shell server...
[  OK  ] Stopped OpenBSD Secure Shell server.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Starting Network Service...
[  OK  ] Started Network Service.
         Starting Network Name Resolution...
[  OK  ] Started Network Name Resolution.
         Stopping Network Service...
[  OK  ] Stopped Network Service.
         Starting Network Service...
[  OK  ] Started Network Service.
[FAILED] Failed to start Network Manager Wait Online.
See 'systemctl status NetworkManager-wait-online.service' for details.
[  OK  ] Reached target Network is Online.
         Starting LSB: Start NTP daemon...
         Starting /etc/rc.local Compatibility...
         Starting LSB: Advanced IEEE 802.11 management daemon...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS2.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
         Starting Authorization Manager...
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started Authorization Manager.
[  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.

Debian GNU/Linux 9 bananapir2 ttyS2

bananapir2 login: root
Password: 
You are required to change your password immediately (root enforced)
Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
 ____                                  ____  _   ____  ____  
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_) |  _ \|___ \ 
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |_) | __) |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| | |  _ < / __/ 
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_| |_| \_\_____|
                                                             

Welcome to ARMBIAN 5.65 user-built Debian GNU/Linux 9 (stretch) 4.19.0-mt7623   
System load:   0.81 0.28 0.10  	Up time:       1 min		
Memory usage:  3 % of 2018MB 	IP:            
CPU temp:      32°C           	
Usage of /:    6% of 15G    	

[ General system configuration (beta): armbian-config ]

New to Armbian? Check the documentation first: https://docs.armbian.com


Thank you for choosing Armbian! Support: www.armbian.com

Creating a new user account. Press <Ctrl-C> to abort

Please provide a username (eg. your forename): opi
Trying to add user opi
Adding user `opi' ...
Adding new group `opi' (1000) ...
Adding new user `opi' (1000) with group `opi' ...
Creating home directory `/home/opi' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for opi
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y

Dear opi, your account opi has been created and is sudo enabled.
Please use this account for your daily work from now on.

root@bananapir2:~# 

for whatever reason next is broken again... you've to build dev (EXPERT="yes" in config).  But hey, 4.19 fires up.. ;)

 

 ____                                  ____  _   ____  ____  
| __ )  __ _ _ __   __ _ _ __   __ _  |  _ \(_) |  _ \|___ \ 
|  _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | | | |_) | __) |
| |_) | (_| | | | | (_| | | | | (_| | |  __/| | |  _ < / __/ 
|____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_|   |_| |_| \_\_____|
                                                             

Welcome to ARMBIAN 5.65 user-built Debian GNU/Linux 9 (stretch) 4.19.0-mt7623   
System load:   0.07 0.08 0.03  	Up time:       3 min		
Memory usage:  3 % of 2018MB 	IP:            192.168.0.66
CPU temp:      32°C           	
Usage of /:    6% of 15G    	

[ 0 security updates available, 4 updates total: apt upgrade ]
Last check: 2018-11-04 14:58

Last login: Sun Nov  4 14:58:44 2018

network with NetworkD works, rest is untested, but I assume..., well test it on your own.. :D

Posted

network seems to be okay after change the cable:

Testing download speed................................................................................
Download: 383.33 Mbit/s
Testing upload speed....................................................................................................
Upload: 333.16 Mbit/s

I avoid to test iperf.. quite sure it would give me results I can't explain.. :D

Posted

@malvcr just for you I built openssl from git sources... To be clear, I didn't pay much attention towards crypto modules.. So you might have a look into kernelconfig in case something is missing here.. (took quite some time to build it.. :D )

opi@bananapir2:~$ openssl version
OpenSSL 1.1.2-dev
opi@bananapir2:~$ openssl speed -elapsed -evp aes-256-cbc
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 3530174 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 1104523 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 292382 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 74180 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 9312 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 16384 size blocks: 4656 aes-256-cbc's in 3.00s
OpenSSL 1.1.2-dev  xx XXX xxxx
built on: Sun Nov  4 17:26:09 2018 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) idea(int) blowfish(ptr) 
compiler: gcc -fPIC -pthread  -march=armv7-a -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc      18827.59k    23563.16k    24949.93k    25320.11k    25427.97k    25427.97k

and

opi@bananapir2:~$ openssl speed -elapsed -evp aes-256-cbc -engine afalg
engine "afalg" set.
You have chosen to measure elapsed time instead of user CPU time.
Doing aes-256-cbc for 3s on 16 size blocks: 76398 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 80277 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 79181 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 69533 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 34005 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 16384 size blocks: 20658 aes-256-cbc's in 3.00s
OpenSSL 1.1.2-dev  xx XXX xxxx
built on: Sun Nov  4 17:26:09 2018 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) idea(int) blowfish(ptr) 
compiler: gcc -fPIC -pthread  -march=armv7-a -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DNDEBUG
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc        407.46k     1712.58k     6756.78k    23733.93k    92856.32k   112820.22k

just quick and dirty.. had to move libs manually cause I probably did something wrong.. but, seems to 'work' at least similar to your tests.

 

This are numbers without the "elapsed" parameter.

Without AFALG
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc      19085.03k    23572.74k    24949.59k    25405.82k    25430.70k    25438.89k

With AFALG
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc       6201.12k    22069.15k   133717.33k   353167.36k  3962119.31k  3391979.52k

I think CPU is still conservative by default.. and not allowed to clock above 1.3GHz (settings back in the time when I had no idea what works and what not.. :D this might change in the future)

Posted

AF_ALG has some CPU bounded limitations, because there is a big quantity of sequential operations must be performed before asking the "engine" to work each block.  Each time, it is important to fill a control block, to program the "socket" and to provide the IV (Interference Vector), something that usually you only do once when working with software encryption.

So, before 256 bit size, the overhead it is just too much to use AF_ALG.  Let me try something with my own software to encrypt and decrypt some data with different block sizes to compare numbers.  In fact, the problem with openssl is that you can's specify different block sizes when asking for encryption and decryption, so the testing numbers are just "evidence" but without any usage.  You can define different "buffer size", but that it is a different thing.

 

The problem with Cryptodev is that it is not an official kernel component (as AF_ALG).  But this is what we have on Linux.  Maybe a basic and clean encryption library capable of working directly with the hardware could be a better solution, but usually they are very cryptic.  You need some time to figure what is the right way to use them; this happens not only with AF_ALG (with a terribly confusing documentation), but also with Cryptodev, Botan, Openssl ..   what I do is to fight once and then to create my own standard interface.  Then, I just provide the parameters and things work.

 

 

Let me check this part carefully.  It is important, because with the R2 and Sinovoip kernel the AF_ALG didn't work as expected.  The ciphered material was undecipherable (so, something was wrong).  In that case I was forced to work with software encryption.  Then, here, there are two things to do:

 

1) To verify that it works and that it is compatible with any other AES implementation.

2) To check what effect the configuration can have in the algorithm speed.

 

This is important for me ... thanks for the extra test.  When I have something about this I will provide some feedback.  Anyway, let me try my own test also in an H2+ CPU ... it is supposed to work well there.

Posted

There's some cleaning going on (just see the last commits). Currently the board will automatically boot into linux (so you don't have to deal with u-boot atm, it's an ugly hack but it works - didn't had time for a proper solution yet), network (at least on debian stretch) should work without issues. So build default/debian 9 and you should be able to to your tests.. At least for SD-Card boot, eMMC will need some tweaks (binaries e.g. preloader is anyway a mess currently let's see what happens there).. but for testing SD-Card should be fine. I'll give the CPU on demand back..  :PThe throttling points are so conservative.. it shouldn't harm the systems.. Maybe something for the next weekend (BBQ the board a bit to see what's possible in thermals). https://github.com/torvalds/linux/blob/4710e78940d8d957f24b8f085f961f1279f8fbff/arch/arm/boot/dts/mt7623.dtsi#L162-L184

 

1 hour ago, malvcr said:

Let me check this part carefully.  It is important, because with the R2 and Sinovoip kernel the AF_ALG didn't work as expected. 

well it's mainline 4.19.1 if mainline doesn't work.. there's not much I can do.. The kernel is more or less a pure vanilla (expect some wifi drivers, but not for the onboard one.. I'm not willing to patch it into.. send me a PR if you want onboard wifi :lol:)

 

 

Posted

OK, I'm sure I'll find my head on a pike for the question, but, it looks like the hardware is at least acceptably made, correct?  No crazy errata to worry about?  And mainline support is likewise fairly mature for arn ARM SoC, correct?  And since this is a hardware bringup thread, I guess the question could be, is it worth to bring this up?  I see 3 people who can work and support if they are so inclined, and even the Mediatek guy.

 

It's a big question, because Igor does not need anything else to worry about, I'm getting my wind back with Amlogic and Rockchip after a long summer and can't learn another new SoC with all of it's fun oddities, etc.  I honestly don't think we need a new board of different architecture, but a lot of the work has already been done it seems.

 

If you want a laugh: https://www.newegg.com/Product/Product.aspx?Item=9SIAFK56SJ5438

 

BPi might want to check with those guys and see why they are trying to give them a bad name for being 10x more expensive than anyone else... :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines