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
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.
pcie.patch for PCIe-Slot (CONFIG_PCIEPORTBUS,CONFIG_PCIEPORTBUS,CONFIG_PCIEPORTBUS have to be activated)
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
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