Public Source Code on Github

20 7808
Post Last Edited by tony_zhang at 2014-7-31 02:45

Big news! The Banana Pi source code is now available on Github: Lemaker-Github.png

You can pull them down from Lemaker Github to build your own kernel. The default kernel configuration has opened all drivers needed by Banana Pi. Please refer to the manuals on wiki:,_script.bin_and_linux-kernel .
The simplest way is refer to “Use Banana Pi BSP” on Wiki.

If you have some modification suggestion for source code, please send patch to e-mail
Thank you Tony!


Give us a electric scheme of Banana Pi

Great work!

Reply 3# sylwek2k

I am working on software. I will help you to ask for the hardware schematic

finally can find the source code.

me too looking for the schematic....

Reply 1# tony_zhang

Thank youTony,
I hope that this will help me with the driver development.
Although I thought that getting the sources, or at least the kernel headers, directly on the bananaPI would be easier.
The BananPI is fast enough for a native compilation of kernel modules.
On Ubuntu systems normally it is  sufficient to install the compiler and
sudo apt-get kernel headers
to start kernel module development
Is there any hope that that can be provided too?


success ! It works ! Gigabit ethernet works ok and I have now xfs in the kernel.

I had to made 2 minors modifications to compile the kernel (but already had to do this with 3.4.90 from linux-sunxi.  I'm cross compiling with gcc version 4.8.4 20140526 (release) [ARM/embedded-4_8-branch revision 211358] (GNU Tools for ARM Embedded Processors)

So maybe this is because of this specific gcc compiler & because I'm cross-compiling ... Don't know

Here are the 2 minors diff :
1st one is because I use a non linux-targeted compiler :

diff ../../linux-sunxi/include/drm/drm.h include/drm/drm.h
< #if defined(__linux__)
> //#if defined(__linux__)
> #if defined(__KERNEL__) || defined(__linux__)

and I had to comment a whole part on process.c :

diff ../../linux-sunxi/arch/arm/kernel/process.c arch/arm/kernel/process.c
<                         unsigned int transbase, dac;
<                         asm("mrc p15, 0, %0, c2, c0\n\t"
<                             "mrc p15, 0, %1, c3, c0\n"
<                             : "=r" (transbase), "=r" (dac));
<                         snprintf(buf, sizeof(buf), "  Table: %08x  DAC: %08x",
<                                   transbase, dac);
> //                        unsigned int transbase, dac;
> //                        asm("mrc p15, 0, %0, c2, c0\n\t"
> //                            "mrc p15, 0, %1, c3, c0\n"
> //                            : "=r" (transbase), "=r" (dac));
> //                        snprintf(buf, sizeof(buf), "  Table: %08x  DAC: %08x",
> //                                  transbase, dac);

If I understand correctly, this is a valid optimization, (defined on A20) . But it chokes :
arch/arm/kernel/process.c: In function '__show_regs':
arch/arm/kernel/process.c:467:4: error: invalid 'asm': operand number out of range
    asm("mrc p15, 0, %0, c2, c0\n\t"
make[1]: *** [arch/arm/kernel/process.o] Erreur 1

I needed to disable it to compile, but there must be a much better solution...

Did not have to wait for long!

Thanks Tony!

Unfortunatley the GMAC code does not compile?

It comes up with 'Undefined error'

It seems to be related to the gpio entrys you have added?

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

Points Rules