Discussion

How to get a working kernel

108 23373
a1d3s  
you does a cat/proc/cpuinfo ? do lscpu
root@bpi-m1-jessie:/home/bpi# lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0
Off-line CPU(s) list:  1
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Model name:            ARMv7 Processor rev 4 (v7l)

Edited by silentcreek at Tue Nov 11, 2014 04:41
[...] but please use bananapi.com forum to talk about

Why should we use yet another forum? First, you ask for help here, and then you want to draw people to a different site? That contradicts my understanding of a community. Also the forum over there has much less activity than the one here at LeMaker. There's nothing to be gained. Let alone there is no info whatsoever on who's behind that site. And last but not least, I haven't seen any contribution of the so-called "Bananapi R&D Team" or "bananapi-dev" to the upstream sunxi code. So, personally, I don't see any reason to use that website or forum. But I'd be glad to see things cleared up.

Edited by dupont-y at Tue Nov 11, 2014 04:44
a1d3s replied at Tue Nov 11, 2014 04:01
you does a cat/proc/cpuinfo ? do lscpu
root@bpi-m1-jessie:/home/bpi# lscpu
Architecture:          a ...


yes that's it.
2nd processor is seen but not started. Even with cpu hotplug compiled in, I can't online the 2nd cpu. I read somewhere else that we need a specially patched uboot for that. I'll try this evening. [edit : just realized that's why uboot from denx was used... in the original image . Maybe the easy way to have a working set is to backport the gmac patch from sunxi-boot to denx fork .]

BTW, 3.18rc3 show great promises in performance. Iperf is giving me 750 Mb/s with gigabit perf instead of 650 Mb/s with kernel 3.4

tkaiser  
Edited by tkaiser at Tue Nov 11, 2014 05:17
dupont-y replied at Tue Nov 11, 2014 04:40
Maybe the easy way to have a working set is to backport the gmac patch from sunxi-boot to denx fork


You refer to https://www.mail-archive.com/u-boot@lists.denx.de/msg148558.html aren't you? And good to hear about increased network throughput. In which direction did you measure (client writes to BPi or vice versa)?

a1d3s  
today i build a new one with rc4

a1d3s  
between uboot-sunxi and uboot-next are much diffrences

f4exb  
Edited by f4exb at Tue Nov 11, 2014 17:39
tkaiser replied at Tue Nov 11, 2014 05:17
You refer to https://www.mail-archive.com/u-boot@lists.denx.de/msg148558.html aren't you? And good ...


Alas, the patch is already in Denx u-boot from git repository.
And it does not work for me.

Also funny enough is that the board/sunxi/gmac.c file found here (https://github.com/linux-sunxi/u-boot-sunxi.git) that was reported to work is the same without the patch.

Update: tried with or without the patch and it does not make any difference.

f4exb  
Edited by f4exb at Wed Nov 12, 2014 00:54

Hello again,

I tried with the image in  a1d3s' post: http://www.bananapi.com/index.ph ... e-w-kernel-3-18-rc3
It works and apparently without packet loss on the pings
However it does not with any of the u-boot images and the kernel I have compiled myself.
Maybe there's something wrong in my kernel configuration although I do not make other changes than getting the Atheros drivers for WiFi and modules option.

tkaiser replied at Tue Nov 11, 2014 05:17
You refer to https://www.mail-archive.com/u-boot@lists.denx.de/msg148558.html aren't you? And good ...

from my pc (5 years old core2 duo with Atheros gigabit) to bananapi :

root@duponty-desktop:~# iperf -c banana2  -i 3 -t 300
------------------------------------------------------------
Client connecting to banana2, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.21.105 port 34956 connected with 192.168.21.42 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 3.0 sec   265 MBytes   741 Mbits/sec
[  3]  3.0- 6.0 sec   264 MBytes   737 Mbits/sec
[  3]  6.0- 9.0 sec   263 MBytes   736 Mbits/sec
[  3]  9.0-12.0 sec   264 MBytes   738 Mbits/sec
[  3] 12.0-15.0 sec   264 MBytes   738 Mbits/sec

In reverse order :
root@banana-two:~# iperf -c 192.168.21.105 -i 3 -t 300
------------------------------------------------------------
Client connecting to 192.168.21.105, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[  3] local 192.168.21.42 port 52914 connected with 192.168.21.105 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 3.0 sec   185 MBytes   516 Mbits/sec
[  3]  3.0- 6.0 sec   186 MBytes   519 Mbits/sec
[  3]  6.0- 9.0 sec   185 MBytes   517 Mbits/sec
[  3]  9.0-12.0 sec   186 MBytes   519 Mbits/sec
[  3] 12.0-15.0 sec   186 MBytes   520 Mbits/sec

f4exb replied at Tue Nov 11, 2014 17:16
Alas, the patch is already in Denx u-boot from git repository.
And it does not work for me.

There's something curious going on.
The image posted by a1d3 is working but WITH packets loss (for me). On this SD card,  I burned a u-boot I previously used, and all is working ok.

This u-boot is coming from  https://github.com/linux-sunxi/u-boot-sunxi.git i pulled oct 12, but with an additional patch I manually add:

diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
index e7ff952..f58c963 100644
--- a/board/sunxi/gmac.c
+++ b/board/sunxi/gmac.c
@@ -24,6 +24,15 @@ int sunxi_gmac_initialize(bd_t *bis)
                CCM_GMAC_CTRL_GPIT_MII);
#endif

+       /*
+        * HdG: this is necessary to get GMAC to work reliable on the
+        * Bananapi. We don't know what these undocumented bits do, so this
+        * is a Bananapi specific hack for now.
+        */
+#ifdef CONFIG_BANANAPI
+       setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
+#endif
+
        /* Configure pin mux settings for GMAC */
        for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
#ifdef CONFIG_RGMII


So. THIS is working, but it seems this patch is now mainline (and on denx fork). I need to try another fresh u-boot compilation to see how things goes.

Regarding kernels : my previous kernels were not working, (lack of serial console don't help to debug why). I started over with a1d3 .config, added all my relevents options (XFS, bridge, multi port sata...) And the result is a perfectly working kernel.
root@banana-two:~# uname -a
Linux banana-two 3.18.0-rc3-169379-g8c27ecb-dirty #14 SMP Mon Nov 10 23:00:32 UTC 2014 armv7l GNU/Linux

go figure....


You have to log in before you can reply Login | Sign Up

Points Rules