ci/lava: Fix cmdline for UART/fastboot devices
Fastboot devices need an indirection for creating a boot image via `mkbootimg`, so we need to propagate the cmdline from LAVA and our extra arguments to it properly. This commit fixes it by retrieving the default cmdline from LAVA and sending it, together with the `extra_nfsroot_args` to the `mkbootimg` command. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29611>
This commit is contained in:

committed by
Marge Bot

parent
eead805919
commit
41dd1c52b1
@@ -34,6 +34,10 @@ class LAVAJobDefinition:
|
||||
|
||||
def __init__(self, job_submitter: "LAVAJobSubmitter") -> None:
|
||||
self.job_submitter: "LAVAJobSubmitter" = job_submitter
|
||||
# NFS args provided by LAVA
|
||||
self.lava_nfs_args: str = "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3 ip=dhcp"
|
||||
# extra_nfsroot_args appends to cmdline
|
||||
self.extra_nfsroot_args: str = " init=/init rootwait usbcore.quirks=0bda:8153:k"
|
||||
|
||||
def has_ssh_support(self) -> bool:
|
||||
if FORCE_UART:
|
||||
@@ -57,11 +61,11 @@ class LAVAJobDefinition:
|
||||
actions for the LAVA job submission.
|
||||
"""
|
||||
args = self.job_submitter
|
||||
values = self.generate_metadata()
|
||||
nfsrootfs = {
|
||||
"url": f"{args.rootfs_url_prefix}/lava-rootfs.tar.zst",
|
||||
"compression": "zstd",
|
||||
}
|
||||
values = self.generate_metadata()
|
||||
|
||||
init_stage1_steps = self.init_stage1_steps()
|
||||
artifact_download_steps = self.artifact_download_steps()
|
||||
@@ -122,7 +126,7 @@ class LAVAJobDefinition:
|
||||
"device_type": self.job_submitter.device_type,
|
||||
"visibility": {"group": [self.job_submitter.visibility_group]},
|
||||
"priority": JOB_PRIORITY,
|
||||
"context": {"extra_nfsroot_args": " init=/init rootwait usbcore.quirks=0bda:8153:k"},
|
||||
"context": {"extra_nfsroot_args": self.extra_nfsroot_args},
|
||||
"timeouts": {
|
||||
"job": {"minutes": self.job_submitter.job_timeout_min},
|
||||
"actions": {
|
||||
|
@@ -18,6 +18,7 @@ def fastboot_deploy_actions(
|
||||
job_definition: "LAVAJobDefinition", nfsrootfs
|
||||
) -> tuple[dict[str, Any], ...]:
|
||||
args = job_definition.job_submitter
|
||||
cmdline = f"{job_definition.lava_nfs_args}{job_definition.extra_nfsroot_args}"
|
||||
fastboot_deploy_nfs = {
|
||||
"timeout": {"minutes": 10},
|
||||
"to": "nfs",
|
||||
@@ -39,7 +40,7 @@ def fastboot_deploy_actions(
|
||||
"steps": [
|
||||
f"cat Image.gz {args.dtb_filename}.dtb > Image.gz+dtb",
|
||||
"mkbootimg --kernel Image.gz+dtb"
|
||||
+ ' --cmdline "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard rootwait ip=dhcp init=/init"'
|
||||
+ f' --cmdline "{cmdline}"'
|
||||
+ " --pagesize 4096 --base 0x80000000 -o boot.img",
|
||||
],
|
||||
}
|
||||
|
Reference in New Issue
Block a user