-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add Qcom Robotics RB5 Support #8017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| # Qualcomm Robotics RB5 Configuration | ||
| declare -g BOARD_NAME="Qualcomm Robotics RB5" | ||
| declare -g BOARD_MAINTAINER="FantasyGmm" | ||
| declare -g BOARDFAMILY="sm8250" | ||
| declare -g KERNEL_TARGET="current,edge" | ||
| declare -g KERNEL_TEST_TARGET="edge" | ||
| declare -g EXTRAWIFI="no" | ||
| declare -g BOOTCONFIG="none" | ||
| declare -g IMAGE_PARTITION_TABLE="gpt" | ||
| # declare -g -a ABL_DTB_LIST=("qrb5165-rb5") | ||
|
|
||
| # Use the full firmware, complete linux-firmware plus Armbian's (for qcom/a650_sqe.fw) | ||
| declare -g BOARD_FIRMWARE_INSTALL="-full" | ||
|
|
||
| declare -g SERIALCON="${SERIALCON:-tty1}" | ||
| declare -g GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused arm64.nopauth efi=noruntime console=ttyMSM0,115200n8 pcie_pme=nomsi" | ||
| declare -g BOOT_FDT_FILE="qcom/qrb5165-rb5.dtb" | ||
| declare -g UEFI_PART_ALIGN="4096" | ||
| enable_extension "grub" | ||
| enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place. | ||
|
|
||
| function qcom-robotics-rb5_is_userspace_supported() { | ||
| [[ "${RELEASE}" == "bookworm" ]] && return 0 | ||
| [[ "${RELEASE}" == "jammy" ]] && return 0 | ||
| [[ "${RELEASE}" == "noble" ]] && return 0 | ||
| [[ "${RELEASE}" == "trixie" ]] && return 0 | ||
| return 1 | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__qcom-robotics-rb5_add_services() { | ||
| if ! qcom-robotics-rb5_is_userspace_supported; then | ||
| if [[ "${RELEASE}" != "" ]]; then | ||
| display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn" | ||
| fi | ||
| return 0 | ||
| fi | ||
|
|
||
| display_alert "$BOARD" "Add services" "info" | ||
|
|
||
| # Bluetooth MAC addr setup service | ||
| mkdir -p $destination/usr/local/bin/ | ||
| mkdir -p $destination/usr/lib/systemd/system/ | ||
| install -Dm655 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.sh $destination/usr/local/bin/ | ||
| install -Dm644 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.service $destination/usr/lib/systemd/system/ | ||
| } | ||
|
|
||
| function post_family_tweaks__qcom-robotics-rb5_enable_services() { | ||
| if ! qcom-robotics-rb5_is_userspace_supported; then | ||
| if [[ "${RELEASE}" != "" ]]; then | ||
| display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn" | ||
| fi | ||
| return 0 | ||
| fi | ||
|
|
||
| display_alert "$BOARD" "Enable services" "info" | ||
|
|
||
| chroot_sdcard systemctl enable bt-fixed-mac.service | ||
| return 0 | ||
| } | ||
|
|
||
| function post_family_tweaks__qcom-robotics-rb5_extra_packages() { | ||
| if ! qcom-robotics-rb5_is_userspace_supported; then | ||
| if [[ "${RELEASE}" != "" ]]; then | ||
| display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn" | ||
| fi | ||
| return 0 | ||
| fi | ||
|
|
||
| if [[ "${RELEASE}" == "jammy" ]] || [[ "${RELEASE}" == "noble" ]]; then | ||
| display_alert "Adding qcom-mainline PPA" "${BOARD}" "info" | ||
| do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/qcom-mainline --yes --no-update | ||
| fi | ||
|
|
||
| if [[ "${RELEASE}" == "noble" ]]; then | ||
| display_alert "Adding Mesa PPA For Ubuntu " "${BOARD}" "info" | ||
| do_with_retries 3 chroot_sdcard add-apt-repository ppa:oibaf/graphics-drivers --yes --no-update | ||
| fi | ||
|
|
||
| do_with_retries 3 chroot_sdcard_apt_get_update | ||
| do_with_retries 3 chroot_sdcard_apt_get_install vulkan-tools mesa-vulkan-drivers btop mtools zstd | ||
|
|
||
| if [[ "${RELEASE}" == "noble" ]]; then | ||
| do_with_retries 3 chroot_sdcard_apt_get_install qbootctl | ||
| fi | ||
|
|
||
| if [[ "${DESKTOP_ENVIRONMENT}" == "kde-plasma" ]]; then | ||
| display_alert "Adding Extra KDE Package" "${BOARD}" "info" | ||
| do_with_retries 3 chroot_sdcard_apt_get_install plasma-workspace-wayland plasma-desktop plasma-systemmonitor plasma-nm kde-standard kde-spectacle kinfocenter kscreen krfb kfind filelight \ | ||
| dolphin clinfo vulkan-tools wayland-utils | ||
| fi | ||
|
|
||
| if [[ "${RELEASE}" == "noble" ]]; then | ||
| chroot_sdcard systemctl enable qbootctl.service | ||
| fi | ||
| chroot_sdcard systemctl enable bt-fixed-mac.service | ||
|
|
||
| # No driver support for suspend | ||
| chroot_sdcard systemctl mask suspend.target | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__qcom-robotics-rb5_bsp_firmware_in_initrd() { | ||
| display_alert "Adding to bsp-cli" "${BOARD}: firmware in initrd" "info" | ||
| declare file_added_to_bsp_destination # Will be filled in by add_file_from_stdin_to_bsp_destination | ||
| # Using Elish's firmware for now | ||
| add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/qcom-robotics-rb5-firmware" <<- 'FIRMWARE_HOOK' | ||
| #!/bin/bash | ||
| [[ "$1" == "prereqs" ]] && exit 0 | ||
| . /usr/share/initramfs-tools/hook-functions | ||
| for f in /lib/firmware/qcom/sm8250/Thundercomm/RB5/* ; do | ||
| add_firmware "${f#/lib/firmware/}" | ||
| done | ||
| add_firmware "qcom/sm8250/a650_zap.mbn" # Extra one for dpu | ||
| add_firmware "qcom/a650_sqe.fw" # Extra one for dpu | ||
| add_firmware "qcom/a650_gmu.bin" # Extra one for gpu | ||
| FIRMWARE_HOOK | ||
| run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.