Pārlūkot izejas kodu

t527: Add gpu acceleration and gst hw decode

baiywt 5 mēneši atpakaļ
vecāks
revīzija
5f17bb4711

+ 1 - 0
.gitignore

@@ -44,6 +44,7 @@ external/cache/sources/orangepi-test
 external/cache/sources/rk3588_packages*
 external/cache/sources/rk356x_packages
 external/cache/sources/rk35xx_packages
+external/cache/sources/t527_packages
 external/cache/sources/rk-rootfs-build*
 external/cache/sources/orangepi-firmware*
 external/cache/sources/wiringOP

+ 1 - 1
external/config/boards/orangepi4a.conf

@@ -7,5 +7,5 @@ MODULES="bcmdhd vin_v4l2"
 KERNEL_TARGET="current"
 DISTRIB_TYPE_CURRENT="bookworm jammy"
 BOOT_LOGO="desktop"
-REVISION="1.0.0"
+REVISION="1.0.2"
 SRC_EXTLINUX="yes"

+ 3 - 0
external/config/desktop/bookworm/environments/gnome/config_base/packages

@@ -24,6 +24,9 @@ gnome-system-monitor
 gnome-terminal
 gnome-session
 gnome-shell
+gstreamer1.0-packagekit
+gstreamer1.0-plugins-base-apps
+gstreamer1.0-pulseaudio
 inputattach
 libnotify-bin
 libpulsedsp

+ 17 - 0
external/config/sources/families/sun55iw3.conf

@@ -75,6 +75,23 @@ family_tweaks_s()
 		SERIALCON="ttyAS0"
 	fi
 
+	rsync -a --chown=root:root "${EXTER}"/packages/bsp/t527/* ${SDCARD}/
+
+	if [[ ${SELECTED_CONFIGURATION} == desktop ]]; then
+		local packages_to_install=("mesa" "libcedarc" "gst-omx")
+		chroot $SDCARD /bin/bash -c "apt-get -y -qq install gstreamer1.0-x" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
+		for package in ${packages_to_install[@]}; do
+			dpkg_install_debs_chroot $EXTER/cache/sources/t527_packages/$RELEASE/$package
+		done
+
+		if [[ $RELEASE == jammy ]]; then
+			chroot $SDCARD /bin/bash -c "apt-get -y -qq install glmark2 glmark2-wayland" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
+		elif [[ $RELEASE == bookworm ]]; then
+			chroot $SDCARD /bin/bash -c "apt-get -y -qq install glmark2-x11 glmark2-wayland" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
+		fi
+
+	fi
+
 	install_wiringop
 }
 

+ 7 - 0
external/packages/bsp/t527/etc/X11/xorg.conf

@@ -0,0 +1,7 @@
+Section "Device"
+	Identifier  "Allwinner Graphics"
+	Driver      "modesetting"
+
+	Option      "kmsdev"        "/dev/dri/card0"
+	Option      "AccelMethod"   "glamor"
+EndSection

+ 5 - 0
external/packages/bsp/t527/etc/udev/rules.d/99-t527-permissions.rules

@@ -0,0 +1,5 @@
+KERNEL=="system", SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
+KERNEL=="reserved", SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
+KERNEL=="sunxi_soc_info", MODE="0666"
+KERNEL=="renderD128", SUBSYSTEM=="drm", MODE="0666"
+KERNEL=="cedar_dev", MODE="0666"

+ 8 - 2
scripts/main.sh

@@ -457,7 +457,7 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
 
 	fi
 
-	if [[ ${BOARD} =~ orangepi4|orangepi4-lts|orangepi800 && $RELEASE =~ focal|buster|bullseye|bookworm ]]; then
+	if [[ "${BOARD}x" =~ orangepi4x|orangepi4-ltsx|orangepi800x && $RELEASE =~ focal|buster|bullseye|bookworm ]]; then
 
 		[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/rk-rootfs-build-${RELEASE}" "branch:rk-rootfs-build-${RELEASE}"
 
@@ -475,13 +475,19 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
 
 	fi
 
+	if [[ ${BOARDFAMILY} == "sun55iw3" && $RELEASE =~ bookworm|jammy ]]; then
+
+		[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/t527_packages" "branch:t527_packages"
+
+	fi
+
 	if [[ ${BOARD} =~ orangepi3|orangepi3-lts && $RELEASE =~ bullseye && $BRANCH == current ]]; then
 
 		[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/ffmpeg_kodi_${RELEASE}" "branch:ffmpeg_kodi_${RELEASE}"
 
 	fi
 
-	if [[ ${BOARD} =~ orangepi4|orangepi4-lts|orangepi800 && $RELEASE =~ jammy && $BRANCH == next ]]; then
+	if [[ "${BOARD}x" =~ orangepi4x|orangepi4-ltsx|orangepi800x && $RELEASE =~ jammy && $BRANCH == next ]]; then
 
 		[[ ${BUILD_OPT} == image ]] && fetch_from_repo "https://github.com/orangepi-xunlong/rk-rootfs-build.git" "${EXTER}/cache/sources/ffmpeg_kodi_${RELEASE}" "branch:ffmpeg_kodi_${RELEASE}"