-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add support for Arduino UNO Q (Qualcomm QRB2210) #9623
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
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1fa9329
add support for arduino-uno-q
chainsx 2eb5181
arduino-uno-q: fix boot with boot.scr and correct memory addresses
SuperKali 814661e
arduino-uno-q: update board and family config
SuperKali 80dee37
arduino-uno-q: fix image-output extension
SuperKali 978064a
arduino-uno-q: add first-boot rootfs resize for eMMC
SuperKali 0887daa
arduino-uno-q: update ath10k WiFi firmware to upstream
SuperKali 6382d33
arduino-uno-q: update kernel config for 6.19
SuperKali b889284
arduino-uno-q: revert board-2.bin to original version
SuperKali 7dfcc29
arduino-uno-q: move flash binaries to armbian/qcombin
SuperKali dd25460
arduino-uno-q: add BOARD_VENDOR
SuperKali 724c52d
arduino-uno-q: update qcombin path to Agatti/arduino-uno-q
SuperKali 5bbef3c
arduino-uno-q: move firmware to armbian/firmware, rename boot script
SuperKali 55f9c9e
arduino-uno-q: include prog_firehose_ddr.elf from Agatti root
SuperKali 1b022c7
arduino-uno-q: add qbootctl to prevent fastboot fallback
SuperKali 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,49 @@ | ||
| # Qualcomm QRB2210 4 core 2/4GB RAM SoC USB-C | ||
| BOARD_NAME="Arduino UNO Q" | ||
| BOARD_VENDOR="arduino" | ||
| BOARDFAMILY="qrb2210" | ||
| BOARD_MAINTAINER="" | ||
| KERNEL_TARGET="edge" | ||
| BOOTCONFIG="qcom_defconfig" | ||
| BOOT_FDT_FILE="qcom/qrb2210-arduino-imola.dtb" | ||
| SERIALCON="ttyMSM0" | ||
| BOOTFS_TYPE="fat" | ||
| BOOTSIZE="512" | ||
|
|
||
| function post_family_tweaks__arduino-uno-q() { | ||
| display_alert "Installing packages" "${BOARD}" "info" | ||
|
|
||
| # Install packages | ||
| do_with_retries 3 chroot_sdcard_apt_get_update | ||
| do_with_retries 3 chroot_sdcard_apt_get_install \ | ||
| rmtfs qrtr-tools protection-domain-mapper tqftpserv \ | ||
| bluetooth bluez gdisk adbd qbootctl | ||
|
|
||
| # ADB branding | ||
| chroot_sdcard sed -i 's/"Debian"/"Armbian"/' /usr/lib/android-sdk/platform-tools/adbd-usb-gadget | ||
| chroot_sdcard sed -i 's/"ADB device"/"Arduino UNO Q"/' /usr/lib/android-sdk/platform-tools/adbd-usb-gadget | ||
|
|
||
| # Enable services | ||
| chroot_sdcard systemctl enable adbd.service | ||
| chroot_sdcard systemctl enable qbootctl.service | ||
| chroot_sdcard systemctl enable armbian-resize-filesystem-qcom.service | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__arduino-uno-q_resize_rootfs() { | ||
| display_alert "Installing rootfs resize script" "${BOARD}" "info" | ||
| install -Dm755 "$SRC/packages/bsp/arduino/armbian-resize-filesystem-qcom" "$destination/usr/lib/armbian/armbian-resize-filesystem-qcom" | ||
| install -Dm644 "$SRC/packages/bsp/arduino/armbian-resize-filesystem-qcom.service" "$destination/usr/lib/systemd/system/armbian-resize-filesystem-qcom.service" | ||
| } | ||
|
|
||
| function post_family_tweaks_bsp__arduino-uno-q_bsp_firmware_in_initrd() { | ||
| display_alert "Adding to bsp-cli" "${BOARD}: firmware in initrd" "info" | ||
| declare file_added_to_bsp_destination | ||
| add_file_from_stdin_to_bsp_destination "/etc/initramfs-tools/hooks/initramfs-hook-qcm2290-fw" <<- 'FIRMWARE_HOOK' | ||
| #!/bin/bash | ||
| [[ "$1" == "prereqs" ]] && exit 0 | ||
| . /usr/share/initramfs-tools/hook-functions | ||
| add_firmware "qcom/qcm2290/a702_zap.mbn" | ||
| add_firmware "qcom/a702_sqe.fw" | ||
| 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| verbosity=1 | ||
| bootlogo=false | ||
| console=serial |
HeyMeco marked this conversation as resolved.
Show resolved
Hide resolved
|
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,75 @@ | ||
| # DO NOT EDIT THIS FILE | ||
| # | ||
| # Please edit /boot/armbianEnv.txt to set supported parameters | ||
| # | ||
|
|
||
| # Set load addresses for Qualcomm QRB2210 | ||
| # These must be set explicitly because ABL overwrites defaults at runtime | ||
| setenv kernel_addr_r "0xc0000000" | ||
| setenv fdt_addr_r "0xc3000000" | ||
| setenv ramdisk_addr_r "0xc4000000" | ||
| setenv load_addr "0xd4000000" | ||
| setenv overlay_error "false" | ||
|
|
||
| # Qualcomm eMMC device and boot partition (0x43 = GPT partition 67 "efi") | ||
| setenv devtype "mmc" | ||
| setenv devnum "0" | ||
| test -n "${distro_bootpart}" || setenv distro_bootpart "43" | ||
|
|
||
| # default values | ||
| setenv rootdev "/dev/mmcblk0p1" | ||
SuperKali marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| setenv verbosity "1" | ||
| setenv console "serial" | ||
| setenv bootlogo "false" | ||
| setenv rootfstype "ext4" | ||
| setenv docker_optimizations "on" | ||
|
|
||
| echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}" | ||
|
|
||
| if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then | ||
| load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt | ||
| env import -t ${load_addr} ${filesize} | ||
| fi | ||
|
|
||
| if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi | ||
| if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyMSM0,115200n8 ${consoleargs}"; fi | ||
| if test "${bootlogo}" = "true"; then | ||
| setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}" | ||
| else | ||
| setenv consoleargs "splash=verbose ${consoleargs}" | ||
| fi | ||
|
|
||
| # get PARTUUID of partition the boot script was loaded from | ||
| if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi | ||
|
|
||
| setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} clk_ignore_unused pd_ignore_unused audit=0 deferred_probe_timeout=30 ${extraargs} ${extraboardargs}" | ||
|
|
||
| if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"; fi | ||
|
|
||
| load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd | ||
| load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image | ||
|
|
||
| load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile} | ||
| fdt addr ${fdt_addr_r} | ||
| fdt resize 65536 | ||
| for overlay_file in ${overlays}; do | ||
| if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/qcom/overlay/${overlay_prefix}-${overlay_file}.dtbo; then | ||
| echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo" | ||
| fdt apply ${load_addr} || setenv overlay_error "true" | ||
| fi | ||
| done | ||
| for overlay_file in ${user_overlays}; do | ||
| if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then | ||
| echo "Applying user provided DT overlay ${overlay_file}.dtbo" | ||
| fdt apply ${load_addr} || setenv overlay_error "true" | ||
| fi | ||
| done | ||
| if test "${overlay_error}" = "true"; then | ||
| echo "Error applying DT overlays, restoring original DT" | ||
| load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile} | ||
| fi | ||
|
|
||
| booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} | ||
|
|
||
| # Recompile with: | ||
| # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr | ||
Oops, something went wrong.
Oops, something went wrong.
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.