3 3
tkaiser

FYI: Armbian running on A31s based Banana Pi M2

Recommended Posts

Did all the way and finally got debian working thanks to community and Igor in person. I will post complete instructions later that day. Hope one day video chip acceleration will be supported and we will get a chance to use GUI Linux without issues.

 

 

P.S. Out of SD-cards right now, sorry, will post manual later :(

Share this post


Link to post
Share on other sites

Hi all,

 

after building several images for BananaPi and R1 with Igors lib and getting some insight to the great stuff he has done I have extended my "configuration.sh" with the following:

BPI-M2)#enabled
#description A31 quad core 1Gb SoC Wifi
#build 0
#--------------------------------------------------------------------------------------------------------------------------------
# Bananapi M2
#--------------------------------------------------------------------------------------------------------------------------------
REVISION="1.0"
BOOTLOADER="https://github.com/BPI-SINOVOIP/BPI-Mainline-uboot"
BOOTCONFIG="Bananapi_M2_defconfig"
BOOTSOURCE="u-boot-bpi-m2"
BOOTDEFAULT="master"
UBOOTTAG=""
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
MODULES_NEXT="brcmfmac"
LINUXFAMILY="banana"
;;

No other changes were made.

I successfully build images for trusty and jessie with mainline kernel (4.2.2).

Armbian is booting without issues as far as I can see.

I have tested ethernet and HDMI, both working, WLAN can be enabled and is up (only verified with "ifconfig", not connected to AP yet). "htop" shows all 4 cores. https://github.com/BPI-SINOVOIP/BPI-WiringPi can be build without issues and "gpio readall" shows all 40 pins. Further tests are ongoing as time permits.

 

Comments are welcome.

 

Share this post


Link to post
Share on other sites

Thanks!

 

I added it to general config. Commit will come ASAP - I'll try if to create a patch for mainline uboot that we won't need an extra kernel source.

Share this post


Link to post
Share on other sites

Hi Igor,

 

tried your image, but no success. U-boot does not start. Only red LED on M2, no HDMI signal, no activity of green LED as with my selfmade image. Looks like your patch does not work. :-(

Share this post


Link to post
Share on other sites

FYI: I donated the M2 I bought a while back in the meantime to the linux-sunxi community. Hans de Goede fortunately had the time to look into it. Regarding quality/state of .dts/defconfig SinoVoip created for the M2 he wrote that they're not really production ready: 

 

Seem to be copy paste from some other boards and then modified until things

work somewhat [...], e.g. the oob interrupt for the wifi is wrong so you get 
1000-s of interrupts / second (it basically triggers as fast as it can).

 

He started from scratch writing new versions of the two files:

 

https://github.com/jwrdegoede/u-boot-sunxi/commit/24c82ec836bc34c2086e93f7baa67333a30930ca

https://groups.google.com/forum/#!topic/linux-sunxi/hLOu3iRGfnU

Share this post


Link to post
Share on other sites

I used the u-boot from Sinovoip in second / last build. Didn't have time to check why my patch was not operational.

 

I don't have M2 but Orange Pi with A31s and it's working with M2 config. USB part is not operational, but we have something to start. 

Share this post


Link to post
Share on other sites

Orange Pi with A31s

 

What?! Ah, seems Xunlong sent you a preliminary sample with A31s and switched in the meantime to H3 for the 'plus' (not the worst reaction to the news that A31/A31s have been discontinued a while ago ;-)

Share this post


Link to post
Share on other sites

 Hello,

ok, no feedback here... sinovoip forum wrote your image is working ;)

 

Since my Odroid C1 (without +) is not reliable. Every 1 or 2 month it runs into kernel panic.

Everytime when I try to backup the sd card, the card becomes more and more unreadable.

Finally there will be never main line support for C1 with Amlogic SoC. So it will stuck on kernel 3.10.

Actually it is running as samba AD DC. SMB version is 1.5 limited by kernel.

 

 Just a few reasons for a new ARM SBC, and I have been looking for something which has at least 4 cores.

 

@Igor:

Your web-page is my guide for new hardware ;)

Actually 96boards with 64bit SoC are also nice, but the price is high and I might need a second board for backup...

 

So decided to order the Banana Pi M2:

Basically your image is working. I have posted the dmesg output also knowing most of the issues are of no relevance:

("basically" means the board will run headless with only network needed, wifi will be of interest later...)

 

root@bananapim2:~# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.2.6-sunxi (root@production) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #1 SMP Sun Nov 29 10:33:44 CET 2015
[    0.000000] CPU: ARMv7 Processor [410fc073] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction Cache

[    0.000000] Machine model: Banana Pi BPI-M2

...

1534] CPU: Testing write buffer coherency: ok
[    0.001790] /cpus/cpu@0 missing clock-frequency property
[    0.001802] /cpus/cpu@1 missing clock-frequency property
[    0.001813] /cpus/cpu@2 missing clock-frequency property
[    0.001823] /cpus/cpu@3 missing clock-frequency property
[    0.001834] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.001886] Setting up static identity map for 0x400082c0 - 0x40008318
[    0.003344] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.003876] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.004400] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.004449] Brought up 4 CPUs
...
[    1.785877] sun6i-a31-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    1.786126] sun6i-a31-r-pinctrl 1f02c00.pinctrl: Reset controller missing
[    1.840257] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
...
[    1.920548] cpu cpu0: running cpufreq without cooling device: -38
[    1.920585] Registering SWP/SWPB emulation handler
[    1.921210] registered taskstats version 1
[    1.921237] zswap: loading zswap
[    1.921521] zpool: no driver for type zbud
[    1.921529] zswap: zbud zpool not available
[    1.921534] zswap: zpool creation failed
[    1.924009] Btrfs loaded
...
[    1.964693] sunxi-mmc 1c11000.mmc: base:0xf053e000 irq:29
[    1.965060] sun6i-rtc 1f00000.rtc: hctosys: unable to read the hardware clock
[    1.968340] vcc5v0: disabling
[    1.968352] vcc3v3: disabling
[    1.970602] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[    1.979945] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    1.980839] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
...
[    3.366919] random: nonblocking pool is initialized
[    3.378759] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d
[    3.389624] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
[    3.475331] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101
[    3.475351] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.475362] usb 1-1: Product: USB 2.0 Hub
[    3.476139] hub 1-1:1.0: USB hub found
[    3.476315] hub 1-1:1.0: 4 ports detected
[    4.968348] brcmfmac: brcmf_cfg80211_reg_notifier: not a ISO3166 code
...
 

 

Regarding the board it self:

Powering via micro USB is a desaster... with only LAN connected the board is booting by luck, with additionaly HDMI connected the board will not power up at all...

But these issues have been known before, therefore I soldered a USB power cable for the 4.0mm/1.7mm barrel plug ;)

All USB ports are working...

 

Iperf with Banana Pi M1 as iperf server: bandwidth 814 Mbit/sec

Iperf with Banana Pi M2 as iperf server: bandwidth 713 Mbit/sec

 

SD Card Transcend Ultimate 16 GB with MLC is my prefered one, because MLC memory has a better lifetime regarding write cylces (It is not working in Odroid C1)

 

root@bananapim2:~# dd if=/dev/zero of=tempfile bs=1M count=1024 conv=fdatasyncotrunc
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 51.4463 s, 20.9 MB/s

root@bananapim2:~# echo 3 | sudo tee /proc/sys/vm/drop_caches
3

root@bananapim2:~# dd if=tempfile of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 47.5262 s, 22.6 MB/s

 

I have tried to updload the whole dmesg as a file but I am not allowed to do so.

 

This is it for now.

 

regards

SMH

 

 

Share this post


Link to post
Share on other sites

Powering via micro USB is a desaster... with only LAN connected the board is booting by luck, with additionaly HDMI connected the board will not power up at all...

 

To be expexted. Most likely you ran into the usual undervoltage problems many/most USB cables suffer from. And the connector itself is simply crap. On top of that means powering through USB a different power scheme compared to DC-IN (the PMU of the M2 can be fed through LiPo battery, USB or DC-IN).

 

Regarding the C1: Maybe you ran just into the common irqbalanced problem (eating up all RAM and CPU and let the machine freeze after some times). And instead of pasting huge amounts of log messages into a forum you could use an online pasteboard service like pastebin.com or even more convenient:

dmesg | curl -F 'sprunge=<-' http://sprunge.us

Finally: a bit sad that I missed your post from a few days before. I would've recommended an Orange Pi Plus2 instead. The USB-to-SATA bridge is crap but twice as much RAM and onboard 8GB eMMC being much faster than the limited SDIO implementation on A31s. Also cheaper than the M2 (that contains an already discontinued SoC since it started shipping half a year ago)

Share this post


Link to post
Share on other sites

@tkaiser

 

Thank you for your reply and for the hints...

 

Regarding the C1: Maybe you ran just into the common irqbalanced problem (eating up all RAM and CPU and let the machine freeze after some times).

Service irqbalanced is being restarted from time to time. Actually I could have removed it from the System, but I wasn't sure, maybe it still doing something positive ;)

Odroid C1 has big problems with SD Card. C1+ should be more stable at this point. But Odroid is a different story for me... :(

 

I would've recommended an Orange Pi Plus2 instead.

Yes, I know, but what about H3, will there be main line support soon. I need at least kernel 4.2...

 

Right now the BPi M2 seems to be quiet good board... only one thing... the temperature is allways around 60°C...

 

 

Regards and Servus,

 

SMH aus A

Share this post


Link to post
Share on other sites

Irqbalanced is on any SBC just a waste of ressources and the reason you either have to restart the daemon or the whole board from time to time. It simply does nothing except of wasting CPU ressources and eating up all your RAM over time.

 

Simply compare with the output of 'cat /proc/interrupts'

 

I had a good laugh when having a 1st look at SinoVoip's OS images for the Banana Pi M3: Of course it's enabled and will take a few days to completely use the 2GB of the board  :)

 

Regarding H3: Mainlining efforts are quiet fast and I believe it will be useable for headless stuff in Q1/2016.

 

And regarding the 60°C on your M2: Since I do some research in this area at the moment, it would be interesting how your cpufreq settings are (which governor? performance or interactive?) I ask because all A31/A31s devices share these dvfs settings:

 operating-points = <
         /* kHz    uV */
         1008000 1200000
         864000  1200000
         720000  1100000
         480000  1000000
         >;

200 mV more or less might make a difference regarding both temperature and consumption. And maybe further voltage decreases might help (but it would be time consuming to get there: http://linux-sunxi.org/Hardware_Reliability_Tests )

 

And it might be also interesting if a display is connected or not. At leat on A20, H3 and A83T the video engine will be completely shut down when no display is connected which leads to a difference in SoC temperature of ~4°C

Share this post


Link to post
Share on other sites

my BPI M2 is covered in the only one available case :angry:

the SoC has a heat sink on top...

cpufreq settings are the default settings of the armbian debian jessie Image

only LAN is connected and wifi is not used yet

of course power is connected via barrel plug (4/1.7mm) at 5.1 V (0.21A idle)

 

cpufreq-info:

current policy: frequency should be within 480 MHz and 1.01 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.

 

I will measure the temperature over time...

 

Update:

When idle the CPU temperature is around 58/59°C

At high load the CPU temperature increases very fast

 

Actually I haven't found the max allowed temperature (I just found the operating temperature of max 75°C, is this the temperature of the environment or SoC?)

I stopped at 81°C...

Share this post


Link to post
Share on other sites

If you experience heat problems, then drop the case. It will not work and heatsinks inside a small enclosure are pretty useless since heat dissipation will be prevented by the enclosure.

 

I made a few tests a year ago and came up with large enclosures that ensure enough airflow. Small enclosures won't work.

 

And I don't know whether these temperatures are critical or not. There are SoCs available (like the one used on LeMaker's barrel burst called Guitar) that exceed easily 100°C without problems. But I would try to get a clue whether you're in an overvoltage situation (hard to tell since I donated my M2 to the linux-sunxi community half a year ago and can't have a look myself). Unfortunately that's not that easy with mainline kernel (at least it's a lot more easy with older Allwinner kernels where you could start with something like 'find /sys -name "*volt*"')

Share this post


Link to post
Share on other sites

the case has a minor impact on the temperature, especially where I want to place the board...

close to a window (its cold outside) the temperature drops to around 50°C

 

This page show some graphs regarding temperature:

http://blog.imgtec.com/powervr/quad-core-allwinner-a31s-with-a-powervr-sgx544mp2-gpu-offers-a-complete-solution-for-phablets

 

I also found a page (cannot find it again)  where somebody has been increased the frequency to 1,2 GHz without any big temperature impact

 

From my point of view the temperature is not in its normale range...

If its critical I don't know too...

Also I haven't seen any stability issues so far... (everything is working smooth, LAN, SD card, USB...)

 

I will try images with different kernel versions, to report some findings...

 

But I am not an expert to find out CPU voltage parameters, I can just have a look from the top...

Share this post


Link to post
Share on other sites

I will try images with different kernel versions, to report some findings...

 

But I am not an expert to find out CPU voltage parameters, I can just have a look from the top...

 

First: Forget about the marketing stuff from Imagination. It's true what they tell but that's not related to your problem (since they're talking only about GPU stuff that applies to gamers running Android).

 

Then how do you measure temperatures? Are you able to read-out an internal sensor?

 

And it would be still interesting how your cpufreq settings look like:

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state /sys/devices/system/cpu/cpu0/cpufreq/* 2>/dev/null | curl -F 'sprunge=<-' http://sprunge.us

Share this post


Link to post
Share on other sites

 

First: Forget about the marketing stuff from Imagination. It's true what they tell but that's not related to your problem (since they're talking only about GPU stuff that applies to gamers running Android).

Sure, they talked about GPU but they measured the SoC temperature...

 

 

Then how do you measure temperatures? Are you able to read-out an internal sensor?

Since I have nothing to measure, I have to take the values from the internal sensor, or take my fingers, when they get burned it is to hot ;)

 

cpufreq:

http://sprunge.us/KCXQ

 

Since the M2 already replaced my Odroid C1 I need an addition M2 for playing ;). I cannot really measure it but M2 seems to be faster as C1, just by feeling...

Share this post


Link to post
Share on other sites

cpufreq:

http://sprunge.us/KCXQ

 

Since the M2 already replaced my Odroid C1 I need an addition M2 for playing ;). I cannot really measure it but M2 seems to be faster as C1, just by feeling...

 

Integer performance of C1/C1+ (Amlogic X805) is superiour to A31s, if you're talking about GPU stuff (Android) then the A31s PowerVR might be faster.

 

Regarding dvfs/cpufreq settings: Your device is ~99% of time in the lowest state (480 MHz @ 1V). No idea what's wrong.

 

What 'internal sensor' do you refer to? We've seen a few funny read-outs of thermal sensors with mainline kernel so I would always handle these values with doubt.

 

You could load one of the crappy OS images provided by SinoVoip that use the crappy Allwinner 3.3.0 kernel and do a 

find /sys -iname "*temp*"

Maybe you find a more reliable thermal source (that's the only good thing regarding Allwinner's kernels. Since they're targeted at tablet operation the SoCs started to contain a thermal sensor and they included a driver to do CPU/GPU budget cooling. And normally the values are accessible through sysfs).

 

But that won't help that much either. When I had the M2 here (just to donate it to the linux-sunxi folks after a few days) I didn't realized this sort of problems. But I didn't take care that much about since the general situation with SinoVoip made me really crazy: http://www.bananapi.com/index.php/forum/general-discussion-for-bpi-m2/895-status-quo-of-m2-regarding-software-support :)

Share this post


Link to post
Share on other sites

I was hoping the R1 would fill a need I have for some serious work, and clearly they are not even near there.

 

Apart from the many issues we had with the R1 (vendor 'forgot' to define SATA power definition, faulty power design, crappy OS support in the beginning and so on), there's one thing most people interested into this device always overlook: It's not suitable to be used as a router without an additional USB-to-Ethernet dongle.

 

The so called 'WAN port' is connected with the 'LAN ports' through an el cheapo switch IC. When the board boots or you're able to attack it from the outside to provoke a reboot then it simply acts as a switch unless the b53 driver tries to change that behaviour. But before any interface has been brought up by the kernel and VLAN rules are applied it acts as a dumb switch connecting all available Ethernet ports.

 

You can use the R1 as 'router' only as long as you're happy with the situation that 'WAN' and 'LAN' are interconnected through a switch (while rebooting the R1 or while being under a 'Denial of Service' attack) or use something else for the 'WAN' interface. And if you do so then still Ethernet performance sucks.

Share this post


Link to post
Share on other sites

I tried the following image wit kernel 3.3: BPI-M2_Raspbian_V4.0_hdmi

 

You could load one of the crappy OS images provided by SinoVoip that use the crappy Allwinner 3.3.0 kernel and do a 

find /sys -iname "*temp*"

I could only find:

/sys/devices/platform/sun6i-i2c.1/i2c-1/1-0034/axp22-supplyer.19/power_supply/battery/temp

This device is not of my interest...

 

the SoC is hotter running this image (measured via touching), because X is running, but the board still runs stable...

 

lets see... I will try a bigger heat sink or a fan...

Actually this board is running as Domain Controller, most of the time it is relaxing... ;)

Share this post


Link to post
Share on other sites

Apart from the many issues we had with the R1 (vendor 'forgot' to define SATA power definition, faulty power design, crappy OS support in the beginning and so on), there's one thing most people interested into this device always overlook: It's not suitable to be used as a router without an additional USB-to-Ethernet dongle.

 

 

Hi Tkaiser,

 

USB-to-Ethernet dongle is not the only solution. People with PPPoE are without problems, as the people with tagged wan. If you have a switch at home with two unused ports, you can tag your wan and everything should be ok.

 

PM

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
3 3