Working minimal image build for Radxa Dragon Q6A.#32
Working minimal image build for Radxa Dragon Q6A.#32lumag merged 5 commits intoqualcomm-linux:mainfrom
Conversation
|
Thanks for the contribution, we will need to break this down in a series of patches in order to get this merged, please split the changes into logical chunks, like adding the machine conf, kas files, kernel changes etc. For the kernel we might just need a fragment for your hardware (or missing features). We will need to get this working with master in order to be able to merge. |
|
Hi @ricardosalveti, Thank you for the review. How shall we split into chunks?
|
|
Pleae use the same PR and force psuh to the same branch with
That right, start from the begining and you will add everything again but in small chunks. In the end you will have the same code but spread in more commits. Take this #16 as reference. |
|
Thank you for the feedback! I have pushed the changes and verified the build with qcom-minimal-image. Please let me know if any modifications are needed. |
|
|
||
| FILES:${PN} = "${nonarch_base_libdir}/firmware/qcom/qcs6490/radxa/dragon-q6a" | ||
|
|
||
| RDEPENDS:${PN} = "packagegroup-rb3gen2-hexagon-dsp-binaries" No newline at end of file |
There was a problem hiding this comment.
There is a separate set of Hexagon packages for Radxa Q6A
| systemd-networkd \ | ||
| btop \ | ||
| " | ||
| BAD_RECOMMENDATIONS:remove = "systemd-networkd" No newline at end of file |
There was a problem hiding this comment.
Why? It's not mentioned in the commit message.
| dropbear \ | ||
| openssh-sftp-server \ | ||
| systemd-networkd \ | ||
| btop \ |
There was a problem hiding this comment.
Could you please sort the lists? It would make it easier to extend them later.
|
|
||
| require conf/machine/include/qcom-qcs6490.inc | ||
|
|
||
| MACHINE_FEATURES += "efi pci wifi bluetooth" |
There was a problem hiding this comment.
"wifi" and "bluetooth" are already set in qcom-common.inc.
| MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ | ||
| packagegroup-qcom-boot-essential \ | ||
| packagegroup-machine-essential-qcom-qcs6490-soc \ | ||
| packagegroup-rb3gen2-firmware \ |
There was a problem hiding this comment.
Please add Radxa-specific packagegroups using firmware and DSP binaries for Q6A.
|
Thank you for your feedback, I have made all the changes you have suggested and tested the build locally. |
| FILESEXTRAPATHS:prepend:radxa-dragon-q6a := "${THISDIR}/radxa-dragon-q6a:" | ||
|
|
||
| SRC_URI:append:radxa-dragon-q6a = " \ | ||
| file://realtek-eth-8169.cfg \ |
There was a problem hiding this comment.
Here you will probably only need the realtek-eth-8169.cfg.
There was a problem hiding this comment.
How are the other two configs applied? Or are they applied by default?
There was a problem hiding this comment.
The other two are present in defconfig.
There was a problem hiding this comment.
In linux-qcom-next these configs are available as part of the tree, see https://github.com/qualcomm-linux/kernel/tree/qcom-next/arch/arm64/configs
There was a problem hiding this comment.
Is the defconfig generic to arm64, qcom or the SoC?
There was a problem hiding this comment.
defconfig is generic to arm64, but here we also have an additional qcom.config that is specific to add additional qcom related drivers and hardware.
This additional config is enabled via KBUILD_CONFIG_EXTRA:append:aarch64 = " ${S}/arch/arm64/configs/qcom.config" in linux-qcom-next.
There was a problem hiding this comment.
We would then still need qcom-qcm6490.cfg, right?
There was a problem hiding this comment.
They are all in defconfig there:
rsalveti@evatuf:~/projects/kernel/linux/arch/arm64/configs$ grep 7280 *
defconfig:CONFIG_PINCTRL_SC7280=y
defconfig:CONFIG_PINCTRL_SC7280_LPASS_LPI=m
defconfig:CONFIG_SND_SOC_SC7280=m
defconfig:CONFIG_SC_CAMCC_7280=m
defconfig:CONFIG_SC_DISPCC_7280=m
defconfig:CONFIG_SC_GCC_7280=y
defconfig:CONFIG_SC_GPUCC_7280=m
defconfig:CONFIG_SC_LPASS_CORECC_7280=m
defconfig:CONFIG_SC_VIDEOCC_7280=m
defconfig:CONFIG_INTERCONNECT_QCOM_SC7280=y
rsalveti@evatuf:~/projects/kernel/linux/arch/arm64/configs$ grep QCOM_USB *
defconfig:CONFIG_REGULATOR_QCOM_USB_VBUS=m
defconfig:CONFIG_PHY_QCOM_USB_HS=m
defconfig:CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=m
defconfig:CONFIG_PHY_QCOM_USB_HS_28NM=m
defconfig:CONFIG_PHY_QCOM_USB_SS=m
rsalveti@evatuf:~/projects/kernel/linux/arch/arm64/configs$ grep USB_DWC3 *
defconfig:CONFIG_USB_DWC3=y
So not required.
There was a problem hiding this comment.
Nice, got it.
I had to remove it when I initially tested with the mainline kernel.
KBUILD_CONFIG_EXTRA:remove:aarch64 = " ${S}/arch/arm64/configs/prune.config"
KBUILD_CONFIG_EXTRA:remove:aarch64 = " ${S}/arch/arm64/configs/qcom.config"
38ae845 to
7ebe39b
Compare
|
Looking better, can you please add a commit message (with body, not just subject) to every commit you have, justifying the change? |
Add board-specific packagegroup for the Radxa Dragon Q6A. Firmware packages: - GPU: Adreno A660 (conditional on opencl/opengl/vulkan) - HDMI bridge: Lontium LT9611UXC - Audio DSP: qcs6490-radxa-dragon-q6a-audio - Compute DSP: qcs6490-radxa-dragon-q6a-compute - QUP serial engine: qcm6490-qupv3fw - Camera ISP: camxfirmware-kodiak - Video encoder/decoder: VPU Hexagon DSP binaries: - ADSP: hexagon-dsp-binaries-radxa-dragon-q6a-adsp - CDSP: hexagon-dsp-binaries-radxa-dragon-q6a-cdsp These use board-specific firmware paths under qcom/qcs6490/radxa/dragon-q6a/ as the UEFI patches the device tree at boot to redirect firmware loading to these paths. Signed-off-by: Navin Reddy <navinreddy23@gmail.com>
Add kernel config fragment and bbappend for the Radxa Dragon Q6A. The Realtek RTL8168 ethernet controller is connected via PCIe and requires CONFIG_R8169 and related PHY/MDIO configs to be enabled. The fragment is applied only for the radxa-dragon-q6a machine via the FILESEXTRAPATHS and SRC_URI machine overrides. Signed-off-by: Navin Reddy <navinreddy23@gmail.com>
Add machine configuration for the Radxa Dragon Q6A (QCS6490). The Dragon Q6A uses a split boot model where firmware lives on SPI NOR and the OS on SD/NVMe/UFS. All boot firmware variables are blanked as the SPI NOR contents are managed by Radxa independently. As Radxa provides the firmware binaries and the edl-ng tool supports SPI NOR flashing, qcomflash integration could be added in the future to produce a single flashable package for both firmware and OS. The image is produced as a GPT disk image with an EFI System Partition (systemd-boot + UKI) and an ext4 rootfs using the standard efi-uki-bootdisk WKS template. Key configuration decisions: - KERNEL_DEVICETREE set to the mainline DTS (merged in Linux 6.19) - PREFERRED_PROVIDER_virtual/kernel set to linux-qcom-next - EFI_PROVIDER is systemd-boot (from qcom-common.inc) - No U-Boot, no FIT image, no qcomflash partition layout - Firmware packagegroups use board-specific Radxa packages instead of the RB3gen2 equivalents Signed-off-by: Navin Reddy <navinreddy23@gmail.com>
Add KAS build configuration for the Radxa Dragon Q6A. Includes the
base configuration from ci/base.yml which provides layer setup,
mirrors, and build settings.
The machine is set to radxa-dragon-q6a, matching the machine
configuration added in the previous commit. Additional KAS fragments
for distro, image targets, and kernel providers can be chained on
the command line. For example:
kas build meta-qcom-3rdparty/ci/radxa-dragon-q6a.yml:\
meta-qcom-3rdparty/ci/qcom-distro.yml:\
meta-qcom-3rdparty/ci/radxa-dragon-q6a-minimal-image.yml
The minimal-image fragment is kept out of the repo as it contains
user-specific settings (passwords, extra packages, local overrides)
and is not covered by CI.
Signed-off-by: Navin Reddy <navinreddy23@gmail.com>
Add radxa-dragon-q6a to the CI build matrix. Signed-off-by: Navin Reddy <navinreddy23@gmail.com>
|
@ricardosalveti |
Thanks, approved for CI, now we wait :-) |
Exciting! Thank you for the feedback, it's been fun to work on this PR. |
|
We will need something similar to qualcomm-linux/meta-qcom@3fe8ee9, but for You can fix via a local bbappend to unblock the build here, but please send this change to meta-qcom as well. |
@ricardosalveti I have tested the build with the changes and it works. Something I noticed is that the boot times are much longer. I have compared the configs after boot and looks like some of the modules are "y" when the default config is used. When we include the configs in the meta layer, then most of them are "m" modules. Although it does not affect the functionality, it would be nice to boot as fast as possible :) |
|
@ricardosalveti I have also made PR for the above message. |
|
You can drop the bbappend now that the change was merged in meta-qcom. |
Hm, unclear from the diff, can you try to change the config until you get the fast behavior so we can isolate the config responsible for this different behavior? Then we can even propose to qcom.config. |
Shall we do this as another PR? I do not have access to the device until Tuesday. |
That can be done at a follow up. Both images built fine now. |
|
Failures are uno-q specific, not related to this PR. |
| @@ -0,0 +1,10 @@ | |||
| CONFIG_NET_SELFTESTS=y | |||
| CONFIG_R8169=y | |||
There was a problem hiding this comment.
I've created a PR to stop disabling R8169 (REALTEK_PHY is already removed from prune.config). Once those are merged and reach qcom-next, we should be able to drop this .config fragment (note: they are still going to be enabled as modules).
There was a problem hiding this comment.
... and once corresponding qcom-next lands in meta-qcom...
There was a problem hiding this comment.
That should be okay if the driver is available as module for Dragon Q6A as the Ethernet is connected via PCIe bus.
quaresmajose
left a comment
There was a problem hiding this comment.
LGTM, thank you very much for your contribution.
|
Thank you all for the review and feedback! |
Please note that the layer compat is modified to work with stable sources that are in https://github.com/qualcomm-linux/meta-qcom-releases/tree/main. To use the release build a lock file has been created. Without this file, the build fails due to missing file paths when a patch is applied.
Use
kas build meta-qcom-3rdparty/ci/radxa-dragon-q6a-minimal-image.ymlto build the image.whinlattershould be removed when the build with master branch ofmeta-qcomsucceeds.