mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Fix USB2 and Type C ports on Orange Pi 5 (#4634)
This commit is contained in:
@@ -302,6 +302,13 @@ family_tweaks() {
|
||||
|
||||
fi
|
||||
|
||||
if [[ -f $SDCARD/lib/systemd/system/orangepi5-usb2-init.service ]]; then
|
||||
|
||||
# enable usb2 init service
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable orangepi5-usb2-init.service >/dev/null 2>&1"
|
||||
|
||||
fi
|
||||
|
||||
if [[ $BOARD == nanopim4* ]]; then
|
||||
|
||||
# enable fan support
|
||||
|
||||
@@ -24,5 +24,10 @@ esac
|
||||
prepare_boot_configuration
|
||||
|
||||
family_tweaks_bsp() {
|
||||
:
|
||||
if [[ $BOARD == orangepi5 ]]; then
|
||||
|
||||
# Add USB2 init service. Otherwise, USB2 won't work by default
|
||||
cp $SRC/packages/bsp/orangepi5/orangepi5-usb2-init.service $destination/lib/systemd/system/
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
9
packages/bsp/orangepi5/orangepi5-usb2-init.service
Normal file
9
packages/bsp/orangepi5/orangepi5-usb2-init.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Init USB2 for Orange Pi 5
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/sh -c "echo host > /sys/kernel/debug/usb/fc000000.usb/mode"
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user