Update for Orange Pi 5 v1.1.0

This commit is contained in:
orangepi-xunlong
2023-01-06 16:05:10 +08:00
parent 1e88c5d827
commit 86c287f010
29 changed files with 2406 additions and 265 deletions

View File

@@ -0,0 +1,3 @@
if which plymouth >/dev/null 2>&1; then
FRAMEBUFFER=y
fi

File diff suppressed because it is too large Load Diff

View File

@@ -7,44 +7,6 @@ else
exit
fi
user=$(cat /etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf | grep "autologin-user=" | cut -d "=" -f 2)
#echo $user
if [[ $user == "root" ]]; then
lcd_num=$(sudo xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | wc -l)
[[ $lcd_num == 1 ]] && id=$(sudo xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | cut -d '=' -f2 | cut -d " " -f 1 | cut -d "[" -f 1)
if [[ $lcd_num == 2 ]]; then
id1=$(sudo xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | head -1 | cut -d "=" -f2 | cut -d "[" -f1)
id2=$(sudo xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | tail -1 | cut -d "=" -f2 | cut -d "[" -f1)
#echo "id1 = $id1"
#echo "id2 = $id2"
fi
fi
if [[ $user != "root" ]]; then
lcd_num=$(xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | wc -l)
[[ $lcd_num == 1 ]] && id=$(xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | cut -d '=' -f2 | cut -d " " -f 1 | cut -d "[" -f 1)
if [[ $lcd_num == 2 ]]; then
id1=$(xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | head -1 | cut -d "=" -f2 | cut -d "[" -f1)
id2=$(xinput | grep "Goodix Capacitive TouchScreen" | grep "pointer" | tail -1 | cut -d "=" -f2 | cut -d "[" -f1)
#echo "id1 = $id1"
#echo "id2 = $id2"
fi
fi
#echo $lcd_num
#echo $id
case $1 in
left)
rotate=3
@@ -64,24 +26,12 @@ none)
;;
esac
[[ -f /etc/profile.d/lcd.sh ]] && sudo rm /etc/profile.d/lcd.sh
sudo bash -c "echo '#!/bin/bash' >> /etc/profile.d/lcd.sh"
sudo bash -c "echo ' ' >> /etc/profile.d/lcd.sh"
sudo bash -c "echo '[[ \$XDG_SESSION_TYPE == x11 ]] && \' >> /etc/profile.d/lcd.sh"
if [[ $lcd_num == 2 ]]; then
sudo bash -c "echo xinput set-prop $id1 \'Coordinate Transformation Matrix\' ${matrix} >> /etc/profile.d/lcd.sh"
sudo bash -c "echo '[[ \$XDG_SESSION_TYPE == x11 ]] && \' >> /etc/profile.d/lcd.sh"
sudo bash -c "echo xinput set-prop $id2 \'Coordinate Transformation Matrix\' ${matrix} >> /etc/profile.d/lcd.sh"
else
sudo bash -c "echo xinput set-prop $id \'Coordinate Transformation Matrix\' ${matrix} >> /etc/profile.d/lcd.sh"
fi
#xrandr -o $1
#sed -i '/xrandr -o/d' ~/.bashrc
#echo "xrandr -o $1" >> ~/.bashrc
sudo sed -i '/TransformationMatrix/d' /usr/share/X11/xorg.conf.d/40-libinput.conf
sudo sed -i "/libinput touchscreen catchall/a Option \"TransformationMatrix\" \"${matrix}\"" /usr/share/X11/xorg.conf.d/40-libinput.conf
sudo sed -i '/extraargs=fbcon=rotate/d' /boot/orangepiEnv.txt
sudo bash -c "echo extraargs=fbcon=rotate:${rotate} >> /boot/orangepiEnv.txt"
sudo sed -i 's/bootlogo=true/bootlogo=false/g' /boot/orangepiEnv.txt
sudo sync
sudo reboot

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

View File

@@ -0,0 +1,17 @@
#!/bin/sh -e
if [ "x$1" = xconfigure ]; then
if which plymouth-set-default-theme >/dev/null 2>&1; then
# For Debian
plymouth-set-default-theme orangepi
else
# For Ubuntu
update-alternatives \
--install /usr/share/plymouth/themes/default.plymouth default.plymouth \
/usr/share/plymouth/themes/orangepi/orangepi.plymouth 150
fi
if which update-initramfs >/dev/null 2>&1; then
update-initramfs -u
fi
fi

View File

@@ -0,0 +1,7 @@
#!/bin/sh -e
if [ "x$1" = xremove ]; then
if which update-initramfs >/dev/null 2>&1; then
update-initramfs -u
fi
fi

View File

@@ -0,0 +1,13 @@
#!/bin/sh -e
if [ "x$1" = xremove ]; then
if which plymouth-set-default-theme >/dev/null 2>&1; then
# For Debian
plymouth-set-default-theme -r
else
# For Ubuntu
update-alternatives \
--remove default.plymouth \
/usr/share/plymouth/themes/orangepi/orangepi.plymouth
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,64 @@
[Plymouth Theme]
Name=OrangePi
Description=OrangePi logo
ModuleName=two-step
[two-step]
Font=DejaVu Sans 15
TitleFont=DejaVu Sans Mono Bold 30
ImageDir=/usr/share/plymouth/themes/orangepi
DialogHorizontalAlignment=.5
DialogVerticalAlignment=.7
TitleHorizontalAlignment=.5
TitleVerticalAlignment=.382
HorizontalAlignment=.5
VerticalAlignment=.8
WatermarkHorizontalAlignment=.5
WatermarkVerticalAlignment=.5
Transition=none
TransitionDuration=0.0
BackgroundStartColor=0x000000
BackgroundEndColor=0x000000
ProgressBarBackgroundColor=0x606060
ProgressBarForegroundColor=0xffffff
DialogClearsFirmwareBackground=false
MessageBelowAnimation=true
[boot-up]
UseEndAnimation=false
UseFirmwareBackground=true
[shutdown]
UseEndAnimation=false
UseFirmwareBackground=true
[reboot]
UseEndAnimation=false
UseFirmwareBackground=true
[updates]
SuppressMessages=true
ProgressBarShowPercentComplete=true
UseProgressBar=true
Title=Installing Updates...
_Title=Installing Updates...
SubTitle=Do not turn off your computer
_SubTitle=Do not turn off your computer
[system-upgrade]
SuppressMessages=true
ProgressBarShowPercentComplete=true
UseProgressBar=true
Title=Upgrading System...
_Title=Upgrading System...
SubTitle=Do not turn off your computer
_SubTitle=Do not turn off your computer
[firmware-upgrade]
SuppressMessages=true
ProgressBarShowPercentComplete=true
UseProgressBar=true
Title=Upgrading Firmware...
_Title=Upgrading Firmware...
SubTitle=Do not turn off your computer
_SubTitle=Do not turn off your computer

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB