software =
{
    version = "@@DISTRO_VERSION@@";
    @@MACHINE@@ = {
        hardware-compatibility: ["1.0"];
        stable = {
            copy0 = {
                images: (
                    {
                        filename = "@@PN@@-@@MACHINE@@.ext4.zst";
                        compressed = "zstd";
                        installed-directly = true;
                        # partlabel are stored inside the GPT partition table.
                        # The partition table is flashed only once and never updated
                        device = "/dev/disk/by-partlabel/rootfs0";
                        type = "raw";
                        sha256 = "$swupdate_get_sha256(@@PN@@-@@MACHINE@@.ext4.zst)";
                    }
                    # Don't remove the trailing whitspace on the next line otherwise
                    # it will not work due to a regex bug in meta-swupdate
                    $coreos_swupdate_extends(images) 
                );

                files: (
                    {
                        filename = "@@COREOS_KERNEL_FILENAME@@";
                        path = "/KERNEL.EFI";
                        device = "/dev/disk/by-partlabel/ebg0";
                        filesystem = "vfat";
                        sha256 = "$swupdate_get_sha256(@@COREOS_KERNEL_FILENAME@@)";
                    },
                    {
                        filename = "@@COREOS_EFIBOOTGUARD_FILENAME@@";
                        path = "@@EFIDIR@@/@@EFI_BOOT_IMAGE@@";
                        device = "/dev/disk/by-partlabel/efi";
                        filesystem = "vfat";
                        sha256 = "$swupdate_get_sha256(@@COREOS_EFIBOOTGUARD_FILENAME@@)";
                    }
                    # Don't remove the trailing whitspace on the next line otherwise
                    # it will not work due to a regex bug in meta-swupdate
                    $coreos_swupdate_extends(files) 
                );

                bootenv: (
                        {
                            name = "kernelparams";
                            value = "coreos.root=rootfs0";
                        },
                        {
                            name = "watchdog_timeout_sec";
                            value = "@@EFIBOOTGUARD_TIMEOUT@@";
                        },
                        {
                            name = "kernelfile";
                            value = "C:EBG0:KERNEL.EFI";

                        }
                        # Don't remove the trailing whitspace on the next line otherwise
                        # it will not work due to a regex bug in meta-swupdate
                        $coreos_swupdate_extends(bootenv) 
                );
            }

            copy1 = {
                images: (
                    {
                        filename = "@@PN@@-@@MACHINE@@.ext4.zst";
                        compressed = "zstd";
                        installed-directly = true;
                        # partlabel are stored inside the GPT partition table.
                        # The partition table is flashed only once and never updated
                        device = "/dev/disk/by-partlabel/rootfs1";
                        type = "raw";
                        sha256 = "$swupdate_get_sha256(@@PN@@-@@MACHINE@@.ext4.zst)";
                    }
                    # Don't remove the trailing whitspace on the next line otherwise
                    # it will not work due to a regex bug in meta-swupdate
                    $coreos_swupdate_extends(images) 
                );

                files: (
                    {
                        filename = "@@COREOS_KERNEL_FILENAME@@";
                        path = "/KERNEL.EFI";
                        device = "/dev/disk/by-partlabel/ebg1";
                        filesystem = "vfat";
                        sha256 = "$swupdate_get_sha256(@@COREOS_KERNEL_FILENAME@@)";
                    },
                    {
                        filename = "@@COREOS_EFIBOOTGUARD_FILENAME@@";
                        path = "@@EFIDIR@@/@@EFI_BOOT_IMAGE@@";
                        device = "/dev/disk/by-partlabel/efi";
                        filesystem = "vfat";
                        sha256 = "$swupdate_get_sha256(@@COREOS_EFIBOOTGUARD_FILENAME@@)";
                    }
                    # Don't remove the trailing whitspace on the next line otherwise
                    # it will not work due to a regex bug in meta-swupdate
                    $coreos_swupdate_extends(files) 
                );
                bootenv: (
                        {
                            name = "kernelparams";
                            value = "coreos.root=rootfs1";
                        },
                        {
                            name = "watchdog_timeout_sec";
                            value = "@@EFIBOOTGUARD_TIMEOUT@@";
                        },
                        {
                            name = "kernelfile";
                            value = "C:EBG1:KERNEL.EFI";

                        }
                        # Don't remove the trailing whitspace on the next line otherwise
                        # it will not work due to a regex bug in meta-swupdate
                        $coreos_swupdate_extends(bootenv) 
                );
            }
        }
    }
}
