Jump to content

Armbian customization


chradev

Recommended Posts

Hi to All,

 

I have tested all above staff (SDC/eMMC support/booting and slow Ethernet fix) on U-Boot v2016.01 and v2016.05-rc1.

Tests done are very simple and fast to detect rough defects onlu.

 

The results are:

U-Boot ver.        eMMC support      SDC/eMMC boot       slow Ethernet (Olimex patch)

2015.10             yes                       yes                            fixed (100-150 Mbits/sec do not comply with previous test!!!)

2016.01             yes                       yes                            not fixed (scp speed less than 1 MBytes/sec)

2016.03             Not tested at all. It did not boot on Lime2 (maybe on other A20 boards as well).

v2016.05-rc1     yes                       yes                            fixed (iperf speed 700-900 Mbits/sec)

 

Best regads

Chris

Link to comment
Share on other sites

Hi to All,

 

I decided to continue with my Armbian (5.07 from git) customization effort using latest U-Boot v2016.05-rc1, Kernel 4.5.1.

There you are the messages taken while booting from SD card prepared with 'dd' an without any modifications afterwards.

 

U-Boot:

 

 

U-Boot SPL 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49 +0300) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0 (SD), SUNXI SD/MMC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
SCSI:  Target spinup took 0 ms.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
2466 bytes read in 324 ms (6.8 KiB/s)
## Executing script at 43100000
** File not found /boot/.verbose **
0 bytes read in 215 ms (0 Bytes/s)
30017 bytes read in 1326 ms (21.5 KiB/s)
6019936 bytes read in 601 ms (9.6 MiB/s)
Kernel image @ 0x46000000 [ 0x000000 - 0x5bdb60 ]
## Flattened Device Tree blob at 49000000
   Booting using the fdt blob at 0x49000000
   Using Device Tree in place at 49000000, end 4900a540

Starting kernel ...

 

 

Console:

 

 

Uncompressing Linux... done, booting the kernel.

Welcome to Debian GNU/Linux 8 (jessie)!

         Expecting device dev-ttyS0.device...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Set up automount Arbitrary Executable File Formats F...utomount Point.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Swap.
         Expecting device dev-sda1.device...
         Expecting device dev-sda2.device...
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-systemd\x2dfsck.slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Increase datagram queue length...
         Starting Restore / save the current clock...
         Mounting Debug File System...
         Starting udev Coldplug all Devices...
         Mounting POSIX Message Queue File System...
         Starting Create list of required static device nodes...rrent kernel...
         Starting Load Kernel Modules...
         Starting LSB: Set keymap...
[  OK  ] Reached target Slices.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Started Increase datagram queue length.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Started Create list of required static device nodes ...current kernel.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started LSB: Set keymap.
[  OK  ] Started udev Coldplug all Devices.
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Listening on Syslog Socket.
         Starting Journal Service...
[  OK  ] Started Journal Service.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Started udev Kernel Device Manager.
         Starting Copy rules generated while the root was ro...
         Starting LSB: Set preliminary keymap...
         Starting LSB: Tune IDE hard disks...
[  OK  ] Started Copy rules generated while the root was ro.
[  OK  ] Started LSB: Tune IDE hard disks.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started LSB: Set preliminary keymap.
[  OK  ] Created slice system-ifup.slice.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Found device SPCC_Solid_State_Disk_A20 1.
[  OK  ] Found device SPCC_Solid_State_Disk_A20 2.
         Starting File System Check on /dev/sda2...
         Starting File System Check on /dev/sda1...
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
[    7.859083] systemd-fsck[292]: /dev/sda1: clean, 93/3276800 files, 1327985/13107200 blocks
[  OK  ] Mounted /tmp.
[    7.888425] systemd-fsck[289]: /dev/sda2: clean, 11/387072 files, 60094/1546470 blocks
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started File System Check on /dev/sda2.
[  OK  ] Started File System Check on /dev/sda1.
[  OK  ] Created slice system-systemd\x2drfkill.slice.
         Starting Load/Save RF Kill Switch Status of rfkill0...
         Mounting /media/sda1...
         Mounting /media/sda2...
[  OK  ] Mounted /media/sda1.
[  OK  ] Mounted /media/sda2.
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill0.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting LSB: Raise network interfaces....
[  OK  ] Reached target Remote File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting LSB: Prepare console...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started LSB: Prepare console.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
         Starting LSB: Set console font and keymap...
[  OK  ] Started LSB: Set console font and keymap.
[  OK  ] Started LSB: Raise network interfaces..
         Starting ifup for wlan0...
[  OK  ] Started ifup for wlan0.
         Starting ifup for eth0...
[  OK  ] Started ifup for eth0.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting Entropy daemon using the HAVEGE algorithm...
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting dnsmasq - A lightweight DHCP and caching DNS server...
         Starting Regular background program processing daemon...
[  OK  ] Started Regular background program processing daemon.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Starting A high performance web server and a reverse proxy server...
         Starting /etc/rc.local Compatibility...
         Starting Login Service...
         Starting LSB: Starts LIRC daemon....
         Starting LSB: Start NTP daemon...
         Starting LSB: disk temperature monitoring daemon...
         Starting LSB: Advanced IEEE 802.11 management daemon...
         Starting LSB: Armbian gathering informations about hardware...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting LSB: RPi-Monitor daemon...
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
         Starting System Logging Service...
         Starting Permit User Sessions...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started LSB: Starts LIRC daemon..
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started System Logging Service.
[  OK  ] Started A high performance web server and a reverse proxy server.
[  OK  ] Started dnsmasq - A lightweight DHCP and caching DNS server.
[  OK  ] Started LSB: Advanced IEEE 802.11 management daemon.
[  OK  ] Started Login Service.
[  OK  ] Reached target Host and Network Name Lookups.
         Starting LSB: set CPUFreq kernel parameters...
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  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 LSB: Armbian gathering informations about hardware.

Debian GNU/Linux 8 egpr ttyS0

egpr login: root
Password:
Last login: Wed Apr 20 21:15:41 EEST 2016 on ttyS0
Linux egpr 4.5.1-sunxi #7 SMP Tue Apr 19 18:52:40 EEST 2016 armv7l
 _     _                  ____
| |   (_)_ __ ___   ___  |___ \
| |   | | '_ ` _ \ / _ \   __) |
| |___| | | | | | |  __/  / __/
|_____|_|_| |_| |_|\___| |_____|


Welcome to ARMBIAN Debian GNU/Linux 8 (jessie) 4.5.1-sunxi

System load:   0.23             Up time:       4 min
Memory usage:  7 % of 1001Mb    IP:            192.168.2.1
CPU temp:      37°C             HDD temp:      40°C
Usage of /:    35% of 3.5G      storage/:      9% of 50G        Battery:       100% charged

 

 

dmesg:

 

 

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.5.1-sunxi (root@chr-vm-yocto) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #7 SMP Tue Apr 19 18:52:40 EEST 2016
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (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] Machine model: Olimex A20-OLinuXino-LIME2
[    0.000000] cma: Reserved 16 MiB at 0x7f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] On node 0 totalpages: 262144
[    0.000000] free_area_init_node: node 0, pgdat c0c66b40, node_mem_map ef6f8000
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:31
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] PERCPU: Embedded 13 pages/cpu @ef6c3000 s23168 r8192 d21888 u53248
[    0.000000] pcpu-alloc: s23168 r8192 d21888 u53248 alloc=13*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 root=PARTUUID=0002c29d-01 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    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: 1008872K/1048576K available (9236K kernel code, 664K rwdata, 2164K rodata, 636K init, 308K bss, 23320K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0b2a654   (11402 kB)
      .init : 0xc0b2b000 - 0xc0bca000   ( 636 kB)
      .data : 0xc0bca000 - 0xc0c702a4   ( 665 kB)
       .bss : 0xc0c73000 - 0xc0cc0378   ( 309 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000523] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000771] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns
[    0.000991] Console: colour dummy device 80x30
[    0.001027] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001043] pid_max: default: 32768 minimum: 301
[    0.001212] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001227] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002159] CPU: Testing write buffer coherency: ok
[    0.002225] ftrace: allocating 29016 entries in 86 pages
[    0.052308] /cpus/cpu@0 missing clock-frequency property
[    0.052344] /cpus/cpu@1 missing clock-frequency property
[    0.052360] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.052448] Setting up static identity map for 0x400082c0 - 0x40008318
[    0.054735] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.054845] Brought up 2 CPUs
[    0.054869] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.054876] CPU: All CPU(s) started in HYP mode.
[    0.054881] CPU: Virtualization extensions available.
[    0.055771] devtmpfs: initialized
[    0.065099] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.065543] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.066456] xor: measuring software checksum speed
[    0.161993]    arm4regs  :  1227.600 MB/sec
[    0.262062]    8regs     :   766.000 MB/sec
[    0.362139]    32regs    :   744.800 MB/sec
[    0.462217]    neon      :  1141.200 MB/sec
[    0.462227] xor: using function: arm4regs (1227.600 MB/sec)
[    0.462384] pinctrl core: initialized pinctrl subsystem
[    0.463773] NET: Registered protocol family 16
[    0.465252] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.492300] cpuidle: using governor ladder
[    0.522329] cpuidle: using governor menu
[    0.530238] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.530257] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.702703] raid6: int32x1  gen()   136 MB/s
[    0.872839] raid6: int32x1  xor()   110 MB/s
[    1.043087] raid6: int32x2  gen()   184 MB/s
[    1.213048] raid6: int32x2  xor()   120 MB/s
[    1.383116] raid6: int32x4  gen()   189 MB/s
[    1.553214] raid6: int32x4  xor()   121 MB/s
[    1.723461] raid6: int32x8  gen()   175 MB/s
[    1.893454] raid6: int32x8  xor()   113 MB/s
[    2.063605] raid6: neonx1   gen()   437 MB/s
[    2.233651] raid6: neonx1   xor()   324 MB/s
[    2.403785] raid6: neonx2   gen()   577 MB/s
[    2.573903] raid6: neonx2   xor()   422 MB/s
[    2.744060] raid6: neonx4   gen()   705 MB/s
[    2.914181] raid6: neonx4   xor()   477 MB/s
[    3.084280] raid6: neonx8   gen()   645 MB/s
[    3.254405] raid6: neonx8   xor()   445 MB/s
[    3.254413] raid6: using algorithm neonx4 gen() 705 MB/s
[    3.254420] raid6: .... xor() 477 MB/s, rmw enabled
[    3.254427] raid6: using intx1 recovery algorithm
[    3.254801] reg-fixed-voltage ahci-5v: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/ahci_pwr_pin@1, deferring probe
[    3.254858] reg-fixed-voltage usb0-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_vbus_pin@0, deferring probe
[    3.254895] reg-fixed-voltage usb1-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe
[    3.254930] reg-fixed-voltage usb2-vbus: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe
[    3.257138] SCSI subsystem initialized
[    3.257453] libata version 3.00 loaded.
[    3.257815] usbcore: registered new interface driver usbfs
[    3.257893] usbcore: registered new interface driver hub
[    3.257989] usbcore: registered new device driver usb
[    3.258308] media: Linux media interface: v0.10
[    3.258373] Linux video capture interface: v2.00
[    3.258474] pps_core: LinuxPPS API ver. 1 registered
[    3.258483] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    3.258513] PTP clock support registered
[    3.260314] clocksource: Switched to clocksource arch_sys_counter
[    3.329111] NET: Registered protocol family 2
[    3.329925] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    3.330031] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    3.330159] TCP: Hash tables configured (established 8192 bind 8192)
[    3.330257] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    3.330422] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    3.330741] NET: Registered protocol family 1
[    3.331286] RPC: Registered named UNIX socket transport module.
[    3.331300] RPC: Registered udp transport module.
[    3.331307] RPC: Registered tcp transport module.
[    3.331313] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.332318] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    3.333640] futex hash table entries: 512 (order: 3, 32768 bytes)
[    3.334418] Initialise system trusted keyring
[    3.345211] zbud: loaded
[    3.348557] NFS: Registering the id_resolver key type
[    3.348629] Key type id_resolver registered
[    3.348638] Key type id_legacy registered
[    3.348668] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.348683] Installing knfsd (copyright © 1996 okir@monad.swb.de).
[    3.350504] JFS: nTxBlock = 8009, nTxLock = 64078
[    3.360256] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    3.369067] bounce: pool size: 64 pages
[    3.369421] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    3.369644] io scheduler noop registered
[    3.369664] io scheduler deadline registered
[    3.369730] io scheduler cfq registered (default)
[    3.370209] sun4i-usb-phy 1c13400.phy: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb0_id_detect_pin@0, deferring probe
[    3.373143] sun7i-a20-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    3.446993] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    3.450528] console [ttyS0] disabled
[    3.470759] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 42, base_baud = 1500000) is a U6_16550A
[    3.471285] console [ttyS0] enabled
[    3.476752] brd: module loaded
[    3.485355] loop: module loaded
[    3.487438] sun7i-dwmac 1c50000.ethernet: no regulator found
[    3.487533] sun7i-dwmac 1c50000.ethernet: no reset control found
[    3.487546]  Ring mode enabled
[    3.487553]  No HW DMA feature register supported
[    3.487561]  Normal descriptors
[    3.487567]  TX Checksum insertion supported
[    3.488309] sun7i-dwmac 1c50000.ethernet eth0: No MDIO subnode found
[    3.492035] libphy: stmmac: probed
[    3.492057] eth0: PHY ID 001cc912 at 1 IRQ POLL (stmmac-0:01) active
[    3.492418] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.492435] ehci-platform: EHCI generic platform driver
[    3.492870] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.492915] ohci-platform: OHCI generic platform driver
[    3.493339] usbcore: registered new interface driver usb-storage
[    3.494857] sunxi-rtc 1c20d00.rtc: rtc core: registered rtc-sunxi as rtc0
[    3.494875] sunxi-rtc 1c20d00.rtc: RTC enabled
[    3.494986] i2c /dev entries driver
[    3.496076] axp20x 0-0034: AXP20x variant AXP209 found
[    3.510087] input: axp20x-pek as /devices/platform/soc@01c00000/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[    3.516955] axp20x 0-0034: Battery detection is disabled, enabling
[    3.517691] axp20x 0-0034: Backup (RTC) battery charging is disabled
[    3.517901] axp20x 0-0034: AXP20X driver loaded
[    3.520457] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    3.521930] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    3.560574] sunxi-mmc 1c0f000.mmc: base:0xf0d78000 irq:26
[    3.597575] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.600334] mmc0: new high speed SDHC card at address 0007
[    3.600348] sunxi-mmc 1c11000.mmc: base:0xf0d7c000 irq:27
[    3.601308] mmcblk0: mmc0:0007 SD04G 3.71 GiB
[    3.601323] ledtrig-cpu: registered to indicate activity on CPUs
[    3.601442] hidraw: raw HID events driver © Jiri Kosina
[    3.601676] usbcore: registered new interface driver usbhid
[    3.601688] usbhid: USB HID core driver
[    3.602856]  mmcblk0: p1
[    3.603008] Initializing XFRM netlink socket
[    3.604429] NET: Registered protocol family 10
[    3.605723] NET: Registered protocol family 17
[    3.605779] NET: Registered protocol family 15
[    3.605849] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    3.605950] 8021q: 802.1Q VLAN Support v1.8
[    3.606028] Key type dns_resolver registered
[    3.606706] Registering SWP/SWPB emulation handler
[    3.610751] registered taskstats version 1
[    3.610786] Loading compiled-in X.509 certificates
[    3.610919] zswap: loaded using pool lzo/zbud
[    3.611343] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[    3.614015] Btrfs loaded
[    3.615684] Key type encrypted registered
[    3.616352] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.617216] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.618073] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.618926] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.674239] mmc1: MAN_BKOPS_EN bit is not set
[    3.680386] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[    3.680441] ahci-sunxi 1c18000.sata: SSS flag set, parallel bus scan disabled
[    3.680473] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    3.680489] ahci-sunxi 1c18000.sata: flags: ncq sntf stag pm led clo only pio slum part ccc
[    3.681523] mmc1: new high speed MMC card at address 0001
[    3.682302] scsi host0: ahci-sunxi
[    3.682733] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 32
[    3.683262] ehci-platform 1c14000.usb: EHCI Host Controller
[    3.683314] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    3.683599] ehci-platform 1c14000.usb: irq 29, io mem 0x01c14000
[    3.683688] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[    3.684217] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[    3.684649] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[    3.685914]  mmcblk1: p1
[    3.700340] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    3.700696] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.700711] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.700721] usb usb1: Product: EHCI Host Controller
[    3.700730] usb usb1: Manufacturer: Linux 4.5.1-sunxi ehci_hcd
[    3.700739] usb usb1: SerialNumber: 1c14000.usb
[    3.701607] hub 1-0:1.0: USB hub found
[    3.701703] hub 1-0:1.0: 1 port detected
[    3.702632] ehci-platform 1c1c000.usb: EHCI Host Controller
[    3.702680] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    3.702971] ehci-platform 1c1c000.usb: irq 33, io mem 0x01c1c000
[    3.720320] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    3.720654] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    3.720669] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.720679] usb usb2: Product: EHCI Host Controller
[    3.720688] usb usb2: Manufacturer: Linux 4.5.1-sunxi ehci_hcd
[    3.720698] usb usb2: SerialNumber: 1c1c000.usb
[    3.721497] hub 2-0:1.0: USB hub found
[    3.721573] hub 2-0:1.0: 1 port detected
[    3.722460] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    3.722509] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    3.722745] ohci-platform 1c14400.usb: irq 30, io mem 0x01c14400
[    3.784653] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001
[    3.784670] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.784681] usb usb3: Product: Generic Platform OHCI controller
[    3.784691] usb usb3: Manufacturer: Linux 4.5.1-sunxi ohci_hcd
[    3.784700] usb usb3: SerialNumber: 1c14400.usb
[    3.785509] hub 3-0:1.0: USB hub found
[    3.785591] hub 3-0:1.0: 1 port detected
[    3.786512] ohci-platform 1c1c400.usb: Generic Platform OHCI controller
[    3.786557] ohci-platform 1c1c400.usb: new USB bus registered, assigned bus number 4
[    3.786780] ohci-platform 1c1c400.usb: irq 34, io mem 0x01c1c400
[    3.844621] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001
[    3.844638] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.844649] usb usb4: Product: Generic Platform OHCI controller
[    3.844658] usb usb4: Manufacturer: Linux 4.5.1-sunxi ohci_hcd
[    3.844668] usb usb4: SerialNumber: 1c1c400.usb
[    3.845529] hub 4-0:1.0: USB hub found
[    3.845614] hub 4-0:1.0: 1 port detected
[    3.846628] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    3.847198] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    3.847221] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[    3.847617] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002
[    3.847633] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.847643] usb usb5: Product: MUSB HDRC host driver
[    3.847652] usb usb5: Manufacturer: Linux 4.5.1-sunxi musb-hcd
[    3.847661] usb usb5: SerialNumber: musb-hdrc.1.auto
[    3.848490] hub 5-0:1.0: USB hub found
[    3.848574] hub 5-0:1.0: 1 port detected
[    3.877186] vcc3v0: disabling
[    3.877222] vcc5v0: disabling
[    3.877243] usb0-vbus: disabling
[    4.001879] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    4.002106] ata1.00: ATA-9: SPCC Solid State Disk A20, SVN137a, max UDMA/133
[    4.002119] ata1.00: 117231408 sectors, multi 16: LBA48 NCQ (depth 31/32)
[    4.002399] ata1.00: configured for UDMA/133
[    4.003232] scsi 0:0:0:0: Direct-Access     ATA      SPCC Solid State 37a  PQ: 0 ANSI: 5
[    4.020354] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.040326] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    4.061220] sd 0:0:0:0: [sda] 117231408 512-byte logical blocks: (60.0 GB/55.9 GiB)
[    4.061576] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.061899] sd 0:0:0:0: [sda] Write Protect is off
[    4.061919] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    4.062086] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.063693]  sda: sda1 sda2
[    4.065548] sd 0:0:0:0: [sda] Attached SCSI disk
[    4.078964] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
[    4.079042] VFS: Mounted root (ext4 filesystem) readonly on device 179:1.
[    4.086028] devtmpfs: mounted
[    4.086765] Freeing unused kernel memory: 636K (c0b2b000 - c0bca000)
[    4.188455] usb 1-1: New USB device found, idVendor=148f, idProduct=5370
[    4.188479] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.188490] usb 1-1: Product: 802.11 n WLAN
[    4.188498] usb 1-1: Manufacturer: Ralink
[    4.188508] usb 1-1: SerialNumber: 1.0
[    4.203711] usb 2-1: New USB device found, idVendor=0b95, idProduct=772b
[    4.203735] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.203746] usb 2-1: Product: AX88772B
[    4.203755] usb 2-1: Manufacturer: ASIX Elec. Corp.
[    4.203764] usb 2-1: SerialNumber: 000001
[    4.378219] random: systemd urandom read with 11 bits of entropy available
[    4.384460] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[    4.384872] systemd[1]: Detected architecture 'arm'.
[    4.432355] systemd[1]: Set hostname to <egpr>.
[    4.862200] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[    4.865516] systemd[1]: Expecting device dev-ttyS0.device...
[    4.880604] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    4.880998] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    4.881103] systemd[1]: Starting Remote File Systems (Pre).
[    4.900500] systemd[1]: Reached target Remote File Systems (Pre).
[    4.900762] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[    4.920522] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    4.920736] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch.
[    4.921058] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    4.921140] systemd[1]: Starting Paths.
[    4.940490] systemd[1]: Reached target Paths.
[    4.940596] systemd[1]: Starting Encrypted Volumes.
[    4.960463] systemd[1]: Reached target Encrypted Volumes.
[    4.960565] systemd[1]: Starting Swap.
[    4.980450] systemd[1]: Reached target Swap.
[    4.980553] systemd[1]: Expecting device dev-sda1.device...
[    5.000465] systemd[1]: Expecting device dev-sda2.device...
[    5.020473] systemd[1]: Starting Root Slice.
[    5.040456] systemd[1]: Created slice Root Slice.
[    5.040565] systemd[1]: Starting User and Session Slice.
[    5.060471] systemd[1]: Created slice User and Session Slice.
[    5.060578] systemd[1]: Starting Delayed Shutdown Socket.
[    5.080478] systemd[1]: Listening on Delayed Shutdown Socket.
[    5.080585] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[    5.100473] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    5.100584] systemd[1]: Starting Journal Socket (/dev/log).
[    5.120466] systemd[1]: Listening on Journal Socket (/dev/log).
[    5.120626] systemd[1]: Starting udev Control Socket.
[    5.140474] systemd[1]: Listening on udev Control Socket.
[    5.140619] systemd[1]: Starting udev Kernel Socket.
[    5.160468] systemd[1]: Listening on udev Kernel Socket.
[    5.160616] systemd[1]: Starting Journal Socket.
[    5.180471] systemd[1]: Listening on Journal Socket.
[    5.180699] systemd[1]: Starting System Slice.
[    5.200487] systemd[1]: Created slice System Slice.
[    5.200636] systemd[1]: Starting system-systemd\x2dfsck.slice.
[    5.220496] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    5.220619] systemd[1]: Starting system-getty.slice.
[    5.240488] systemd[1]: Created slice system-getty.slice.
[    5.240599] systemd[1]: Starting system-serial\x2dgetty.slice.
[    5.260488] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    5.260721] systemd[1]: Starting Increase datagram queue length...
[    5.311248] systemd[1]: Starting Restore / save the current clock...
[    5.348903] systemd[1]: Started Set Up Additional Binary Formats.
[    5.349564] systemd[1]: Mounting Debug File System...
[    5.363782] systemd[1]: Starting udev Coldplug all Devices...
[    5.384487] systemd[1]: Mounting POSIX Message Queue File System...
[    5.404652] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[    5.440825] systemd[1]: Starting Load Kernel Modules...
[    5.464767] systemd[1]: Mounted Huge Pages File System.
[    5.464959] systemd[1]: Starting LSB: Set keymap...
[    5.483953] systemd[1]: Starting Slices.
[    5.493834] fuse init (API version 7.24)
[    5.500596] systemd[1]: Reached target Slices.
[    5.517717] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    5.520669] systemd[1]: Mounted POSIX Message Queue File System.
[    5.540544] systemd[1]: Mounted Debug File System.
[    5.560548] systemd[1]: Started Increase datagram queue length.
[    5.580526] systemd[1]: Started Restore / save the current clock.
[    5.640738] systemd[1]: Started Create list of required static device nodes for the current kernel.
[    5.660711] systemd[1]: Started Load Kernel Modules.
[    5.680713] systemd[1]: Started LSB: Set keymap.
[    5.684003] systemd[1]: Time has been changed
[    5.770535] systemd[1]: Started udev Coldplug all Devices.
[    5.841146] systemd[1]: Mounting FUSE Control File System...
[    5.890865] systemd[1]: Starting Apply Kernel Variables...
[    5.914542] systemd[1]: Mounted Configuration File System.
[    5.915111] systemd[1]: Starting Create Static Device Nodes in /dev...
[    5.944173] systemd[1]: Starting Syslog Socket.
[    5.960607] systemd[1]: Listening on Syslog Socket.
[    5.960817] systemd[1]: Starting Journal Service...
[    6.000682] systemd[1]: Started Journal Service.
[    6.182969] systemd-udevd[171]: starting version 215
[    6.877493] sun4i-ss 1c15000.crypto-engine: no reset control found
[    6.879061] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    7.520475] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[    7.661355] random: nonblocking pool is initialized
[    7.683050] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[    7.702339] EXT4-fs (mmcblk0p1): re-mounted. Opts: data=writeback,commit=600,errors=remount-ro
[    7.721955] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[    7.723437] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    7.725550] usbcore: registered new interface driver rt2800usb
[    8.086224] asix 2-1:1.0 eth1: register 'asix' at usb-1c1c000.usb-1, ASIX AX88772B USB 2.0 Ethernet, 00:80:80:8a:61:5f
[    8.086471] usbcore: registered new interface driver asix
[    8.950545] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: errors=remount-ro
[    8.976112] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: errors=remount-ro
[    9.341384] systemd-journald[169]: Received request to flush runtime journal from PID 1
[   13.002266] ip_tables: © 2000-2006 Netfilter Core Team
[   13.035192] nf_conntrack version 0.5.0 (16029 buckets, 64116 max)
[   14.131704]  RX IPC Checksum Offload disabled
[   14.131743]  No MAC Management Counters available
[   14.132074] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.120756] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   19.120865] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   26.631863] device eth1 entered promiscuous mode
[   27.508083] IPv6: ADDRCONF(NETDEV_UP): br0: link is not ready
[   72.614739] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   72.618421] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.33
[   75.053293] device wlan0 entered promiscuous mode
[   75.651699] br0: port 2(wlan0) entered forwarding state
[   75.651834] br0: port 2(wlan0) entered forwarding state
[   75.652114] IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
[   90.660322] br0: port 2(wlan0) entered forwarding state

 

 

In addition to A20-Olimexino-Lime2-eMMC (HW rev. E) board there are:

In addition to the standard Armbian staff following packages are installed and configured at build time:

mc pmount dnsutils dnsmasq nginx-full

Additional packages installed from none Debian sites:

  • Node.JS (v. 4.4.3) incl. a few npm packages - at build time from customization script
  • PRI Monitor v. 2.10 - at first run

PRI Monitor is also customized to work with A20/AXP209 and integrated in nginx web server based on Armbian forums.

System is configured to boot from either eMMC or SD card if present. SSD has 2 EXT4 partitions for data and system.

Network configuration is like a router with WAN on native Ethernet interface and LAN on USB-LAN and USB-WiFi adapters in bridge.

DHCP and DNS services are accessible only from LAN while and web one from both interfaces. Iptables is used to manage network access.

 

Total power consumption (in idle state) is 470mA@5.25V and 240mA@5.18V passes through PMU up to maximal 9.2W (DC-IN) and 6.7W (PMU).

The most power hungry devices are USB-LAN adapter (more than 160mA) and GBit ethernet PHY (more than 60mA) in system idle state.

CPU and PMU temperatures measered at open box was 43.5°C/26.5°C (in idle) up to 58.2°C/58.2°C (at extreem load incl. battery charge).

 

No system hangs are observed except in closed box case with system load (not always maximal).

The best performance results measured (with U-Boot 2015.10 and Kernel 4.4.6) are:

  • 980Mbps GBit LAN throughput
  • 48/90 MB/s SSD R/W speed
  • 10 hours (all HW staff) and 16 hours (without USB-LAN) life on battery in idle state

 

It will be nice if somebody while looking around catch some unusual case or problem and share it or any thought.

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

Trying to unify booting process with searching for bootable device in given order I take from U-Boot its environment variables:

 

 

=> printenv
baudrate=115200
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; bootefi ${kernel_addr_r}
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 mmc1 scsi0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_scsi0=setenv devnum 0; run scsi_boot
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootm_size=0xa000000
console=ttyS0,115200
dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
ethaddr=02:c2:05:c2:e6:5f
fdt_addr_r=0x43000000
fdtcontroladdr=7af31980
fdtfile=sun7i-a20-olinuxino-lime2.dtb
kernel_addr_r=0x42000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${fdtfile}; fdt addr ${fdt_addr_r}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
pxefile_addr_r=0x43200000
ramdisk_addr_r=0x43300000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi;
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x43100000
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
serial#=165166c205c2e65f
stderr=serial,vga
stdin=serial,usbkbd
stdout=serial,vga
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 3482/131068 bytes

 

 

and seamed to have everything for what I am needing of.

Only priority list has to be modified after my wishes:

boot_targets=scsi0 usb0 usb1 fel mmc0 mmc2 pxe dhcp

On the other hand I found following script:

part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait

if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then
  if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
    if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
      bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
    else
      bootz ${kernel_addr_r} - ${fdt_addr_r};
    fi;
  fi;
fi

if load ${devtype} ${devnum}:${bootpart} 0x48000000 /boot/uImage; then
  if load ${devtype} ${devnum}:${bootpart} 0x43000000 /boot/script.bin; then
    setenv bootm_boot_mode sec;
    bootm 0x48000000;
  fi;
fi

Having everything to recognize and boot Linux Kernel with or without initram. Even will do it by PARTUUID

 

Of course some more parameters to kernel command line have to be added but the main functionality looks for me o.k.

 

Any thoughts?

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

After adjusting of boot script and some experiments I succeed to unify the boot from SATA, USB, SDC and eMMC (in that order)

The boot script is:

if load ${devtype} ${devnum}:${distro_bootpart} 0x00000000 /boot/.verbose; then setenv verbosity 7; else setenv verbosity 1; fi
part uuid ${devtype} ${devnum}:${distro_bootpart} uuid
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait loglevel=${verbosity} ${extended_bootargs}

if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/zImage; then
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtb/${fdtfile}; then
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
      bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
    else
      bootz ${kernel_addr_r} - ${fdt_addr_r};
    fi;
  fi;
fi

if load ${devtype} ${devnum}:${distro_bootpart} 0x48000000 /boot/uImage; then
  if load ${devtype} ${devnum}:${distro_bootpart} 0x43000000 /boot/script.bin; then
    setenv bootm_boot_mode sec;
    bootm 0x48000000;
  fi;
fi
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

On eMMC and SD cards modify following / add variables:

from: boot_targets=fel mmc0 mmc1 scsi0 usb0 pxe dhcp
to  : boot_targets=scsi0 usb0 fel mmc0 mmc2 pxe dhcp
new : extended_bootargs ....

where 'fel' is responsible to chose whether to boot from SD/MMC or eMMC.

 

Preparation of boot device / partition(s) includes:

  • fdisk /dev/sdX
    • delete old partitions
    • make new partition(s)
    • make boot the bootable partition (very important)
    • only one partition can be bootable or firs one will be booted from
  • use rsync or other method to copy files to newly created boot partition
  • if use 'dd' to clone disk
    • use fdisk /dev/sdX to
      • make the boot bootable partition (very important)
      • change the disk identifier
    • change boot partition UUID: tune2fs /dev/sdb1 -U 'uuidgen'
  • adjust /etc/fstab to correspond with device will be installed as '/' (UUID can be used as well)
  • for disabling to boot from given USB or SATA device partition make it none bootable

U-Boot messages at booting from eMMC:

 

 

U-Boot SPL 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC2


U-Boot 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49 +0300) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 1, SUNXI SD/MMC: 0 (eMMC)
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
SCSI:  SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1104 bytes read in 302 ms (2.9 KiB/s)
## Executing script at 43100000
0 bytes read in 262 ms (0 Bytes/s)
6019936 bytes read in 576 ms (10 MiB/s)
30017 bytes read in 1134 ms (25.4 KiB/s)
** File not found /boot/initramfs-linux.img **
Kernel image @ 0x42000000 [ 0x000000 - 0x5bdb60 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Device Tree to 49ff5000, end 49fff540 ... OK

Starting kernel ...

 

 

U-Boot messages at booting from SD/MMC device:

 

 

U-Boot SPL 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49 +0300) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0 (SD), SUNXI SD/MMC: 1
In:    serial
Out:   serial
Err:   serial
SCSI:  Target spinup took 0 ms.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net:   eth0: ethernet@01c50000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: SPCC Solid State Rev: SVN1
            Type: Hard Disk
            Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)
Found 1 device(s).

SCSI device 0:
    Device 0: (0:0) Vendor: ATA Prod.: SPCC Solid State Rev: SVN1
            Type: Hard Disk
            Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)
... is now current device
Scanning scsi 0:1...

USB device 0: unknown device
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
1104 bytes read in 335 ms (2.9 KiB/s)
## Executing script at 43100000
195 bytes read in 294 ms (0 Bytes/s)
6019936 bytes read in 602 ms (9.5 MiB/s)
30017 bytes read in 1325 ms (21.5 KiB/s)
** File not found /boot/initramfs-linux.img **
Kernel image @ 0x42000000 [ 0x000000 - 0x5bdb60 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Device Tree to 49ff5000, end 49fff540 ... OK

Starting kernel ...

 

 

U-Boot messages at booting from USB Flash device:

 

 

 

 

 

U-Boot messages at booting from SATA SSD device:

 

 

U-Boot SPL 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2016.05-rc1-armbian (Apr 20 2016 - 09:13:49 +0300) Allwinner Technology

CPU: Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C: ready
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0 (SD), SUNXI SD/MMC: 1
In: serial
Out: serial
Err: serial
SCSI: Target spinup took 0 ms.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net: eth0: ethernet@01c50000
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
USB2: USB EHCI 1.00
USB3: USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
Hit any key to stop autoboot: 0
scanning bus for devices...
Device 0: (0:0) Vendor: ATA Prod.: SPCC Solid State Rev: SVN1
Type: Hard Disk
Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)
Found 1 device(s).

SCSI device 0:
Device 0: (0:0) Vendor: ATA Prod.: SPCC Solid State Rev: SVN1
Type: Hard Disk
Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)
... is now current device
Scanning scsi 0:2...
Found U-Boot script /boot/boot.scr
1104 bytes read in 37 ms (28.3 KiB/s)
## Executing script at 43100000
** File not found /boot/.verbose **
6019936 bytes read in 188 ms (30.5 MiB/s)
30017 bytes read in 228 ms (127.9 KiB/s)
** File not found /boot/initramfs-linux.img **
Kernel image @ 0x42000000 [ 0x000000 - 0x5bdb60 ]
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Loading Device Tree to 49ff5000, end 49fff540 ... OK

Starting kernel ...

 

 

 

Not clear for now or not working as expected:

  • How to write environment variables to the Armbian image at the build process
  • /etc/fstab record of '/' as /dev/mmcblk0p1 in case of swapping eMMC and SD/MMC device order
    could be committed or the only way is to use partition UUID
  • If partition UUID has to be used for /etc/fstab record of '/' should it be written at build time
  • resize of partition if USB (maybe SATA as well) disk is prepared with 'dd' does not happen

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

While testing boot from different devices I found that U-Boot 2016-05-rc1 cannot write to eMMC.

After modifying environment variably command 'saveenv' fail and data was not written to eMMC.

The same case for SD/MMC is finished successfully.

 

Any ideas where to search and how to fix the problem?

 

Best ragards

Chris

Link to comment
Share on other sites

Because of problem to save environment variables to eMMC at run-time or to modify them and save at build time I prepare a patch for modifying the order of boot targets as follow:

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 8f11eb9..ac8ae47 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -465,11 +465,11 @@ extern int soft_i2c_gpio_scl;
 	"fel "
 
 #define BOOT_TARGET_DEVICES(func) \
+	BOOT_TARGET_DEVICES_SCSI(func) \
+	BOOT_TARGET_DEVICES_USB(func) \
 	func(FEL, fel, na) \
 	BOOT_TARGET_DEVICES_MMC(func) \
 	BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
-	BOOT_TARGET_DEVICES_SCSI(func) \
-	BOOT_TARGET_DEVICES_USB(func) \
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 

to fit my requirements.

 

U-Boot will try first to boot from SATA then from USB and finally will invoke FEL which will boot from eMMC or SD/MMC if inserted.

Boot order can be changed at run-time without modifying u-boot environment by changing of SATA and USB partitions boot flag.

Link to comment
Share on other sites

Hi to All,

 

The phase of boot procedure unification is finished and tested on 2x A20-Olinuxino-Lime2-eMMC (HW rev. E) boards with customized Armbian 5.07, U-Boot 2016.05-rc1 and Kernel 4.5.2:

  • prepared image successfully boot from SATA, USB, SD/MMC and eMMC at given priority
  • procedure for preparation of all boot devices is tested and work well (see attached file)
  • it was found a problem to write in eMMC (from U-Boot only) at the one of the boards (maybe HW related)

 

GBit Ethernet performance was measured (by iperf) for following Lime2 boards:

Board IP  ...83    ...190   ...75'   ...75"
    Opt.    eMMC     eMMC      4GB      4GB
 HW rev.       E        E        C        C
     Max  917,00   831,00   750,00   920.00
 Average  898,36   786,45   707,09   890.55
  StdDev   15,07    39,14    21,17    25.74
     Min  872,00   717,00   676,00   850.00

Coincidence or not but the board with slower (12%) Ethernet has a problem to write in eMMC.

The board with HW rev. C has 21% lower or the same Ethernet performance at 2 different tests.

 

It may be helpful for someone to know additional current drawn at different Ethernet modes:

 100 Mbps idle - reference
 100 Mbps  max - +70mA
1000 Mbps idle - +70mA
1000 Mbps  max - +240mA

The next step is is to make use of GPIO in U-Boot to force booting from eMMC and moving to read-only rootfs on it.

 

Best regards

Chris

Armbian-Customization.pdf

Link to comment
Share on other sites

Hi to All,

 

I try to use a button connected between GND and GPIO PB18 (ID=50) which is pulled up on Lime2-eMMC.

The idea is to force booting from eMMC when the button is pushed at boot.

 

I have also connected 2x LEDS to GPIOs PC23 (ID=87) and PC23 (ID=88).

I have modified boor.cmd as follows:

if gpio input 50; then gpio set 87; setenv devtype mmc; setenv devnum 0; setenv distro_bootpart 1; else gpio set 88; fi
part uuid ${devtype} ${devnum}:${distro_bootpart} uuid
echo Booting ${devtype} ${devnum}:${distro_bootpart} UUID=${uuid}
if load ${devtype} ${devnum}:${distro_bootpart} 0x00000000 /boot/.verbose; then setenv verbosity 7; else setenv verbosity 1; fi
setenv bootargs console=${console} root=PARTUUID=${uuid} rootfstype=ext4 rw rootwait panic=10 loglevel=${verbosity} ${extended_bootargs}

if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/zImage; then
  if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtb/${fdtfile}; then
    if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
      bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
    else
      bootz ${kernel_addr_r} - ${fdt_addr_r};
    fi;
  fi;
fi

if load ${devtype} ${devnum}:${distro_bootpart} 0x48000000 /boot/uImage; then
  if load ${devtype} ${devnum}:${distro_bootpart} 0x43000000 /boot/script.bin; then
    setenv bootm_boot_mode sec;
    bootm 0x48000000;
  fi;
fi
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

and everything works fine except first if statement.

I expect when the button is not pushed (gpio input value is 1) to be run 'then' case but it is really running 'else' case:

...
Scanning scsi 0:1...
Found U-Boot script /boot/boot.scr
1314 bytes read in 39 ms (32.2 KiB/s)
## Executing script at 43100000
gpio: pin 50 (gpio 50) value is 1
gpio: pin 88 (gpio 88) value is 1
Booting scsi 0:1 UUID=aa89ba3d-01
...

and when the button is pushed (gpio input value is 0) backward but it is really running 'then' case:

...
Scanning scsi 0:1...
Found U-Boot script /boot/boot.scr
1314 bytes read in 39 ms (32.2 KiB/s)
## Executing script at 43100000
gpio: pin 50 (gpio 50) value is 0
gpio: pin 87 (gpio 87) value is 1
Booting mmc 0:1 UUID=e1604232-01
...

Can somebody explain this behavior?

 

Best regards

Chris

Link to comment
Share on other sites

Thanks Zador,

 

This explains observed behavior. Unfortunately, fast search on Internet did not help me enough.

 

In addition to above implementation I plan to to add Linux daemon or event listener so the button pushing will invoke system reboot.

In case of short button push the system will simply reboot.

If the button is pushed long enough (until boot script is executed) U-Boot will boot from eMMC for system maintenance.

 

Next step is to make eMMC rootfs read-only.

 

Any references for the best way to be done?

 

Best ragards

Chris

Link to comment
Share on other sites

Hi to All,

 

Meanwhile I have made some measurement of consumption and temperatures regarding HDMI monitor usage.

 

On the attached image:

  • In the beginning HDMI interface is active but monitor is switched off.
  • The monitor was switched on for an hour (11:45-12:45).
  • After that the monitor is switched off and at 17:30 system was restarted which deactivates HDMI interface.

 

Some figures can be found here.

 

Best regards

Chris

post-904-0-66623300-1461697969_thumb.jpg

Link to comment
Share on other sites

Hi to All,

 

There you are init.d script I wrote for creating and activating of a daemon for clean rebooting the system when user button is pushed:

 

 

#! /bin/bash
### BEGIN INIT INFO
# Provides: rebootd
# Required-Start: $sysfsutils
# Required-Stop: $sysfsutils
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Banana Led disabler
### END INIT INFO

# Immediately exit if not called by init system
if [ "X$1" != "Xstart" ]; then
exit 1
fi

DAEMON=/tmp/rebootd

cat > $DAEMON <<'EOF'
#!/bin/bash
#
# blink red led if firstrun is still running
# listen to the reboot button push
# reboot when button is pushed
#

trap process_USR1 SIGUSR1
process_USR1() {
# echo 'Got signal USR1'
exit 0
}

me_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
me_FILE=$(basename $0)
cd /

if [ "$1" = "child" ] ; then # 2. We are the child. We need to fork again.
shift
umask 0
exec setsid $me_DIR/$me_FILE XXrefork_daemonXX "$@" /dev/null 2>/dev/null &
exit 0
fi
if [ "$1" != "XXrefork_daemonXX" ] ; then # 1. This is where the original call starts.
exec $me_DIR/$me_FILE child "$@" &
exit 0
fi

shift

sleep 30

if [ ! -f /sys/class/gpio/gpio87 ]; then
echo 87 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio87/direction
fi
if [ ! -f /sys/class/gpio/gpio88 ]; then
echo 88 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio88/direction
fi
if [ ! -f /sys/class/gpio/gpio50 ]; then
echo 50 > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio50/direction
fi

RED_LED=/sys/class/gpio/gpio87/value
GREEN_LED=/sys/class/gpio/gpio88/value
RESET_BUTTON=/sys/class/gpio/gpio50/value

if [ -f /tmp/create_swap.sh ]; then
echo 1 > $RED_LED;
echo 0 > $GREEN_LED;
BLINKING_LED=$RED_LED;
else
echo 0 > $RED_LED;
echo 1 > $GREEN_LED;
BLINKING_LED=$GREEN_LED;
fi

while [ -f /tmp/create_swap.sh ]; do
sleep 0.5;
if [[ "$(cat ${BLINKING_LED})" == "1" ]]; then
echo 0 > $BLINKING_LED;
else
echo 1 > $BLINKING_LED;
fi
done
echo 0 > $RED_LED;
echo 1 > $GREEN_LED;
while [[ "$(cat ${RESET_BUTTON})" == "1" ]]; do sleep 1; done
echo 1 > $RED_LED;

echo 87 > /sys/class/gpio/unexport
echo 88 > /sys/class/gpio/unexport
echo 50 > /sys/class/gpio/unexport

EOF

echo -e "rm -f $DAEMON\nreboot\nexit 0" >> $DAEMON

chmod +x $DAEMON

. /lib/lsb/init-functions

case "$1" in
start)
log_daemon_msg "Starting the process" "$DAEMON"
if start-stop-daemon --start --quiet --exec $DAEMON; then
log_end_msg 0
else
log_end_msg 1
fi
;;
*)
## If no parameters are given, print which are avaiable.
echo "Usage: $0 {start}"
exit 1
;;
esac

exit 0

 

It also control 2 LESDs and if the firstrun script is still running avoiding to interrupt it.

If the button is pushed for a longer time (till U-Boot checks it) the system will boot from eMMC or SD/MMC if inserted.

 

There is a dirty fix (sleep 30) of the problem to recognize if firstrun is going on in the very beginning.

 

Best regards

Chris

Link to comment
Share on other sites

I am not sure that performance is better because both NAND and eMMC are connected via 8-bit bus to CPU but the kernel supports currently only for 4-wire one for eMMC and SD/MMC.

 

I did not made any performance measures because NAND is not supported in mainline kernel for now.

Link to comment
Share on other sites

I am not sure that performance is better because both NAND and eMMC are connected via 8-bit bus to CPU but the kernel supports currently only for 4-wire one for eMMC and SD/MMC.

 

I did not made any performance measures because NAND is not supported in mainline kernel for now.

 

As far as I can tell no one did real performance measurements so far. Everyone is focused on laughable sequential transfer speeds and forgets random i/O. Also Olliver's performance numbers he posted here I'm not able to deal with. 'Sequential dd test' without knowing the used block size is pretty useless since performance when testing with bs=1 or eg. bs=1M will differ by magnitudes.

 

It would already help if you could use the iozone call as outlined here and add the results there. :) Thx

Link to comment
Share on other sites

Hi to All,

 

I am not sure that performance is better because both NAND and eMMC are connected via 8-bit bus to CPU but the kernel supports currently only for 4-wire one for eMMC and SD/MMC.

 

I did not made any performance measures because NAND is not supported in mainline kernel for now.

 

As Olliver Schinagl wrote to me:

ChR wrote: 
In my opinion 8-bit access to eMMC is broken in Allwinned A20 or in the mmc driver.

Olliver wrote:
Nah, it's not broken. But Allwinner 'forgot' to map the mmc controller pins to the mux and thus the additional 4 bits are not on the actual pins. It is sad and wasn't necessary, I'm sure it's just a small over sight, which is costing us performance now. But we get a big improvement by using the latest 4.6-rc1+ kernel by using HS-DDR mode. In my early tests I saw 40 MB/s read and 17 MB/s write speeds. It would be nice to imagine what the additional 8 bits would have brought us, but alas.
As I said however, the Lime2 PCB brings out all 8 bits and if we ever get a pin-compatible A40, there is a chance it will have 8 bit emmc. The Lime2 does not have 1.8 3.3 switcher on the vqmmc lines however, but I am not sure if we need this at all for higher speeds.
If 8 bit would give us double the bandwith, it could be we'd get 80 MB/s/40 MB/s in theory, but I think that's already beyond the current chip anyway.
Comparing it to the current NAND chips, which top ou at 4MB/s read if memory serves me, eMMC makes the boards quite capable 

On the other hand following the advice of Olliver Schinagl I managed to get working driver configured to use 8-bit bus but real access was 4-bit  (eMMC is mmc1 below):

Booted from SD card with 8-bit patched kernel
root@egpr:~# dmesg | grep mmc
[ 3.599625] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 3.631883] sunxi-mmc 1c0f000.mmc: base:0xf08da000 irq:26
[ 3.669058] mmc0: host does not support reading read-only switch, assuming write-enable
[ 3.671674] sunxi-mmc 1c11000.mmc: base:0xf08de000 irq:27
[ 3.672064] mmc0: new high speed SDHC card at address 0007
[ 3.673068] mmcblk0: mmc0:0007 SD04G 3.71 GiB
[ 3.674785] mmcblk0: p1
[ 3.682261] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[ 3.689280] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.690146] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.690977] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.691808] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.745505] mmc1: MAN_BKOPS_EN bit is not set
[ 3.749187] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RD EBE !!
[ 3.749229] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 3.749247] sunxi-mmc 1c11000.mmc: send stop command failed
[ 3.749268] mmc1: switch to bus width 2 failed
[ 3.753586] mmc1: new high speed MMC card at address 0001
[ 3.754479] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[ 3.754961] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[ 3.755604] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[ 3.757045] mmcblk1: p1
[ 4.216879] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
[ 7.907002] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro

root@egpr:~# cat /sys/kernel/debug/mmc0/ios
clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
root@egpr:~# cat /sys/kernel/debug/mmc1/ios
clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 1 (mmc high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)

Booted from SATA SSD with 4-bit patched kernel
[ 3.598868] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 3.631154] sunxi-mmc 1c0f000.mmc: base:0xf08da000 irq:26
[ 3.668313] mmc0: host does not support reading read-only switch, assuming write-enable
[ 3.670908] sunxi-mmc 1c11000.mmc: base:0xf08de000 irq:27
[ 3.671324] mmc0: new high speed SDHC card at address 0007
[ 3.672302] mmcblk0: mmc0:0007 SD04G 3.71 GiB
[ 3.674067] mmcblk0: p1
[ 3.681882] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[ 3.686129] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.686996] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.687843] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.688672] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[ 3.724762] mmc1: MAN_BKOPS_EN bit is not set
[ 3.731196] mmc1: new high speed MMC card at address 0001
[ 3.732141] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB
[ 3.732553] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[ 3.732960] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[ 3.734186] mmcblk1: p1

root@egpr:~# cat /sys/kernel/debug/mmc0/ios
clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 2 (sd high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
root@egpr:~# cat /sys/kernel/debug/mmc1/ios
clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 1 (mmc high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)

 

Some results form performance tests done by me can be found in attached file.

 

Best regards

Chris

eMMC-RW-speed.pdf

Link to comment
Share on other sites

Hi to All,

 

Here you can find raw data from iozone test of 4BG eMMC on A2-Olinuxino-Lime2-eMMC:

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     3444     3671     9650     9634     7795     3492
          102400      16     6328     6525    13264    12905    12014     6408
          102400     512    11547    11557    21569    21560    21494    11517
          102400    1024    11774    11838    21869    21881    21782    11822
          102400   16384    11830    11818    22048    22059    22065    11853

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     3444     3677     9663     9626     7801     3577
          102400      16     6290     6514    13084    12740    11873     6409
          102400     512    11623    11653    21592    21567    21485    10617
          102400    1024    11787    11859    21862    21907    21811    11805
          102400   16384    11944    11914    22131    22125    22147    11947

and the info printed from mmctest script:

mmc1:0001 info:

                 cid: fe014e50315858585812c3fbc08fc17b
                 csd: d04f01320f5913ffffffffe78a40008f
                 prv: 0x12
                date: 12/2014
                name: P1XXXX
                type: MMC
         rel_sectors: 0x1
preferred_erase_size: 4194304
               fwrev: 0x0
               hwrev: 0x0
               oemid: 0x014e
enhanced_area_offset: 18446744073709551594
         ffu_capable: 0
  raw_rpmb_size_mult: 0x1
              manfid: 0x0000fe
              serial: 0xc3fbc08f
              uevent: DRIVER=mmcblk MMC_TYPE=MMC MMC_NAME=P1XXXX MODALIAS=mmc:block
          erase_size: 524288
  enhanced_area_size: 4294967274

 

For reference here you can also find the info and the speed test results of 4GB SD card class 10:

mmc0:0007 info:

                 cid: 275048534430344730018913ff00d5ef
                 csd: 400e00325b5900001da77f800a40002d
                 scr: 0235800301000000
                date: 05/2013
                name: SD04G
                type: SD
preferred_erase_size: 4194304
               fwrev: 0x0
               hwrev: 0x3
               oemid: 0x5048
              manfid: 0x000027
              serial: 0x018913ff
              uevent: DRIVER=mmcblk MMC_TYPE=SD MMC_NAME=SD04G MODALIAS=mmc:block
          erase_size: 512
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4      253      257     5800     5822     4438      217
          102400      16     5481     5514     9623     9626     8547       62
          102400     512    11176    11868    21033    21094    19195     2191
          102400    1024    12181    11707    21595    21652    20741     4708
          102400   16384    12671    11737    21942    21966    21076    10466

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4      222      227     5790     5821     4180      203
          102400      16     5681     6149     9470     9661     8340       62
          102400     512    12033    11656    21194    21194    20982     2199
          102400    1024    12548    11792    21606    21616    20760     4737
          102400   16384    12755    11831    21929    21964    21214    10531

 

and 60GB SATA SSD:

root@egpr:/media/sda2# iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
        Iozone: Performance Test of File I/O
                Version $Revision: 3.429 $
                Compiled for 32 bit mode.
                Build: linux

        Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
                     Al Slater, Scott Rhine, Mike Wisner, Ken Goss
                     Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
                     Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
                     Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
                     Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
                     Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
                     Vangel Bojaxhi, Ben England, Vikentsi Lapa.

        Run began: Thu May  5 00:33:32 2016

        Include fsync in write timing
        O_DIRECT feature enabled
        Auto Mode
        File size set to 102400 kB
        Record Size 4 kB
        Record Size 16 kB
        Record Size 512 kB
        Record Size 1024 kB
        Record Size 16384 kB
        Command line used: iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2
        Output is in kBytes/sec
        Time Resolution = 0.000001 seconds.
        Processor cache size set to 1024 kBytes.
        Processor cache line size set to 32 bytes.
        File stride size set to 17 * record size.
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4    12917    15962    27921    27318    18837    15748
          102400      16    24240    27723    66737    67846    54894    27764
          102400     512    36688    36982   152152   152306   151760    37191
          102400    1024    37104    37162   156008   156168   155951    37436
          102400   16384    38076    38122   180726   181874   182121    38239

iozone test complete.

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

I try to measure eMMC performance using the patch from Olliver Schinagl against development kernel 4.6.0-rc6 and succeed to setting it up in lib.config as:

KERNELBRANCH=v4.6-rc6

But the patch is oriented to add new dts file named:

/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts

My question is how and where to setup Armbian to use the new board device tree?

 

Best regards

Chris

Link to comment
Share on other sites

Add patch to userpatches/kernel/sunxi-dev 

 

I assume you are using DEV branch.

 

There are more options - you can create a new u-boot config and declare DTB there or in boot.scr since we don''t need to have different u-boot. A hack to u-boot that it chooses this DTB if eMMC is detected ? :)

Link to comment
Share on other sites

Hi Igor,

 

Add patch to userpatches/kernel/sunxi-dev 

 

I assume you are using DEV branch.

 

There are more options - you can create a new u-boot config and declare DTB there or in boot.scr since we don''t need to have different u-boot. A hack to u-boot that it chooses this DTB if eMMC is detected ? :)

 

I use dev branch and put the new patch in userpatches/kernel/sunxi-dev.

The new patch create a new device tree source file named sun7i-a20-olinuxino-lime2-emmc.dts and add it to Makefile be compiled.

 

Unfortunately, I cannot find a way to add new board lime2-emmc without modifying Armbian code base.

 

Is there such a way or I have to modify Armbian code base for adding the new board?

And if so where and what I have to add as a staff for the new board?

 

I prefer to add completely new board named lime2-emmc with all needed configuration staff instead of patching other board staff.

 

Best regards

Chris

Link to comment
Share on other sites

Thanks Igor,

 

Ahaa, ok.

 

You will need to add to our code, this is not user defined yet.

 

https://github.com/igorpecovnik/lib/blob/master/config/boards/lime2.conf

Use this, copy and rename and use different u-boot config + DTB and uboot config patch. That should do.

 

I will try and will update you.

I expect to have better solution for Lime2-eMMC board for dev branch.

 

BTW kernel 4.6 is very close to release.

If it is happened in next week or so could we expect to migrate next Armbian branch to it?

 

Best regards

Chris

Link to comment
Share on other sites

BTW kernel 4.6 is very close to release.

If it is happened in next week or so could we expect to migrate next Armbian branch to it?

Even if it will be released soon, it won't be declared "stable" for 1-2 weeks after the release.

 

https://github.com/igorpecovnik/lib/blob/master/config/boards/lime2.conf

Use this, copy and rename and use different u-boot config + DTB and uboot config patch. That should do.

Since lime2-emmc still can boot from SD and eMMC is not removable, IMO it should be handled in u-boot via patch (like declaring new variable if board has eMMC) or in nand-sata-install script (by tweaking DTB path in boot script).

Link to comment
Share on other sites

Thanks for your effort too.

 

 

BTW kernel 4.6 is very close to release.

If it is happened in next week or so could we expect to migrate next Armbian branch to it?

 

I am rather conservative on those upgrades since lot's of boards share one kernel and if one board fails, we need to explain, apologize and rush to provide an update. If we wait a week or more it become much less stressful. One long time idea still need to be realized some day - daily / weekly dev builds in repository.

 

@Zador

OK, that's even better.

Link to comment
Share on other sites

Thanks Igor and Zador,

 

Thanks for your effort too.

 

 

I am rather conservative on those upgrades since lot's of boards share one kernel and if one board fails, we need to explain, apologize and rush to provide an update. If we wait a week or more it become much less stressful. One long time idea still need to be realized some day - daily / weekly dev builds in repository.

 

@Zador

OK, that's even better.

It is good to hear that you measure delay in weeks and not in months.

It fits to my plans and I will probably migrate to new 4.6 kernel.

 

BTW I have just test eMMC performance and find that while write has the same speed the read is 80% faster probably because of driver development.

 

About the U-Boot I have patched it as explained above in this thread and find a way to boot from all SATA, USB, SD/MMC and eMMC device at given order.

 

Best regards

Chris

Link to comment
Share on other sites

Hi to All,

 

I have extend performance tests with measurement of eMMC, SD/MMC and SATA SSD R/W speed with kernel 4.6-rc7.

 

Interesting phenomenon is up to 87% eMMC read speed increase with kernel 4.6-rc7 (38.9 vs. 20.8 MB/s at iozone read with 512+ kB buffer).

Olliver Schinagl has reported the similar result for eMMC read speed with kernel 4.6-rc7 explaining it with added advances driver features.

 

Unfortunately, the better write speed of 17 MB/s reported by him is not observed in my tests.

A possible reason for that could be multiply writes of big files to eMMC in my case.

 

Best regards

Chris

eMMC-RW-speed-1.pdf

Link to comment
Share on other sites

Hi to All,
 
Following http://linux-sunxi.org/1-Wire, thanks to http://forum.armbian.com/index.php/topic/1267-armbian-511-fails-to-build-kernel/ and after a whole night fighting I finally succeed to find how to patch Lime2-eMMC device tree to support OneWire devices in Armbian 5.12 with kernel 4.5.5:
 

 

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 0940a78..406547a 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -612,7 +612,7 @@
 		};
 	};
 
-	soc@01c00000 {
+	soc: soc@01c00000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index d5c796c..218de93 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -201,6 +201,13 @@
 };
 
 &pio {
+	w1_pin: w1_pin@0 {
+		allwinner,pins = "PC21";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
+
 	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
 		allwinner,pins = "PC3";
 		allwinner,function = "gpio_out";
@@ -278,3 +285,12 @@
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
 };
+
+&soc {
+	onewire_device {
+		compatible = "w1-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&w1_pin>;
+		gpios = <&pio 2 21 GPIO_ACTIVE_HIGH>; /* PC21 */
+	};
+};

 

 

and the result is:

 

 

root@egpr:~# cat /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins | grep PC21
pin 85 (PC21): soc@01c00000:onewire_device 1c20800.pinctrl:85 function gpio_in group PC21

root@egpr:~# ls -la /sys/bus/w1/devices/
total 0
drwxr-xr-x 2 root root 0 May 26 06:40 .
drwxr-xr-x 4 root root 0 May 26 06:40 ..
lrwxrwxrwx 1 root root 0 May 26 06:40 28-00000771ad36 -> ../../../devices/w1_bus_master1/28-00000771ad36
lrwxrwxrwx 1 root root 0 May 26 06:40 28-00000771cca3 -> ../../../devices/w1_bus_master1/28-00000771cca3
lrwxrwxrwx 1 root root 0 May 26 06:40 w1_bus_master1 -> ../../../devices/w1_bus_master1

root@egpr:~# cat /sys/bus/w1/devices/28-00000771ad36/w1_slave
2e 02 4b 46 7f ff 02 10 7f : crc=7f YES
2e 02 4b 46 7f ff 02 10 7f t=34875

root@egpr:~# cat /sys/bus/w1/devices/28-00000771cca3/w1_slave
83 01 4b 46 7f ff 0d 10 66 : crc=66 YES
83 01 4b 46 7f ff 0d 10 66 t=24187

 

 

There are 2x DS18B20 devices measuring ambient (24.2°C) and PMU (34.9°C) temperatures.
 
Following http://rpi-experiences.blogspot.bg/2013/06/rpi-monitor-version-20-advance-usage.html  I have also added them to status and statistics of RPI Monitor:

 

 

dynamic.23.name=living_room_temp_1
dynamic.23.source=/sys/devices/w1_bus_master1/28-00000771ad36/w1_slave
dynamic.23.regexp=t=(\d+)$
dynamic.23.postprocess=sprintf("%.1f", $1/1000)
dynamic.23.rrd=GAUGE

dynamic.24.name=living_room_temp_2
dynamic.24.source=/sys/devices/w1_bus_master1/28-00000771cca3/w1_slave
dynamic.24.regexp=t=(\d+)$
dynamic.24.postprocess=sprintf("%.1f", $1/1000)
dynamic.24.rrd=GAUGE

...

web.status.1.content.5.name=Temperature
web.status.1.content.5.icon=cpu_temp.png
web.status.1.content.5.line.1=JustGageBar("SoC", "°C",0, data.soc_temp , 100,100,80,percentColors,50,60)+" "+JustGageBar("PMU", "°C",0, data.pmic_temp , 100,100,80,percentColors,45,55)+" "+JustGageBar("Ambient", "°C",0, data.living_room_temp_2 , 100,100,80,percentColors,45,55)+" "+JustGageBar("Cooler", "°C",0, data.living_room_temp_1 , 100,100,80,percentColors,45,55)

...

web.statistics.1.content.6.name=Load / Temperatures / Consumption
web.statistics.1.content.6.graph.1=pmic_temp
web.statistics.1.content.6.graph.2=soc_temp
web.statistics.1.content.6.graph.3=living_room_temp_1
web.statistics.1.content.6.graph.4=living_room_temp_2
web.statistics.1.content.6.graph.5=total_consumption
web.statistics.1.content.6.graph.6=load1
web.statistics.1.content.6.ds_graph_options.pmic_temp.label=PMU temperature (°C)
web.statistics.1.content.6.ds_graph_options.soc_temp.label=SoC temperature (°C)
web.statistics.1.content.6.ds_graph_options.living_room_temp_1.label=Cooler temperature (°C)
web.statistics.1.content.6.ds_graph_options.living_room_temp_2.label=Ambient temperature (°C)
web.statistics.1.content.6.ds_graph_options.total_consumption.label=Consumption (W)
web.statistics.1.content.6.ds_graph_options.load1.label=Load 1 min
web.statistics.1.content.6.ds_graph_options.total_consumption.yaxis=2
web.statistics.1.content.6.ds_graph_options.load1.yaxis=2
web.statistics.1.content.6.graph_options.y1axis={ position: "left", min: 0, max: 70 }
web.statistics.1.content.6.graph_options.y2axis={ position: "right" }

 

 

 

Best regards
Chris

Link to comment
Share on other sites

Hi to All,

 

These days I have succeed to build my first Lime2-4GB based prototype with aluminum box (160x125x30 mm).

It was applied interesting solution for heat dissipation from all chips to the box wall.

The first test shows good results at close to working conditions (see attachment).

 

It is on its way the real prototype based on Lime2-eMMC with aluminum box (160x155x50 mm).

All system staff will be mounted into the box for outside usage (humidity and dust resistant).

 

Best regards

Chris

Lime2-rev-C-E-comp-02.pdf

Link to comment
Share on other sites

Hi to All,

 

These days I have finished Lime2-eMMC based prototype with aluminum box (160x165x51 mm).

It was applied already tested solution for heat dissipation from all chips (CPU, PMU, DDR and Flash) to the box walls.

All connectors, buttons etc. used are humidity and dust resistant.

STM32-H405 board used is only simulator of final low level peripheral staff.

 

Series of tests ware also done at close to working conditions, high CPU and network load and higher environment temperature.

All tests done include full battery discharge / charge cycle. See attached file for the results.

 

The most important conclusions are:

  • The temperatures of CPU and PMU chips are less than 50°C for all tests done;
  • DDR and Flash chips temperatures are probably close to the CPU one;
  • The temperature difference between the cooler and external air is less than 2°C;
  • The temperature difference between the cooler and CPU/PMU is less than 7°C;
  • There is no even a single hang at all tests done.

 

Unfortunately, uncertainty about CPU and PMU temperature measurement is still present so any comments about test results are welcome.

 

Best regards

Chris

Lime2-rev-C-E-comp-06-7p.pdf

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines