-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Orangepi RV2 Board with Spacemit-Famliy both Current and Edge #9299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sven-ola
wants to merge
41
commits into
armbian:main
Choose a base branch
from
sven-ola:orangepi-rv2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
f2b4227
OrangePi-RV2: Add ky-to-spacemit re-substituted DTs and WIP board con…
sven-ola 3f1b622
OrangePi-RV2: switch on power for bcmdhd wifi
sven-ola d6fb8e7
OrangePi-RV2: add support for RISCV64 compile-to-binaries.
sven-ola b0203c5
OrangePi-RV2: load bcmdhd wifi on boot
sven-ola a038136
OrangePi-RV2: BCM bluetooth firmware hacking service
sven-ola 066e363
OrangePi-RV2: follow the tradition to log changes to syscfg
sven-ola 6eb3d47
OrangePi-RV2: SPI NOR partitioning (prep for boot-from-flash)
sven-ola 49b4f40
Spacemit: expand SPI NOR address limit to 16Mb (probably wrong 12Mb l…
sven-ola f19c4e4
OrangePi-RV2: script for armbian-install to write boot cfg to MTD flash
sven-ola f9d962d
OrangePi-RV2: u-boot support for XM25QH128A flash
sven-ola 228bf1e
OrangePi-RV2: u-boot FIT configs for rv2 and r2s (auto-selected via T…
sven-ola 7f6c133
Spacemit: HW crypto fixes / speedup.
sven-ola 5251489
OrangePi-RV2: add missing interrupt for bcmdhd WLAN hostwake GPIO
sven-ola 4451225
OrangePi-RV2: wlan driver for edge
sven-ola 5c358bc
OrangePi-RV2: Add overlay dtbo files
sven-ola 99d9889
OrangePi-RV2: Speedup for fast SD cards with the Linux MMC kernel dri…
sven-ola ab83254
OrangePi-R2S: Realtek 8125 Ethernet support
sven-ola 9e399e9
General: do not use PCIe ASPM with Samsung 9b1 NVME
sven-ola 758b50c
OrangePi-RV2: fix internal audio
sven-ola f122f44
Spacemit: fix HDMI audio (and rCPU communication)
sven-ola dd13ae3
Spacemit: enable CAN and IR (sync up to OrangePi RV2)
sven-ola 99ad088
Spacemit: temporarly revert kthread removal to fix HDMI audio
sven-ola af5293a
Merge remote-tracking branch 'upstream/main' into orangepi-rv2
sven-ola 99cda71
Revert "Spacemit: temporarly revert kthread removal to fix HDMI audio"
sven-ola 6320ff3
OrangePi-RV2: fix internal audio, activate headphone gpio
sven-ola 1931edd
Spacemit: add a license to the esos.elf RTOS firmware
sven-ola 09903c2
Spacemit: HDMI audio fix: revert busy-loop removal, apply 1 sec timeout
sven-ola f03cb74
RiscV: added riscv64 to trixie/mate desktops
sven-ola f99a197
Merge remote-tracking branch 'upstream/main' into orangepi-rv2
sven-ola 84bbd55
OrangePi-RV2: Completely disable unused pwr-gpios
sven-ola e187c9e
OrangePi-RV2/R2S: synchronize Eth/RGMII unit-address in DT
sven-ola 577775f
Patch fixup to prevent .orig
sven-ola 187fe9b
Spacemit: revert XMC flash chip addon, use .config instead
sven-ola f1aa0f2
Spacemit: re-add wrongly removed OrangePi RV2 flash chip
sven-ola 69e78b3
Merge branch 'main' into orangepi-rv2
sven-ola bfe58b5
Spacemit: HDMI audio fix, set highest realtime prio
sven-ola 5de69dd
Spacemit: rename patch comment to match patch content
sven-ola 68ffeb4
OrangePi-RV2/R2V: fix copy/paste error in DT model string
sven-ola b209e40
Spacemit: prevent uninitialized thread shutdown (triggerd by the rabbit)
sven-ola 046a86f
Merge branch 'main' into orangepi-rv2
sven-ola 613737f
Spacemit: fix high CPU load caused by rCPU remoteproc communication k…
sven-ola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Ky X1 octa core RISC-V SoC 2GB/4GB/8GB RAM, 2xGbit+2x2.5 Gbit Eth | ||
| BOARD_NAME="Orange Pi R2S" | ||
| BOARD_VENDOR="xunlong" | ||
| BOARDFAMILY="spacemit" | ||
| BOARD_MAINTAINER="sven-ola" | ||
| KERNEL_TARGET="current,edge" | ||
| BOOT_FDT_FILE="spacemit/x1_orangepi-r2s.dtb" | ||
| BOOTDELAY=1 | ||
| SRC_EXTLINUX="yes" | ||
| SRC_CMDLINE="earlycon=sbi console=tty1 console=ttyS0,115200 loglevel=1" | ||
| PACKAGE_LIST_BOARD="" | ||
|
|
||
| function post_config_uboot_target__extra_configs_for_orangepi() { | ||
| display_alert "$BOARD" "disable MMC UHS support to speed up MMC under Linux" "info" | ||
| run_host_command_logged scripts/config --disable CONFIG_MMC_UHS_SUPPORT | ||
| } | ||
|
|
||
| write_uboot_platform_mtd() { | ||
| if [ -b /dev/mtdblock0 ]; then | ||
| dd if="${1}/bootinfo_spinor.bin" of=/dev/mtdblock0 bs=65536 status=none; | ||
| dd if="${1}/FSBL.bin" of=/dev/mtdblock2 bs=65536 status=none; | ||
| dd if="${1}/u-boot-env-default.bin" of=/dev/mtdblock3 bs=65536 status=none; | ||
| dd if="${1}/fw_dynamic.itb" of=/dev/mtdblock4 bs=65536 status=none; | ||
| dd if="${1}/u-boot.itb" of=/dev/mtdblock5 bs=65536 status=none; | ||
| sync | ||
| fi | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Ky X1 octa core RISC-V SoC 2GB/4GB/8GB RAM, 2xGbit, Wifi, BT, M.2-M(2230), M.2-M(2280) | ||
| BOARD_NAME="Orange Pi RV2" | ||
| BOARD_VENDOR="xunlong" | ||
| BOARDFAMILY="spacemit" | ||
| BOARD_MAINTAINER="sven-ola" | ||
| KERNEL_TARGET="current,edge" | ||
| BOOT_FDT_FILE="spacemit/x1_orangepi-rv2.dtb" | ||
| BOOTDELAY=1 | ||
| SRC_EXTLINUX="yes" | ||
| SRC_CMDLINE="earlycon=sbi console=tty1 console=ttyS0,115200 loglevel=1" | ||
| PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools pciutils" | ||
|
|
||
| case "${BRANCH}" in edge) | ||
| BCMDHD_SPACEMIT_TYPE="sdio" | ||
| BCMDHD_SPACEMIT_TAG="v101.10.591.84.37-4" | ||
| enable_extension "bcmdhd-spacemit" | ||
| ;;esac | ||
|
|
||
| function post_config_uboot_target__extra_configs_for_orangepi() { | ||
| display_alert "$BOARD" "disable MMC UHS support to speed up MMC under Linux" "info" | ||
| run_host_command_logged scripts/config --disable CONFIG_MMC_UHS_SUPPORT | ||
| } | ||
|
|
||
| write_uboot_platform_mtd() { | ||
| if [ -b /dev/mtdblock0 ]; then | ||
| dd if="${1}/bootinfo_spinor.bin" of=/dev/mtdblock0 bs=65536 status=none; | ||
| dd if="${1}/FSBL.bin" of=/dev/mtdblock2 bs=65536 status=none; | ||
| dd if="${1}/u-boot-env-default.bin" of=/dev/mtdblock3 bs=65536 status=none; | ||
| dd if="${1}/fw_dynamic.itb" of=/dev/mtdblock4 bs=65536 status=none; | ||
| dd if="${1}/u-boot.itb" of=/dev/mtdblock5 bs=65536 status=none; | ||
| sync | ||
| fi | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__orangepirv2_wifi() { | ||
| display_alert "$BOARD" "Force load bmcdhd wireless" "info" | ||
| run_host_command_logged mkdir -pv "${destination}"/etc/modules-load.d | ||
| run_host_command_logged echo "bcmdhd" > "${destination}"/etc/modules-load.d/${BOARD}.conf | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__orangepirv2_bluetooth() { | ||
| display_alert "$BOARD" "Installing bluetooth.service" "info" | ||
| # Bluetooth on this board is handled by a Broadcom (AP6256) chip and requires | ||
| # a custom brcm_patchram_plus binary, plus a systemd service to run it at boot time | ||
| install -m 644 $SRC/packages/bsp/orangepirv2/orangepirv2-bluetooth.service $destination/lib/systemd/system | ||
| return 0 | ||
| } | ||
|
|
||
| function post_family_tweaks__orangepirv2_enable_bluetooth_service() { | ||
| display_alert "$BOARD" "Enabling orangepirv2-bluetooth.service" "info" | ||
| chroot_sdcard systemctl enable orangepirv2-bluetooth.service | ||
| return 0 | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__orangepirv2_bt() { | ||
| # Build custom Bluetooth firmware hacking tool | ||
| if [ -f "$SRC/packages/bsp/$BOARD/brcm_patchram_plus.c" ];then | ||
| run_host_command_logged env PATH="${toolchain}:${PATH}" "${UBOOT_COMPILER}gcc" "$SRC/packages/bsp/${BOARD}/brcm_patchram_plus.c" -Wno-implicit-function-declaration -s -o "$destination/usr/bin/brcm_patchram_plus" || exit_with_error "Unable to compile brcm_patchram_plus.c" | ||
| fi | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| arm64, amd64 | ||
| arm64, amd64, riscv64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # shellcheck shell=bash | ||
|
|
||
| function extension_finish_config__install_kernel_headers_for_bcmdhd_spacemit_dkms() { | ||
|
|
||
| if [[ "${KERNEL_HAS_WORKING_HEADERS}" != "yes" ]]; then | ||
| display_alert "Kernel version has no working headers package" "skipping bcmdhd-spacemit dkms for kernel v${KERNEL_MAJOR_MINOR}" "warn" | ||
| return 0 | ||
| fi | ||
| declare -g INSTALL_HEADERS="yes" | ||
| display_alert "Forcing INSTALL_HEADERS=yes; for use with bcmdhd-spacemit dkms" "${EXTENSION}" "debug" | ||
| } | ||
|
|
||
| function post_install_kernel_debs__install_bcmdhd_spacemit_dkms_package() { | ||
|
|
||
| [[ "${INSTALL_HEADERS}" != "yes" ]] || [[ "${KERNEL_HAS_WORKING_HEADERS}" != "yes" ]] && return 0 | ||
| [[ -z ${BCMDHD_SPACEMIT_TAG} ]] && return 0 | ||
| [[ -z ${BCMDHD_SPACEMIT_TYPE} ]] && return 0 | ||
|
|
||
| local file_name= | ||
| local pcie_url="https://codeberg.org/sven-ola/bcmdhd-spacemit-dkms/releases/download/${BCMDHD_SPACEMIT_TAG}/bcmdhd-spacemit-pcie-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb" | ||
| local sdio_url="https://codeberg.org/sven-ola/bcmdhd-spacemit-dkms/releases/download/${BCMDHD_SPACEMIT_TAG}/bcmdhd-spacemit-sdio-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb" | ||
| local usb_url="https://codeberg.org/sven-ola/bcmdhd-spacemit-dkms/releases/download/${BCMDHD_SPACEMIT_TAG}/bcmdhd-spacemit-usb-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb" | ||
|
|
||
| case "${BCMDHD_SPACEMIT_TYPE}" in | ||
| "pcie") | ||
| file_name=bcmdhd-spacemit-pcie-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb | ||
| use_clean_environment="yes" chroot_sdcard "wget ${pcie_url} -P /tmp" | ||
| ;; | ||
| "sdio") | ||
| file_name=bcmdhd-spacemit-sdio-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb | ||
| use_clean_environment="yes" chroot_sdcard "wget ${sdio_url} -P /tmp" | ||
| ;; | ||
| "usb") | ||
| file_name=bcmdhd-spacemit-usb-dkms_${BCMDHD_SPACEMIT_TAG#v}_all.deb | ||
| use_clean_environment="yes" chroot_sdcard "wget ${usb_url} -P /tmp" | ||
| ;; | ||
| *) | ||
| return 0 | ||
| ;; | ||
| esac | ||
| display_alert "Install bcmdhd-spacemit packages, will build kernel module in chroot" "${EXTENSION}" "info" | ||
| # shellcheck disable=SC2034 | ||
| declare -ag if_error_find_files_sdcard=("/var/lib/dkms/bcmdhd*/*/build/*.log") | ||
| use_clean_environment="yes" chroot_sdcard_apt_get_install /tmp/"${file_name}" | ||
| use_clean_environment="yes" chroot_sdcard "rm -f /tmp/bcmdhd*.deb" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| The following license only applies to "esos.elf" | ||
| ================================================================ | ||
|
|
||
| SPACEMIT (Hangzhou) Technology Co., Ltd. grants permission to use and redistribute | ||
| aforementioned firmware files for the use with devices containing Spacemit chipsets, | ||
| but not as part of the Linux kernel or in any other form which would require | ||
| these files themselves to be covered by the terms of the GNU General Public License | ||
| or the GNU Lesser General Public License. | ||
|
|
||
| These firmware files are distributed in the hope that they will be useful, but | ||
| are provided WITHOUT ANY WARRANTY, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTY | ||
| OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| This firmware file is the RTOS for the Spacemit K1x realtime CPU. | ||
| The Spacemit firmware is based on the Thread Operating System RTOS, | ||
| see https://www.rt-thread.io/ for an explanation. New esos.elf files | ||
| can be downloaded from the Spacemit repo hosted on a Chinese | ||
| GIT site, see https://gitee.com/spacemit-buildroot/buildroot-ext. | ||
|
|
||
| One of the branches there also has a license file, reproduced here: | ||
| https://gitee.com/spacemit-buildroot/buildroot-ext/blob/k1-bl-v2.2.y/board/spacemit/k1/target_overlay/lib/firmware/LICENSE.spacemit_esos |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.