61 lines
2.5 KiB
Plaintext
61 lines
2.5 KiB
Plaintext
# 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="legacy,current"
|
|
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 current)
|
|
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
|
|
}
|