GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - comp-sec-eng/BPI-Router-Linux: Linux kernel 4.14+ for BPI-R2, 5.4+ for R64, 6.1+ for R2Pro and R3, 6.12+ for R4, 6.17+ for R4Pro/R4Lite

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

1,327,915 Commits
1,327,915 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Documentation
Documentation
 
 
LICENSES
LICENSES
 
 
arch
arch
 
 
block
block
 
 
certs
certs
 
 
crypto
crypto
 
 
drivers
drivers
 
 
fs
fs
 
 
include
include
 
 
init
init
 
 
io_uring
io_uring
 
 
ipc
ipc
 
 
kernel
kernel
 
 
lib
lib
 
 
mm
mm
 
 
net
net
 
 
rust
rust
 
 
samples
samples
 
 
scripts
scripts
 
 
security
security
 
 
sound
sound
 
 
tools
tools
 
 
usr
usr
 
 
utils
utils
 
 
virt
virt
 
 
.clang-format
.clang-format
 
 
.clippy.toml
.clippy.toml
 
 
.cocciconfig
.cocciconfig
 
 
.editorconfig
.editorconfig
 
 
.get_maintainer.ignore
.get_maintainer.ignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.mailmap
.mailmap
 
 
.rustfmt.toml
.rustfmt.toml
 
 
COPYING
COPYING
 
 
CREDITS
CREDITS
 
 
Kbuild
Kbuild
 
 
Kconfig
Kconfig
 
 
MAINTAINERS
MAINTAINERS
 
 
Makefile
Makefile
 
 
README
README
 
 
README.md
README.md
 
 
bpi-r2pro.its
bpi-r2pro.its
 
 
bpi-r3.its
bpi-r3.its
 
 
bpi-r4.its
bpi-r4.its
 
 
bpi-r64.its
bpi-r64.its
 
 
build.conf
build.conf
 
 
build.sh
build.sh
 
 

Repository files navigation

Kernel 6.12 for BananaPi R2/R64/R2Pro/R3/R4

CI

Requirements

On a x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):

#for r2
sudo apt install gcc-arm-linux-gnueabihf libc6-armhf-cross u-boot-tools bc make ccache gcc libc6-dev libncurses5-dev libssl-dev bison flex
#for r64 / r2pro / r3 / r4
sudo apt install gcc-aarch64-linux-gnu u-boot-tools bc make gcc ccache libc6-dev libncurses5-dev libssl-dev bison flex

If you build it directly on the BananaPi-R2/R64 (not recommended) you do not need the crosscompile-packages gcc-arm-linux-gnueabihf/gcc-aarch64-linux-gnu and libc6-armhf-cross

Issues

Ubuntu 22 seems not set update-alternatives for gcc, so build.sh will report crosscompiler is not installed

for i in $(ls /usr/bin/arm-linux-gnueabihf-gcc-{8..12});do sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc $i 50;done
sudo update-alternatives --config arm-linux-gnueabihf-gcc

for i in $(ls /usr/bin/aarch64-linux-gnu-gcc-{8..12});do sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc $i 50;done
sudo update-alternatives --config aarch64-linux-gnu-gcc

R2

internal wifi/bt does not work anymore on 6.0+ as there are internal changes in linux which break mt6625 driver

R64

  • pcie-slot CN8 does not detect gen2-cards due to hardware-issue (missing capacitors)
  • some pcie-cards are not detected because of wrong memory-mapping of BAR0

R2Pro

  • mic-switch not working (hw related)

R3

  • vlan on left SFP not working (6.2 + Fix from Felix works) https://patchwork.kernel.org/project/linux-mediatek/list/?series=698421
  • some issues with some GPON and copper-SFP

R4

  • some issues with some GPON and copper-SFP
  • wifi bad signal (noise issue) https://forum.banana-pi.org/t/bpi-r4-wifi-range/19418/182

Usage

if you want to build for other board than R2, change "board" in build.conf first

  ./build.sh importconfig
  ./build.sh config #to configure manually with menuconfig
  ./build.sh

the option "pack" creates a tar.gz-file which contains folders "BPI-BOOT" (content of Boot-partition aka /boot) and BPI-ROOT (content for rootfs aka /). simply backup your existing kernel (uImage or bpi-rX.itb on /boot) and unpack the content of these 2 folders to your system

you can also install direct to sd-card which makes a backup of kernelfile, here you have to change your uEnv.txt if you use a new filename (by default it's containing kernelversion)

Usage with docker

The Dockerfile in utils/docker/ provides a build environment without installing the native compilers on the local system.

The local directory will be mounted into the docker container. All changes will also be present in the respository folder.

  1. Build the docker container for building once:

    sh ./utils/docker/build_container.sh

    Note: if you get this error: "Got permission denied while trying to connect to the Docker daemon socket at ..." you have to configure non-root https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user

    sudo usermod -aG docker $USER
    newgrp docker
  2. Start and connect to the running docker container:

    sh ./utils/docker/run.sh
  3. Now you can use the commands from above:

    ./build.sh
  4. Close the container with exit or CTRL-D.

  5. Your build artifacts from the build script will be in the folder ./SD/

If you want to clean up you can remove all containers (and the associated docker images) with:

docker rmi bpi-cross-compile:1 --force

install kernel (debian/ubuntu images)

either on host-system (build maschine) and inserted sdcard:

./build.sh install

or in running system (first make backup of your current itb in /boot) by unpacking the tar.gz file created by pack option in build.sh

kernelfile=bpi-r3_6.6.47-main.tar.gz
sudo tar -xzf $kernelfile --strip-components=1 -C /boot/ BPI-BOOT
echo "unpack kernel-modules to bpi-root loopdev..."
sudo tar -xzf $kernelfile --strip-components=2 -C /lib/. BPI-ROOT/lib/

Branch details

Kernel upstream + BPI-R2 / R64

  • 4.9-main
  • 4.14-main
  • 4.19-main | 4.19-r64-main
  • 5.4-main
  • 5.10-main
  • 5.15-main
  • 6.1-main
  • 6.6-main
  • 6.12-main

Kernel versions

Kernel features by version

R2/R64:

Feature 4.4 4.9 4.14 4.19 5.4 5.10 5.15 6.1 6.6 6.12
PCIe Y Y Y Y Y Y Y Y Y Y
SATA Y Y Y Y Y Y Y Y Y Y
2 GMAC Y Y Y Y N N N Y Y
DSA N Y Y Y Y Y Y Y Y Y
USB Y Y Y Y Y Y Y Y Y Y
VLAN (dsa) Y N Y Y Y Y Y Y
VLAN-aware Bridge N Y Y Y Y Y Y Y
HW NAT (R2) Y Y N Y Y Y Y
HW QOS (R2) Y ? N N
Crypto Y Y Y Y
WIFI (internal) Y Y Y Y Y Y N N N
BT N N Y Y Y Y Y N N N
VIDEO (R2 only) Y N Y Y Y Y Y Y Y
ACPI (R2) ? N Y Y Y Y N
IR (R2) ? N N N Y Y ? Y Y
WIFI (R64) N N N N Y Y Y Y Y
BT (R64) N N N N Y Y Y Y Y
Other options -- -- -- -- -- -- -- -- --
OpenVPN ? Y Y Y Y Y Y Y Y Y
iptables (R2) ? Y Y Y Y Y Y Y Y Y
nftables (R2) ? N N Y Y Y Y Y Y Y
LXC / Docker (R2) ? ? Y Y Y Y Y Y Y Y

Symbols:

Symbol Meaning
? Unsure
() Testing

(Testing in separate branch wlan/hdmi/hwnat/hwqos)

  • WIFI/BT on R2 needs WMT-tools called before
  • HW-NAT only works between LAN and WAN (bridge unclear, wifi not supported)
  • HW-QoS is merged into 4.14-main, but we do not know how to test it
  • ACPI-feature means System is powered off, not only halted (power-consumption ~0.2W, no reboot on reset), reboot-problem on R2 with soldered power-switch (see frank-w#35). Power-off is also initiated by pressing the power-switch, on R64 not currently not available
  • VIDEO is hdmi-output (X-server/framebuffer-console)...here some resolutions are not supported by vendor-driver. R64 does not have HDMI

kernel 4.4 / uboot 2014-04: https://github.com/frank-w/BPI-R2-4.4 mainline-uboot: https://github.com/frank-w/u-boot

R2Pro/R3/R4

Feature 6.1 6.6 6.12
USB Y Y Y
PCIe Y Y Y
SATA (r2pro) Y Y Y
DSA Y Y Y
2 GMAC Y Y Y
SFP (R3) Y Y Y
VLAN Y/P Y/P Y
HW NAT (R3) Y Y Y
WIFI (r3 internal) Y Y Y
VIDEO (R2pro only) Y Y Y
IR (R2pro) ? ? ?
R3mini support N Y Y
R4 support N N Y

P=partial (vlan on r3 only works on dsa-ports, not on left SFP)

Images

Latest images are created by my BPI-Router-Images repo https://github.com/frank-w/BPI-Router-Images

and stored on my gdrive https://drive.google.com/drive/folders/1A5S7_82Bg4EYxjzdQ5FKyBw9Qi2C3uK-?usp=drive_link

discussion in bpi forum: https://forum.banana-pi.org/t/debian-ubuntu-image-creation/15826

more information: https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r4:start#debian_ubuntu_image_building

Links

  • BPI-R2: http://www.banana-pi.org/r2.html
  • BPI-R64: http://www.banana-pi.org/r64.html
  • BPI-R2Pro: https://wiki.banana-pi.org/Banana_Pi_BPI-R2_Pro
  • BPI-R3: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
  • BPI-R4: https://wiki.banana-pi.org/Banana_Pi_BPI-R4
  • Kernel: https://www.kernel.org/ , Stable-RC: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/
  • linux-mediatek: https://patchwork.kernel.org/project/linux-mediatek/list/, Threaded: http://lists.infradead.org/pipermail/linux-mediatek/
  • Forum: https://forum.banana-pi.org/c/banana-router/62
  • Wiki: https://www.fw-web.de/dokuwiki/doku.php?id=en:start

License

GPL-2.0

Free Software, Hell Yeah!

About

Linux kernel 4.14+ for BPI-R2, 5.4+ for R64, 6.1+ for R2Pro and R3, 6.12+ for R4, 6.17+ for R4Pro/R4Lite

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.