using which Kernel?
Kernel-features-overview on github
4.4.70 on GitHub
sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools git clone https://github.com/BPI-SINOVOIP/BPI-R2-bsp.git bpi-r2 cd bpi-r2 ./build.sh
see also Patch for build.sh
if successful finished, Kernel is in folder SD/BPI-BOOT modules in SD/BPI-ROOT
kernel can be copied to Boot-Partition (path, previous Backup!) the modules must be copied as Root
cp SD/BPI-BOOT/bananapi/bpi-r2/linux/uImage /media/$USER/BPI-BOOT/bananapi/bpi-r2/linux/ sudo cp -r SD/BPI-ROOT/lib/modules/4.4.70-BPI-R2-Kernel /media/$USER/BPI-ROOT/lib/modules/
i have forked the official kernel-repo and updated to actual kernel-version, added mt76x2 wireless driver and activated uart0+1:
4.4.x on GitHub
steps to build/install are same except the git clone :)
sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools git clone https://github.com/frank-w/BPI-R2-4.4.git bpi-r2 cd bpi-r2 ./build.sh
v1.2.1 (Nov 23, 2017),including mt76x2/x3 wireless driver
Bootloader (u-boot): https://drive.google.com/file/d/11XQ4n6WYSj7gGPtMwug4SITtYn0GZxOb/view?usp=sharing
https://drive.google.com/drive/folders/1kkFyxeHoskszI7CpSsL6Wi6ROjDrBLOB?usp=sharing
the 4.4-archive (Kernelversion-BPI-R2-Kernel_boot+root.tgz) contains 2 folders, which contents have to be copied to the partiton of SD/MMC with the same name.
config from user RyderLee ramdisk
pcie.patch for PCIe-Slot (CONFIG_PCIEPORTBUS,CONFIG_PCIEPORTBUS,CONFIG_PCIEPORTBUS have to be activated)
Script to compile/copy changed defconfig
above 4.14.14 only pcie-patch may be needed..
with kernel 4.4.70 mmc0=sd-card and mmc1=emmc, so i have done this also for kernel 4.14 (else you have to change u-boots uenv.txt and Mount-Points in system)
to do this set mmc1-section above mmc0-section arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts and in arch/arm/boot/dts/mt7623.dtsi mmc-swap.diff
with my github-Repo:
sudo apt-get install git make gcc-arm-linux-gnueabihf git clone https://github.com/frank-w/BPI-R2-4.14.git bpi-r2-4.14 cd bpi-r2-4.14 ./build.sh importconfig ./build.sh config #if you want to change the kernel-config ./build.sh
https://drive.google.com/drive/folders/1EGN1TvqCpDHdOAS-mjRg9ipi0kahnOUV?usp=sharing
the 4.14-archive (bpi-r2_kernelversion_gitbranch.tar.gz) contains 2 folders, which contents have to be copied to the partiton of SD/MMC with the same name.
there are also binary-packages on github-releases (made by travis-ci) with same file-structure: https://github.com/frank-w/BPI-R2-4.14/releases
you can use this script for installing the tar.gz-package
The linux-kernel has 2 parts…the “main-kernel-image” (uImage) and the modules.
The kernel-image is loaded by uboot from BPI-BOOT-Partition folder bananapi/bpi-r2/linux/. By default the file “uImage” is loaded, but you can choose another name and set variable “kernel” in uEnv.txt.
the modules have to be put to BPI-ROOT-partition (/lib/modules/kernelname).
using dts(i)-nodes (arch/arm/boot/dts/) and porting them to older kernel
Discussion
I have noticed some issues when using a USB Sierra Wireless EM7345 4G LTE module. There are random kernel usb-disconnect uevents every 5-10 mins. The module initializes all about fine and connects to the internet before the kernel causes a disconnect. I have tested with all the kernel versions on your repo.
The same problem does not exist when using the module with the BPI-R2 stock linux images or even when connected to a host PC.
I would really appreciate if you can give some feedback on the problem.
cheers
If you can send me an email I will try to reproduce every step and send it :-)
That was quite a lot of tries and failures but after few kernel recompilations and tweaking it works now.
Time to start fighting with internal wlan.
For wifi: get wmttools from my gdrive (simply unpack) and use my wifi.sh (after change related parts and configs)
https://drive.google.com/drive/mobile/folders/1WLWAR1FC-rF4n2SgFecBlU1ym_XKqAR_/15Y5Y3NAOwg_IMmN3k6hdb7pAQj9oTVTl/15lHk7IEyVyQdYzVfvPvV-3jMhz7GSL7p?sort=13&direction=a
https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#kernel_414
Didn't fix it yet... but planning to try those patches:
https://sites.google.com/site/twisteroidambassador/linux/ath-user-regd
Problem is there is no way to change country from 00 (global) to any other country. Therefore it is only usable as an wifi client not as a AP.
Will try to patch 4.14 and will try to make it works.
BTW. Onboard wifi doesn't work at all in AP mode, not sure about client mode. Not sure if that is fault of kernel or some problem with my gentoo distribution I'm trying to make right now.
For internal wifi please follow steps on my wifi-page. You nees wmttools to get ap0-device. Then you can configure it and run hostapd on it. I have 4.14-main running with internal wifi on r2.