Skip to content

Commit 06072c6

Browse files
committed
Update RB5 Config,Fix CI Build Fail
1 parent 0b14d56 commit 06072c6

File tree

1 file changed

+125
-0
lines changed

1 file changed

+125
-0
lines changed
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Qualcomm Robotics RB5 QCS8250 Octa-core,8GB LPDDR4X/5,128GB UFS3.1,WiFi6
2+
declare -g BOARD_NAME="Qualcomm Robotics RB5"
3+
declare -g BOARD_MAINTAINER="FantasyGmm"
4+
declare -g BOARDFAMILY="sm8250"
5+
declare -g KERNEL_TARGET="current,edge"
6+
declare -g KERNEL_TEST_TARGET="edge"
7+
declare -g EXTRAWIFI="no"
8+
declare -g BOOTCONFIG="none"
9+
declare -g IMAGE_PARTITION_TABLE="gpt"
10+
# Reserve for ABL Boot
11+
# 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"
12+
# declare -g -a ABL_DTB_LIST=("qrb5165-rb5")
13+
14+
# Use the full firmware, complete linux-firmware plus Armbian's (for qcom/a650_sqe.fw)
15+
declare -g BOARD_FIRMWARE_INSTALL="-full"
16+
17+
declare -g SERIALCON="${SERIALCON:-tty1}"
18+
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"
19+
declare -g BOOT_FDT_FILE="qcom/qrb5165-rb5.dtb"
20+
declare -g SECTOR_SIZE="4096"
21+
enable_extension "grub"
22+
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.
23+
24+
function qcom_robotics_rb5_is_userspace_supported() {
25+
[[ "${RELEASE}" == "noble" ]] && return 0
26+
[[ "${RELEASE}" == "trixie" ]] && return 0
27+
return 1
28+
}
29+
30+
function post_family_tweaks_bsp__qcom_robotics_rb5_firmware() {
31+
if ! qcom_robotics_rb5_is_userspace_supported; then
32+
if [[ "${RELEASE}" != "" ]]; then
33+
display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn"
34+
fi
35+
return 0
36+
fi
37+
38+
display_alert "$BOARD" "Add services" "info"
39+
40+
# USB Gadget Network service
41+
mkdir -p $destination/usr/local/bin/
42+
mkdir -p $destination/usr/lib/systemd/system/
43+
mkdir -p $destination/etc/initramfs-tools/scripts/init-bottom/
44+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/setup-usbgadget-network.sh $destination/usr/local/bin/
45+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/remove-usbgadget-network.sh $destination/usr/local/bin/
46+
install -Dm644 $SRC/packages/bsp/usb-gadget-network/usbgadget-rndis.service $destination/usr/lib/systemd/system/
47+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/usb-gadget-initramfs-hook $destination/etc/initramfs-tools/hooks/usb-gadget
48+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/usb-gadget-initramfs-premount $destination/etc/initramfs-tools/scripts/init-premount/usb-gadget
49+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/dropbear $destination/etc/initramfs-tools/scripts/init-premount/
50+
install -Dm655 $SRC/packages/bsp/usb-gadget-network/kill-dropbear $destination/etc/initramfs-tools/scripts/init-bottom/
51+
}
52+
53+
function post_family_tweaks__qcom_robotics_rb5_enable_services() {
54+
if ! qcom_robotics_rb5_is_userspace_supported; then
55+
if [[ "${RELEASE}" != "" ]]; then
56+
display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn"
57+
fi
58+
return 0
59+
fi
60+
61+
display_alert "$BOARD" "Enable services" "info"
62+
chroot_sdcard systemctl enable usbgadget-rndis.service
63+
64+
return 0
65+
}
66+
67+
function post_family_tweaks__qcom_robotics_rb5_extra_packages() {
68+
if ! qcom_robotics_rb5_is_userspace_supported; then
69+
if [[ "${RELEASE}" != "" ]]; then
70+
display_alert "Missing userspace for ${BOARD}" "${RELEASE} does not have the userspace necessary to support the ${BOARD}" "warn"
71+
fi
72+
return 0
73+
fi
74+
75+
if [[ "${RELEASE}" == "noble" ]]; then
76+
do_with_retries 3 chroot_sdcard_apt_get_update
77+
do_with_retries 3 chroot_sdcard_apt_get_install software-properties-common
78+
fi
79+
80+
if [[ "${RELEASE}" == "noble" ]]; then
81+
display_alert "Adding qcom-mainline PPA For" "${BOARD}" "info"
82+
do_with_retries 3 chroot_sdcard add-apt-repository ppa:liujianfeng1994/qcom-mainline --yes --no-update
83+
fi
84+
85+
# We need unudhcpd from armbian repo, so enable it
86+
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.sources.disabled "${SDCARD}"/etc/apt/sources.list.d/armbian.sources
87+
do_with_retries 3 chroot_sdcard_apt_get_update
88+
display_alert "Installing ${BOARD} tweaks" "warn"
89+
do_with_retries 3 chroot_sdcard_apt_get_install vulkan-tools mesa-vulkan-drivers mtools zstd alsa-ucm-conf qrtr-tools unudhcpd
90+
# disable armbian repo back
91+
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.sources "${SDCARD}"/etc/apt/sources.list.d/armbian.sources.disabled
92+
93+
if [[ "${DESKTOP_ENVIRONMENT}" == "kde-plasma" ]]; then
94+
display_alert "Adding Extra KDE Package" "${BOARD}" "info"
95+
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 \
96+
dolphin clinfo wayland-utils
97+
fi
98+
99+
if [[ "${RELEASE}" == "noble" ]]; then
100+
do_with_retries 3 chroot_sdcard_apt_get_install qbootctl
101+
chroot_sdcard systemctl enable qbootctl.service
102+
fi
103+
104+
# No driver support for suspend
105+
chroot_sdcard systemctl mask suspend.target
106+
}
107+
108+
function post_family_tweaks_bsp__qcom_robotics_rb5_bsp_firmware_in_initrd() {
109+
display_alert "Adding to bsp-cli" "${BOARD}: firmware in initrd" "info"
110+
declare file_added_to_bsp_destination # Will be filled in by add_file_from_stdin_to_bsp_destination
111+
# Using Elish's firmware for now
112+
add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/qcom-robotics-rb5-firmware" <<- 'FIRMWARE_HOOK'
113+
#!/bin/bash
114+
[[ "$1" == "prereqs" ]] && exit 0
115+
. /usr/share/initramfs-tools/hook-functions
116+
for f in /lib/firmware/qcom/sm8250/Thundercomm/RB5/* ; do
117+
add_firmware "${f#/lib/firmware/}"
118+
done
119+
# Add extra firmware from both possible locations
120+
for fw in "qcom/sm8250/a650_zap.mbn" "qcom/a650_sqe.fw" "qcom/a650_gmu.bin"; do
121+
add_firmware "$fw"
122+
done
123+
FIRMWARE_HOOK
124+
run_host_command_logged chmod -v +x "${file_added_to_bsp_destination}"
125+
}

0 commit comments

Comments
 (0)