Update for Orange Pi 5 v1.0.6

This commit is contained in:
orangepi-xunlong
2022-12-16 18:28:40 +08:00
parent 041e404e63
commit 653f94c660
13 changed files with 334 additions and 24 deletions

View File

@@ -1 +0,0 @@
export QT_XCB_GL_INTEGRATION=xcb_egl

View File

@@ -1 +0,0 @@
export QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox --disable-es3-gl-context --ignore-gpu-blacklist --ignore-gpu-blocklist --enable-accelerated-video-decode"

View File

@@ -0,0 +1,9 @@
#!/bin/bash
while true; do
gpu_load=$(cat /sys/devices/platform/fb000000.gpu/devfreq/fb000000.gpu/load | cut -d "@" -f 1)
echo $(date "+%H:%M:%S") : GPU load is : ${gpu_load}%
sleep 1
done

View File

@@ -0,0 +1,19 @@
#!/bin/bash
release=$(lsb_release -cs)
sudo apt update
if [[ $release =~ focal|bionic|buster ]]; then
sudo apt-get -y install qt5-default qttools5-dev-tools qtbase5-doc-html qt5-assistant qt5-doc
elif [[ $release =~ bullseye|jammy ]]; then
sudo apt-get -y install qttools5-dev-tools qtbase5-doc-html qt5-assistant qt5-doc qt5-qmake qt5-qmake-bin
else
echo "Unsupported system!"
exit
fi
sudo apt-get -y install qtcreator qmlscene gdb qtdeclarative5-dev qtbase5-examples cmake
sudo chown orangepi:orangepi /usr/lib/aarch64-linux-gnu/qt5/examples -R
qmake -v

View File

@@ -0,0 +1,74 @@
#!/bin/bash
#mirror_url=http://mirrors.ustc.edu.cn
mirror_url=https://repo.huaweicloud.com
if [[ -n $1 ]]; then
version=$1
else
echo "usage: install_ros.sh ros1/ros2"
exit
fi
release=$(lsb_release -cs)
if [[ $version == "ros1" && $release =~ focal ]]; then
[[ -f /etc/apt/sources.list.d/ros-latest.list ]] && sudo rm /etc/apt/sources.list.d/ros-latest.list
sudo sh -c "echo deb ${mirror_url}/ros/ubuntu $(lsb_release -sc) main > /etc/apt/sources.list.d/ros1.list"
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
sudo apt install -y ros-noetic-desktop-full
sudo sh -c 'echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc'
echo "source /opt/ros/noetic/setup.bash" >> /home/orangepi/.bashrc
sudo apt install -y python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo sh -c 'echo "151.101.84.133 raw.githubusercontent.com" >> /etc/hosts'
source /opt/ros/noetic/setup.bash
sudo rosdep init
rosdep update
exit
fi
if [[ $version == "ros2" && $release =~ focal ]]; then
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
echo "deb [arch=$(dpkg --print-architecture)] ${mirror_url}/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt install -y ros-galactic-desktop
sudo apt install -y ros-dev-tools
sudo sh -c 'echo "source /opt/ros/galactic/setup.bash" >> /root/.bashrc'
echo "source /opt/ros/galactic/setup.bash" >> /home/orangepi/.bashrc
source /opt/ros/galactic/setup.bash
ros2 -h
exit
fi
if [[ $version == "ros2" && $release =~ jammy ]]; then
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
echo "deb [arch=$(dpkg --print-architecture)] ${mirror_url}/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt install -y ros-humble-desktop
sudo apt install -y ros-dev-tools
sudo sh -c 'echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc'
echo "source /opt/ros/humble/setup.bash" >> /home/orangepi/.bashrc
source /opt/ros/humble/setup.bash
ros2 -h
exit
fi
echo "Unsupported System!"

View File

@@ -8,4 +8,16 @@ echo "Start MIPI CSI Camera Preview!"
export XDG_RUNTIME_DIR=/run/user/1000
gst-launch-1.0 v4l2src device=/dev/video11 io-mode=4 ! queue ! video/x-raw,format=NV12,width=2112,height=1568,framerate=30/1 ! glimagesink
if [[ -c /dev/video51 ]]; then
gst-launch-1.0 v4l2src device=/dev/video33 io-mode=4 ! video/x-raw,format=NV12,width=1080,height=720,framerate=15/1 ! xvimagesink > /dev/null 2>&1 &
gst-launch-1.0 v4l2src device=/dev/video42 io-mode=4 ! video/x-raw,format=NV12,width=720,height=576,framerate=15/1 ! xvimagesink > /dev/null 2>&1 &
gst-launch-1.0 v4l2src device=/dev/video51 io-mode=4 ! video/x-raw,format=NV12,width=640,height=480,framerate=15/1 ! xvimagesink > /dev/null 2>&1
elif [[ -c /dev/video31 ]]; then
gst-launch-1.0 v4l2src device=/dev/video22 io-mode=4 ! video/x-raw,format=NV12,width=720,height=576,framerate=15/1 ! xvimagesink > /dev/null 2>&1 &
gst-launch-1.0 v4l2src device=/dev/video31 io-mode=4 ! video/x-raw,format=NV12,width=720,height=576,framerate=15/1 ! xvimagesink > /dev/null 2>&1
elif [[ -c /dev/video11 ]]; then
gst-launch-1.0 v4l2src device=/dev/video11 io-mode=4 ! video/x-raw,format=NV12,width=2112,height=1568,framerate=15/1 ! xvimagesink > /dev/null 2>&1
else
echo "Can not find camera!!!"
fi

View File

@@ -0,0 +1,29 @@
#!/bin/bash
if [[ -f /opt/ros/noetic/setup.bash ]]; then
source /opt/ros/noetic/setup.bash
roscore &
sleep 5
rosrun turtlesim turtlesim_node &
rosrun turtlesim turtle_teleop_key
fi
if [[ -f /opt/ros/galactic/setup.bash ]]; then
source /opt/ros/galactic/setup.bash
ros2 run demo_nodes_cpp talker &
ros2 run demo_nodes_py listener
fi
if [[ -f /opt/ros/humble/setup.bash ]]; then
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp talker &
ros2 run demo_nodes_py listener
fi

View File

@@ -1,3 +1,5 @@
#!/bin/bash
sudo bash -c "echo 0x100 > /sys/module/rk_vcodec/parameters/mpp_dev_debug"
sudo dmesg -c > /dev/null
dmesg -w