Bananian

Howto: Build and install a modified linux kernel directly on Bananian

33 25154
mille  
Edited by mille at Sat Jan 17, 2015 05:34

I needed a customized kernel but was to lazy to setup a cross compiler environment. That's why I tried to get it done directly on Bananian, and it worked . SD Card >= 4GB required.

as root:

  1. apt-get install git build-essential libncurses5-dev u-boot-tools uboot-mkimage
  2. cd ~
  3. git clone https://github.com/Bananian/linux-bananapi.git --depth 1
  4. cd linux-bananapi
  5. make sun7i_defconfig
  6. make menuconfig
  7. make -j2 uImage modules
  8. make modules_install
  9. mount /dev/mmcblk0p1 /boot
  10. cp arch/arm/boot/uImage /boot
  11. reboot
Copy the Code
how much time did it take just to compile ie after cloning the kernel github?

mille  
"git clone...": ~10 minutes.
"make -j2 uImage modules": ~2.5 hours.

great, thanks for sharing!
Future versions of Bananian Linux will include an kernel update routine without compiling.

chris89  
I did it today.

"git clone...": ~2 minutes.
"make -j3 uImage modules": ~2.0 hours.

j3 = 1 CPU + 2 Cores

joates  
Edited by joates at 2014-10-23 15:11

thank you mille

i did this on the BPi no problem (much easier IMO, no need for cross-compiling setup)
link to my post

similar result:
make -j2 uImage modules ( it took about 2 hours )

joates replied at 2014-10-23 15:09
thank you mille

i did this on the BPi no problem (much easier IMO, no need for cross-compiling setu ...

cross-compiling on my i5 processor is finished within some minutes...

I did build a kernel locally yet but I'm running Gentoo and all installation is done by local compilation.
My solution was to setup a distributed compilation (DistCC) with my bPI, my i5 (2 physical core), and an old celeron as participant.
And the compilation is fast enough for my needs

joates  
Bananian replied at Fri Oct 24, 2014 11:00
cross-compiling on my i5 processor is finished within some minutes...

@Bananian
EASIER means requiring a small amount of effort (which has almost nothing to do with SPEED)

considering the TITLE of this thread ("Build and install a modified linux kernel directly on Bananian") i think you are a little off-topic, don't you ?

I think the comparison to a desktop computer is a fair one.

Just consider this: I set up a virtual machine running Ubuntu as my cross-compilation environment within less than 30 minutes (and you could do that even faster if you take preconfigured images from the web, or if you already have a linux installation running). Here I spent 30 minutes that I wouldn't have had to on the Banana Pi.

However, now I can compile a kernel within minutes (depending on the system's cpu) as opposed to 2 hours. You might still think it's easier to do this on your BPi if you need to compile the kernel only once. But as soon as you look into compiling the kernel more than once, e.g. when you update your kernel sources, etc., then you really reach a point where in my opinion it is really easier (not only in terms of time) to do this on a desktop machine.

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

Points Rules