|
| 1 | +# OrangePi RV2 - RISC-V SoC with SPI flash boot |
| 2 | +BOARD_NAME="Orange Pi RV2" |
| 3 | +BOARDFAMILY="ky" |
| 4 | +BOARD_MAINTAINER="tmshlvck" |
| 5 | +KERNEL_TARGET="current,edge" |
| 6 | +BOOT_FDT_FILE="ky/x1_orangepi-rv2.dtb" |
| 7 | +BOOTDELAY=1 |
| 8 | +SRC_EXTLINUX="yes" |
| 9 | +SRC_CMDLINE="console=ttyS0,115200 earlycon=sbi clk_ignore_unused swiotlb=65536" |
| 10 | +PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools can-utils v4l-utils" |
| 11 | +#SKIP_BOOTSPLASH="yes" # Skip boot splash patch, conflicts with CONFIG_VT=yes |
| 12 | + |
| 13 | +function post_config_uboot_target__extra_configs_for_orangepi_rv2() { |
| 14 | + display_alert "u-boot for ${BOARD}" "u-boot: enabling extra configs for SPI flash boot" "info" |
| 15 | + run_host_command_logged scripts/config --enable CONFIG_SD_BOOT |
| 16 | + run_host_command_logged scripts/config --enable CONFIG_EXT4_WRITE |
| 17 | + run_host_command_logged scripts/config --enable CONFIG_FS_BTRFS |
| 18 | + run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS |
| 19 | + run_host_command_logged scripts/config --enable CONFIG_CMD_SF |
| 20 | + run_host_command_logged scripts/config --enable CONFIG_SPI_FLASH |
| 21 | + run_host_command_logged scripts/config --enable CONFIG_SPI_FLASH_MTD |
| 22 | + run_host_command_logged scripts/config --enable CONFIG_CMD_MTD |
| 23 | +} |
| 24 | + |
| 25 | +function post_family_tweaks_bsp__orangepi_rv2_extras() { |
| 26 | + display_alert "$BOARD" "Installing OrangePi RV2 specific configuration" "info" |
| 27 | + |
| 28 | + if [[ -d "$SRC/packages/blobs/riscv64/ky" ]]; then |
| 29 | + run_host_command_logged mkdir -pv "${destination}"/lib/firmware |
| 30 | + display_alert "$BOARD" "Installing boot firmware" "info" |
| 31 | + run_host_command_logged cp -fv $SRC/packages/blobs/riscv64/ky/esos.elf "${destination}"/lib/firmware |
| 32 | + fi |
| 33 | + |
| 34 | + # Force load wireless module if available |
| 35 | + if [[ -f "${destination}"/etc/modules-load.d/${BOARD}.conf ]]; then |
| 36 | + run_host_command_logged rm -f "${destination}"/etc/modules-load.d/${BOARD}.conf |
| 37 | + fi |
| 38 | + run_host_command_logged mkdir -pv "${destination}"/etc/modules-load.d |
| 39 | + |
| 40 | + # Add wireless module for AP6256 if present |
| 41 | + if [[ "${BOARD}x" == "orangepirv2x" ]]; then |
| 42 | + echo "bcmdhd" > "${destination}"/etc/modules-load.d/${BOARD}.conf |
| 43 | + |
| 44 | + # Copy WiFi firmware if available |
| 45 | + if [[ -f "${SRC}/packages/blobs/ky/nvram_ap6256.txt" ]]; then |
| 46 | + run_host_command_logged mkdir -pv "${destination}"/lib/firmware |
| 47 | + run_host_command_logged cp -v "${SRC}/packages/blobs/ky/nvram_ap6256.txt" "${destination}"/lib/firmware/ |
| 48 | + fi |
| 49 | + fi |
| 50 | +} |
0 commit comments