Skip to content

Commit 3fcb6a3

Browse files
authored
Merge pull request #1142 from kernelkit/banana-pi
Add support for Banana Pi (BPi-R3)
2 parents 153ceda + 33e873c commit 3fcb6a3

File tree

27 files changed

+676
-47
lines changed

27 files changed

+676
-47
lines changed

.github/workflows/build-boot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- cn9130_crb_boot
2121
- aarch64_qemu_boot
2222
- rpi4_boot
23+
- mt7986_sd_boot
2324
env:
2425
MAKEFLAGS: -j5
2526
steps:

.github/workflows/build-image.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
required: true
1010
options:
1111
- raspberry-pi-4
12+
- banana-pi-r3
1213
default: 'raspberry-pi-4'
1314
use_latest_release:
1415
description: 'Use latest release artifacts instead of workflow artifacts'
@@ -55,6 +56,10 @@ jobs:
5556
echo "BOOTLOADER=rpi4_boot" >> $GITHUB_ENV
5657
echo "TARGET=aarch64" >> $GITHUB_ENV
5758
;;
59+
banana-pi-r3)
60+
echo "BOOTLOADER=mt7986_sd_boot" >> $GITHUB_ENV
61+
echo "TARGET=aarch64" >> $GITHUB_ENV
62+
;;
5863
*)
5964
echo "Error: Unknown board ${{ inputs.board }}"
6065
exit 1
@@ -142,7 +147,7 @@ jobs:
142147
143148
# Use the standardized mkimage.sh path for the selected board
144149
# BOARD_SCRIPT="src/board/${{ inputs.board }}/mkimage.sh"
145-
BOARD_SCRIPT="src/board/raspberry-pi-4/mkimage.sh"
150+
BOARD_SCRIPT="src/board/${{ inputs.board }}/mkimage.sh"
146151
147152
if [ -f "$BOARD_SCRIPT" ]; then
148153
echo "Using board-specific image creation script: $BOARD_SCRIPT"

board/aarch64/README.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,8 @@ aarch64
44
Board Specific Documentation
55
----------------------------
66

7+
- [Banana Pi R3](banana-pi-r3/)
78
- [Marvell CN9130-CRB](cn9130-crb/)
89
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
910
- [NanoPi R2S](r2s/)
10-
- [Raspberry Pi 4 b](#raspberry-pi-4-b)
11-
12-
# Raspberry Pi 4 b
13-
14-
## Support level
15-
Full support for base board but not any extension board on the
16-
GPIOs.
17-
18-
### Touch screen
19-
The [Raspberry Pi touch display v1][RPI-TOUCH] is supported, including
20-
touch functionality. There are multiple touchscreens on the market for
21-
Raspberry Pi, but only the official (first version with 800x480
22-
resolution) is currently supported. Infix supplies all drivers
23-
required to utilize the hardware, but you need to add the actual
24-
graphical application in a container.
25-
26-
There are some important considerations you need to know about when
27-
using Infix for graphical applications. The container needs access to
28-
/dev/dri/ to be able to access the graphics card, and it also needs
29-
access to /run/udev to be able to find the input devices.
30-
31-
Example of running Doom in Infix:
32-
33-
```cli
34-
admin@example:/> configure
35-
admin@example:/config/> edit container doom
36-
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
37-
admin@example:/config/container/doom/> set privileged
38-
admin@example:/config/container/doom/> edit mount udev
39-
admin@example:/config/container/doom/mount/udev/> set type bind
40-
admin@example:/config/container/doom/mount/udev/> set target /run/udev/
41-
admin@example:/config/container/doom/mount/udev/> set source /run/udev/
42-
admin@example:/config/container/doom/mount/udev/> end
43-
admin@example:/config/container/doom/mount/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
44-
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
45-
admin@example:/config/container/doom/mount/xorg.conf/> end
46-
admin@example:/config/container/doom/> edit volume var
47-
admin@example:/config/container/doom/volume/var/> set target /var
48-
admin@example:/config/container/doom/volume/var/> leave
49-
admin@example:/>
50-
51-
```
52-
53-
54-
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
11+
- [Raspberry Pi 4 b](raspberry-pi-4/)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Banana Pi R3
2+
3+
## Support level
4+
Full support for all Infix enabled features including switched ethernet ports, WiFi,
5+
and SFP interfaces. The board includes comprehensive hardware support for
6+
MediaTek MT7986 SoC features.
7+
8+
### Hardware features
9+
The Banana Pi R3 is a high-performance networking board featuring:
10+
- MediaTek MT7986 ARM Cortex-A53 quad-core processor
11+
- 4x Gigabit LAN ports (lan1-lan4)
12+
- 1x Gigabit WAN port
13+
- 2x SFP ports (sfp1, sfp2) for fiber connectivity
14+
- Dual WiFi interfaces (wifi0 for 2.4GHz, wifi1 for 5GHz)
15+
- USB support
16+
- SD card boot support
17+
18+
### Network configuration
19+
The board comes preconfigured with:
20+
- 4 switched LAN ports for internal networking
21+
- Dedicated WAN port with DHCP client enabled
22+
- SFP ports for high-speed fiber connections
23+
- Dual WiFi interfaces for wireless connectivity
24+
25+
### Pre-built images
26+
SD card image: [infix-bpi-r3-sdcard.img](https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-sdcard.img)
27+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Raspberry Pi 4 b
2+
3+
## Support level
4+
Full support for base board but not any extension board on the
5+
GPIOs.
6+
7+
### Touch screen
8+
The [Raspberry Pi touch display v1][RPI-TOUCH] is supported, including
9+
touch functionality. There are multiple touchscreens on the market for
10+
Raspberry Pi, but only the official (first version with 800x480
11+
resolution) is currently supported. Infix supplies all drivers
12+
required to utilize the hardware, but you need to add the actual
13+
graphical application in a container.
14+
15+
There are some important considerations you need to know about when
16+
using Infix for graphical applications. The container needs access to
17+
/dev/dri/ to be able to access the graphics card, and it also needs
18+
access to /run/udev to be able to find the input devices.
19+
20+
Example of running Doom in Infix:
21+
22+
```cli
23+
admin@example:/> configure
24+
admin@example:/config/> edit container doom
25+
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
26+
admin@example:/config/container/doom/> set privileged
27+
admin@example:/config/container/doom/> edit mount udev
28+
admin@example:/config/container/doom/mount/udev/> set type bind
29+
admin@example:/config/container/doom/mount/udev/> set target /run/udev/
30+
admin@example:/config/container/doom/mount/udev/> set source /run/udev/
31+
admin@example:/config/container/doom/mount/udev/> end
32+
admin@example:/config/container/doom/mount/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
33+
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
34+
admin@example:/config/container/doom/mount/xorg.conf/> end
35+
admin@example:/config/container/doom/> edit volume var
36+
admin@example:/config/container/doom/volume/var/> set target /var
37+
admin@example:/config/container/doom/volume/var/> leave
38+
admin@example:/>
39+
40+
```
41+
42+
### Pre-built images
43+
SD card image: [infix-rpi4-sdcard.img](https://github.com/kernelkit/infix/releases/download/latest-boot/infix-rpi4-sdcard.img)
44+
45+
46+
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/

configs/aarch64_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ BR2_PACKAGE_MARVELL_CN9130_CRB=y
138138
BR2_PACKAGE_MARVELL_ESPRESSOBIN=y
139139
BR2_PACKAGE_STYX_DCP_SC_28P=y
140140
BR2_PACKAGE_RASPBERRY_PI_4=y
141+
BR2_PACKAGE_BANANA_PI_R3=y
141142
BR2_PACKAGE_FEATURE_WIFI_DONGLE_REALTEK=y
142143
BR2_PACKAGE_CONFD=y
143144
BR2_PACKAGE_CONFD_TEST_MODE=y

configs/mt7986_sd_boot_defconfig

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
BR2_aarch64=y
2+
BR2_TOOLCHAIN_EXTERNAL=y
3+
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
4+
BR2_DL_DIR="$(BR2_EXTERNAL_INFIX_PATH)/dl"
5+
BR2_CCACHE=y
6+
BR2_CCACHE_DIR="$(BR2_EXTERNAL_INFIX_PATH)/.ccache"
7+
BR2_ENABLE_DEBUG=y
8+
BR2_PACKAGE_OVERRIDE_FILE="$(BR2_EXTERNAL_INFIX_PATH)/local.mk"
9+
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
10+
BR2_SSP_NONE=y
11+
BR2_INIT_NONE=y
12+
BR2_SYSTEM_BIN_SH_NONE=y
13+
# BR2_PACKAGE_BUSYBOX is not set
14+
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
15+
# BR2_TARGET_ROOTFS_TAR is not set
16+
BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
17+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
18+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/mtk-openwrt/arm-trusted-firmware-mtk.git"
19+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="78a0dfd927bb00ce973a1f8eb4079df0f755887a"
20+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="mt7986"
21+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y
22+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33=y
23+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_DEVICE=sdmmc DRAM_USE_DDR4=1 USE_MKIMAGE=1 MKIMAGE=$(HOST_DIR)/bin/mkimage"
24+
BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.img *.bin"
25+
BR2_TARGET_UBOOT=y
26+
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
27+
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
28+
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2025.01"
29+
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mt7986a_bpir3_sd"
30+
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="${BR2_EXTERNAL_INFIX_PATH}/board/common/uboot/extras.config ${BR2_EXTERNAL_INFIX_PATH}/src/board/banana-pi-r3/uboot/extras.config ${BR2_EXTERNAL_INFIX_PATH}/src/board/banana-pi-r3/uboot/sd-extras.config"
31+
BR2_TARGET_UBOOT_NEEDS_DTC=y
32+
BR2_TARGET_UBOOT_FORMAT_DTB=y
33+
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="${BR2_EXTERNAL_INFIX_PATH}/src/board/banana-pi-r3/uboot/*.dtsi"
34+
BR2_PACKAGE_HOST_GENIMAGE=y
35+
BR2_PACKAGE_HOST_RAUC=y
36+
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
37+
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
38+
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
39+
TRUSTED_KEYS=y
40+
TRUSTED_KEYS_DEVELOPMENT=y
41+
DISK_IMAGE_BOOT_BIN=y
42+
DISK_IMAGE_BOOT_DATA="${BINARIES_DIR}/flash-image.bin"
43+
DISK_IMAGE_BOOT_OFFSET=0x00200000

doc/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ All notable changes to the project are documented in this file.
99
### Changes
1010
- Upgrade Buildroot to 2025.02.6 (LTS)
1111
- Upgrade Linux kernel to 6.12.46 (LTS)
12+
- Add support for [Banana Pi R3][BPI-R3], a 7 port switch with 2 WiFi chip.
1213

1314
### Fixes
1415

16+
[BPI-R3]: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
17+
1518
[v25.08.0][] - 2025-09-01
1619
-------------------------
1720

package/board/Config.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/board/marvell-espressobin/Config.in"
77
source "$BR2_EXTERNAL_INFIX_PATH/package/board/microchip-sparx5-pcb135/Config.in"
88
source "$BR2_EXTERNAL_INFIX_PATH/package/board/styx-dcp-sc-28p/Config.in"
99
source "$BR2_EXTERNAL_INFIX_PATH/package/board/raspberry-pi-4/Config.in"
10+
source "$BR2_EXTERNAL_INFIX_PATH/package/board/banana-pi-r3/Config.in"
11+
1012

1113
endmenu
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config BR2_PACKAGE_BANANA_PI_R3
2+
bool "Banana Pi R3"
3+
depends on BR2_aarch64
4+
select BR2_PACKAGE_FEATURE_WIFI
5+
select BR2_PACKAGE_LINUX_FIRMWARE
6+
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK
7+
select BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7986
8+
select SDCARD_AUX
9+
help
10+
Build Banana PI R3 support

0 commit comments

Comments
 (0)