# URLs to our kernel rootfs to boot from, both generated by the base
# container build
- deploy = {
+
+ nfsrootfs = {
+ "url": f"{args.rootfs_url_prefix}/lava-rootfs.tar.zst",
+ "compression": "zstd",
+ }
+
+ fastboot_deploy_nfs = {
"timeout": {"minutes": 10},
+ "to": "nfs",
+ "nfsrootfs": nfsrootfs,
+ }
+
+ fastboot_deploy_prepare = {
+ "timeout": {"minutes": 5},
+ "to": "downloads",
+ "os": "oe",
+ "images": {
+ "kernel": {
+ "url": f"{args.kernel_url_prefix}/{args.kernel_image_name}",
+ },
+ },
+ "postprocess": {
+ "docker": {
+ "image": "registry.gitlab.collabora.com/lava/health-check-docker",
+ "steps": [
+ 'gzip Image',
+ "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"' +
+ " --pagesize 4096 --base 0x80000000 -o boot.img",
+ ],
+ },
+ }
+ }
+ if args.kernel_image_type:
+ fastboot_deploy_prepare["images"]["kernel"]["type"] = args.kernel_image_type
+ if args.dtb_filename:
+ fastboot_deploy_prepare["images"]["dtb"] = {"url": f"{args.kernel_url_prefix}/{args.dtb_filename}.dtb"}
+
+ tftp_deploy = {
+ "timeout": {"minutes": 5},
"to": "tftp",
"os": "oe",
- "kernel": {"url": f"{args.kernel_url_prefix}/{args.kernel_image_name}"},
- "nfsrootfs": {
- "url": f"{args.rootfs_url_prefix}/lava-rootfs.tar.zst",
- "compression": "zstd",
+ "kernel": {
+ "url": f"{args.kernel_url_prefix}/{args.kernel_image_name}",
},
+ "nfsrootfs": nfsrootfs,
}
if args.kernel_image_type:
- deploy["kernel"]["type"] = args.kernel_image_type
+ tftp_deploy["kernel"]["type"] = args.kernel_image_type
if args.dtb_filename:
- deploy["dtb"] = {"url": f"{args.kernel_url_prefix}/{args.dtb_filename}.dtb"}
+ tftp_deploy["dtb"] = {"url": f"{args.kernel_url_prefix}/{args.dtb_filename}.dtb"}
+
+ fastboot_deploy = {
+ "timeout": {"minutes": 2},
+ "to": "fastboot",
+ "docker": {
+ "image": "registry.gitlab.collabora.com/lava/health-check-docker",
+ },
+ "images": {
+ "boot": {"url": "downloads://boot.img"},
+ },
+ }
+
+ fastboot_boot = {
+ "timeout": {"minutes": 2},
+ "docker": {"image": "registry.gitlab.collabora.com/lava/health-check-docker"},
+ "failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
+ "method": args.boot_method,
+ "prompts": ["lava-shell:"],
+ "commands": ["set_active a"]
+ }
- # always boot over NFS
- boot = {
+ tftp_boot = {
"failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"method": args.boot_method,
- "commands": "nfs",
"prompts": ["lava-shell:"],
+ "commands": "nfs"
}
# skeleton test definition: only declaring each job as a single 'test'
f"lava-test-case 'mesa-ci_{args.mesa_job_name}' --shell /init-stage2.sh",
]
- values["actions"] = [
- {"deploy": deploy},
- {"boot": boot},
- {"test": test},
- ]
+ if args.boot_method == "fastboot":
+ values["actions"] = [
+ {"deploy": fastboot_deploy_nfs},
+ {"deploy": fastboot_deploy_prepare},
+ {"deploy": fastboot_deploy},
+ {"boot": fastboot_boot},
+ {"test": test},
+ ]
+ else: # tftp
+ values["actions"] = [
+ {"deploy": tftp_deploy},
+ {"boot": tftp_boot},
+ {"test": test},
+ ]
return values