Skip to content

Commit 399894e

Browse files
committed
Add new board banana pi r3
The Banana Pi R3 is a high-performance networking board featuring: - MediaTek MT7986 ARM Cortex-A53 quad-core processor - 4x Gigabit LAN ports (lan1-lan4) - 1x Gigabit WAN port - 2x SFP ports (sfp1, sfp2) for fiber connectivity - Dual WiFi interfaces (wifi0 for 2.4GHz, wifi1 for 5GHz) - USB support - SD card boot support
1 parent 8146e05 commit 399894e

File tree

24 files changed

+736
-45
lines changed

24 files changed

+736
-45
lines changed

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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 BR2_PACKAGE_BANANA_PI_R3_SDCARD
9+
select SDCARD_AUX
10+
# select BR2_TARGET_ARM_TRUSTED_FIRMWARE
11+
# select BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT # Does not work, needs a hook in the .mk file
12+
# select BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP
13+
# select BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33
14+
# select BR2_TARGET_UBOOT
15+
# select BR2_TARGET_UBOOT_FORMAT_CUSTOM
16+
# select BR2_TARGET_UBOOT_NEEDS_DTC
17+
# select BR2_TARGET_UBOOT_NEEDS_UBOOT_TOOLS
18+
# select BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
19+
help
20+
Build Banana PI R3 support
21+
22+
# Don't redefine - just set conditional defaults
23+
# config BR2_TARGET_UBOOT_BOARD_DEFCONFIG
24+
# default "mt7986a_bpir3_sd"
25+
26+
# config BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES
27+
# default "${BR2_EXTERNAL_INFIX_PATH}/board/common/uboot/extras.config ${BR2_EXTERNAL_INFIX_PATH}/src/board/banana-pi-r3/uboot/extras.config"
28+
29+
# config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME
30+
# default "arch/arm/dts/infix-key.dtbo arch/arm/dts/rpi-env.dtbo"
31+
32+
# config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH
33+
# default "${BR2_EXTERNAL_INFIX_PATH}/src/board/banana-pi-r3/uboot/rpi-env.dtso"
34+
35+
# config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL
36+
# default "https://github.com/mtk-openwrt/arm-trusted-firmware.git"
37+
38+
# config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
39+
# default "78a0dfd927bb00ce973a1f8eb4079df0f755887a"
40+
41+
# config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
42+
# default "mt7986"
43+
44+
# config BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES
45+
# default "BOOT_DEVICE=sdmmc USE_COHERENT_MEM=1"
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
GENIMAGE_CFG="$(BUILD_DIR)/genimage.cfg"
2+
GENIMAGE_TMP="$(BUILD_DIR)/genimage.tmp"
3+
BOARD_DIR="$(BR2_EXTERNAL_INFIX_PATH)/src/board/banana-pi-r3"
4+
BOOTLOADER_NAME=fip.bin
5+
BOOTLOADER2_NAME=bl2.img
6+
7+
BOOTLOADER_PATH=/home/lazzer/Documents/github.com/kernelkit/infix3/output-bootloader/images
8+
9+
define BANANA_PI_R3_LINUX_CONFIG_FIXUPS
10+
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_MEDIATEK)
11+
$(call KCONFIG_ENABLE_OPT,CONFIG_MACH_MT7986)
12+
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_MT7986)
13+
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_MT6577)
14+
$(call KCONFIG_SET_OPT,CONFIG_I2C_GPIO,y)
15+
$(call KCONFIG_SET_OPT,CONFIG_MTK_THERMAL,m)
16+
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_UART)
17+
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_WATCHDOG)
18+
$(call KCONFIG_ENABLE_OPT,CONFIG_MEDIATEK_GE_PHY)
19+
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
20+
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_MEDIATEK)
21+
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_MEDIATEK_SOC)
22+
$(call KCONFIG_SET_OPT,CONFIG_NET_DSA_MT7530,m)
23+
$(call KCONFIG_SET_OPT,CONFIG_MT7915E,m)
24+
$(call KCONFIG_SET_OPT,CONFIG_PCIE_MEDIATEK_GEN3,m)
25+
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_SCPSYS)
26+
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_MTK)
27+
$(call KCONFIG_ENABLE_OPT,CONFIG_MTK_HSDMA)
28+
$(call KCONFIG_SET_OPT,CONFIG_MT7915E,m)
29+
$(call KCONFIG_ENABLE_OPT,CONFIG_MT798X_WMAC)
30+
$(call KCONFIG_SET_OPT,CONFIG_MTK_SOC_THERMAL,m)
31+
$(call KCONFIG_SET_OPT,CONFIG_I2C_MT65XX,m)
32+
$(call KCONFIG_SET_OPT,CONFIG_USB_XHCI_MTK,m)
33+
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_TPHY,m)
34+
$(call KCONFIG_SET_OPT,CONFIG_PHY_MTK_XSPHY,m)
35+
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_GPIO,m)
36+
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_MT6380,m)
37+
$(call KCONFIG_SET_OPT,CONFIG_PWM_MEDIATEK,m)
38+
$(call KCONFIG_SET_OPT,CONFIG_SENSORS_PWM_FAN,m)
39+
$(call KCONFIG_SET_OPT,CONFIG_NVMEM_MTK_EFUSE,m)
40+
$(call KCONFIG_SET_OPT,CONFIG_CRYPTO_DEV_SAFEXCEL,m)
41+
endef
42+
43+
ifeq ($(BR2_PACKAGE_BANANA_PI_R3),y)
44+
define GENERATE_SD_CARD
45+
VERSION="-$(INFIX_RELEASE)"
46+
cp "$(BOOTLOADER_PATH)/$(BOOTLOADER_NAME)" "$(BINARIES_DIR)"
47+
cp "$(BOOTLOADER_PATH)/$(BOOTLOADER2_NAME)" "$(BINARIES_DIR)"
48+
sed "s|#VERSION#|$(RELEASE)|" "$(BOARD_DIR)/genimage.cfg.in" | \
49+
sed "s|#INFIX_ID#|$(INFIX_ID)|" > "$(GENIMAGE_CFG)"
50+
# Create temporary root path
51+
ROOTPATH_TMP=$(mktemp -d)
52+
trap 'rm -rf \"$ROOTPATH_TMP\"' EXIT
53+
54+
# Clean previous genimage temp directory
55+
rm -rf "${GENIMAGE_TMP}"
56+
57+
# Generate the SD card image
58+
$(HOST_DIR)/bin/genimage \
59+
--rootpath "${ROOTPATH_TMP}" \
60+
--tmppath "$(GENIMAGE_TMP)" \
61+
--inputpath "$(BINARIES_DIR)" \
62+
--outputpath "$(BINARIES_DIR)" \
63+
--config "${GENIMAGE_CFG}"
64+
endef
65+
endif
66+
.PHONY: generate-sdcard-image
67+
all: generate-sdcard-image
68+
generate-sdcard-image: target-post-image
69+
$(call GENERATE_SD_CARD)
70+
71+
72+
$(eval $(ix-board))
73+
$(eval $(generic-package))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Locally calculated
22
sha256 06d32acf42808b682859008292f0591d2d872f19aa1a8021bfcd1c1c626285e6 arm-trusted-firmware-v2.9.tar.gz
3+
sha256 42faea115c2f249ca47a8dd3b035591ff55482f267b64b84867521c8b021253d arm-trusted-firmware-78a0dfd927bb00ce973a1f8eb4079df0f755887a-git4.tar.gz
4+
sha256 fb138bd3a4ad0bc0860896ebb8acd7f239c81e05cd4eb1aa1c59c440bfe66f24 arm-trusted-firmware-master-git4.tar.gz
5+

0 commit comments

Comments
 (0)