Repository navigation
fastboot: add image profiles, rootfs_ref ramdisk resolution, and SpacemiT K3 support - #3285
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
19723f7 to
95fc0d7
Compare
|
|
||
| {% macro prepare(kernel, dtb, ramdisk, firmware=none) -%} | ||
| {% set append_dtb = fastboot_boot_image_format|default('android-header-dtb') == 'appended-dtb' %} | ||
| {% set cmdline = fastboot_kernel_cmdline|default('console=ttyMSM0,115200n8 earlycon qcom_geni_serial.con_enabled=1 mem_sleep_default=s2idle mitigations=auto video=efifb:off') %} |
There was a problem hiding this comment.
Thanks @docularxu for fixing default cmdline! No behaviour change for existing android device now.
- {% set cmdline = fastboot_kernel_cmdline|default('console=ttyMSM0,115200n8 earlycon root=/dev/ram rw rootwait rdinit=/sbin/init ignore_loglevel clk_ignore_unused pd_ignore_unused fw_devlink=off no_console_suspend kernel.sched_pelt_multiplier=4 mem_sleep_default=s2idle mitigations=auto video=efifb:off') %}
+ {% set cmdline = fastboot_kernel_cmdline|default('console=ttyMSM0,115200n8 earlycon qcom_geni_serial.con_enabled=1 mem_sleep_default=s2idle mitigations=auto video=efifb:off') %}
|
The generated env_k3.txt sets ramdisk_addr, but K3 U-Boot’s loadramdisk command reads ramdisk_addr_r. The stock address happens to match 0x130000000, masking the typo. Use the runtime Jinja environment in the fastboot test — runtime/init.py:133-133 Group shlex with the standard-library imports. Blank line before shlex places it in third-party imports and will cause lint to fail. |
Register a shellquote Jinja filter backed by shlex.quote so image profiles can safely pass artifact filenames and command lines to shell commands. Provide _get_jinja2_environment on Runtime so tests can exercise the configured filter setup. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Add boot_deploy_timeout to the total job timeout while retaining the existing 15-minute default. This allows K3 downloads and bootfs preparation to receive a larger budget without changing other platforms. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Move image packaging and deploy labels into pluggable image profiles and keep downloads, workload overlays, deploy and boot actions in the shared template. Resolve the ramdisk from the node artifact, the rootfs_ref-provided ramdisk URL, or a rootfs root directory, and fail explicitly when none is set. Rootfs URLs are supplied by the configuration layer, and kbuild nodes render without a ramdisk artifact. Keep modules optional, add the kselftest overlay only for kselftest workloads, preserve the Qualcomm command line and timeout defaults in the android profile, and accept both buildroot and Debian login prompts. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Guodong Xu <guodong.xu@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Package a staged payload into an ext4 image with metadata headroom and partition-capacity checks. Allow callers to select filesystem features and verify the resulting image with e2fsck. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Package versioned kernel, initramfs, DTB and env_k3.txt files into bootfs.ext4. Validate the initramfs entry point, partition capacity and firmware load limits, relocating the DTB for large ramdisks. Select bootfs flashing and host-side boot handling so the device dictionary can run its bounded fastboot continue command. Keep firmware assumptions and the K3 download/deploy timeouts within this profile. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
Add the opt-in kselftest_shallow_clone setting to both LAVA selftest templates. Select the master branch without a pinned revision and omit Git history from the overlay. TESTPROG_URL is unchanged and already prefers the xz archive with gzip fallback. Signed-off-by: Yogesh Lal <yogesh.lal@oss.qualcomm.com> Co-developed-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Xinzheng Long <xinzheng.long@oss.qualcomm.com> Signed-off-by: Ze Huang <ze.huang@oss.qualcomm.com>
|
Thanks @nuclearcat for the review :) I have addressed the comments in the updated series:
Before: steps:
- "\n\n\nKERNEL=Image.gz\nDTB=k3-pico-itx.dtb\n..."After: steps:
- KERNEL=Image.gz
- DTB=k3-pico-itx.dtb
|
Summary
Modernize the fastboot LAVA path and add SpacemiT K3 support: image profiles, rootfs_ref-based ramdisk resolution, bounded ext4 images, a spacemit-k3 profile, shell quoting, and buildroot/Debian prompts.
Changes
shellquoteJinja filter backed byshlex.quote.boot_deploy_timeoutin the total job timeout, default 15.fastboot/profiles/*.jinja2; the defaultandroidprofile keeps existing behaviour.node.artifacts.ramdisk, thenparams.ramdisk(rootfs_ref), thenparams.ramdiskroot + '/rootfs.cpio.gz', and fail explicitly otherwise. Rootfs URLs are supplied by the configuration layer.spacemit-k3bootfs profile.kselftest_shallow_cloneoverlay setting./ #,~ #androot@[^:]+:~#.Behaviour change
Fastboot jobs must supply a ramdisk through a node artifact or
rootfs_ref; the template now fails explicitly instead of rendering an empty ramdisk URL. Node artifacts take precedence overrootfs_ref.Dependencies
Required by the kernelci-pipeline K3 change; merge this first because the pipeline jobs depend on
shellquoteand thespacemit-k3profile.