Update Qcom RB5 Config

This commit is contained in:
FantasyGmm
2025-08-13 14:54:08 +08:00
committed by Igor
parent bf9b1368fe
commit dfb7c4fa6a

View File

@@ -7,21 +7,21 @@ declare -g KERNEL_TEST_TARGET="edge"
declare -g EXTRAWIFI="no" declare -g EXTRAWIFI="no"
declare -g BOOTCONFIG="none" declare -g BOOTCONFIG="none"
declare -g IMAGE_PARTITION_TABLE="gpt" declare -g IMAGE_PARTITION_TABLE="gpt"
# Reserve for ABL Boot
# declare -g BOOTIMG_CMDLINE_EXTRA="clk_ignore_unused pd_ignore_unused console=tty0 console=ttyMSM0,1500000n8 pcie_pme=nomsi panic=30 allow_mismatched_32bit_el0 mem_sleep_default=s2idle"
# declare -g -a ABL_DTB_LIST=("qrb5165-rb5") # declare -g -a ABL_DTB_LIST=("qrb5165-rb5")
# Use the full firmware, complete linux-firmware plus Armbian's (for qcom/a650_sqe.fw) # Use the full firmware, complete linux-firmware plus Armbian's (for qcom/a650_sqe.fw)
declare -g BOARD_FIRMWARE_INSTALL="-full" declare -g BOARD_FIRMWARE_INSTALL="-full"
declare -g SERIALCON="${SERIALCON:-tty1}" 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 GRUB_CMDLINE_LINUX_DEFAULT="clk_ignore_unused pd_ignore_unused console=tty0 arm64.nopauth efi=noruntime console=ttyMSM0,1500000n8 pcie_pme=nomsi panic=30 allow_mismatched_32bit_el0 mem_sleep_default=s2idle"
declare -g BOOT_FDT_FILE="qcom/qrb5165-rb5.dtb" declare -g BOOT_FDT_FILE="qcom/qrb5165-rb5.dtb"
declare -g UEFI_PART_ALIGN="4096" declare -g SECTOR_SIZE="4096"
enable_extension "grub" enable_extension "grub"
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place. enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.
function qcom-robotics-rb5_is_userspace_supported() { function qcom-robotics-rb5_is_userspace_supported() {
[[ "${RELEASE}" == "bookworm" ]] && return 0
[[ "${RELEASE}" == "jammy" ]] && return 0
[[ "${RELEASE}" == "noble" ]] && return 0 [[ "${RELEASE}" == "noble" ]] && return 0
[[ "${RELEASE}" == "trixie" ]] && return 0 [[ "${RELEASE}" == "trixie" ]] && return 0
return 1 return 1
@@ -37,11 +37,17 @@ function post_family_tweaks_bsp__qcom-robotics-rb5_add_services() {
display_alert "$BOARD" "Add services" "info" display_alert "$BOARD" "Add services" "info"
# Bluetooth MAC addr setup service # USB Gadget Network service
mkdir -p $destination/usr/local/bin/ mkdir -p $destination/usr/local/bin/
mkdir -p $destination/usr/lib/systemd/system/ mkdir -p $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.sh $destination/usr/local/bin/ mkdir -p $destination/etc/initramfs-tools/scripts/init-bottom/
install -Dm644 $SRC/packages/bsp/generate-bt-mac-addr/bt-fixed-mac.service $destination/usr/lib/systemd/system/ install -Dm655 $SRC/packages/bsp/usb-gadget-network/setup-usbgadget-network.sh $destination/usr/local/bin/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/remove-usbgadget-network.sh $destination/usr/local/bin/
install -Dm644 $SRC/packages/bsp/usb-gadget-network/usbgadget-rndis.service $destination/usr/lib/systemd/system/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/usb-gadget-initramfs-hook $destination/etc/initramfs-tools/hooks/usb-gadget
install -Dm655 $SRC/packages/bsp/usb-gadget-network/usb-gadget-initramfs-premount $destination/etc/initramfs-tools/scripts/init-premount/usb-gadget
install -Dm655 $SRC/packages/bsp/usb-gadget-network/dropbear $destination/etc/initramfs-tools/scripts/init-premount/
install -Dm655 $SRC/packages/bsp/usb-gadget-network/kill-dropbear $destination/etc/initramfs-tools/scripts/init-bottom/
} }
function post_family_tweaks__qcom-robotics-rb5_enable_services() { function post_family_tweaks__qcom-robotics-rb5_enable_services() {
@@ -53,8 +59,8 @@ function post_family_tweaks__qcom-robotics-rb5_enable_services() {
fi fi
display_alert "$BOARD" "Enable services" "info" display_alert "$BOARD" "Enable services" "info"
chroot_sdcard systemctl enable usbgadget-rndis.service
chroot_sdcard systemctl enable bt-fixed-mac.service
return 0 return 0
} }
@@ -66,33 +72,33 @@ function post_family_tweaks__qcom-robotics-rb5_extra_packages() {
return 0 return 0
fi fi
if [[ "${RELEASE}" == "jammy" ]] || [[ "${RELEASE}" == "noble" ]]; then if [[ "${RELEASE}" == "noble" ]]; then
display_alert "Adding qcom-mainline PPA" "${BOARD}" "info" do_with_retries 3 chroot_sdcard_apt_get_update
do_with_retries 3 chroot_sdcard_apt_get_install software-properties-common
fi
if [[ "${RELEASE}" == "noble" ]]; then
display_alert "Adding qcom-mainline PPA For" "${BOARD}" "info"
do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/qcom-mainline --yes --no-update do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/qcom-mainline --yes --no-update
fi fi
if [[ "${RELEASE}" == "noble" ]]; then # We need unudhcpd from armbian repo, so enable it
display_alert "Adding Mesa PPA For Ubuntu " "${BOARD}" "info" mv "${SDCARD}"/etc/apt/sources.list.d/armbian.sources.disabled "${SDCARD}"/etc/apt/sources.list.d/armbian.sources
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_update
do_with_retries 3 chroot_sdcard_apt_get_install vulkan-tools mesa-vulkan-drivers btop mtools zstd display_alert "Installing ${BOARD} tweaks" "warn"
do_with_retries 3 chroot_sdcard_apt_get_install vulkan-tools mesa-vulkan-drivers mtools zstd alsa-ucm-conf qbootctl qrtr-tools unudhcpd
if [[ "${RELEASE}" == "noble" ]]; then # disable armbian repo back
do_with_retries 3 chroot_sdcard_apt_get_install qbootctl mv "${SDCARD}"/etc/apt/sources.list.d/armbian.sources "${SDCARD}"/etc/apt/sources.list.d/armbian.sources.disabled
fi
if [[ "${DESKTOP_ENVIRONMENT}" == "kde-plasma" ]]; then if [[ "${DESKTOP_ENVIRONMENT}" == "kde-plasma" ]]; then
display_alert "Adding Extra KDE Package" "${BOARD}" "info" display_alert "Adding Extra KDE Package" "${BOARD}" "info"
do_with_retries 3 chroot_sdcard_apt_get_install plasma-workspace plasma-desktop plasma-systemmonitor plasma-nm kde-standard kde-spectacle kinfocenter kscreen krfb kfind filelight \ do_with_retries 3 chroot_sdcard_apt_get_install plasma-workspace plasma-desktop plasma-systemmonitor plasma-nm kde-standard kde-spectacle kinfocenter kscreen krfb kfind filelight \
dolphin clinfo vulkan-tools wayland-utils dolphin clinfo wayland-utils
fi fi
if [[ "${RELEASE}" == "noble" ]]; then if [[ "${RELEASE}" == "noble" ]]; then
chroot_sdcard systemctl enable qbootctl.service chroot_sdcard systemctl enable qbootctl.service
fi fi
chroot_sdcard systemctl enable bt-fixed-mac.service
# No driver support for suspend # No driver support for suspend
chroot_sdcard systemctl mask suspend.target chroot_sdcard systemctl mask suspend.target