<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks for that Gerhard,<br>
<br>
Speaking of u-boot , I had sent an email a few days ago to Igor
Pecovnik , who is the Debian ARM developer . He has been patching
the Debian source for the BananaPi R1 for a while now , and
maintains the R1 patches and scripts and dts . My question was if he
could submit those (lamobo R1) BananaPi R1 patches for the dts back
to Denx . That way they would be in the mainline and the benefit is
that all Distros would have access to them not just Debian . Also it
would be less work for him maintaining the patches with every
release of u-boot . He and Tomas Kaiser went through the exercise of
fine tuning the GMAC_TX_DELAY specifically for the R1 to improve the
Ethernet throughput .This parameter is there to compensate for the
physical board layout , length of tracks etc. . They arrived at the
setting of 4 compared with generic bananapi setting of 3 . <br>
<br>
Best Regards<br>
Milorad<br>
<br>
<br>
<div class="moz-cite-prefix">On 21/08/15 04:38, Gerhard Wiesinger
wrote:<br>
</div>
<blockquote cite="mid:55D61E9F.1060905@wiesinger.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Milorad,<br>
<br>
Had to adapt the command line a little bit but works now, see
below. I also think you missed a ; after make in the line below.<br>
Updated the script also for cleanup and multiple invocations and
output versioning (see below).<br>
<br>
dnf install git gcc<br>
<br>
CFLAGS="-I $SRCDIR/libnl-tiny/src/include -D_GNU_SOURCE"
LDFLAGS="-L $SRCDIR/libnl-tiny/src" make cli.o swlib.o; cc -L
$SRCDIR/libnl-tiny/src -o swconfig cli.o swlib.o -lnl-tiny -ldl<br>
<br>
Also installed the LED service, but it is only for one CPU (e.g.
cpu0, cpu1 is not handled)...<br>
I'm currently not physically at the Banana so I can't verify it
now ...<br>
<br>
Uboot is currently compiling ...<br>
There are also newer versions available:<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="ftp://ftp.denx.de/pub/u-boot/">ftp://ftp.denx.de/pub/u-boot/</a><br>
<br>
Ciao,<br>
Gerhard<br>
<br>
#!/bin/bash<br>
# This script is used to compile 'swconfig' for the BPI-R1 based
on the OpenWrt sources.<br>
# Big thanks to mattrix and x4711 from the LeMaker forum who
discovered this procedure.<br>
<br>
# Requires : lua-devel cmake lua git<br>
# Requires2: dnf install git gcc<br>
git clone <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://github.com/Bananian/openwrt.git">https://github.com/Bananian/openwrt.git</a><br>
pushd .<br>
cd openwrt<br>
git pull<br>
popd<br>
<br>
# cp
openwrt/target/linux/generic/files/include/uapi/linux/switch.h
/usr/include/linux/switch.h<br>
\cp -f
openwrt/target/linux/generic/files/include/uapi/linux/switch.h
/usr/include/linux/switch.h<br>
<br>
chmod 644 /usr/include/linux/switch.h<br>
<br>
rm -f swconfig<br>
rm -f libnl-tiny<br>
ln -s openwrt/package/network/config/swconfig/src swconfig<br>
ln -s openwrt/package/libs/libnl-tiny libnl-tiny<br>
SRCDIR=`pwd`<br>
<br>
cd $SRCDIR/libnl-tiny/src<br>
#rm libnl-tiny.so<br>
rm -f *.o libnl-tiny.so libnl-tiny.a<br>
make<br>
ar rcs libnl-tiny.a nl.o handlers.o msg.o attr.o cache.o
cache_mngt.o object.o socket.o error.o genl.o genl_family.o
genl_ctrl.o genl_mngt.o unl.o<br>
<br>
cp -f libnl-tiny.so /lib<br>
cp -f libnl-tiny.so $SRCDIR/libnl-tiny.so.`date
+%Y.%m.%d.%H.%M.%S`<br>
<br>
cd $SRCDIR/swconfig<br>
rm -f *.o swconfig<br>
#CFLAGS="-I $SRCDIR/libnl-tiny/src/include -D_GNU_SOURCE"
LDFLAGS="-L $SRCDIR/libnl-tiny/src" make cc -L
$SRCDIR/libnl-tiny/src -o swconfig cli.o swlib.o -lnl-tiny -ldl<br>
CFLAGS="-I $SRCDIR/libnl-tiny/src/include -D_GNU_SOURCE"
LDFLAGS="-L $SRCDIR/libnl-tiny/src" make cli.o swlib.o; cc -L
$SRCDIR/libnl-tiny/src -o swconfig cli.o swlib.o -lnl-tiny -ldl<br>
<br>
cp -f swconfig /usr/local/bin<br>
cp -f swconfig $SRCDIR/swconfig.`date +%Y.%m.%d.%H.%M.%S`<br>
<br>
<br>
On 17.08.2015 15:29, OM Ugarcina wrote:<br>
</div>
<blockquote
cite="mid:FE3151A8-0864-4278-B31B-546CB64C39ED@gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<div>Not really , it is that I just got all the services and
apps configured and working : Avahi, cups, radius, Apache,
squid, firewall, dhcp, DNS, PPPoE. Would want to see if the
fc22 versions were really that much newer . Also would hate to
brake something . But have been thinking about doing a yum
upgrade . F2fs is really developed for sdcards and flash
storage . It works well with different internal geometries
used with flash devices and their block sizes . It is being
developed by Samsung . Check this article which looks into how
to get the best out of a sdcard :</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/">https://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/</a></div>
<div><br>
</div>
<div>And the reason for f2fs is to do this optimized approach
automatically.<br>
<br>
Best Regards
<div><br>
</div>
<div>O&M Ugarcina</div>
</div>
<div><br>
On 17 Aug 2015, at 11:03 pm, Gerhard Wiesinger <<a
moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:gerhard@wiesinger.com"><a class="moz-txt-link-abbreviated" href="mailto:gerhard@wiesinger.com">gerhard@wiesinger.com</a></a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Milorad,<br>
<br>
Thanx. Any reason not to update to fc22?<br>
<br>
Any advantage from f2fs over xfs (which is the default
fedora image I used)?<br>
<br>
All my x64 systems and also banana work well with fc22.<br>
<br>
Ciaom<br>
Gerhard<br>
<br>
<br>
On 17.08.2015 15:00, OM Ugarcina wrote:<br>
</div>
<blockquote
cite="mid:2727EBF9-3E44-4743-A517-4858F61477D1@gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<div>Hello Gerhard,</div>
<div><br>
</div>
<div>My system is mostly fc21 but with latest fc22 kernel
and fc23 uboot and using f2fs file system . The system
will probably stay mostly like that , but I will keep
updating important packages if security warrants or if
there is a great feature . Hans is :</div>
<span style="background-color: rgba(255, 255, 255, 0);">
<div><span style="background-color: rgba(255, 255, 255,
0);"><br>
</span></div>
<a moz-do-not-send="true" href="https://github.com/jwr">https://github.com/jwr</a><b>degoede</b></span>
<div><b><br>
</b></div>
<div><b><br>
</b>
<div><br>
Best Regards
<div><br>
</div>
<div>Milorad</div>
</div>
<div><br>
On 17 Aug 2015, at 9:40 pm, Gerhard Wiesinger <<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:gerhard@wiesinger.com"><a class="moz-txt-link-abbreviated" href="mailto:gerhard@wiesinger.com">gerhard@wiesinger.com</a></a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">BTW: are you already on
FC22?<br>
<br>
Ciao,<br>
Gerhard<br>
<br>
On 17.08.2015 13:01, mo.ucina wrote:<br>
</div>
<blockquote cite="mid:55D1BF17.4020508@gmail.com"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
Sounds Good,<br>
<br>
Here is the kernel src rpm :<br>
<br>
<b><a moz-do-not-send="true"
href="http://tinyurl.com/pwnctea">http://tinyurl.com/pwnctea</a></b><br>
<br>
<br>
that error looks like a missing dependency , you
will need to install an equivalent of
glibc-headers for arm on the machine . Technically
the switch is an 8 port device , and WAN port is
wired internally to port 3 . I would have thought
that all ports would behave similarly . But anyway
it is purely a cosmetic thing . <br>
<br>
Not much activity on the R1 with the Fedora users
at the moment . There is a bit of work being done
by sunxi with the u-boot people , and there have
been patches submitted for a separate Lamobo R1
(that is probably going to be the official name
for our router) but they have not made it in yet .
I think probably due to maintenance ownership , no
one wanted to sign up for it . So Hans is probably
sitting on the patches and not putting them in . <br>
<br>
I have installed the latest u-boot 2015-07 with
the latest code additions . <br>
You can see it here :<br>
<br>
<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://lists.fedoraproject.org/pipermail/arm/2015-June/009582.html">https://lists.fedoraproject.org/pipermail/arm/2015-June/009582.html</a><br>
<br>
<div class="moz-cite-prefix">On 17/08/15 19:50,
Gerhard Wiesinger wrote:<br>
</div>
<blockquote
cite="mid:55D1AE7D.5040607@wiesinger.com"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Milorad,<br>
<br>
Thank you for the information.<br>
<br>
I had to define the cross compile flags as I
compiled on a x64 machine because I had no
network connectivity at the beginning.<br>
# Yours/mine:<br>
rpmbuild -ba --target armv7hl --without=perf
--without=debuginfo --without=pae
--define="_arch arm" --define="_build_arch
arm" kernel.spec<br>
rpmbuild -ba --target armv7hl --without=perf
--without=debuginfo --without=pae
--define="_arch arm" --define="_build_arch
arm" --define="_with_cross 1"
--define="_without_tools 1" kernel.spec <br>
<br>
I had the following compile errors without the
"_without_tools" defines:<br>
+ make CROSS_COMPILE=arm-linux-gnu-<br>
arm-linux-gnu-gcc -O1 -Wall -Wshadow -W
-Wformat -Wimplicit-function-declaration
-Wimplicit-int -fstack-protector -D
VERSION=\"1.0\" -c -o tmon.o tmon.c<br>
tmon.c:19:20: fatal error: getopt.h: No such
file or directory<br>
compilation terminated.<br>
<builtin>: recipe for target 'tmon.o'
failed<br>
make: *** [tmon.o] Error 1<br>
error: Bad exit status from
/var/tmp/rpm-tmp.SJeffm (%build)<br>
<br>
So I decided to to disable the tools. Will try
to compile also directly on the Banana. But at
that time I had no network connectivity and
therefore it was really annoying to work
directly there. But now Banana is in
production and I will try in the future to
compile.<br>
<br>
OK, you are having the same issue on the LED.
I guess it can be software controlled, too (it
works well as it toggles on startup).<br>
<br>
Information from the chinese seller:<br>
dear Gerhard,<br>
the R1 is a router, this port is the ADSL
port,<br>
it is different from the other 4 ports,<br>
the status is common, it is not a quality
problem, dear friend!<br>
<br>
I think we should stay in contact and share
information as we find something new regarding
Banana and Fedora.<br>
<br>
Any active community around Fedora on Banana
(Forum/mailing lists)?<br>
<br>
BTW: any information of the sources of the
Allwinner A20 uboot?<br>
BTW2: Do you know a source of the schematic of
the Banana Pi-R (I only found other versions).<br>
<br>
Thank you.<br>
<br>
Ciao,<br>
Gerhard<br>
<br>
<br>
On 17.08.2015 11:25, mo.ucina wrote:<br>
</div>
<blockquote
cite="mid:55D1A8A4.7020609@gmail.com"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
Hello Gerhard,<br>
<br>
I use the banana hardware to compile the
kernel , it is slow but works always 100% . I
used to get funny issues when trying to cross
compile . SO now I just kick off a compile
before going to bed , and in the morning it is
done . My compile line is :<br>
<br>
<big><tt>rpmbuild -ba --target armv7hl
--without=perf --without=debuginfo
--without=pae --define="_arch arm"
--define="_build_arch arm" kernel.spec</tt><tt><br>
</tt></big><br>
My swconfig comes from this script :<br>
<br>
<big><tt>#!/bin/bash</tt><tt><br>
</tt><tt># This script is used to compile
'swconfig' for the BPI-R1 based on the
OpenWrt sources.</tt><tt><br>
</tt><tt># Big thanks to mattrix and x4711
from the LeMaker forum who discovered this
procedure.</tt><tt><br>
</tt><tt><br>
</tt><tt># Requires : lua-devel cmake lua
git</tt><tt><br>
</tt><tt>git clone <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://github.com/Bananian/openwrt.git"><a class="moz-txt-link-freetext" href="https://github.com/Bananian/openwrt.git">https://github.com/Bananian/openwrt.git</a></a></tt><tt><br>
</tt><tt><br>
</tt><tt>cp
openwrt/target/linux/generic/files/include/uapi/linux/switch.h
/usr/include/linux/switch.h</tt><tt><br>
</tt><tt>chmod 644
/usr/include/linux/switch.h</tt><tt><br>
</tt><tt><br>
</tt><tt>ln -s
openwrt/package/network/config/swconfig/src
swconfig</tt><tt><br>
</tt><tt>ln -s
openwrt/package/libs/libnl-tiny libnl-tiny</tt><tt><br>
</tt><tt>SRCDIR=`pwd`</tt><tt><br>
</tt><tt><br>
</tt><tt>cd $SRCDIR/libnl-tiny/src</tt><tt><br>
</tt><tt>make</tt><tt><br>
</tt><tt>rm libnl-tiny.so</tt><tt><br>
</tt><tt>ar rcs libnl-tiny.a nl.o handlers.o
msg.o attr.o cache.o cache_mngt.o object.o
socket.o error.o genl.o genl_family.o
genl_ctrl.o genl_mngt.o unl.o</tt><tt><br>
</tt><tt><br>
</tt><tt>cd $SRCDIR/swconfig</tt><tt><br>
</tt><tt>CFLAGS="-I
$SRCDIR/libnl-tiny/src/include
-D_GNU_SOURCE" LDFLAGS="-L
$SRCDIR/libnl-tiny/src" make cc -L
$SRCDIR/libnl-tiny/src -o swconfig cli.o
swlib.o -lnl-tiny -ldl</tt><tt><br>
</tt><tt><br>
</tt></big><br>
The led on the WAN port is always on - for
some reason , even with drivers , irrespective
of the cable being in or out . I am not using
the hdmi , my board is acting purely as a
wired router . I have defined two interfaces
with different subnets , one for in , the
other for out . Because the board has just one
NIC , the interfaces need to be done with
vlans . And I connect to it via ssh . One
interesting thing that I have borrowed form
the ubuntu people is using the green LED
indicator for indicating activity , in my case
CPU activity , but can be used instead for
others as well . I have set it up as a service
:<br>
<br>
<big><tt>cat /etc/systemd/system/led.service </tt><tt><br>
</tt><tt>[Unit]</tt><tt><br>
</tt><tt>Description=Assign LED Function</tt><tt><br>
</tt><tt><br>
</tt><tt>[Service]</tt><tt><br>
</tt><tt>Type=oneshot</tt><tt><br>
</tt><tt>ExecStart=/bin/sh -c "echo 'cpu0'
>
/sys/class/leds/bananapi\:green\:usr/trigger"</tt><tt><br>
</tt><tt><br>
</tt><tt>[Install]</tt><tt><br>
</tt><tt>WantedBy=multi-user.target</tt><tt><br>
</tt></big><br>
<br>
I will send you the link to the src rpm with
switch drivers .<br>
<br>
<br>
Best Regards<br>
<br>
Milorad<br>
<br>
Melbourne/AUstralia<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 17/08/15
16:05, Gerhard Wiesinger wrote:<br>
</div>
<blockquote
cite="mid:55D179B0.1070208@wiesinger.com"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hello Milorad,<br>
<br>
Great, thank you for the answers. Some
comments and questions below.<br>
<br>
1.) Ad kernel<br>
In the meantime I got a working kernel,
you can find it on <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://www.wiesinger.com/opensource/fedora/kernel/BananaPi-R1/"><a class="moz-txt-link-freetext" href="https://www.wiesinger.com/opensource/fedora/kernel/BananaPi-R1/">https://www.wiesinger.com/opensource/fedora/kernel/BananaPi-R1/</a></a><br>
I integrated 2 patches, the dmesg spamming
patch and the switch patch. Can you also
post the SRPM on a cloud service like
Google Drive/Dropbox, etc.<br>
<br>
BTW: What's your command line compiling
the kernel?<br>
I had to disable the tools to get compile
done.<br>
rpmbuild -ba --target armv7hl
--without=perf --without=debuginfo
--without=pae --define="_arch arm"
--define="_build_arch arm"
--define="_with_cross 1"
--define="_without_tools 1" kernel.spec <br>
<br>
2.) swconfig<br>
Where did you find the instructions for
compiling swconfig? (The Ubuntu version
works well).<br>
<br>
3.) LEDs<br>
Can you try the following: No connection
at the uplink port. Is one the LED always
on like in the picture from my previous
email?<br>
It already is on when the uboot comes up.<br>
<br>
Except the uplink port LEDs look ok to me<br>
<br>
4.) Regarding Display & console:<br>
Does full HD work for you?<br>
Currently I boot into normal console login
only.<br>
<br>
I don't see any service startup messages
at the screen but maybe they go into the
serial console. Any hint?<br>
<br>
Thank you.<br>
<br>
BTW: I'm from Austria/Vienna, where are
you from?<br>
<br>
Ciao,<br>
Gerhard<br>
<br>
<br>
On 17.08.2015 07:49, OM Ugarcina wrote:<br>
</div>
<blockquote
cite="mid:CAHm1XyzHr2xcjHZNCQcB=t2rnNGsJNXwSSxrm0bDw_c9_8DLvw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hello Gerhard,<br>
<br>
</div>
The kernel that comes from the
fedora image will not have the
switch driver in it , so it is
normal that the networking
does not work out of the box .
That is also the reason why
the swconfig utility is not
seeing anything yet . I
compiled the swconfig utility
from sources using the
ubuntu-bananian instructions .
The one you copied from ubuntu
should work just as well .
Once you have the switch
drivers the LEDs will start
blinking when data is going ,
but I am still not sure if
they are working perfectly 100
% . The LED colours when it
comes to link speed look odd
to me .<br>
</div>
<br>
</div>
If your are in a position to
compile the kernel I have a src
rpm for you . It is a bit big ,
about 80 Mb , if you have an FTP
server I can uploaded for you . <br>
<br>
</div>
The kernel devs at Fedora are still
not including the drivers for the
switch because of a few issues to do
with missing APIs which need to be
agreed on . The driver that I use
comes from open-wrt and uses their
approach which works very well . <br>
<br>
</div>
Best Regards<br>
</div>
Milorad<br>
<div>
<div>
<div>
<div>
<div> <br>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Aug 13,
2015 at 7:16 PM, Gerhard Wiesinger <span
dir="ltr"><<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:gerhard@wiesinger.com"><a class="moz-txt-link-abbreviated" href="mailto:gerhard@wiesinger.com">gerhard@wiesinger.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">Hello
Milorad,<br>
<br>
Got my Banana Pi R1 yesterday but it
doesn't work out of the box :-(<br>
fedora-arm-image-installer
--image=Fedora-Server-armhfp-22-3-sda.raw.xz
--target=Bananapi --media=/dev/sdi
--selinux=OFF --norootpass -y<br>
It boots well but as you wrote the
BCM53125 is not found.<br>
<a moz-do-not-send="true"
href="https://lists.fedoraproject.org/pipermail/arm/2015-June/009544.html"
rel="noreferrer" target="_blank">https://lists.fedoraproject.org/pipermail/arm/2015-June/009544.html</a><br>
Do you also have a version for
Fedora 22 available (or a complete
source RPM package).<br>
<br>
Any hints for a better working
Fedora image or a maintained kernel
repository?<br>
<br>
BTW: Where did you get the swconfig
utility? Currently I'm using a copy
of the Ubuntu version which works
well but no switch is found.<br>
<br>
BTW2: This patch is also important:<br>
<a moz-do-not-send="true"
href="http://forum.armbian.com/index.php/topic/111-dmesg-spmmed-by-clocksource-hstimer-mask-0xffffffff-max-cycles-0xffffffff-max-idle-ns-238907555784-ns/"
rel="noreferrer" target="_blank">http://forum.armbian.com/index.php/topic/111-dmesg-spmmed-by-clocksource-hstimer-mask-0xffffffff-max-cycles-0xffffffff-max-idle-ns-238907555784-ns/</a><br>
<a moz-do-not-send="true"
href="http://permalink.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/17500"
rel="noreferrer" target="_blank">http://permalink.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/17500</a><br>
<a moz-do-not-send="true"
href="https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/commit/?h=next/dt&id=2186df37831a8bb259bbf2ae07356747a03d0b8d"
rel="noreferrer" target="_blank">https://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/commit/?h=next/dt&id=2186df37831a8bb259bbf2ae07356747a03d0b8d</a><br>
<br>
BTW3: Is it normal that the LED is
always on the uplink port, see image
attached?<br>
<br>
Thank you.<br>
<br>
Ciao,<br>
Gerhard<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>