Skip to content

[wip] Add support for booting u-boot + kernel/initrd/dtb FIT#2257

Draft
ricardosalveti wants to merge 10 commits into
qualcomm-linux:masterfrom
ricardosalveti:uboot-fit
Draft

[wip] Add support for booting u-boot + kernel/initrd/dtb FIT#2257
ricardosalveti wants to merge 10 commits into
qualcomm-linux:masterfrom
ricardosalveti:uboot-fit

Conversation

@ricardosalveti
Copy link
Copy Markdown
Contributor

Add support for loading U-Boot FIT images containing kernel+initrd+dtb instead of UKI.

Draft as it is still wip, created PR for wider validation.

Comment thread recipes-bsp/u-boot/u-boot-scr-qcom-fit.bb Outdated
Comment thread recipes-bsp/u-boot/u-boot-scr-qcom-fit.bb Outdated
Comment thread recipes-kernel/images/esp-qcom-fit-image.bb
@ricardosalveti ricardosalveti force-pushed the uboot-fit branch 5 times, most recently from 003bbfa to 08f890d Compare May 23, 2026 05:18
The Qualcomm U-Boot default environment currently jumps straight to
the EFI boot manager. This skips the standard bootflow scan used by
bootstd to discover boot scripts and other boot methods.

Patch the default environment to run bootflow scan -lb so FIT boot
scripts can be discovered while preserving EFI support through the
normal boot methods.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Define UBOOT_ENTRYPOINT for qcm6490 to the first available large DDR
region after UEFI so FIT image generation has a stable entrypoint,
which is required by kernel-fit-image.bbclass.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add a deployable U-Boot boot script for Qualcomm FIT image boot.
The script loads /fitImage from the boot partition discovered by
bootstd and boots it via bootm.

The kernel command line is composed from QCOM_BOOTIMG_ROOTFS,
KERNEL_CONSOLE, and KERNEL_CMDLINE_EXTRA (defaulting to empty so
machines can append extra arguments without breaking builds that
do not set it). Set PACKAGE_ARCH to MACHINE_ARCH since the compiled
script embeds machine-specific command line arguments.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add an EFI System Partition image for the U-Boot FIT boot flow. The
image populates its VFAT partition with only fitImage and boot.scr so
bootstd can discover and execute the boot script. When an initramfs-
bundled FIT (fitImage-<INITRAMFS_IMAGE_NAME>-<MACHINE>) is present it
is preferred over the plain fitImage.

The recipe is skipped when neither UBOOT_MACHINE nor UBOOT_CONFIG is
set, matching the same guard used by linux-yocto-fitimage, so world
builds on machines without U-Boot support skip it gracefully.

The recipe is also skipped when kernel-fit-extra-artifacts is absent
from KERNEL_CLASSES. linux-yocto-fitimage:do_compile requires linux.bin
and linux_comp in the kernel deploy directory, which are only produced
when that class is active.

Also introduce esp-qcom-common.inc with the shared VFAT and image
sizing settings common to all Qualcomm ESP images, so other images can
reuse the same settings and avoid duplication.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Use esp-qcom-common.inc for the shared ESP image configuration and
remove the duplicated VFAT, image sizing, and image feature settings
from esp-qcom-image.bb.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add kernel-fit-image.yml, a reusable kas fragment that switches a
Qualcomm build to the FIT-based U-Boot boot flow. It removes the
bootimg kernel class, enables kernel-fit-extra-artifacts to produce
the FIT binary, sets QCOM_ESP_IMAGE to esp-qcom-fit-image, and clears
EFI_PROVIDER since EFI boot is not needed in this flow.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add a CI build entry for rb3gen2-core-kit with linux-qcom-6.18 and
the u-boot-qcom FIT boot stack. The build composes
ci/linux-qcom-6.18.yml, ci/u-boot-qcom.yml, and
ci/kernel-fit-image.yml to validate the complete FIT image path,
from kernel build through U-Boot boot script generation to ESP image
packaging.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add UBOOT_CONFIG for qcs9100-ride-sx using qcom_lemans_defconfig,
which covers the Lemans/SA8775P SoC family shared with iq-9075-evk.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Define UBOOT_ENTRYPOINT for the qcs9100 SoC family at 0xb0800000,
the first available large DDR region after UEFI. The address is taken
from the Qualcomm memory configuration documentation:
https://docs.qualcomm.com/doc/80-80022-300/topic/memory_configurations.html

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Add a CI build entry for qcs9100-ride-sx with linux-qcom-6.18 and
the u-boot-qcom FIT boot stack, composing ci/linux-qcom-6.18.yml,
ci/u-boot-qcom.yml, and ci/kernel-fit-image.yml to validate the
complete FIT image path on the QCS9100 platform.

Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
@github-actions
Copy link
Copy Markdown

Test run workflow

Test jobs for commit e05aa35

qcom-distro
Pass: 271 | Fail: 2 | Total: 296
nodistro
Pass: 9 | Fail: 0 | Total: 9
qcom-distro_linux-qcom-6.18
Pass: 6 | Fail: 1 | Total: 7

@test-reporting-app
Copy link
Copy Markdown

Test Results

   67 files   -    36    354 suites   - 278   3h 21m 49s ⏱️ - 3h 26m 51s
  127 tests  -     2    121 ✅ +   21   0 💤 ± 0  6 ❌  - 23 
3 351 runs   - 2 657  3 322 ✅  - 2 604  23 💤  - 24  6 ❌  - 29 

For more details on these failures, see this check.

Results for commit e05aa35. ± Comparison against base commit c66b499.

This pull request removes 2 tests.
lava ‑ lava-test-retry
lava ‑ lava-test-shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants