Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on bananapi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 424
Location: Close to Annecy

PostPosted: Sat Aug 23, 2014 9:32 am    Post subject: Gentoo on bananapi Reply with quote

Hello,

I just own a BananaPI card and I would like it to run Gentoo.

My goal is to replace my energy hog basement server, so the bPI will be use :
* headless
* has to support basic network facilities (DNS, DHCP, mediatomb, deluge, http, php, postgresql, ... servers) I know the CPU power is enough as before the head of my network was a Sun Sparc 5 box :D
* eventually, some I2C hacking

I didn't find any howto for this specific board but, as it is supposed to be compatible with both Raspberry PI and CubyBoard, I'll try to proceed with Cuby installation as the hardware is closer, and I'm currently building v7 (armv7a-hardfloat-linux-gnueabi) and will probably have to mix rPI instruction, this topic and this page.

Anyone working with Gentoo on this board ? If not, any tips (Am I going the right way ?).

Thanks

Laurent
Back to top
View user's profile Send private message
Jogie214
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2004
Posts: 148
Location: Cologne / Germany

PostPosted: Sun Aug 24, 2014 10:04 am    Post subject: Reply with quote

Hi,

I just installed gentoo, but one advice at first use an SSD or a SATA HD, compilation is extremly limited by SD-Card performance, it took me nearly a day to compile dhcpcd, but the CPU wasn't the bootleneck.
First install crossdev, then create the armv7a-hardfloat-linux-gnueabi toolchain.
Download the armv7a stage 3.
To get a working kernel, uboot and script bin, I used the this wiki entry http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel.
The wiki is very ubuntu specific, you have to change the CROSS_COMPILE option in the Makefile in bananapi-bsp
Code:

CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi

Install the kernel and u-boot as described in the wiki, then untar the stage 3 install to the second partition of your SD-Card
Code:

tar xvpjf stage3_tarball -C /dev/your_sd_card_second_partition


Greetings and have fun,
jogie
_________________
Desktop: Core i3-4130T / Asus H87i-Plus / 8GB DDR3-800 / Intel HD / Gentoo amd64
Laptop : Core 2 Duo 5500 / HP nx7300 / 4 GB-RAM / Intel / Gentoo amd64
Back to top
View user's profile Send private message
szatox
Guru
Guru


Joined: 27 Aug 2013
Posts: 347

PostPosted: Sun Aug 24, 2014 4:20 pm    Post subject: Reply with quote

Since SD card is solid-state persistent memory, i'm pretty sure it's lifetime is lmited by compilation as much as compilation's speed is limited by that card. Good you noticed it's a bad idea.
Yet another solution is swap over ethernet or mounting ramdisk created on a big PC over NFS. LAN might provide more throughput than many USB HDDs would.
Back to top
View user's profile Send private message
Jogie214
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2004
Posts: 148
Location: Cologne / Germany

PostPosted: Sun Aug 24, 2014 6:37 pm    Post subject: Reply with quote

Hi,

for the compilation process I use tmpfs on RAM (650MB of the GB installed), to prevent to many write operations, the problem is the access to the headers and libraries in the system (at least I guess so). During a compilation process the CPU is (according to top) never at 100%, and since this is dual core board, there is still a lot of spare cpu power just idling around :(. But maybe the problem is the limited cache of the processor, I don't know, as soon as my SSD is up and running, I'll install some tools and benchmark to identify the problem.
The installation on an NFS is indeed a good idea, but I don't want to use a big rig to provide the data for my power saving little board.

Greetings,
jogie
_________________
Desktop: Core i3-4130T / Asus H87i-Plus / 8GB DDR3-800 / Intel HD / Gentoo amd64
Laptop : Core 2 Duo 5500 / HP nx7300 / 4 GB-RAM / Intel / Gentoo amd64
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 424
Location: Close to Annecy

PostPosted: Sun Aug 24, 2014 8:19 pm    Post subject: Reply with quote

Hi,

Jogie214 wrote:
To get a working kernel, uboot and script bin, I used the this wiki entry http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel.
The wiki is very ubuntu specific, you have to change the CROSS_COMPILE option in the Makefile in bananapi-bsp
Code:

CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi



I'm using Banana's How to build page ... but it failed.
Code:
  HOSTCC  tools/aisimage.o
In file included from /usr/include/image.h:22:0,
                 from /root/bPI/sunxi-bsp/u-boot-sunxi/tools/aisimage.c:10:
/usr/include/rgbpixel.h:61:3: erreur: expected specifier-qualifier-list before \u2018RGBpixel\u2019
In file included from /root/bPI/sunxi-bsp/u-boot-sunxi/tools/aisimage.c:10:0:
/usr/include/image.h:40:1: erreur: unknown type name \u2018class\u2019
/usr/include/image.h:41:1: erreur: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018{\u2019 token
/root/bPI/sunxi-bsp/u-boot-sunxi/tools/aisimage.c:22:1: erreur: unknown type name \u2018table_entry_t\u2019
/root/bPI/sunxi-bsp/u-boot-sunxi/tools/aisimage.c:23:2: attention : accolades autour d'une initialisation de scalaire [enabled by default]
/root/bPI/sunxi-bsp/u-boot-sunxi/tools/aisimage.c:23:2: attention : (near initialization for \u2018aisimage_cmds[0]\u2019) [enabled by default]

Which is normal : /usr/include/rgbpixel.h is a C++ code
Code:
struct RGBpixel
{
  /// The red, green, blue and alpha components
  unsigned char red, green, blue, alpha;
  /// Constructor (initialize to zero, alpha to 255)
  RGBpixel () /* : red(0), green(0), blue(0), alpha(255) {} */
  { *(unsigned *)this = (unsigned)~RGB_MASK; }


and tools/aisimage.c is ... C.

I duno how to solve that :(


Jogie214 wrote:
for the compilation process I use tmpfs on RAM (650MB of the GB installed), to prevent to many write operations, the problem is the access to the headers and libraries in the system (at least I guess so).


I'm on way to create a binary host to build stuffs outside the bPI : I'm doing that for my x86 machines and I have almost zero local compilations.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 424
Location: Close to Annecy

PostPosted: Sun Aug 24, 2014 10:53 pm    Post subject: Reply with quote

I'm trying this procedure too :

Jogie214 wrote:
To get a working kernel, uboot and script bin, I used the this wiki entry http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel.


but it fails also due to "error: git-remote-https died of signal 13" which linked to a Curl bug :(

Even if I bypass this issue, I'm failing with rgbpixel.h as described above :cry:

I got my bPI with a Raspbian card : will it work if I take everything up to "stage 3" from this card ?
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 442

PostPosted: Mon Aug 25, 2014 1:20 pm    Post subject: Reply with quote

destroyedlolo wrote:
Hi,

I'm using Banana's How to build page ... but it failed.
[code] HOSTCC tools/aisimage.o
In file included from /usr/include/image.h:22:0,


That's a problem with the u-boot build process: it wants image.h from the u-boot source, but gcc picks standard includes first.
You need to temporarily either uninstall the package which provides /usr/include/image.h or rename the file while you build uboot.
(I've been hit by that while trying to build u-boot for the Tegra K1..)
Back to top
View user's profile Send private message
Jogie214
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2004
Posts: 148
Location: Cologne / Germany

PostPosted: Mon Aug 25, 2014 8:48 pm    Post subject: Reply with quote

Hi,

image.h is provided by lensfun, I just deinstalled it during the process. I'm sorry that I forgot to mention it.
Quote:

but it fails also due to "error: git-remote-https died of signal 13" which linked to a Curl bug

I encountered that bug too, but some research pointed out, that it can be ignored :D.

Some update on the SSD, I just installed vim, ntp, htop and screen in under an hour, so I would strongly advise you to use some kind of sata storage.
_________________
Desktop: Core i3-4130T / Asus H87i-Plus / 8GB DDR3-800 / Intel HD / Gentoo amd64
Laptop : Core 2 Duo 5500 / HP nx7300 / 4 GB-RAM / Intel / Gentoo amd64
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 424
Location: Close to Annecy

PostPosted: Mon Aug 25, 2014 9:24 pm    Post subject: Reply with quote

ok, thanks, it helped to move ahead.
But do you have any idea to solve this nasty "error: git-remote-https died of signal 13" ?
Back to top
View user's profile Send private message
Jogie214
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2004
Posts: 148
Location: Cologne / Germany

PostPosted: Mon Aug 25, 2014 11:36 pm    Post subject: Reply with quote

To be honest I don't know. But to my understanding it's a communications error during the final goodbye, so I don't care that much.
I'm trying to get Xorg and all HW features of the Bananapi up and running.
_________________
Desktop: Core i3-4130T / Asus H87i-Plus / 8GB DDR3-800 / Intel HD / Gentoo amd64
Laptop : Core 2 Duo 5500 / HP nx7300 / 4 GB-RAM / Intel / Gentoo amd64
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 424
Location: Close to Annecy

PostPosted: Tue Aug 26, 2014 6:21 pm    Post subject: Reply with quote

It's what I have understood from my Internet reading but

Code:
celeron sunxi-bsp # make
git submodule init
git submodule update u-boot-sunxi
Clonage dans 'u-boot-sunxi'...
remote: Counting objects: 261423, done.
remote: Compressing objects: 100% (51385/51385), done.
remote: Total 261423 (delta 205554), reused 261423 (delta 205554)
Réception d'objets: 100% (261423/261423), 72.64 MiB | 396.00 KiB/s, done.
Résolution des deltas: 100% (205554/205554), done.
Vérification de la connectivité... fait.
error: git-remote-https died of signal 13
Chemin de sous-module 'u-boot-sunxi' : '8a4621c488f33089d831168bfa5bae210a5684c8' extrait
mkdir -p /root/bPI/sunxi-bsp/build/Bananapi-u-boot
make -C u-boot-sunxi Bananapi_config O=/root/bPI/sunxi-bsp/build/Bananapi-u-boot CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- -j2
make[1] : on entre dans le répertoire « /root/bPI/sunxi-bsp/u-boot-sunxi »
make[1] : on quitte le répertoire « /root/bPI/sunxi-bsp/u-boot-sunxi »
make[1] : on entre dans le répertoire « /root/bPI/sunxi-bsp/u-boot-sunxi »
make: *** No rule to make target `Bananapi_config'.  Stop.
make[1]: *** [Bananapi_config] Erreur 1
make[1] : on quitte le répertoire « /root/bPI/sunxi-bsp/u-boot-sunxi »
make: *** [/root/bPI/sunxi-bsp/build/Bananapi-u-boot/include/config.h] Erreur 2


Yesterday, I did another try, this step passed but I got error 13 afterward and the compilation failed just after this error too.

Anyway, do you think it would boot from Banana's Raspbian image ... using a Gentoo made kernel ?
Back to top
View user's profile Send private message
szatox
Guru
Guru


Joined: 27 Aug 2013
Posts: 347

PostPosted: Tue Aug 26, 2014 7:48 pm    Post subject: Reply with quote

Kernel and userland are not bound to each other. You need boh of them to boot, but none of them forces any particular variant of the other.
They must both be compiled for hardware you're going to run it on. That's pretty much it. If you can run raspbian on banana pi, both those components are good enough.
If you replace kernel with gentoo one, it will also be fine as long as it's compiled for this hardware.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum