Skip to content

Commit 68e1053

Browse files
committed
readme: add updated Readme
1 parent 898ac0c commit 68e1053

1 file changed

Lines changed: 226 additions & 0 deletions

File tree

README.md

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# Kernel 6.12 for BananaPi R2/R64/R2Pro/R3/R4
2+
3+
![CI](https://github.com/frank-w/BPI-Router-Linux/workflows/CI/badge.svg?branch=6.12-main)
4+
5+
## Requirements
6+
7+
On a x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):
8+
```sh
9+
#for r2
10+
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
11+
#for r64 / r2pro / r3 / r4
12+
sudo apt install gcc-aarch64-linux-gnu u-boot-tools bc make gcc ccache libc6-dev libncurses5-dev libssl-dev bison flex
13+
```
14+
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
15+
16+
## Issues
17+
18+
Ubuntu 22 seems not set update-alternatives for gcc, so build.sh will report crosscompiler is not installed
19+
20+
```sh
21+
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
22+
sudo update-alternatives --config arm-linux-gnueabihf-gcc
23+
24+
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
25+
sudo update-alternatives --config aarch64-linux-gnu-gcc
26+
```
27+
### R2
28+
29+
internal wifi/bt does not work anymore on 6.0+ as there are internal changes in linux which break mt6625 driver
30+
31+
### R64
32+
* pcie-slot CN8 does not detect gen2-cards due to hardware-issue (missing capacitors)
33+
* some pcie-cards are not detected because of wrong memory-mapping of BAR0
34+
35+
### R2Pro
36+
* mic-switch not working (hw related)
37+
38+
### R3
39+
* vlan on left SFP not working (6.2 + Fix from Felix works)
40+
https://patchwork.kernel.org/project/linux-mediatek/list/?series=698421
41+
* some issues with some GPON and copper-SFP
42+
43+
### R4
44+
45+
* some issues with some GPON and copper-SFP
46+
* wifi bad signal (noise issue)
47+
https://forum.banana-pi.org/t/bpi-r4-wifi-range/19418/182
48+
49+
## Usage
50+
51+
if you want to build for other board than R2, change "board" in build.conf first
52+
53+
```sh
54+
./build.sh importconfig
55+
./build.sh config #to configure manually with menuconfig
56+
./build.sh
57+
```
58+
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
59+
60+
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)
61+
62+
### Usage with docker
63+
64+
The Dockerfile in `utils/docker/` provides a build environment without installing the native compilers on the local system.
65+
66+
The local directory will be mounted into the docker container. All changes will also be present in the respository folder.
67+
68+
1. Build the docker container for building once:
69+
```sh
70+
sh ./utils/docker/build_container.sh
71+
```
72+
73+
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
74+
https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
75+
```sh
76+
sudo usermod -aG docker $USER
77+
newgrp docker
78+
```
79+
1. Start and connect to the running docker container:
80+
```sh
81+
sh ./utils/docker/run.sh
82+
```
83+
1. Now you can use the commands from above:
84+
```sh
85+
./build.sh
86+
```
87+
1. Close the container with `exit` or `CTRL-D`.
88+
1. Your build artifacts from the build script will be in the folder `./SD/`
89+
90+
91+
If you want to clean up you can remove all containers (and the associated docker images) with:
92+
```sh
93+
docker rmi bpi-cross-compile:1 --force
94+
```
95+
## install kernel (debian/ubuntu images)
96+
97+
either on host-system (build maschine) and inserted sdcard:
98+
99+
```sh
100+
./build.sh install
101+
```
102+
103+
or in running system (first make backup of your current itb in /boot) by unpacking
104+
the tar.gz file created by pack option in build.sh
105+
106+
```sh
107+
kernelfile=bpi-r3_6.6.47-main.tar.gz
108+
sudo tar -xzf $kernelfile --strip-components=1 -C /boot/ BPI-BOOT
109+
echo "unpack kernel-modules to bpi-root loopdev..."
110+
sudo tar -xzf $kernelfile --strip-components=2 -C /lib/. BPI-ROOT/lib/
111+
```
112+
113+
## Branch details
114+
115+
Kernel upstream + BPI-R2 / R64
116+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/4.9-main">4.9-main</a>
117+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/4.14-main">4.14-main</a>
118+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/4.19-main">4.19-main</a> | <a href="https://github.com/frank-w/BPI-R2-4.14/tree/4.19-r64-main">4.19-r64-main</a>
119+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/5.4-main">5.4-main</a>
120+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/5.10-main">5.10-main</a>
121+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/5.15-main">5.15-main</a>
122+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/6.1-main">6.1-main</a>
123+
* <a href="https://github.com/frank-w/BPI-Router-Linux/tree/6.6-main">6.6-main</a>
124+
* 6.12-main
125+
126+
## Kernel versions
127+
128+
Kernel features by version
129+
130+
R2/R64:
131+
132+
| Feature | 4.4 | 4.9 | 4.14 | 4.19 | 5.4 | 5.10 | 5.15 | 6.1 | 6.6 | 6.12 |
133+
|--------------------| --- | --- | --- | --- | --- | ---- | ---- | --- | --- | --- |
134+
| PCIe | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
135+
| SATA | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
136+
| 2 GMAC | Y | Y | Y | Y | N | N | N | Y | Y | |
137+
| DSA | N | Y | Y | Y | Y | Y | Y | Y | Y | Y |
138+
| USB | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
139+
| VLAN (dsa) | | | Y | N | Y | Y | Y | Y | Y | Y |
140+
| VLAN-aware Bridge | | | N | Y | Y | Y | Y | Y | Y | Y |
141+
| HW NAT (R2) | | Y | Y | | | N | Y | Y | Y | Y |
142+
| HW QOS (R2) | | Y | ? | | | N | N | | | |
143+
| Crypto | Y | Y | Y | | Y | | | | | |
144+
| WIFI (internal) | | Y | Y | Y | Y | Y | Y | N | N | N |
145+
| BT | N | N | Y | Y | Y | Y | Y | N | N | N |
146+
| VIDEO (R2 only) | Y | N | Y | Y | Y | Y | Y | Y | Y | |
147+
| ACPI (R2) | ? | N | Y | Y | Y | | | Y | N | |
148+
| IR (R2) | ? | N | N | N | Y | Y | ? | Y | Y | |
149+
| WIFI (R64) | N | N | N | N | Y | Y | Y | Y | Y | |
150+
| BT (R64) | N | N | N | N | Y | Y | Y | Y | Y | |
151+
| Other options |--|--|--|--|--|--|--|--|--|
152+
| OpenVPN | ? | Y | Y | Y | Y | Y | Y | Y | Y | Y |
153+
| iptables (R2) | ? | Y | Y | Y | Y | Y | Y | Y | Y | Y |
154+
| nftables (R2) | ? | N | N | Y | Y | Y | Y | Y | Y | Y |
155+
| LXC / Docker (R2) | ? | ? | Y | Y | Y | Y | Y | Y | Y | Y |
156+
157+
Symbols:
158+
159+
|Symbol|Meaning|
160+
|------|-------|
161+
| ? |Unsure |
162+
| () |Testing|
163+
164+
(Testing in separate branch wlan/hdmi/hwnat/hwqos)
165+
166+
* WIFI/BT on R2 needs WMT-tools called before
167+
* HW-NAT only works between LAN and WAN (bridge unclear, wifi not supported)
168+
* HW-QoS is merged into 4.14-main, but we do not know how to test it
169+
* 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 https://github.com/frank-w/BPI-R2-4.14/issues/35). Power-off is also initiated by pressing the power-switch, on R64 not currently not available
170+
* VIDEO is hdmi-output (X-server/framebuffer-console)...here some resolutions are not supported by vendor-driver. R64 does not have HDMI
171+
172+
173+
kernel 4.4 / uboot 2014-04: https://github.com/frank-w/BPI-R2-4.4
174+
mainline-uboot: https://github.com/frank-w/u-boot
175+
176+
R2Pro/R3/R4
177+
178+
| Feature | 6.1 | 6.6 | 6.12 |
179+
|--------------------| --- | --- | --- |
180+
| USB | Y | Y | Y |
181+
| PCIe | Y | Y | Y |
182+
| SATA (r2pro) | Y | Y | Y |
183+
| DSA | Y | Y | Y |
184+
| 2 GMAC | Y | Y | Y |
185+
| SFP (R3) | Y | Y | Y |
186+
| VLAN | Y/P | Y/P | Y |
187+
| HW NAT (R3) | Y | Y | Y |
188+
| WIFI (r3 internal) | Y | Y | Y |
189+
| VIDEO (R2pro only) | Y | Y | Y |
190+
| IR (R2pro) | ? | ? | ? |
191+
| R3mini support | N | Y | Y |
192+
| R4 support | N | N | Y |
193+
194+
P=partial (vlan on r3 only works on dsa-ports, not on left SFP)
195+
196+
## Images
197+
198+
Latest images are created by my BPI-Router-Images repo
199+
https://github.com/frank-w/BPI-Router-Images
200+
201+
and stored on my gdrive
202+
https://drive.google.com/drive/folders/1A5S7_82Bg4EYxjzdQ5FKyBw9Qi2C3uK-?usp=drive_link
203+
204+
discussion in bpi forum:
205+
https://forum.banana-pi.org/t/debian-ubuntu-image-creation/15826
206+
207+
more information:
208+
https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r4:start#debian_ubuntu_image_building
209+
210+
## Links
211+
212+
* BPI-R2: http://www.banana-pi.org/r2.html
213+
* BPI-R64: http://www.banana-pi.org/r64.html
214+
* BPI-R2Pro: https://wiki.banana-pi.org/Banana_Pi_BPI-R2_Pro
215+
* BPI-R3: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
216+
* BPI-R4: https://wiki.banana-pi.org/Banana_Pi_BPI-R4
217+
* Kernel: https://www.kernel.org/ , Stable-RC: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/
218+
* linux-mediatek: https://patchwork.kernel.org/project/linux-mediatek/list/, Threaded: http://lists.infradead.org/pipermail/linux-mediatek/
219+
* Forum: https://forum.banana-pi.org/c/banana-router/62
220+
* Wiki: https://www.fw-web.de/dokuwiki/doku.php?id=en:start
221+
222+
License
223+
----
224+
GPL-2.0
225+
226+
*Free Software, Hell Yeah!*

0 commit comments

Comments
 (0)