Skip to content

fastboot: keep the android profile's default kernel command line unchanged - #1

Closed
docularxu wants to merge 7 commits into
Sutter099:mainfrom
docularxu:fastboot-android-cmdline
Closed

docularxu wants to merge 7 commits into
Sutter099:mainfrom
docularxu:fastboot-android-cmdline

Conversation

@docularxu

Copy link
Copy Markdown

Fix for a review finding on kernelci#3285, sent against this fork's main so that merging it here updates the upstream PR directly.

Problem

The new fastboot/profiles/android.jinja2 replaces the kernel command line that boot/fastboot.jinja2 hardcoded on main with a different default: it drops qcom_geni_serial.con_enabled=1 and adds 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.

No platform in kernelci-pipeline sets fastboot_image_profile or fastboot_kernel_cmdline, so all nine existing fastboot platforms (dragonboard-410c, dragonboard-820c, exynos850-e850-96, gs101-oriole, kaanapali-qrd, sm8350-hdk, hamoa-crd, mahua-crd, purwa-crd) silently pick up the new string, while the PR description says the default android profile keeps existing behaviour.

Verified by rendering baseline-arm64-qualcomm and kselftest-arm64-ramdisk for kaanapali-qrd with the real job generator against a mainline arm64 build, once on upstream main and once with kernelci#3285 applied: the mkbootimg --cmdline argument differs exactly as described above.

Fix

Keep the profile's default byte-identical to the string on main. The fastboot_kernel_cmdline override stays, so platforms that want the extended command line can opt in from kernelci-pipeline with one param per platform, in a change that names them.

With this commit the rendered kaanapali-qrd jobs match main again except for the PR's intended changes (gunzip step written differently, extra root@[^:]+:~# prompt). The K3 job is unaffected since it uses the spacemit-k3 profile.

🤖 Generated with Claude Code

https://claude.ai/code/session_017z48zes3YPSVLb2Kz6petY

yogeshlal and others added 7 commits November 25, 2026 16:15
Register a shellquote Jinja filter backed by shlex.quote so image profiles
can safely pass artifact filenames and command lines to shell commands.

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: 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>
…anged

The android profile replaced the command line that boot/fastboot.jinja2 used
to hardcode with a new default that drops qcom_geni_serial.con_enabled=1 and
adds 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.  No platform sets fastboot_image_profile or
fastboot_kernel_cmdline today, so every existing fastboot platform
(dragonboard-410c, dragonboard-820c, exynos850-e850-96, gs101-oriole,
kaanapali-qrd, sm8350-hdk, hamoa-crd, mahua-crd, purwa-crd) would silently
boot with the new string.

Restore the previous command line as the profile default so the generated
LAVA jobs for those platforms are unchanged by the profile refactoring.
Platforms that want the extended command line can opt in by setting
fastboot_kernel_cmdline in their params, in a separate kernelci-pipeline
change that names them.

Verified by rendering baseline-arm64-qualcomm and kselftest-arm64-ramdisk
for kaanapali-qrd against a mainline arm64 build: with this commit the
mkbootimg --cmdline argument is identical to the one produced by main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017z48zes3YPSVLb2Kz6petY
Signed-off-by: Guodong Xu <docular.xu@gmail.com>
@Sutter099
Sutter099 force-pushed the main branch 2 times, most recently from 19723f7 to 95fc0d7 Compare December 1, 2026 07:12
@Sutter099

Copy link
Copy Markdown
Owner

Merged, thanks!

@Sutter099 Sutter099 closed this Dec 1, 2026
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.

3 participants