Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel sources for Banana Pi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Mon Feb 27, 2017 9:05 pm    Post subject: Kernel sources for Banana Pi Reply with quote

Hi,

Months ago I installed a raspberry PI and used https://github.com/raspberrypi/linux

Anyone knows about similar git repository for Banana Pi kernel sources?

Thank you!
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3462

PostPosted: Tue Feb 28, 2017 7:55 pm    Post subject: Reply with quote

Raspberry sources in gentoo repository comes with a config for banana pi too.
You can run regular make-arm7-blabla-bla-something to autoconfigure it for any of quite a lot of boards. You will get a working kernel and DTB for your piece of hardware.
Perhaps you could also find those defconfigs in other *-sources from portage. I was going to build gentoo-sources for banana, but I got busy with other matters so this idea is waiting for better time to get some attention again.
Anyway, I don't know about git, but you _can_ build a working banana kernel yourself using crossdev and sources from portage. No manual configuration required.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 653
Location: EU

PostPosted: Tue Feb 28, 2017 9:49 pm    Post subject: Reply with quote

There are a lot of board sold under the name banana pi, but probably all use the AllWinner Soc,you should be more specific to get more help ...

Try this wiki from the developers of the kernel for AllWinner SoC:
http://linux-sunxi.org/Linux
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Wed Mar 01, 2017 5:49 pm    Post subject: Reply with quote

Well,

I managed to install the OS thanks to this: https://wiki.gentoo.org/wiki/Banana_Pi_the_Gentoo_Way

Then I emerged gentoo-sources from the Banana Pi and tried to compile the kernel but I got the error below:

Code:

CC      arch/arm/kernel/psci.o
arch/arm/kernel/psci.c:287:12: error: redefinition of ‘psci_init’
 int __init psci_init(void)
            ^
In file included from arch/arm/kernel/psci.c:26:0:
./arch/arm/include/asm/psci.h:44:19: note: previous definition of ‘psci_init’ was here
 static inline int psci_init(void) { return 0; }
                   ^
scripts/Makefile.build:258: recipe for target 'arch/arm/kernel/psci.o' failed
make[1]: *** [arch/arm/kernel/psci.o] Error 1
Makefile:948: recipe for target 'arch/arm/kernel' failed
make: *** [arch/arm/kernel] Error 2


Maybe I should give a try to this: https://wiki.gentoo.org/wiki/Banana_Pi_the_Gentoo_Way#Compile_the_Kernel

What you say szatox is that I should emerge sys-kernel/raspberrypi-sources and try to compile kernel from there?

Thank you
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3462

PostPosted: Wed Mar 01, 2017 8:31 pm    Post subject: Reply with quote

Yup. It "just worked"™ for me so it's certainly worth a shot.
I remember there were autoconfigs for banana pro and banana pi among many others. "find ./arch/ -iname '*ana*fconfig'" should give you a hint on the correct replacement to be made in "make defconfig" command. Obviously, use make's counterpart from crossdev.

Unfortunately there isn't much more for me to share on this matter, I've only spent a few days on it - mostly playing in different area.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54588
Location: 56N 3W

PostPosted: Wed Mar 01, 2017 8:58 pm    Post subject: Reply with quote

mamac,

Cross compiling a kernel for a Raspberry Pi is covered in some detail in Raspberry Pi 3 64 bit Install

You will need to change the tuple when you use crossdev to build your cross compiler. I think you have an arm7a, so it will be armv7a-hardfloat-linux-gnueabi but do check first.

Once you have your kernel tree the defconfigs are listed in arch/arm/configs/ pick one you like.

The method in the same but using a different cross toolchain and a different defconfig.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Thu Mar 02, 2017 6:18 pm    Post subject: Reply with quote

Thank you gents for all your recommendations.
I think I have enough information to have a nice kernel for my hardware.
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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