From 2fc6917e6fff8d9f94ab7acedf4307b0d875542c Mon Sep 17 00:00:00 2001 From: leeboby Date: Wed, 7 Aug 2024 10:15:25 +0800 Subject: [PATCH] Support Orange Pi Ai Max --- external/config/boards/orangepiaimax.conf | 15 +++++++++++++++ .../families/include/rockchip64_common.inc | 2 +- .../config/sources/families/rockchip-rk3588.conf | 4 ++-- .../lib/orangepi/orangepi-hardware-optimization | 4 ++-- .../common/files/orangepi-hardware-optimization | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 external/config/boards/orangepiaimax.conf diff --git a/external/config/boards/orangepiaimax.conf b/external/config/boards/orangepiaimax.conf new file mode 100644 index 0000000..11677f8 --- /dev/null +++ b/external/config/boards/orangepiaimax.conf @@ -0,0 +1,15 @@ +# Rockchip RK3588 SoC +BOARD_NAME="Orange Pi Ai Max" +BOARDFAMILY="rockchip-rk3588" +BOOTCONFIG="orangepi_ai_max_defconfig" +KERNEL_TARGET="legacy,current" +BOOT_LOGO="desktop" +BOOT_FDT_FILE="rockchip/rk3588-orangepi-ai-max.dtb" +BOOT_SCENARIO="spl-blobs" +IMAGE_PARTITION_TABLE="gpt" +BOOT_SUPPORT_SPI="yes" +SKIP_BOOTSPLASH="yes" # Skip boot splash patch, conflicts with CONFIG_VT=yes +DISTRIB_TYPE_LEGACY="bullseye bookworm bionic focal jammy" +DISTRIB_TYPE_CURRENT="bullseye bookworm focal jammy" +BOOTFS_TYPE="fat" +REVISION="1.0.0" diff --git a/external/config/sources/families/include/rockchip64_common.inc b/external/config/sources/families/include/rockchip64_common.inc index ccfb569..bcc9d04 100644 --- a/external/config/sources/families/include/rockchip64_common.inc +++ b/external/config/sources/families/include/rockchip64_common.inc @@ -62,7 +62,7 @@ elif [[ $BOARDFAMILY == "rockchip-rk3588" ]]; then BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}" - if [[ "${BOARD}x" =~ orangepi5maxx|orangepi5prox|orangepi5plusx|orangepi5x|orangepi5bx|orangepi5ultrax ]]; then + if [[ "${BOARD}x" =~ orangepi5maxx|orangepi5prox|orangepi5plusx|orangepiaimax|orangepi5x|orangepi5bx|orangepi5ultrax ]]; then DDR_BLOB="${DDR_BLOB:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin}" BL31_BLOB='rk35/rk3588_bl31_v1.45_20240422.elf' diff --git a/external/config/sources/families/rockchip-rk3588.conf b/external/config/sources/families/rockchip-rk3588.conf index f67d236..246f340 100644 --- a/external/config/sources/families/rockchip-rk3588.conf +++ b/external/config/sources/families/rockchip-rk3588.conf @@ -113,7 +113,7 @@ family_tweaks_s() { rsync -a --chown=root:root "${EXTER}"/packages/bsp/rk3588/* ${SDCARD}/ fi - if [[ ${BOARD} =~ orangepi5plus|orangepi5max|orangepi900|orangepi5ultra ]]; then + if [[ ${BOARD} =~ orangepi5plus|orangepiaimax|orangepi5max|orangepi900|orangepi5ultra ]]; then if [[ ${SELECTED_CONFIGURATION} == desktop && ${DESKTOP_ENVIRONMENT} == kde-plasma ]]; then rsync -a --chown=root:root --exclude=etc/pulse "${EXTER}"/packages/bsp/orangepi5plus/* ${SDCARD}/ @@ -159,7 +159,7 @@ family_tweaks_s() { echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > ${SDCARD}/etc/udev/rules.d/90-naming-audios.rules echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> ${SDCARD}/etc/udev/rules.d/90-naming-audios.rules - elif [[ "${BOARD}x" =~ orangepi5plusx|orangepi900x ]]; then + elif [[ "${BOARD}x" =~ orangepi5plusx|orangepiaimaxx|orangepi900x ]]; then echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > ${SDCARD}/etc/udev/rules.d/90-naming-audios.rules echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi1-sound", ENV{SOUND_DESCRIPTION}="HDMI1 Audio"' >> ${SDCARD}/etc/udev/rules.d/90-naming-audios.rules diff --git a/external/packages/bsp/common/usr/lib/orangepi/orangepi-hardware-optimization b/external/packages/bsp/common/usr/lib/orangepi/orangepi-hardware-optimization index ef7551f..c73f7c0 100755 --- a/external/packages/bsp/common/usr/lib/orangepi/orangepi-hardware-optimization +++ b/external/packages/bsp/common/usr/lib/orangepi/orangepi-hardware-optimization @@ -97,7 +97,7 @@ prepare_board() { rockpro64|renegade-elite|pinebook-pro|station-p1) BOARDFAMILY=rk3399 ;; - orangepi5|orangepicm5|orangepicm5-tablet|orangepi5b|orangepi5plus|orangepi5pro|orangepi5max|orangepi5ultra|orangepitab|orangepi900) + orangepi5|orangepicm5|orangepicm5-tablet|orangepi5b|orangepi5plus|orangepiaimax|orangepi5pro|orangepi5max|orangepi5ultra|orangepitab|orangepi900) [[ $BOARD =~ orangepi5|orangepi5b ]] && echo host > /sys/kernel/debug/usb/fc000000.usb/mode if [[ $BOARD =~ orangepicm5 ]]; then while true; do @@ -157,7 +157,7 @@ prepare_board() { tinymix -D ${es8388_card} 25 0 tinymix -D ${es8388_card} 27 0 fi - elif [[ $BOARD =~ orangepi5plus ]]; then + elif [[ $BOARD =~ orangepi5plus|orangepiaimax ]]; then amixer -c ${es8388_card} cset name='PCM Volume' 190 >/dev/null 2>&1 amixer -c ${es8388_card} cset name='Right Mixer Right Playback Switch' off >/dev/null 2>&1 fi diff --git a/external/packages/raspi/orangepi/common/files/orangepi-hardware-optimization b/external/packages/raspi/orangepi/common/files/orangepi-hardware-optimization index 9c6a855..43f6bad 100755 --- a/external/packages/raspi/orangepi/common/files/orangepi-hardware-optimization +++ b/external/packages/raspi/orangepi/common/files/orangepi-hardware-optimization @@ -6,7 +6,7 @@ prepare_board() { case ${BOARD} in - orangepi5|orangepi5b|orangepi5plus|orangepitab|orangepi900) + orangepi5|orangepi5b|orangepi5plus|orangepiaimax|orangepitab|orangepi900) [[ $BOARD =~ orangepi5|orangepi5b ]] && echo host > /sys/kernel/debug/usb/fc000000.usb/mode if [[ -c /dev/mpp_service ]]; then