please choosego to mobile | Continue to access the PC version
View: 40736|Reply: 52

[TUTO] How to compile Kernel & Headers (from banana pi github)

[Copy link]

5

threads

37

posts

136

credits

Registered member

Rank: 2

credits
136
Published in 2015-1-25 17:30:52 | Show all floors |Read mode
Edited by Tankafaire at 2015-1-25 16:15

Hi all,
I have compiled a new kernel for Orange Pi with success, here is the tutorial step by step:

  1. sudo apt-get install git build-essential libncurses5-dev u-boot-tools uboot-mkimage
  2. git clone https://github.com/silentcreek/bananapi-kernel --depth 1
  3. cd bananapi-kernel
  4. make sun7i_defconfig
  5. make menuconfig                      # exit & save     
  6. make -j2 uImage modules          # ~ 2.5h working
  7. sudo make modules_install
  8. sudo mount /dev/mmcblk0p1 /boot
  9. sudo mv /boot/uImage /boot/uImage_old  # save precedent uImage, can be restored
  10. sudo cp arch/arm/boot/uImage /boot
  11. sudo reboot
Copy code

http://forum.lemaker.org/thread-2657-1-1-howto_build_and_install_a_modified_linux_kernel_directly_on_bananian.html

1

threads

25

posts

212

credits

Intermediate member

Rank: 3Rank: 3

credits
212
Published in 2015-1-25 19:22:44 | Show all floors
This is build guide on board. We can cross compile kernel on x86 machine. It'll be faster.

5

threads

37

posts

136

credits

Registered member

Rank: 2

credits
136
 Author| Published in 2015-1-25 19:32:34 | Show all floors
Yes, I have another tutorial to share, but I want to try it before !
Published in 2015-1-25 21:11:59 | Show all floors
Tankafaire,Thank you.

9

threads

634

posts

4429

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4429
Published in 2015-1-25 21:56:17 | Show all floors
Edited by igorpec at 2015-1-25 15:00

Here is my script:
https://github.com/igorpecovnik/BananaPI-Debian

Maybe a bit more complex but it has more value and advantages then others.

It download sources, compile and creates .deb packed kernel + headers + libc. You can boot it also with mainline u-boot and you can build your own modules on the system.

If you run it as nonroot, you can compile kernel+uboot (ignore a lot of errors), with root (no errors) you get out an raw boot ready image with desired system (wheezy, jessie, ubuntu trusty).

Note that kernel is gzip compressed which is not default for old / standard installations. You can either convert it to uImage or use new bootloader with proper u-boot scripts.

1

threads

25

posts

212

credits

Intermediate member

Rank: 3Rank: 3

credits
212
Published in 2015-1-26 01:36:27 | Show all floors
I'm think banana pi patches should be merged into linux-sunxi sources. This making unnecessary mess with support for allwinner platforms.

11

threads

59

posts

326

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
326
Published in 2015-1-26 02:26:49 | Show all floors
Which kernel version did you recompile? 3.4 ? Or a newer one (Fedora gave me 3.17)
You can also reach me on freenode irc, channel #orangepi username eFfeM

1

threads

25

posts

212

credits

Intermediate member

Rank: 3Rank: 3

credits
212
Published in 2015-1-26 02:43:29 | Show all floors
The 3.4 kernel from linux-sunxi supports video acceleration, and more then mainline kernels: http://linux-sunxi.org/Linux_mainlining_effort.

9

threads

634

posts

4429

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4429
Published in 2015-1-26 05:13:34 | Show all floors
ryba84 replied at 2015-1-25 18:36
I'm think banana pi patches should be merged into linux-sunxi sources. This making unnecessary mess  ...

This should be done differently. I think (not 100% sure) this patch breaks Cubietruck GMAC so you can't just merge ... maybe this is fixed in u-boot.

5

threads

37

posts

136

credits

Registered member

Rank: 2

credits
136
 Author| Published in 2015-1-26 06:08:06 | Show all floors
For the Mali driver:
Is this tutorial http://forum.lemaker.org/thread-5757-1-1-installing_mali_r3p2_kernel_drivers_into_lemaker_kernel_3_4.html
can be adapted for 3.4.104+ (or 3.4.105+), or is it just for 3.4.103+ ? or just for banana ?

In fact I tried a little and it fails for 3.4.105+ (don't remember the exact error, but "space blank" I think)
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list