rockchip-rk356x.conf 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
  2. BOOTBRANCH='branch:v2017.09-rk3588'
  3. OVERLAY_PREFIX="rk356x"
  4. CPUMIN=408000
  5. CPUMAX=1800000
  6. case $BRANCH in
  7. legacy)
  8. KERNELBRANCH='branch:orange-pi-5.10-rk35xx'
  9. LINUXCONFIG='linux-rockchip-rk356x-legacy'
  10. ;;
  11. current)
  12. KERNELBRANCH='branch:orange-pi-6.6-rk35xx'
  13. LINUXCONFIG='linux-rockchip-rk356x-current'
  14. ;;
  15. esac
  16. prepare_boot_configuration
  17. install_balenaEtcher(){
  18. if [[ $BUILD_DESKTOP == yes && $install_balena_etcher == yes ]]; then
  19. balena_etcher_deb=balena-etcher-electron_1.7.9+5945ab1f_arm64.deb
  20. balena_etcher_url="https://github.com/Itai-Nelken/BalenaEtcher-arm/releases/download/v1.7.9/${balena_etcher_deb}"
  21. balena_etcher=${EXTER}/cache/debs/arm64/${balena_etcher_deb}
  22. if [[ ! -f ${balena_etcher} ]]; then
  23. wget -P ${EXTER}/cache/debs/arm64 ${balena_etcher_url}
  24. fi
  25. install_deb_chroot ${balena_etcher}
  26. fi
  27. }
  28. family_tweaks_bsp()
  29. {
  30. install -m 755 $EXTER/packages/bsp/adb/adbd-${ARCH} ${destination}/usr/bin/adbd
  31. }
  32. family_tweaks_s() {
  33. rsync -a --chown=root:root "${EXTER}"/packages/bsp/rk356x/* ${SDCARD}/
  34. chroot $SDCARD /bin/bash -c "apt-get -y -qq install dnsmasq v4l-utils swig python3-dev python3-setuptools bluez libncurses-dev" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
  35. [[ ${RELEASE} == jammy ]] && rm ${SDCARD}/etc/profile.d/orangepi-ssh-title.sh # for adbd
  36. chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload enable usbdevice.service >/dev/null 2>&1"
  37. if [[ -f "${SDCARD}"/etc/profile.d/im-config_wayland.sh && ${DESKTOP_ENVIRONMENT} =~ xfce|kde-plasma ]]; then
  38. chroot $SDCARD /bin/bash -c "rm /etc/profile.d/im-config_wayland.sh" # for adbd
  39. fi
  40. install_balenaEtcher
  41. install_wiringop
  42. if [[ -f ${SDCARD}/etc/pulse/default.pa && ${SELECTED_CONFIGURATION} == desktop && ${BOARD} =~ orangepicm4|orangepi3b ]]; then
  43. sed -i "s/auto-profiles = yes/auto-profiles = no/" ${SDCARD}/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
  44. echo "load-module module-alsa-sink device=hw:0,0 sink_name=AudioCodec-Playback sink_properties=\"device.description='Headphone'\"" >> ${SDCARD}/etc/pulse/default.pa
  45. echo "load-module module-alsa-sink device=hw:1,0 sink_name=HDMI-Playback sink_properties=\"device.description='HDMI Audio'\"" >> ${SDCARD}/etc/pulse/default.pa
  46. fi
  47. }