Skip to content

Commit

Permalink
enable ap6275p bluetooth only for the orange pi 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed Sep 17, 2023
1 parent aae551a commit 903ca75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 0 additions & 6 deletions scripts/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@ chroot ${chroot_dir} /bin/bash -c "systemctl enable cpu-governor-performance"
cp ${overlay_dir}/usr/lib/systemd/system/gpu-governor-performance.service ${chroot_dir}/usr/lib/systemd/system/gpu-governor-performance.service
chroot ${chroot_dir} /bin/bash -c "systemctl enable gpu-governor-performance"

# Enable bluetooth for AP6275P
cp ${overlay_dir}/usr/lib/systemd/system/ap6275p-bluetooth.service ${chroot_dir}/usr/lib/systemd/system/ap6275p-bluetooth.service
cp ${overlay_dir}/usr/lib/scripts/ap6275p-bluetooth.sh ${chroot_dir}/usr/lib/scripts/ap6275p-bluetooth.sh
cp ${overlay_dir}/usr/bin/brcm_patchram_plus ${chroot_dir}/usr/bin/brcm_patchram_plus
chroot ${chroot_dir} /bin/bash -c "systemctl enable ap6275p-bluetooth"

# Add realtek bluetooth firmware to initrd
cp ${overlay_dir}/usr/share/initramfs-tools/hooks/rtl-bt ${chroot_dir}/usr/share/initramfs-tools/hooks/rtl-bt

Expand Down
8 changes: 7 additions & 1 deletion scripts/config-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ for type in $target; do
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-es8388-sound", ENV{SOUND_DESCRIPTION}="ES8388 Audio"'
} > ${chroot_dir}/etc/udev/rules.d/90-naming-audios.rules

# Enable bluetooth for AP6275P
cp ${overlay_dir}/usr/lib/systemd/system/ap6275p-bluetooth.service ${chroot_dir}/usr/lib/systemd/system/ap6275p-bluetooth.service
cp ${overlay_dir}/usr/lib/scripts/ap6275p-bluetooth.sh ${chroot_dir}/usr/lib/scripts/ap6275p-bluetooth.sh
cp ${overlay_dir}/usr/bin/brcm_patchram_plus ${chroot_dir}/usr/bin/brcm_patchram_plus
chroot ${chroot_dir} /bin/bash -c "systemctl enable ap6275p-bluetooth"

# Enable USB 2.0 port
cp ${overlay_dir}/usr/lib/systemd/system/enable-usb2.service ${chroot_dir}/usr/lib/systemd/system/enable-usb2.service
chroot ${chroot_dir} /bin/bash -c "systemctl --no-reload enable enable-usb2"

Expand Down Expand Up @@ -182,7 +189,6 @@ for type in $target; do
fi

if [[ ${MAINLINE} == "Y" ]]; then
chroot ${chroot_dir} /bin/bash -c "systemctl disable ap6275p-bluetooth"
chroot ${chroot_dir} /bin/bash -c "apt-get -y install linux-firmware"
else
chroot ${chroot_dir} /bin/bash -c "apt-get -y install armbian-firmware"
Expand Down

0 comments on commit 903ca75

Please sign in to comment.