Compiling a compatible U-boot and Linux Kernel for Banana Pi

15 17383
Hi all,

Ok, so I have fixed the issue with the GMAC driver (due to recent source code upload from tony) - advised tony of issue with his source.

http://multiupload.biz/rbufzaez9 ... Upload.biz.zip.html

Download this patch file and apply against the generic linux kernel zip from kernel.org - 3.4.93
This adds full support for Banana Pi - you can keep updating to newer linux stable branch on 3.4
This is important for security reasons! as there is no official kernel for bananapi.

Hope this helps all!

Yes and no Multiupload and Sex popups with Virus scanner warnings are always a bit dubious.

Post Last Edited by f4exb at 2014-7-23 15:40

I am very pleased to say that it works! What I have done:

- made an u-boot following the instructions at the beginning of this thread
- use Lubuntu 3.0 image's script.bin with the following modifications in .fex format:
  In twi0_para section allow it with twio_used = 1 (this activates the temperature sensor)
  in twi2_para section disable it with twio_used = 0 (does not seem to be connected to anything, this is just      to avoid nasty messages in the dmesg log)- use Lubuntu's uEnv.txt but with 50Hz for the console display as it actually looks better: disp.screen0_output_mode=EDID:1280x720p50
- use the kernel source above with some configuration tweaks
- Allow CMA (CONFIG_CMA...), this frees the 80M fixed allocation for Cedar driver. However CMA is experimental in 3.4 so this is if you don't plan to use Cedar critically: I have compiled CEDAR as a module to be able to load it later: CONFIG_VIDEO_SUNXI_CEDAR=m (I haven't tried video acceleration yet)
- CONFIG_AXP_HWMON=y This is to get the temperature sensor. It is normally compiled as a module but I was unable to find it I also enabled CONFIG_THERMAL_HWMON=y
- I added support for XFS (CONFIG_XFS...)
- I added exportfs as built-in: CONFIG_EXPORTFS=y

For the distribution I installed a Debian Jessie (Wheezy is outdated) following these instructions:
http://cbwebs.de/single-board-co ... copying-my-article/

Ethernet works well (at 100 Mb/s, I didn't try the 1 Gb/s by lack of proper router), using iperf it is very close to full capacity at 96.5 Mb/s
I have added a SATA disk formatted in XFS (hence my mods to the configuration above) it woks very well too.
This makes a cute and energy efficient little server

Now this thing starts to get rolling!

Kernel 3.4.93 patched with latest patch from db260178 compiles and works
Kernel 3.4.99 also compiles (not tested) . For patching reply no to reverse patch and yes to apply patch whenever prompted to.

Post Last Edited by TooMeeK at 2014-8-3 16:50

Something changed, so patches for u-boot are useless (or I'm doing something wrong).
/usr/src/u-boot-sunxi# patch -p1 < ../bpi-uboot.patchpatching file arch/arm/cpu/armv7/sunxi/board.c
Hunk #1 succeeded at 152 with fuzz 2 (offset 4 lines).
The next patch would create the file board/sunxi/dram_bananapi.c,
which already exists!  Assume -R? [n]
Apply anyway? [n] y
patching file board/sunxi/dram_bananapi.c
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file board/sunxi/dram_bananapi.c.rej
patching file board/sunxi/Makefile
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n] y
Hunk #1 FAILED at 45.
1 out of 1 hunk FAILED -- saving rejects to file board/sunxi/Makefile.rej
patching file boards.cfg
Hunk #1 succeeded at 400 with fuzz 1 (offset 36 lines).

Anyway, even hacking the code (diff file by file), I was unable to make device bootable..
.. restoring 32GB SD card image from backup.
Without the patch following line:
make -j4 'BananaPi_config' CROSS_COMPILE=arm-linux-gnueabihf-
will produce error instead of:
Configuring for BananaPi - Board: sun7i, Options: BANANAPI,SPL,SUNXI_GMAC,RGMII,STATUSLED=248,FAST_MBUS

Post Last Edited by TooMeeK at 2014-8-4 15:31

Compilation of u-boot-sunxi succeed while compiling from original sources.
make -j4 'Bananapi_config' CROSS_COMPILE=arm-linux-gnueabihf-
is required.
Suppose they don't need patching anymore?

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

Points Rules